Version Description
: June 14th, 2018 = * fixed : when margins and paddings are not defined ( number field emptied ), no related CSS properties should be printed. * fixed : sek-sektion-inner should not have a padding of 15px on front. * fixed : a nested sektion should reset its parent column padding. * fixed : empty sektions wrapper should only be printed when customizing. * fixed : prevent element in the wp content to be displayed out of the wp-content-wrapper when previewing. * fixed : dynamic CSS can be printed twice : inline and enqueued as CSS file when user logged in.
=
Download this release
Release Info
Developer | nikeo |
Plugin | Nimble Page Builder |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- assets/czr/sek/css/sek-preview.css +14 -1
- assets/czr/sek/css/sek-preview.min.css +1 -1
- assets/czr/sek/js/ccat-sek-control.js +12 -2
- assets/czr/sek/js/ccat-sek-control.min.js +1 -1
- assets/front/css/sek-base.css +8 -4
- assets/front/css/sek-base.min.css +1 -1
- inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.js +85 -83
- inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.min.js +1 -1
- inc/czr-base-fmk/assets/js/_1_ccat_czr-theme-fmk.js +1 -1
- inc/czr-base-fmk/assets/js/_1_ccat_czr-theme-fmk.min.js +1 -1
- inc/czr-base-fmk/assets/js/czr-preview-base.js +203 -210
- inc/czr-base-fmk/assets/js/czr-preview-base.min.js +1 -1
- inc/czr-base-fmk/czr-base-fmk.php +13 -19
- inc/czr-skope/index.php +11 -0
- inc/sektions/ccat-sektions.php +26 -17
- nimble-builder.php +2 -2
- readme.txt +16 -11
assets/czr/sek/css/sek-preview.css
CHANGED
@@ -7,6 +7,12 @@
|
|
7 |
position: relative;/* <= Needed for the placement of the ui icons container revealed on hover */
|
8 |
}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
.sek-column {
|
11 |
position: relative;
|
12 |
padding: 23px 10px 0;/* <= Needed for the placement of the ui icons container revealed on hover */
|
@@ -44,7 +50,6 @@
|
|
44 |
|
45 |
|
46 |
|
47 |
-
|
48 |
/* PREVIEW UI BLOCKS */
|
49 |
.sek-dyn-ui-wrapper {
|
50 |
display: none;
|
@@ -292,6 +297,14 @@
|
|
292 |
cursor: pointer;
|
293 |
position: relative;
|
294 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
.sek-wp-content-wrapper:hover {
|
296 |
outline: 2px dashed #036697;
|
297 |
}
|
7 |
position: relative;/* <= Needed for the placement of the ui icons container revealed on hover */
|
8 |
}
|
9 |
|
10 |
+
/* only when previewing */
|
11 |
+
/* @fixed since https://github.com/presscustomizr/nimble-builder/issues/24 */
|
12 |
+
.sek-sektion-inner{
|
13 |
+
padding: 15px;/* <= Needed for the placement of the ui icons container revealed on hover */
|
14 |
+
}
|
15 |
+
|
16 |
.sek-column {
|
17 |
position: relative;
|
18 |
padding: 23px 10px 0;/* <= Needed for the placement of the ui icons container revealed on hover */
|
50 |
|
51 |
|
52 |
|
|
|
53 |
/* PREVIEW UI BLOCKS */
|
54 |
.sek-dyn-ui-wrapper {
|
55 |
display: none;
|
297 |
cursor: pointer;
|
298 |
position: relative;
|
299 |
}
|
300 |
+
/* prevent element in the wp content to be displayed out of the wp-content-wrapper when previewing
|
301 |
+
@fixes https://github.com/presscustomizr/nimble-builder/issues/29
|
302 |
+
*/
|
303 |
+
.sek-wp-content-wrapper:after {
|
304 |
+
content: '';
|
305 |
+
display: block;
|
306 |
+
clear: both;
|
307 |
+
}
|
308 |
.sek-wp-content-wrapper:hover {
|
309 |
outline: 2px dashed #036697;
|
310 |
}
|
assets/czr/sek/css/sek-preview.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.sektion-wrapper{min-height:50px}.sek-section{padding:23px 0 0;position:relative}.sek-column{position:relative;padding:23px 10px 0}.sek-section h2{color:#000}.sek-column h3{color:#00f}.sek-column-inner.sek-empty-col{min-height:100px;height:100%}.sek-module{position:relative}.sek-module-inner{position:relative}.sek-module h4{color:red}.sek-dyn-ui-wrapper{display:none;position:absolute;bottom:0;left:0;top:0;right:0;color:#fff;background:rgba(190,239,255,0);border-radius:4px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important}.sek-dyn-ui-wrapper,.sek-dyn-ui-wrapper *{text-shadow:none;-webkit-touch-callout:none}.sek-dyn-ui-inner{position:absolute;top:-18px;opacity:.8;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.sek-dyn-left-icons{left:0}.sek-dyn-right-icons{right:0}.sek-dyn-ui-inner:hover{opacity:1}.sek-dyn-ui-wrapper-active{position:relative}.sek-dyn-ui-icons{background:#00a0d2;float:left;min-height:18px;margin:-1px -1px 0;padding:0 4px;text-shadow:none;font-size:1em}.sek-dyn-ui-icons>span{display:block;float:left}.sek-dyn-ui-icons i{color:#fff!important;cursor:pointer;float:left;font-size:1em;height:1.4em;line-height:1.4em;opacity:.8;text-align:center;width:1em}.sek-dyn-left-icons .sek-dyn-ui-icons i{margin:0 .3em}.sek-dyn-ui-icons i:hover{opacity:1}.sek-dyn-ui-icons .fa-ellipsis-v{cursor:move}.sek-dyn-ui-icons [data-sek-click-on=remove]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-icons [data-sek-click-on=pick-module]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-location-type{position:absolute;z-index:2;bottom:0;padding:0 1em;font-size:.6em;right:0;cursor:pointer}.sek-col-10 .sek-module-dyn-ui,.sek-col-10>.sek-column-dyn-ui,.sek-col-11 .sek-module-dyn-ui,.sek-col-11>.sek-column-dyn-ui,.sek-col-12 .sek-module-dyn-ui,.sek-col-12>.sek-column-dyn-ui,.sek-col-14 .sek-module-dyn-ui,.sek-col-14>.sek-column-dyn-ui,.sek-col-16 .sek-module-dyn-ui,.sek-col-16>.sek-column-dyn-ui,.sek-col-20 .sek-module-dyn-ui,.sek-col-20>.sek-column-dyn-ui,.sek-col-25 .sek-module-dyn-ui,.sek-col-25>.sek-column-dyn-ui,.sek-col-8 .sek-module-dyn-ui,.sek-col-8>.sek-column-dyn-ui,.sek-col-9 .sek-module-dyn-ui,.sek-col-9>.sek-column-dyn-ui{font-size:.7rem}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#000}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1000}.sek-section[data-sek-is-nested=true]>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1002}.sek-section-dyn-ui{border:2px dotted #000}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{top:0;z-index:1000}.sek-section.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,0,0,.8);box-shadow:0 0 2px rgba(0,0,0,.8)}.sek-column>.sek-column-dyn-ui .sek-dyn-ui-inner{top:0;z-index:1001}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#00b846}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1001}.sek-column-dyn-ui{border:2px dotted #00b846;font-size:1rem}.sek-column-dyn-ui .dev-level-data{background:#0085ba}.sek-column.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,184,70,.8);box-shadow:0 0 2px rgba(0,184,70,.8)}.sek-module{min-height:50px}.sek-module:hover{cursor:pointer}.sek-module>.sek-module-dyn-ui .sek-dyn-ui-inner{top:0;z-index:1005}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#0085ba}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:0;right:auto;z-index:1005}.sek-module-dyn-ui{border:1px dotted #0085ba;font-size:1rem}.dev-level-data{position:absolute;bottom:0;left:0;background:#000;padding:1px 12px;font-size:11px}.sek-module-dyn-ui .dev-level-data{background:#c68f00;right:0;left:unset}.sek-module.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,133,186,.8);box-shadow:0 0 2px rgba(0,133,186,.8)}.sek-wp-content-wrapper{cursor:pointer;position:relative}.sek-wp-content-wrapper:hover{outline:2px dashed #036697}.sek-wp-content-wrapper>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:auto;right:0;z-index:1005;background:#036697}.sek-wp-content-wrapper .sek-dyn-ui-icons{background-color:#036697}.sek-wp-content-wrapper .sek-dyn-ui-inner{top:0;z-index:1005}.sek-wp-content-dyn-ui{bottom:0;left:0;top:0;right:0;font-size:1rem}.sek-empty-location-placeholder{position:relative;min-height:50px;margin:20px 0;border-radius:5px}.sek-empty-location-placeholder:hover{border:2px dotted #000}.sek-add-button-wrapper{text-align:center;width:100%;margin:1rem 0;position:relative}.sek-no-modules-column{position:relative;height:100%;bottom:0;left:0;right:0;z-index:1}.sek-module-drop-zone-for-first-module{text-align:center;border:1px dotted #ccc;background:#eee;background:rgba(238,238,238,.84);height:100%;min-height:40px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:-webkit-box;display:flex}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]{cursor:pointer;width:50px;height:50px;color:#0085ba;color:rgba(0,133,186,.6);border-radius:30px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]:hover{-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);color:#0085ba}.sek-col-10 [data-sek-click-on=pick-module],.sek-col-11 [data-sek-click-on=pick-module],.sek-col-12 [data-sek-click-on=pick-module],.sek-col-14 [data-sek-click-on=pick-module],.sek-col-16 [data-sek-click-on=pick-module],.sek-col-20 [data-sek-click-on=pick-module],.sek-col-25 [data-sek-click-on=pick-module],.sek-col-8 [data-sek-click-on=pick-module],.sek-col-9 [data-sek-click-on=pick-module]{font-size:.9rem}.sek-dragging .sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]{display:none}.sek-sortable-overing>.sek-no-modules-column{display:none}.sek-drop-zone{-webkit-transition:opacity,height .4s ease;-o-transition:opacity,height .4s ease;transition:opacity,height .4s ease}.sek-active-drop-zone.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]{display:none}.sek-dynamic-drop-zone{opacity:0}.sek-active-drop-zone.sek-dynamic-drop-zone{height:auto!important;min-height:50px}.sek-dragging .sek-dynamic-drop-zone{height:5px;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;border:2px dotted #72777c;background:#ddd;border-radius:5px}.sek-dragging [data-sek-location=between-sections],.sek-dragging [data-sek-location=in-empty-location]{background:#ddd;border:2px dotted #72777c}.sek-dragging .sek-drag-is-approaching.sek-dynamic-drop-zone{height:20px}.sek-dragging .sek-drag-is-close.sek-dynamic-drop-zone{height:55px}.sek-dragging .sek-drag-is-very-close.sek-dynamic-drop-zone{height:75px}.sek-dragging .sek-module-drop-zone-for-first-module,.sek-dragging [data-sek-location=between-modules-and-nested-sections]{background:#dcefff;background:rgba(220,239,255,.84);border:2px dotted #1d85bb;border-radius:5px}.sek-dragging-element .sek-column-inner,.sek-dragging-element .sek-sektion-inner{min-height:50px}.sek-module-placeholder-content{text-align:center;text-transform:uppercase}.sek-module-placeholder-content>p{padding:35px 10px}.sek-add-content-button{position:absolute;top:0;width:100%;z-index:1001;display:none}.sek-empty-location-placeholder .sek-add-content-button{top:50%}.sek-add-content-button.is_last{bottom:0;top:unset}.sek-add-content-button-wrapper{position:relative;top:-5px;width:100%;border:1px dashed #ccc;height:10px;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:.35s ease-in-out;-o-transition:.35s ease-in-out;transition:.35s ease-in-out}.is_last .sek-add-content-button-wrapper{top:10px}.sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed #333}.sek-mouse-is-close .sek-add-content-button-wrapper .sek-add-content-btn{opacity:1}.sek-add-content-btn{margin:auto;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1000px;width:18px;height:18px;background-color:#000;color:#fff;border:none;outline:0;font-size:13px;overflow:hidden;-webkit-transition:width .5s ease,background-color .5s ease;-o-transition:width .5s ease,background-color .5s ease;transition:width .5s ease,background-color .5s ease;font-weight:400;font-style:normal;cursor:pointer;position:absolute;left:calc(50% - 12px);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;opacity:0}.sek-add-content-btn.sek-mouse-is-close{z-index:10000}.sek-add-content-btn:hover{width:26px;height:26px;--sek-add-content-btn-width:65px;width:calc(var(--sek-add-content-btn-width) + 70px);background-color:#000;opacity:1;left:calc(50% - 83px);-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2)}.sek-click-on-button-icon{font-size:19px;left:4px;top:-4px;position:relative}.sek-add-content-btn:hover .sek-click-on-button-icon{font-size:19px;left:8px;top:0}.action-button-text{visibility:hidden;white-space:nowrap;padding-left:14px;padding-bottom:2px}.sek-add-content-btn:not(.disabled):hover .action-button-text{visibility:visible}.sortable-placeholder{max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#00a2d7;border-radius:4px;color:#fff!important;display:block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;-o-text-overflow:ellipsis;text-overflow:ellipsis;text-shadow:none;text-transform:none;white-space:nowrap;overflow:hidden;z-index:10}.in-new-sektion.sortable-placeholder{background:#72777c}.sek-moving-section [data-sek-level=location]{background:#ddd;border:2px dotted #72777c;border-radius:5px}.sek-moving-section .sek-empty-location-placeholder{display:none}.sek-sortable-section-over .sortable-placeholder{background:#72777c}.ui-resizable-helper{border:2px dotted #00b846}[data-sek-level=column] .ui-resizable-e{cursor:e-resize;width:7px;right:-4px;font-size:.55em}[data-sek-level=column] .ui-resizable-e i{background:#00b846;border-radius:12px;color:#fff;padding:2px;display:none}[data-sek-level=section]:hover .ui-resizable-e{background:#d5d5d573;background:rgba(213,213,213,.42)}[data-sek-level=section]:hover .ui-resizable-e i{display:block}[data-sek-level=column] .ui-resizable-handle{display:-webkit-box;display:-ms-flexbox;display:flex;height:calc(100% - 26px);top:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module [data-sek-input-type=tiny_mce_editor]:hover{outline:1px solid #1d85bb}.sek-refreshing{-webkit-filter:blur(1px);filter:blur(1px)}.sek-level-clone{position:absolute!important;z-index:10000}.sek-level-clone::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;opacity:.5}@-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}
|
1 |
+
.sektion-wrapper{min-height:50px}.sek-section{padding:23px 0 0;position:relative}.sek-sektion-inner{padding:15px}.sek-column{position:relative;padding:23px 10px 0}.sek-section h2{color:#000}.sek-column h3{color:#00f}.sek-column-inner.sek-empty-col{min-height:100px;height:100%}.sek-module{position:relative}.sek-module-inner{position:relative}.sek-module h4{color:red}.sek-dyn-ui-wrapper{display:none;position:absolute;bottom:0;left:0;top:0;right:0;color:#fff;background:rgba(190,239,255,0);border-radius:4px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important}.sek-dyn-ui-wrapper,.sek-dyn-ui-wrapper *{text-shadow:none;-webkit-touch-callout:none}.sek-dyn-ui-inner{position:absolute;top:-18px;opacity:.8;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.sek-dyn-left-icons{left:0}.sek-dyn-right-icons{right:0}.sek-dyn-ui-inner:hover{opacity:1}.sek-dyn-ui-wrapper-active{position:relative}.sek-dyn-ui-icons{background:#00a0d2;float:left;min-height:18px;margin:-1px -1px 0;padding:0 4px;text-shadow:none;font-size:1em}.sek-dyn-ui-icons>span{display:block;float:left}.sek-dyn-ui-icons i{color:#fff!important;cursor:pointer;float:left;font-size:1em;height:1.4em;line-height:1.4em;opacity:.8;text-align:center;width:1em}.sek-dyn-left-icons .sek-dyn-ui-icons i{margin:0 .3em}.sek-dyn-ui-icons i:hover{opacity:1}.sek-dyn-ui-icons .fa-ellipsis-v{cursor:move}.sek-dyn-ui-icons [data-sek-click-on=remove]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-icons [data-sek-click-on=pick-module]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-location-type{position:absolute;z-index:2;bottom:0;padding:0 1em;font-size:.6em;right:0;cursor:pointer}.sek-col-10 .sek-module-dyn-ui,.sek-col-10>.sek-column-dyn-ui,.sek-col-11 .sek-module-dyn-ui,.sek-col-11>.sek-column-dyn-ui,.sek-col-12 .sek-module-dyn-ui,.sek-col-12>.sek-column-dyn-ui,.sek-col-14 .sek-module-dyn-ui,.sek-col-14>.sek-column-dyn-ui,.sek-col-16 .sek-module-dyn-ui,.sek-col-16>.sek-column-dyn-ui,.sek-col-20 .sek-module-dyn-ui,.sek-col-20>.sek-column-dyn-ui,.sek-col-25 .sek-module-dyn-ui,.sek-col-25>.sek-column-dyn-ui,.sek-col-8 .sek-module-dyn-ui,.sek-col-8>.sek-column-dyn-ui,.sek-col-9 .sek-module-dyn-ui,.sek-col-9>.sek-column-dyn-ui{font-size:.7rem}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#000}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1000}.sek-section[data-sek-is-nested=true]>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1002}.sek-section-dyn-ui{border:2px dotted #000}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{top:0;z-index:1000}.sek-section.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,0,0,.8);box-shadow:0 0 2px rgba(0,0,0,.8)}.sek-column>.sek-column-dyn-ui .sek-dyn-ui-inner{top:0;z-index:1001}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#00b846}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1001}.sek-column-dyn-ui{border:2px dotted #00b846;font-size:1rem}.sek-column-dyn-ui .dev-level-data{background:#0085ba}.sek-column.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,184,70,.8);box-shadow:0 0 2px rgba(0,184,70,.8)}.sek-module{min-height:50px}.sek-module:hover{cursor:pointer}.sek-module>.sek-module-dyn-ui .sek-dyn-ui-inner{top:0;z-index:1005}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#0085ba}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:0;right:auto;z-index:1005}.sek-module-dyn-ui{border:1px dotted #0085ba;font-size:1rem}.dev-level-data{position:absolute;bottom:0;left:0;background:#000;padding:1px 12px;font-size:11px}.sek-module-dyn-ui .dev-level-data{background:#c68f00;right:0;left:unset}.sek-module.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,133,186,.8);box-shadow:0 0 2px rgba(0,133,186,.8)}.sek-wp-content-wrapper{cursor:pointer;position:relative}.sek-wp-content-wrapper:after{content:'';display:block;clear:both}.sek-wp-content-wrapper:hover{outline:2px dashed #036697}.sek-wp-content-wrapper>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:auto;right:0;z-index:1005;background:#036697}.sek-wp-content-wrapper .sek-dyn-ui-icons{background-color:#036697}.sek-wp-content-wrapper .sek-dyn-ui-inner{top:0;z-index:1005}.sek-wp-content-dyn-ui{bottom:0;left:0;top:0;right:0;font-size:1rem}.sek-empty-location-placeholder{position:relative;min-height:50px;margin:20px 0;border-radius:5px}.sek-empty-location-placeholder:hover{border:2px dotted #000}.sek-add-button-wrapper{text-align:center;width:100%;margin:1rem 0;position:relative}.sek-no-modules-column{position:relative;height:100%;bottom:0;left:0;right:0;z-index:1}.sek-module-drop-zone-for-first-module{text-align:center;border:1px dotted #ccc;background:#eee;background:rgba(238,238,238,.84);height:100%;min-height:40px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:-webkit-box;display:flex}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]{cursor:pointer;width:50px;height:50px;color:#0085ba;color:rgba(0,133,186,.6);border-radius:30px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]:hover{-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);color:#0085ba}.sek-col-10 [data-sek-click-on=pick-module],.sek-col-11 [data-sek-click-on=pick-module],.sek-col-12 [data-sek-click-on=pick-module],.sek-col-14 [data-sek-click-on=pick-module],.sek-col-16 [data-sek-click-on=pick-module],.sek-col-20 [data-sek-click-on=pick-module],.sek-col-25 [data-sek-click-on=pick-module],.sek-col-8 [data-sek-click-on=pick-module],.sek-col-9 [data-sek-click-on=pick-module]{font-size:.9rem}.sek-dragging .sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]{display:none}.sek-sortable-overing>.sek-no-modules-column{display:none}.sek-drop-zone{-webkit-transition:opacity,height .4s ease;-o-transition:opacity,height .4s ease;transition:opacity,height .4s ease}.sek-active-drop-zone.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-module]{display:none}.sek-dynamic-drop-zone{opacity:0}.sek-active-drop-zone.sek-dynamic-drop-zone{height:auto!important;min-height:50px}.sek-dragging .sek-dynamic-drop-zone{height:5px;-webkit-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease;border:2px dotted #72777c;background:#ddd;border-radius:5px}.sek-dragging [data-sek-location=between-sections],.sek-dragging [data-sek-location=in-empty-location]{background:#ddd;border:2px dotted #72777c}.sek-dragging .sek-drag-is-approaching.sek-dynamic-drop-zone{height:20px}.sek-dragging .sek-drag-is-close.sek-dynamic-drop-zone{height:55px}.sek-dragging .sek-drag-is-very-close.sek-dynamic-drop-zone{height:75px}.sek-dragging .sek-module-drop-zone-for-first-module,.sek-dragging [data-sek-location=between-modules-and-nested-sections]{background:#dcefff;background:rgba(220,239,255,.84);border:2px dotted #1d85bb;border-radius:5px}.sek-dragging-element .sek-column-inner,.sek-dragging-element .sek-sektion-inner{min-height:50px}.sek-module-placeholder-content{text-align:center;text-transform:uppercase}.sek-module-placeholder-content>p{padding:35px 10px}.sek-add-content-button{position:absolute;top:0;width:100%;z-index:1001;display:none}.sek-empty-location-placeholder .sek-add-content-button{top:50%}.sek-add-content-button.is_last{bottom:0;top:unset}.sek-add-content-button-wrapper{position:relative;top:-5px;width:100%;border:1px dashed #ccc;height:10px;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:.35s ease-in-out;-o-transition:.35s ease-in-out;transition:.35s ease-in-out}.is_last .sek-add-content-button-wrapper{top:10px}.sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed #333}.sek-mouse-is-close .sek-add-content-button-wrapper .sek-add-content-btn{opacity:1}.sek-add-content-btn{margin:auto;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1000px;width:18px;height:18px;background-color:#000;color:#fff;border:none;outline:0;font-size:13px;overflow:hidden;-webkit-transition:width .5s ease,background-color .5s ease;-o-transition:width .5s ease,background-color .5s ease;transition:width .5s ease,background-color .5s ease;font-weight:400;font-style:normal;cursor:pointer;position:absolute;left:calc(50% - 12px);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;opacity:0}.sek-add-content-btn.sek-mouse-is-close{z-index:10000}.sek-add-content-btn:hover{width:26px;height:26px;--sek-add-content-btn-width:65px;width:calc(var(--sek-add-content-btn-width) + 70px);background-color:#000;opacity:1;left:calc(50% - 83px);-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2)}.sek-click-on-button-icon{font-size:19px;left:4px;top:-4px;position:relative}.sek-add-content-btn:hover .sek-click-on-button-icon{font-size:19px;left:8px;top:0}.action-button-text{visibility:hidden;white-space:nowrap;padding-left:14px;padding-bottom:2px}.sek-add-content-btn:not(.disabled):hover .action-button-text{visibility:visible}.sortable-placeholder{max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#00a2d7;border-radius:4px;color:#fff!important;display:block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;-o-text-overflow:ellipsis;text-overflow:ellipsis;text-shadow:none;text-transform:none;white-space:nowrap;overflow:hidden;z-index:10}.in-new-sektion.sortable-placeholder{background:#72777c}.sek-moving-section [data-sek-level=location]{background:#ddd;border:2px dotted #72777c;border-radius:5px}.sek-moving-section .sek-empty-location-placeholder{display:none}.sek-sortable-section-over .sortable-placeholder{background:#72777c}.ui-resizable-helper{border:2px dotted #00b846}[data-sek-level=column] .ui-resizable-e{cursor:e-resize;width:7px;right:-4px;font-size:.55em}[data-sek-level=column] .ui-resizable-e i{background:#00b846;border-radius:12px;color:#fff;padding:2px;display:none}[data-sek-level=section]:hover .ui-resizable-e{background:#d5d5d573;background:rgba(213,213,213,.42)}[data-sek-level=section]:hover .ui-resizable-e i{display:block}[data-sek-level=column] .ui-resizable-handle{display:-webkit-box;display:-ms-flexbox;display:flex;height:calc(100% - 26px);top:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module [data-sek-input-type=tiny_mce_editor]:hover{outline:1px solid #1d85bb}.sek-refreshing{-webkit-filter:blur(1px);filter:blur(1px)}.sek-level-clone{position:absolute!important;z-index:10000}.sek-level-clone::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;opacity:.5}@-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}
|
assets/czr/sek/js/ccat-sek-control.js
CHANGED
@@ -3947,8 +3947,18 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
3947 |
// Listen to user actions on the inputs and set the input value
|
3948 |
$wrapper.on( 'keyup mouseup change', 'input[type="number"]', function(evt) {
|
3949 |
var _type_ = $(this).closest('[data-sek-spacing]').data('sek-spacing'),
|
3950 |
-
_newInputVal = $.extend( true, {}, _.isObject( input() ) ? input() : {} )
|
3951 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3952 |
input( _newInputVal );
|
3953 |
});
|
3954 |
// Schedule a reset action
|
3947 |
// Listen to user actions on the inputs and set the input value
|
3948 |
$wrapper.on( 'keyup mouseup change', 'input[type="number"]', function(evt) {
|
3949 |
var _type_ = $(this).closest('[data-sek-spacing]').data('sek-spacing'),
|
3950 |
+
_newInputVal = $.extend( true, {}, _.isObject( input() ) ? input() : {} ),
|
3951 |
+
_rawVal = $(this).val();
|
3952 |
+
|
3953 |
+
// Validates
|
3954 |
+
// @fixes https://github.com/presscustomizr/nimble-builder/issues/26
|
3955 |
+
if ( ( _.isString( _rawVal ) && ! _.isEmpty( _rawVal ) ) || _.isNumber( _rawVal ) ) {
|
3956 |
+
_newInputVal[ _type_ ] = _rawVal;
|
3957 |
+
} else {
|
3958 |
+
// this allow users to reset a given padding / margin instead of reseting them all at once with the "reset all spacing" option
|
3959 |
+
_newInputVal = _.omit( _type_, _newInputVal );
|
3960 |
+
}
|
3961 |
+
|
3962 |
input( _newInputVal );
|
3963 |
});
|
3964 |
// Schedule a reset action
|
assets/czr/sek/js/ccat-sek-control.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var CZRSeksPrototype=CZRSeksPrototype||{};!function(o,n){n.extend(CZRSeksPrototype,{initialize:function(){var i=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(o.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");i.MAX_NUMBER_OF_COLUMNS=12,i.SETTING_UPDATE_BUFFER=50,i.defaultSektionSettingValue=sektionsLocalizedData.defaultSektionSettingValue,i.sekCollectionSettingId=new o.Value({}),i.registered=new o.Value([]),o.bind("ready",function(){i.registerAndSetupDefaultPanelSectionOptions(),i.sekCollectionSettingId.callbacks.add(function(e,t){try{i.setupSettingToBeSaved()}catch(e){o.errare("Error in self.sekCollectionSettingId.callbacks => self.setupSettingsToBeSaved()",e)}}),_.isEmpty(o.czr_activeSkopes().local)||i.setContextualCollectionSettingIdWhenSkopeSet(),o.czr_activeSkopes.callbacks.add(function(e,t){i.setContextualCollectionSettingIdWhenSkopeSet(e,t)}),i.reactToPreviewMsg(),i.setupDnd(),i.setupTinyMceEditor(),i.schedulePrintSectionJson(),i.bind("sek-ui-removed",function(){o.previewedDevice("desktop")}),o.previewedDevice.bind(function(t){var e=_.filter(i.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){o.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){n(this).trigger("click")})})})}),n("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){i.resetCollectionSetting()}),i.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&o.control(e.id,function(e){e.container.find("[draggable]").each(function(){n(this).off("dragstart dragend")})}),"control"==e.what&&o.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(n(this).data("select2"))||n(this).select2("destroy")})})})})},registerAndSetupDefaultPanelSectionOptions:function(){var e=o.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});o.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg",'"/>'].join(""));if(0<e.length){e.on("click",function(e){o.previewer.trigger("sek-pick-module")});var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}})}),this.register({what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:1e3,constructWith:e,track:!1})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){!_.isEmpty(t.local)&&o.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&o.previewer.trigger("sek-pick-module"),sektionsData=o.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&o.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&o.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&o.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.sekCollectionSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,c){c.extend(CZRSeksPrototype,{setupSettingToBeSaved:function(){var e,t=this;e=s.czr_skopeBase.getSkopeProperty("sektions","local").db_values;var i=t.sekCollectionSettingId();if(_.isEmpty(i))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!s.has(i)){t.register({what:"setting",id:i,value:t.validateSettingValue(_.isObject(e)?e:t.defaultSektionSettingValue),transport:"postMessage",type:"option",track:!1});sektionsLocalizedData.isDevMode&&s(i,function(e){e.bind(function(e,t,i){s.infoLog("sektionSettingValue is updated",{newValue:e,previousValue:t,params:i})})})}},validateSettingValue:function(i){if(!_.isObject(i))return s.errare("validation error => the setting should be an object",i),null;var n={},o=!1,e=[],r=function(e){s.errare(e,i),s.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks the Nimble builder, you might try to reset the sections for this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),o=!0},a=function(t){if(!o)if(_.isUndefined(t)&&_.isEmpty(n)){if(t=c.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void r("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void r('validation error => the root level should not have a "level" or an "id" property');_.each(i.collection,function(e){n=t,a(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void r("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void r("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void r("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void r('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void r("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void r("validation error => missing collection property for level => "+t.level+" "+t.id);switch(t.level){case"location":if(!_.isEmpty(n.level))return void r("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=n.level)return void r("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=n.level)return void r("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=n.level)return void r("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=n.level)return void r("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){n=c.extend(!0,{},t),a(e)})}};return a(),o?null:i},resetCollectionSetting:function(){var e=this;if(_.isEmpty(e.sekCollectionSettingId()))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");s(e.sekCollectionSettingId())(e.defaultSektionSettingValue),s.previewer.refresh(),s.notifications.remove("sek-notify"),s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.Notification("sek-reset-done",{type:"success",message:sektionsLocalizedData.i18n["Reset complete"],dismissible:!0})),_.delay(function(){s.notifications.remove("sek-reset-done")},5e3)})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},a={},s=!0,e={"sek-add-section":{callback:function(e){return s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-module",{}),c.previewer.send("sek-focus-on",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-module",{})}},"sek-add-module":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.send("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-module",{}),o.updateAPISetting({action:"sek-update-fonts"}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-duplicate":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}c.previewer.send("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),c.previewer.send("sek-focus-on",{id:e.apiParams.id})}},"sek-resize-columns":function(e){return s=!0,a={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.send("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-pick-module":function(e){return s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered},o.generateUI(a)},"sek-pick-section":function(e){return s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:"section",was_triggered:!_.has(e,"was_triggered")||e.was_triggered},o.generateUI(a)},"sek-edit-options":function(e){return s=!0,r={},_.isEmpty(e.id)?l.Deferred(function(){this.reject("missing id")}):(a={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a))},"sek-edit-module":function(e){return s=!0,r={},a={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a)},"sek-notify":function(t){return s=!1,l.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification("sek-notify",{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove("sek-notify")},t.duration||5e3)}),this.resolve()})},"sek-refresh-level":function(e){return s=!0,l.Deferred(function(){r={action:"sek-refresh-level",level:e.level,id:e.id},a={},this.resolve()})}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){s?c.previewer.send(n,{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:a,cloneId:!_.isEmpty(e)&&e}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:a}),o.trigger([n,"done"].join("_"),t)}).fail(function(t){c.errare("reactToPreviewMsg => error when firing "+n,t),c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification("sek-react-to-preview",{type:"info",message:t,dismissible:!0})),_.delay(function(){c.notifications.remove("sek-react-to-preview")},5e3)})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this,n=function(e){return e.id="",_.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&n(e)}),e};c.previewer.bind("sek-to-json",function(e){var t=l.extend(!0,{},i.getLevelModel(e.id));!function(e){w=400,h=300;var t=_.isUndefined(window.screenLeft)?window.screenX:window.screenLeft,i=_.isUndefined(window.screenTop)?window.screenY:window.screenTop,n=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,o=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,r=n/2-w/2+t,a=o/2-h/2+i,s=window.open("about:blank",null,"scrollbars=yes, width="+w+", height="+h+", top="+a+", left="+r),c=s.document;c.open("text/html"),c.write(e),c.close(),window.focus&&s.focus()}(JSON.stringify(n(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(g,p){p.extend(CZRSeksPrototype,{generateUI:function(n){var e,o=this,t=p.Deferred();switch(_.isEmpty(n.action)&&t.reject("generateUI => missing action"),n.action){case"sek-generate-draggable-candidates-picker-ui":var i=sektionsLocalizedData.optPrefixForSektionsNotSaved+("module"===n.content_type?"_sek_draggable_modules_ui":"_sek_draggable_sections_ui");if(o.isUIControlAlreadyRegistered(i)){g.control(i).focus({completeCallback:function(){var e=g.control(i).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}});break}o.cleanRegistered(),e=function(){g.has(i)||(g(i,function(e){e.bind(function(e,t){g.errare("MODULE / SECTION PICKER SETTING CHANGED")})}),o.register({level:n.level,what:"setting",id:i,dirty:!1,value:"",transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,what:"control",id:i,label:"module"===n.content_type?sektionsLocalizedData.i18n["Module Picker"]:sektionsLocalizedData.i18n["Section Picker"],type:"czr_module",module_type:"module"===n.content_type?"sek_module_picker_module":"sek_section_picker_module",section:i,priority:10,settings:{default:i},track:!1}).done(function(){g.control(i).focus({completeCallback:function(){}})})},g.section.when(i,function(){e()}),o.register({what:"section",id:i,title:"module"===n.content_type?sektionsLocalizedData.i18n["Module Picker"]:sektionsLocalizedData.i18n["Section Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:g.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})});break;case"sek-generate-module-ui":if(_.isEmpty(n.id)&&t.reject("generateUI => missing id"),o.isUIControlAlreadyRegistered(n.id)){g.control(n.id).focus({completeCallback:function(){}});break}o.cleanRegistered();var r=o.getLevelProperty({property:"value",id:n.id}),a=o.getLevelProperty({property:"module_type",id:n.id});_.isEmpty(a)&&t.reject("generateUI => module => invalid module_type"),e=function(){g.has(n.id)||(g(n.id,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(n,{action:"sek-set-module-value"}),settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:n.id,dirty:!1,value:r,transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,what:"control",id:n.id,label:sektionsLocalizedData.i18n["Customize the options for module :"]+" "+g.czrModuleMap[a].name,type:"czr_module",module_type:a,section:n.id,priority:10,settings:{default:n.id}}).done(function(){g.control(n.id).focus({completeCallback:function(){}})})},g.section.when(n.id,function(){e()}),o.register({what:"section",id:n.id,title:sektionsLocalizedData.i18n["Content for"]+" "+g.czrModuleMap[a].name,panel:sektionsLocalizedData.sektionsPanelId,priority:20});break;case"sek-generate-level-options-ui":var s=n.id+"__sectionLayout_options",c=n.id+"__bgBorder_options",l=n.id+"__height_options",d=n.id+"__spacing_options";if(o.isUIControlAlreadyRegistered(c)||o.isUIControlAlreadyRegistered(l)||o.isUIControlAlreadyRegistered(d)){g.section(g.control(c).section()).expanded(!0);break}o.cleanRegistered();var u=o.getLevelProperty({property:"options",id:n.id});u=_.isObject(u)?u:{},e=function(){"section"===n.level&&(g.has(l)||(g(s,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"layout",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:s,dirty:!1,value:u.layout||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,level_id:n.id,what:"control",id:s,label:sektionsLocalizedData.i18n["Layout settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_level_section_layout_module",section:n.id,priority:0,settings:{default:s}}).done(function(){g.control(s).focus({completeCallback:function(){}})})),g.has(c)||(g(c,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"bg_border",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:c,dirty:!1,value:u.bg_border||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,level_id:n.id,what:"control",id:c,label:sektionsLocalizedData.i18n["Background and border settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_level_bg_border_module",section:n.id,priority:10,settings:{default:c}}).done(function(){g.control(c).focus({completeCallback:function(){}})}),g.has(d)||(g(d,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"spacing",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:d,dirty:!1,value:u.spacing||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,what:"control",id:d,label:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_spacing_module",section:n.id,priority:15,settings:{default:d}}).done(function(){g.control(d).focus({completeCallback:function(){}})}),g.has(l)||(g(l,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"height",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:l,dirty:!1,value:u.height||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,level_id:n.id,what:"control",id:l,label:sektionsLocalizedData.i18n["Height settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_level_height_module",section:n.id,priority:20,settings:{default:l}}).done(function(){g.control(l).focus({completeCallback:function(){}})})},g.section.when(n.id,function(){e()}),o.register({what:"section",id:n.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+n.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1})}return"pending"==t.state()?t.resolve().promise():t.promise()},updateAPISettingAndExecutePreviewActions:function(e){if(!_.isEmpty(e.settingParams)&&_.has(e.settingParams,"to")){var t,i=this,n=e.settingParams.to,o=null,r=!1;if(!_.isEmpty(e.settingParams.args)&&_.has(e.settingParams.args,"moduleRegistrationParams")){var a=e.settingParams.args.moduleRegistrationParams.control,s=e.settingParams.args.moduleRegistrationParams.id,c=a.czr_Module(s);if(_.isEmpty(c)?g.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",e):(o=c.module_type,r=c.isMultiItem()),!r&&_.isObject(n)?t=i.normalizeAndSanitizeSingleItemInputValues(n,o):(t=[],_.each(n,function(e){t.push(i.normalizeAndSanitizeSingleItemInputValues(e,o))})),_.isEmpty(e.defaultPreviewAction))g.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",e);else{var l="refresh_stylesheet"===e.defaultPreviewAction,d="refresh_markup"===e.defaultPreviewAction,u="refresh_fonts"===e.defaultPreviewAction;_.isEmpty(e.settingParams.args.inputRegistrationParams)||(_.isUndefined(e.settingParams.args.inputRegistrationParams.refresh_stylesheet)||(l=Boolean(e.settingParams.args.inputRegistrationParams.refresh_stylesheet)),_.isUndefined(e.settingParams.args.inputRegistrationParams.refresh_markup)||(d=Boolean(e.settingParams.args.inputRegistrationParams.refresh_markup)),_.isUndefined(e.settingParams.args.inputRegistrationParams.refresh_fonts)||(u=Boolean(e.settingParams.args.inputRegistrationParams.refresh_fonts)));var p=function(){return i.updateAPISetting({action:e.uiParams.action,id:e.uiParams.id,value:t,in_column:e.uiParams.in_column,in_sektion:e.uiParams.in_sektion,options_type:e.options_type,settingParams:e.settingParams}).done(function(){!0===l&&g.previewer.send("sek-refresh-stylesheet",{skope_id:g.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:e.uiParams.id,level:e.uiParams.level}}),!0===d&&g.previewer.send("sek-refresh-level",{apiParams:{action:"sek-refresh-level",id:e.uiParams.id,level:e.uiParams.level},skope_id:g.czr_skopeBase.getSkopeProperty("skope_id")})})};if(!0===u){var m="";try{m="font_family_css"!=e.settingParams.args.input_changed?void g.errare("updateAPISettingAndExecutePreviewActions => Error when refreshing fonts => the input id is not font_family_css",e):e.settingParams.args.input_value}catch(e){return void g.errare("updateAPISettingAndExecutePreviewActions => Error when refreshing fonts",e)}if(!_.isString(m))return void g.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",er);-1<m.indexOf("gfont")?i.updateAPISetting({action:"sek-update-fonts",font_family:m}).done(function(){p().then(function(){i.updateAPISetting({action:"sek-update-fonts"})})}):p()}else p()}}else g.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",e)}else g.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",e)},normalizeAndSanitizeSingleItemInputValues:function(e,i){var n,o={},r={},a=null,s=this;return _.each(e,function(e,t){_.contains(["title","id"],t)||(null!==i&&"no_default_value_specified"===(a=s.getInputDefaultValue(t,i))&&g.infoLog("::updateAPISettingAndExecutePreviewActions => missing default value for input "+t+" in module "+i),e!==a&&(o[t]=e))}),_.each(o,function(e,t){switch(s.getInputType(t,i)){case"text":case"textarea":case"check":case"gutencheck":case"select":case"radio":case"number":case"upload":case"upload_url":case"color":case"wp_color_alpha":case"wp_color":case"content_picker":case"tiny_mce_editor":case"password":case"range":case"range_slider":case"hidden":case"h_alignment":case"h_text_alignment":case"spacing":case"bg_position":case"v_alignment":case"font_size":case"line_height":case"font_picker":default:n=e}r[t]=n}),r},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=g.control.has(t):(i=!0,1<e.length&&g.errare("generateUI => why is this control registered more than once ? => "+t)),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(H,Q){Q.extend(CZRSeksPrototype,{updateAPISetting:function($){var B=this,W=Q.Deferred();return H(B.sekCollectionSettingId(),function(e){var t,i,n,o,r,a,s,c,l=e(),d=_.isObject(l)?Q.extend(!0,{},l):B.defaultSektionSettingValue;switch(d.collection=_.isArray(d.collection)?d.collection:B.defaultSektionSettingValue.collection,$.action){case"sek-add-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");if(!0===$.is_nested){n=B.getLevelModel($.in_column,d.collection);var u=B.getLevelModel($.in_sektion,d.collection);if("no_match"==u){W.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===u.is_nested){W.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==n){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.push({id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+B.guid(),level:"column",collection:[]}],is_nested:!0})}else{if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}t.collection=_.isArray(t.collection)?t.collection:[],_.each(t.collection,function(e,t){$.before_section===e.id&&(M=t),$.after_section===e.id&&(M=t+1)}),t.collection=_.isArray(t.collection)?t.collection:[],t.collection.splice(M,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+B.guid(),level:"column",collection:[]}]})}break;case"sek-duplicate-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");var p;try{p=B.cloneLevel($.id)}catch(e){H.errare("updateAPISetting => "+$.action,e);break}var m=B.getLevelPositionInCollection($.id,d.collection);if(!0===$.is_nested){if("no_match"==(n=B.getLevelModel($.in_column,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection.splice(parseInt(m+1,10),0,p)}s=p.id;break;case"sek-remove-section":if(!0===$.is_nested)"no_match"!=(n=B.getLevelModel($.in_column,d.collection))?(n.collection=_.isArray(n.collection)?n.collection:[],n.collection=_.filter(n.collection,function(e){return e.id!=$.id})):H.errare("updateAPISetting => "+$.action+" => no parent column matched");else{if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}t.collection=_.filter(t.collection,function(e){return e.id!=$.id})}break;case"sek-move-section":var g,f,h=B.getLevelModel($.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+$.action+" => missing target location");if($.from_location!=$.to_location){var k=B.getLevelModel($.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+$.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],g=B.getLevelModel($.id,k.collection),f=Q.extend(!0,{},g),k.collection=_.filter(k.collection,function(e){return e.id!=$.id})}h.collection=_.isArray(h.collection)?h.collection:[],r=Q.extend(!0,[],h.collection),a=[],_.each($.newOrder,function(e){if($.from_location!=$.to_location&&e==f.id)a.push(f);else{if(i=B.getLevelModel(e,r),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => move section => missing section candidate");a.push(i)}}),h.collection=a;break;case"sek-add-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(i=B.getLevelModel($.in_sektion,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),W.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(i.collection=_.isArray(i.collection)?i.collection:[],B.MAX_NUMBER_OF_COLUMNS-1<_.size(i.collection)){W.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}_.each(i.collection,function(e){e.width=""}),i.collection.push({id:$.id,level:"column",collection:[]});break;case"sek-remove-column":if("no_match"!=(i=B.getLevelModel($.in_sektion,d.collection))){if(1===_.size(i.collection)){W.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}i.collection=_.isArray(i.collection)?i.collection:[],i.collection=_.filter(i.collection,function(e){return e.id!=$.id}),_.each(i.collection,function(e){e.width=""})}else H.errare("updateAPISetting => "+$.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(i=B.getLevelModel($.in_sektion,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),W.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(i.collection=_.isArray(i.collection)?i.collection:[],B.MAX_NUMBER_OF_COLUMNS-1<_.size(i.collection)){W.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var v;try{v=B.cloneLevel($.id)}catch(e){H.errare("updateAPISetting => "+$.action,e);break}var y=B.getLevelPositionInCollection($.id,d.collection);s=v.id,i.collection.splice(parseInt(y+1,10),0,v),_.each(i.collection,function(e){e.width=""});break;case"sek-resize-columns":if($.col_number<2)break;var w=B.getLevelModel($.resized_column,d.collection),b=B.getLevelModel($.sister_column,d.collection);if("no_match"==w){H.errare("updateAPISetting => "+$.action+" => no resized column matched"),W.reject("updateAPISetting => "+$.action+" => no resized column matched");break}w.width=parseFloat($.resizedColumnWidthInPercent);var P=B.getLevelModel($.in_sektion,d.collection),S=_.filter(P.collection,function(e){return e.id!=w.id&&e.id!=b.id}),z=parseFloat(w.width.toFixed(3));_.isEmpty(S)||_.each(S,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/$.col_number).toFixed(3))),z=parseFloat((z+e.width).toFixed(3))}),b.width=parseFloat((100-z).toFixed(3));break;case"sek-move-column":var I,E,D=B.getLevelModel($.to_sektion,d.collection);if(_.isEmpty(D)||"no_match"==D)throw new Error("updateAPISetting => "+$.action+" => missing target sektion");if($.from_sektion!=$.to_sektion){var C=B.getLevelModel($.from_sektion,d.collection);if(_.isEmpty(C)||"no_match"==C)throw new Error("updateAPISetting => "+$.action+" => missing source column");C.collection=_.isArray(C.collection)?C.collection:[],I=B.getLevelModel($.id,C.collection),E=Q.extend(!0,{},I),C.collection=_.filter(C.collection,function(e){return e.id!=$.id}),_.each(C.collection,function(e){e.width=""})}D.collection=_.isArray(D.collection)?D.collection:[],r=Q.extend(!0,[],D.collection),a=[],_.each($.newOrder,function(e){if($.from_sektion!=$.to_sektion&&e==E.id)a.push(E);else{if(n=B.getLevelModel(e,r),_.isEmpty(n)||"no_match"==n)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");a.push(n)}}),D.collection=a,_.each(D.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.module_type))throw new Error("updateAPISetting => "+$.action+" => missing module_type");if("no_match"===(n=B.getLevelModel($.in_column,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var M=0;n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_module===e.id&&(M=t),$.after_module===e.id&&(M=t+1)});var A={id:$.id,level:"module",module_type:$.module_type};"no_starting_value"!==(c=B.getModuleStartingValue($.module_type))&&(A.value=c),n.collection.splice(M,0,A);break;case"sek-duplicate-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(n=B.getLevelModel($.in_column,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var x;n.collection=_.isArray(n.collection)?n.collection:[];try{x=B.cloneLevel($.id)}catch(e){H.errare("updateAPISetting => "+$.action,e),W.reject("updateAPISetting => "+$.action+" => error when cloning the level");break}var L=B.getLevelPositionInCollection($.id,d.collection);s=x.id,n.collection.splice(parseInt(L+1,10),0,x);break;case"sek-remove-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");"no_match"!=(n=B.getLevelModel($.in_column,d.collection))?(n.collection=_.isArray(n.collection)?n.collection:[],n.collection=_.filter(n.collection,function(e){return e.id!=$.id})):H.errare("updateAPISetting => "+$.action+" => no parent column matched");break;case"sek-move-module":var R,T,Z;if(R=B.getLevelModel($.to_column,d.collection),_.isEmpty(R)||"no_match"==R)throw new Error("updateAPISetting => "+$.action+" => missing target column");if($.from_column!=$.to_column){var O;if(O=B.getLevelModel($.from_column,d.collection),_.isEmpty(O)||"no_match"==O)throw new Error("updateAPISetting => "+$.action+" => missing source column");O.collection=_.isArray(O.collection)?O.collection:[],T=B.getLevelModel($.id,d.collection),Z=Q.extend(!0,{},T),O.collection=_.filter(O.collection,function(e){return e.id!=$.id})}if(R.collection=_.isArray(R.collection)?R.collection:[],r=Q.extend(!0,[],R.collection),a=[],_.each($.newOrder,function(e){if($.from_column!=$.to_column&&e==Z.id)a.push(Z);else{if(o=B.getLevelModel(e,d.collection),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => "+$.action+" => missing moduleCandidate");a.push(o)}}),a.length!=_.uniq(a).length)throw new Error("updateAPISetting => "+$.action+" => there are duplicated modules in column : "+R.id);R.collection=a;break;case"sek-set-module-value":o=B.getLevelModel($.id,d.collection);var j={};if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(j[t]=e)}),"no_match"==o){H.errare("updateAPISetting => "+$.action+" => no module matched",$),W.reject("updateAPISetting => "+$.action+" => error no module matched");break}o.value=j;break;case"sek-set-level-options":var U=B.getLevelModel($.id,d.collection),F={};if("no_match"===U){H.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),W.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}switch(U.options=U.options||{},_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(F[t]=e)}),_.isEmpty($.options_type)&&H.errare("updateAPISetting => "+$.action+" => missing options_type"),$.options_type){case"layout":U.options.layout=F;break;case"bg_border":U.options.bg_border=F;break;case"height":U.options.height=F;break;case"spacing":U.options.spacing=F}break;case"sek-add-content-in-new-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");M=0;if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}switch(t.collection=_.isArray(t.collection)?t.collection:[],_.each(t.collection,function(e,t){$.before_section===e.id&&(M=t),$.after_section===e.id&&(M=t+1)}),$.content_type){case"module":c=B.getModuleStartingValue($.content_id),t.collection.splice(M,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+B.guid(),level:"column",collection:[{id:$.droppedModuleId,level:"module",module_type:$.content_id,value:"no_starting_value"!==c?c:null}]}]});break;case"preset_section":var N;try{N=B.getPresetSectionCollection({presetSectionType:$.content_id,section_id:$.id})}catch(e){H.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",e),W.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()");break}if(!_.isObject(N)||_.isEmpty(N)){H.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,N),W.reject("updateAPISetting => "+$.action+" => preset section type not found or empty");break}t.collection.splice(M,0,N)}break;case"sek-update-fonts":var V=B.sniffGFonts();if(!_.isEmpty($.font_family)&&_.isString($.font_family)&&!_.contains(V,$.font_family)){if($.font_family.indexOf("gfont")<0){H.errare("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont"),W.reject("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont");break}V.push($.font_family)}d.fonts=V}"pending"==W.state()&&(_.isEqual(l,d)?W.reject("updateAPISetting => the new setting value is unchanged when firing action : "+$.action):null!==B.validateSettingValue(d)?(e(d,$),W.resolve(s)):W.reject("updateAPISetting => the new setting value did not pass the validation checks for action "+$.action))}),W.promise()},getPresetSectionCollection:function(e){var t=this,i=Q.extend(!0,{},sektionsLocalizedData.presetSections);if(!_.isObject(i)||_.isEmpty(i))throw new Error("getPresetSectionCollection => Invalid sektionsLocalizedData.presetSections");if(_.isEmpty(i[e.presetSectionType]))throw new Error("getPresetSectionCollection => "+e.presetSectionType+" has not been found in sektionsLocalizedData.presetSections");var n=i[e.presetSectionType];if("string"!=typeof n||"{"!==n[0])throw new Error("getPresetSectionCollection => "+e.presetSectionType+" is not JSON.parse-able");n=JSON.parse(n);var o=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),_.isArray(e.collection)&&o(e.collection)}),e};return n.id=e.section_id,n.collection=o(n.collection),n}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(f,h){h.extend(CZRSeksPrototype,{register:function(e){if(_.has(e,"id")){var t,i={};switch(e.what){case"setting":if(f.has(e.id))return e;t=h.extend(!0,{},f.Setting.prototype.defaults);var n=_.extend(t,{dirty:!_.isUndefined(e.dirty)&&e.dirty,value:e.value||[],transport:e.transport||"refresh",type:e.type||"option"}),o=f.settingConstructor[n.type]||f.Setting;try{f.add(new o(e.id,n.value,n))}catch(e){f.errare("czr_sektions::register => problem when adding a setting to the api",e)}break;case"panel":if(!_.has(e,"id"))throw new Error("registerPanel => missing panel id ");if(f.section.has(e.id))break;t=h.extend(!0,{},f.Panel.prototype.defaults);var r=_.extend(t,{id:e.id,title:e.title||e.id,priority:_.has(e,"priority")?e.priority:0}),a=_.isObject(e.constructWith)?e.constructWith:f.Panel;r=_.extend({params:r},r);try{i=f.panel.add(new a(e.id,r))}catch(e){f.errare("czr_sektions::register => problem when adding a panel to the api",e)}break;case"section":if(!_.has(e,"id"))throw new Error("registerSection => missing section id ");if(f.section.has(e.id))break;t=h.extend(!0,{},f.Section.prototype.defaults);var s=_.extend(t,{content:"",id:e.id,title:e.title,panel:e.panel,priority:e.priority,description_hidden:!1,customizeAction:sektionsLocalizedData.i18n.Customizing}),c=_.isUndefined(e.constructWith)?f.Section:e.constructWith;s=_.extend({params:s},s);try{i=f.section.add(new c(e.id,s))}catch(e){f.errare("czr_sektions::register => problem when adding a section to the api",e)}break;case"control":if(f.control.has(e.id))break;t=h.extend(!0,{},f.Control.prototype.defaults);var l,d=_.extend(t,{content:"",label:e.label||e.id,priority:e.priority,section:e.section,settings:e.settings,type:e.type,module_type:e.module_type,input_attrs:e.input_attrs,sek_registration_params:e}),u=f.controlConstructor[d.type]||f.Control;l=_.extend({params:d},d);try{i=f.control.add(new u(e.id,l))}catch(e){f.errare("czr_sektions::register => problem when adding a control to the api",e)}break;default:f.errorLog('invalid "what" when invoking the register() method')}if(i=_.isEmpty(i)?{deferred:{embedded:h.Deferred(function(){this.resolve()})}}:i,!1!==e.track){var p=this.registered(),m=h.extend(!0,[],p),g=_.findWhere(m,{id:e.id});if(!_.isEmpty(g)&&_.isEqual(g,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);m.push(e),this.registered(m)}return"setting"==e.what?e:i.deferred.embedded}f.errare("register => missing id ",e)},cleanRegistered:function(){var t=this,e=h.extend(!0,[],t.registered()||[]);e=_.filter(e,function(e){return"setting"!==e.what&&f[e.what].has(e.id)&&(_.isFunction(f[e.what](e.id).trigger)&&t.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),h.when(f[e.what](e.id).container.remove()).done(function(){f[e.what].remove(e.id),t.trigger("sek-ui-removed",{what:e.what,id:e.id})})),"setting"===e.what}),t.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{rootPanelFocus:function(){a.section.has(a.czr_activeSectionId())?a.section(a.czr_activeSectionId()).expanded(!1):a.section.each(function(e){e.expanded(!1)}),a.panel.each(function(e){e.expanded(!1)})},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()+e()+e()},getLevelModel:function(t,e){var i=this,n="no_match";if(_.isUndefined(e)){var o=a(i.sekCollectionSettingId())(),r=_.isObject(o)?s.extend(!0,{},o):i.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==n&&(t===e.id?n=e:_.isArray(e.collection)&&(n=i.getLevelModel(t,e.collection)))}),n},getLevelPositionInCollection:function(i,e){var n=this,o="no_match";if(_.isUndefined(e)){var t=a(n.sekCollectionSettingId())(),r=_.isObject(t)?s.extend(!0,{},t):n.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e,t){"no_match"==o&&(i===e.id?o=t:_.isArray(e.collection)&&(o=n.getLevelPositionInCollection(i,e.collection)))}),o},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))a.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];a.errare("getLevelProperty => invalid model for id : "+e.id,t)}else a.errare("getLevelProperty => no level model found for id : "+e.id)}},cloneLevel:function(e){var t=this,i=t.getLevelModel(e);if("no_match"==i)throw new Error("cloneLevel => no match for level id : "+e);var n=s.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};var t=sektionsLocalizedData.registeredModules[e].tmpl["item-inputs"],i={id:"",title:""};return _.each(t,function(e,t){switch(t){case"tabs":_.each(e,function(e){_.each(e.inputs,function(e,t){i[t]=e.default||""})});break;default:i[t]=e.default||""}}),i},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sektionsLocalizedData.registeredModules[e][t]:"not_set"},isModuleRegistered:function(e){return sektionsLocalizedData.registeredModules&&!_.isUndefined(sektionsLocalizedData.registeredModules[e])},sniffGFonts:function(i,e){var n=this;if(i=i||[],_.isUndefined(e)){var t=a(n.sekCollectionSettingId())();e=_.isObject(t)?s.extend(!0,{},t):n.defaultSektionSettingValue}return _.each(e,function(e,t){"font_family_css"==t&&-1<e.indexOf("gfont")&&!_.contains(i,e)&&i.push(e),(_.isArray(e)||_.isObject(e))&&n.sniffGFonts(i,e)}),i},getInputDefaultValue:function(i,n,e){var o=this;if(o.cachedDefaultInputValues=o.cachedDefaultInputValues||{},o.cachedDefaultInputValues[n]=o.cachedDefaultInputValues[n]||{},_.has(o.cachedDefaultInputValues[n],i))return o.cachedDefaultInputValues[n][i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_default_value_specified";return _.each(e,function(e,t){"no_default_value_specified"===r&&(i!==t||_.isUndefined(e.default)||(r=e.default),"no_default_value_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputDefaultValue(i,n,e)),"no_default_value_specified"!==r&&(o.cachedDefaultInputValues[n][i]=r))}),r}a.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules")},getInputType:function(i,n,e){var o=this;if(o.cachedInputTypes=o.cachedInputTypes||{},o.cachedInputTypes[n]=o.cachedInputTypes[n]||{},_.has(o.cachedInputTypes[n],i))return o.cachedInputTypes[n][i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_input_type_specified";return _.each(e,function(e,t){"no_input_type_specified"===r&&(i!==t||_.isUndefined(e.input_type)||(r=e.input_type),"no_input_type_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputType(i,n,e)),"no_input_type_specified"!==r&&(o.cachedInputTypes[n][i]=r))}),r}a.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return a.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return a.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t=sektionsLocalizedData.registeredModules[e].starting_value;return _.isEmpty(t)?"no_starting_value":t}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,f){f.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){"draggable"in document.createElement("span")?t.setupNimbleDragZones(e.input_container):r.panel(sektionsLocalizedData.sektionsPanelId,function(e){r.notifications.add(new r.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){r.notifications.remove("drag-drop-support")},1e4)})}),r.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){r.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_section_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var t=this;e.find("[draggable]").each(function(){f(this).on("dragstart",function(e){(function(e){e.originalEvent.dataTransfer.setData("sek-content-type",f(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",f(this).data("sek-content-id"));try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){r.notifications.add(new r.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){r.notifications.remove("drag-drop-support")},1e4)})}t.dnd_draggedType=f(this).data("sek-content-type"),f("body").addClass("sek-dragging"),r.previewer.send("sek-drag-start",{type:t.dnd_draggedType})}).call(f(this),e)}).on("dragend",function(e){(function(e){f("body").removeClass("sek-dragging"),r.previewer.send("sek-drag-stop")}).call(f(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=f("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=f(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop(f(this))&&(e.stopPropagation(),t.dnd_OnEnterOver(f(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(f(this),e)||t.dnd_cleanOnLeaveDrop(f(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop(f(this)))return;e.preventDefault(),t.dnd_onDrop(f(this),e),t.dnd_cleanOnLeaveDrop(f(this),e),r.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_toggleDragApproachClassesToDropZones:function(g){this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.$dropZones.find(".sek-drop-zone").each(function(){var e=g.clientY,t=g.clientX,i=f(this)[0].getBoundingClientRect(),n=Math.abs(e-i.bottom),o=Math.abs(i.top-e),r=t-i.right,a=i.left-t,s=n<40||o<40,c=0<r&&r<40||0<a&&a<40,l=n<60||o<60,d=0<r&&r<60||0<a&&a<60,u=t<=i.right&&i.left<=t,p=e<=i.top&&i.bottom<=e,_=n<120||o<120,m=0<r&&r<120||0<a&&a<120;(s||p)&&(c||u)?(f(this).addClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-approaching")):(l||p)&&(d||u)?(f(this).addClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-approaching")):(_||p)&&(m||u)?(f(this).addClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-close")):(f(this).removeClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-approaching"))}),this.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=f(e.currentTarget);switch(this.dnd_draggedType){case"module":t=sektionsLocalizedData.i18n["Insert here"],0<n.length&&("between-sections"!==n.data("sek-location")&&"in-empty-location"!==n.data("sek-location")||(t=sektionsLocalizedData.i18n["Insert in a new section"])),i='<div class="sek-module-placeholder-content"><p>'+t+"</p></div>";break;case"preset_section":i='<div class="sek-module-placeholder-content"><p>'+(t=sektionsLocalizedData.i18n["Insert a new section here"])+"</p></div>";break;default:r.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return f(r.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=e&&0<e.length&&e.hasClass("sek-content-preset_section-drop-zone");return e.hasClass("sek-drop-zone")&&("preset_section"===this.dnd_draggedType&&t||"module"===this.dnd_draggedType&&!t)},dnd_OnEnterOver:function(e,t){t.preventDefault(),!0!==e.data("is-drag-entered")&&(e.data("is-drag-entered",!0),e.addClass("sek-active-drop-zone"),this.$dropZones.addClass("sek-is-dragging"));try{this.dnd_mayBePrintPreDropElement(e,t)}catch(e){r.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),f(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(f(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"))},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");f.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,a=i.right,s=i.top,c=i.bottom;return r<=n&&n-r<=a-r&&(s<=o&&o-s<=c-s)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();r.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id")})},reactToDrop:function(){this.bind("sek-content-dropped",function(e){try{!function(e){if(!_.isObject(e))throw new Error("Invalid params provided");if(e.drop_target_element.length<1)throw new Error("Invalid drop_target_element");var t="content-in-column";switch("between-sections"===e.drop_target_element.data("sek-location")&&(t="content-in-new-section"),"in-empty-location"===e.drop_target_element.data("sek-location")&&(t="content-in-empty-location"),"between-columns"===e.drop_target_element.data("sek-location")&&(t="content-in-new-column"),t){case"content-in-column":var i=e.drop_target_element.closest("div[data-sek-level]");if(i.length<1)throw new Error("No valid level dom element found");var n=i.data("sek-level"),o=i.data("sek-id");if(_.isEmpty(n)||_.isEmpty(o))throw new Error("No valid level id found");r.previewer.trigger("sek-add-module",{level:n,id:o,in_column:e.drop_target_element.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:e.drop_target_element.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-new-section":r.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"content-in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,r.previewer.trigger("sek-add-content-in-new-sektion",e)}}(e)}catch(e){r.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery),function(i,c,l){i.czrInputMap=i.czrInputMap||{},c.extend(i.czrInputMap,{spacing:function(e){var n=this,i=c(".sek-spacing-wrapper",n.container);i.on("keyup mouseup change",'input[type="number"]',function(e){var t=c(this).closest("[data-sek-spacing]").data("sek-spacing"),i=c.extend(!0,{},l.isObject(n())?n():{});i[t]=c(this).val(),n(i)}),i.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),i.find('input[type="number"]').each(function(){c(this).val("")}),n([])}),l.isObject(n())&&l.each(n(),function(e,t){c('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)})},bg_position:function(e){var t=this;c(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(c(this).val())}),l.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},v_alignment:function(e){var t=this,i=c(".sek-v-align-wrapper",t.container);i.find('div[data-sek-align="'+t()+'"]').addClass("selected"),i.on("click","[data-sek-align]",function(e){e.preventDefault(),i.find(".selected").removeClass("selected"),c.when(c(this).addClass("selected")).done(function(){t(c(this).data("sek-align"))})})},font_size:function(e){var t=this,i=c(".sek-font-size-wrapper",t.container);i.find('input[type="number"]').on("change",function(){t(c(this).val()+"px")}).stepper()},line_height:function(e){var t=this,i=c(".sek-line-height-wrapper",t.container);i.find('input[type="number"]').on("change",function(){t(c(this).val()+"px")}).stepper()},font_picker:function(e){var s=this,o=s.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+s.id+'"]',s.container);l.isNull(s())||l.isEmpty(s())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"),l.each([{title:sektionsLocalizedData.i18n["Web Safe Fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google Fonts"],type:"gfont",list:t.gfonts}],function(e){var t,r,a,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,a="",l.each(t,function(e){var t,i,n=e.name,o=l.isString(n)?n.replace(/[+|:]/g," "):n;t=n,i=r,(n=l.isString(t)?["[",i,"]",t].join(""):"")==s()?a+='<option selected="selected" value="'+n+'">'+o+"</option>":a+='<option value="'+n+'">'+o+"</option>"}),a)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.select2(i),c(".select2-selection__rendered",s.container).css(r(s()))},r=function(e){if(!l.isString(e)||l.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=a(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=l.isNumber(i)?i:400,n=o[1]&&-1!=o[1].indexOf("italic")?"italic":"",{"font-family":"none"==t?"inherit":t.replace(/[+|:]/g," "),"font-weight":i||400,"font-style":n||"normal"}},a=function(e){if(!l.isString(e)||l.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return l.isString(t[0])?t[0].replace(/[+|:]/g," "):""};o.bind("tab-switch",function(e){var t;c.when((t=c.Deferred(),l.isEmpty(s.sek_fontCollections)?i.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:s.module.id}).done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");s.sek_fontCollections=JSON.parse(e),t.resolve(s.sek_fontCollections)}).fail(function(e){t.reject(e)}):t.resolve(s.sek_fontCollections),t.promise())).done(function(t){var i;(i=c.Deferred(),void 0!==c.fn.select2&&void 0!==c.fn.select2.amd&&"function"==typeof c.fn.select2.amd.require?c.fn.select2.amd.require(["select2/results","select2/utils"],function(e,t){var n=function(e,t,i){n.__super__.constructor.call(this,e,t,i)};t.Extend(n,e),n.prototype.bind=function(e,t){var i=this;e.on("results:focus",function(e){"true"!=e.element.attr("aria-selected")&&i.trigger("select",{data:e.data})}),n.__super__.bind.call(this,e,t)},i.resolve(n)}):i.resolve(!1),i.promise()).done(function(e){n(e,t)})}).fail(function(e){i.errare("font_picker => fail response =>",e)})})}})}(wp.customize,jQuery,_);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var o=this;a.sekEditorExpanded=new a.Value(!1),a.sekEditorSynchronizedInput=new a.Value,o.editorEventsListenerSetup=!1;var r=function(){a.sekTinyMceEditor=a.sekTinyMceEditor||tinyMCE.get("czr-customize-content_editor"),!1===o.editorEventsListenerSetup&&(o.attachEventsToEditor(),o.editorEventsListenerSetup=!0,o.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};o.bind("sek-edit-module_done",function(e){"tiny_mce_editor"==e.clicked_input_type&&(a.sekEditorSynchronizedInput({control_id:e.id,input_id:e.clicked_input_id}),a.sekEditorExpanded(!0),a.sekTinyMceEditor.focus())}),s("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=s(this).data("czr-control-id"),t=s(this).data("czr-input-id");if(_.isEmpty(e)||_.isEmpty(t))a.errare("toggle-tinymce-editor => missing input or control id");else{var i=s.extend(!0,{},a.sekEditorSynchronizedInput()),n=_.extend(i,{input_id:t,control_id:e});a.sekEditorSynchronizedInput(n),a.sekEditorExpanded(!0),a.sekTinyMceEditor.focus()}}),a.sekEditorSynchronizedInput.bind(function(e,t){r();var i=o.getLevelProperty({property:"value",id:e.control_id}),n=_.isObject(i)&&!_.isEmpty(i[e.input_id])?i[e.input_id]:"";try{a.sekTinyMceEditor.setContent(n)}catch(e){a.errare("Error when setting the tiny mce editor content in setupTinyMceEditor",e)}a.sekTinyMceEditor.focus()}),a.sekEditorExpanded.bind(function(e){r(),e&&a.sekTinyMceEditor.focus(),s(document.body).toggleClass("czr-customize-content_editor-pane-open",e),s(window)[e?"on":"off"]("resize",function(){a.sekEditorExpanded()&&_.delay(function(){o.czrResizeEditor(window.innerHeight-o.$editorPane.height())},50)}),e?o.czrResizeEditor(window.innerHeight-o.$editorPane.height()):(o.$preview.css("bottom",""),o.$collapseSidebar.css("bottom",""))}),s("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){a.sekEditorExpanded(!1)}),s("#customize-controls").on("click",function(e){"open-tinymce-editor"!=s(e.target).data("czr-action")&&a.sekEditorExpanded(!1)}),s(document).on("keydown",_.throttle(function(e){27===e.keyCode&&a.sekEditorExpanded(!1)},50)),o.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=s(a.sekTinyMceEditor.iframeElement).contents().get(0);s(e).on("keydown",_.throttle(function(e){27===e.keyCode&&a.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-module","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?a.previewer.bind(e,function(){a.sekEditorExpanded(!1)}):a.previewer.bind(e,function(e){a.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachEventsToEditor:function(){var t=this;t.$editorTextArea=s("#czr-customize-content_editor"),t.$editorPane=s("#czr-customize-content_editor-pane"),t.$editorDragbar=s("#czr-customize-content_editor-dragbar"),t.$editorFrame=s("#czr-customize-content_editor_ifr"),t.$mceTools=s("#wp-czr-customize-content_editor-tools"),t.$mceToolbar=t.$editorPane.find(".mce-toolbar-grp"),t.$mceStatusbar=t.$editorPane.find(".mce-statusbar"),t.$preview=s("#customize-preview"),t.$collapseSidebar=s(".collapse-sidebar"),a.sekTinyMceEditor.on("input change keyup",function(e){if(a.control.has(a.sekEditorSynchronizedInput().control_id))try{a.control(a.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:a.sekEditorSynchronizedInput().input_id,html_content:a.sekTinyMceEditor.getContent(),modified_editor_element:a.sekTinyMceEditor})}catch(e){a.errare("Error when triggering tinyMceEditorUpdated",e)}}),t.$editorTextArea.on("input",function(e){try{a.control(a.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:a.sekEditorSynchronizedInput().input_id,html_content:t.$editorTextArea.val(),modified_editor_element:t.$editorTextArea})}catch(e){a.errare("Error when triggering tinyMceEditorUpdated",e)}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{});a.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=i.$mceTools.outerHeight()+i.$mceToolbar.outerHeight()+i.$mceStatusbar.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),i.$editorFrame.css("height",o.height-o.components),i.$collapseSidebar.css("bottom",n-o.height<56?i.$mceStatusbar.outerHeight()+4:o.height+8))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(t,e){jQuery.extend(CZRSeksPrototype,t.Events);var i=t.Class.extend(CZRSeksPrototype);try{t.czr_sektions=new i}catch(e){t.errare("api.czr_sektions => problem on instantiation",e)}}(wp.customize),function(a,o,s){var e={initialize:function(e,t){var i=this;i.inputConstructor=a.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=a.CZRItem.extend(i.CZRItemConstructor||{}),a.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){var n=this,e=(n.input_parent,n.module);s.isEmpty(sektionsLocalizedData.selectOptions[n.id])?a.errare("Missing select options for input id => "+n.id+" in module "+e.module_type):(s.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?o.extend(i,{selected:"selected"}):"px"===t&&o.extend(i,{selected:"selected"}),o("select[data-czrtype]",n.container).append(o("<option>",i))}),o("select[data-czrtype]",n.container).selecter())}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){a.errorLog("item.setInputVisibilityDeps() : "+e)}}),a.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module,r=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(i){switch(i.id){case"bg-image":s.each(["bg-position","bg-attachment","bg-scale","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay"],function(t){try{r.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!s.isEmpty(i()+"")&&a.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;default:e=!s.isEmpty(i()+"")}return e})}catch(e){a.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":s.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.call(i,e,function(){return!s.isEmpty(n.czr_Input("bg-image")()+"")&&a.CZR_Helpers.isChecked(i())})}catch(e){a.errare(o.id+" => error in setInputVisibilityDeps",e)}})}})}}};a.czrModuleMap=a.czrModuleMap||{},o.extend(a.czrModuleMap,{sek_level_bg_border_module:{mthds:e,crud:!1,name:a.czr_sektions.getRegisteredModuleProperty("sek_level_bg_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:s.extend({id:"",title:""},a.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_border_module"))}})}(wp.customize,jQuery,_),function(o,r,i){var e={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){var n=this,e=(n.input_parent,n.module);i.isEmpty(sektionsLocalizedData.selectOptions[n.id])?o.errare("Missing select options for input id => "+n.id+" in module "+e.module_type):(i.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?r.extend(i,{selected:"selected"}):"px"===t&&r.extend(i,{selected:"selected"}),r("select[data-czrtype]",n.container).append(r("<option>",i))}),r("select[data-czrtype]",n.container).selecter())}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"height-type":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"custom-height",function(){return"custom"===e()})}})}}};o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{sek_level_height_module:{mthds:e,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(i,o,t){var e={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRInputMths:{setupSelect:function(){var n=this,e=(n.input_parent,n.module);t.isEmpty(sektionsLocalizedData.selectOptions[n.id])?i.errare("Missing select options for input id => "+n.id+" in module "+e.module_type):(t.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?o.extend(i,{selected:"selected"}):"px"===t&&o.extend(i,{selected:"selected"}),o("select[data-czrtype]",n.container).append(o("<option>",i))}),o("select[data-czrtype]",n.container).selecter())}}};i.czrModuleMap=i.czrModuleMap||{},o.extend(i.czrModuleMap,{sek_level_section_layout_module:{mthds:e,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_section_layout_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_section_layout_module"))}})}(wp.customize,jQuery,_),function(n,o,e){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRSpacingInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRSpacingItemMths||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRSpacingInputMths:{setupSelect:function(){var n=this;n.input_parent,n.module;e.each(sektionsLocalizedData.selectOptions.spacingUnits,function(e,t){var i={value:t,html:e};t==n()?o.extend(i,{selected:"selected"}):"px"===t&&o.extend(i,{selected:"selected"}),o("select[data-czrtype]",n.container).append(o("<option>",i))}),o("select[data-czrtype]",n.container).selecter()}},CZRSpacingItemMths:{initialize:function(e,t){n.CZRItem.prototype.initialize.call(this,e,t);var i=this;i.bind("tab-switch",function(e){device="desktop";try{device=i.container.find('[data-tab-id="'+e.id+'"]').data("sek-device")}catch(e){n.errare("spacing input => error when binding the tab switch event",e)}try{n.previewedDevice(device)}catch(e){n.errare("spacing input => error when setting the device on tab switch",e)}})}}};n.czrModuleMap=n.czrModuleMap||{},o.extend(n.czrModuleMap,{sek_spacing_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_spacing_module"))}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},e.extend(t.czrModuleMap,{sek_module_picker_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}}),t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})}})}(wp.customize,jQuery,_),function(o,r,a){var e={initialize:function(e,t){var i=this;o.CZRDynModule.prototype.initialize.call(i,e,t),i.inputConstructor=o.CZRInput.extend(i.CZRImageInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRImageInputMths:{setupSelect:function(){var n=this;n.input_parent,n.module;a.isEmpty(sektionsLocalizedData.selectOptions[n.id])?o.errare("Missing select options for input id => "+n.id+" in image module"):(a.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?r.extend(i,{selected:"selected"}):"px"===t&&r.extend(i,{selected:"selected"}),r("select[data-czrtype]",n.container).append(r("<option>",i))}),r("select[data-czrtype]",n.container).selecter())}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,e=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"link-to":a.each(["link-pick-url","link-custom-url","link-target"],function(t){try{e.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":e.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{czr_image_module:{mthds:e,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_module")}})}(wp.customize,jQuery,_),function(o,r,e){var t={initialize:function(e,t){o.CZRDynModule.prototype.initialize.call(this,e,t),this.inputConstructor=o.CZRInput.extend(this.CZRTextEditorInputMths||{})},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;o.CZRInput.prototype.initialize.call(i,e,t),"tiny_mce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")})},setupSelect:function(){var n=this;n.input_parent,n.module;e.isEmpty(sektionsLocalizedData.selectOptions[n.id])?o.errare("Missing select options for input id => "+n.id+" in image module"):(e.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?r.extend(i,{selected:"selected"}):"px"===t&&r.extend(i,{selected:"selected"}),r("select[data-czrtype]",n.container).append(r("<option>",i))}),r("select[data-czrtype]",n.container).selecter())}}};o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{czr_tiny_mce_editor_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_tiny_mce_editor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tiny_mce_editor_module")}})}(wp.customize,jQuery,_);
|
1 |
+
var CZRSeksPrototype=CZRSeksPrototype||{};!function(o,n){n.extend(CZRSeksPrototype,{initialize:function(){var i=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(o.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");i.MAX_NUMBER_OF_COLUMNS=12,i.SETTING_UPDATE_BUFFER=50,i.defaultSektionSettingValue=sektionsLocalizedData.defaultSektionSettingValue,i.sekCollectionSettingId=new o.Value({}),i.registered=new o.Value([]),o.bind("ready",function(){i.registerAndSetupDefaultPanelSectionOptions(),i.sekCollectionSettingId.callbacks.add(function(e,t){try{i.setupSettingToBeSaved()}catch(e){o.errare("Error in self.sekCollectionSettingId.callbacks => self.setupSettingsToBeSaved()",e)}}),_.isEmpty(o.czr_activeSkopes().local)||i.setContextualCollectionSettingIdWhenSkopeSet(),o.czr_activeSkopes.callbacks.add(function(e,t){i.setContextualCollectionSettingIdWhenSkopeSet(e,t)}),i.reactToPreviewMsg(),i.setupDnd(),i.setupTinyMceEditor(),i.schedulePrintSectionJson(),i.bind("sek-ui-removed",function(){o.previewedDevice("desktop")}),o.previewedDevice.bind(function(t){var e=_.filter(i.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){o.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){n(this).trigger("click")})})})}),n("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){i.resetCollectionSetting()}),i.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&o.control(e.id,function(e){e.container.find("[draggable]").each(function(){n(this).off("dragstart dragend")})}),"control"==e.what&&o.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(n(this).data("select2"))||n(this).select2("destroy")})})})})},registerAndSetupDefaultPanelSectionOptions:function(){var e=o.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});o.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg",'"/>'].join(""));if(0<e.length){e.on("click",function(e){o.previewer.trigger("sek-pick-module")});var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}})}),this.register({what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:1e3,constructWith:e,track:!1})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){!_.isEmpty(t.local)&&o.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&o.previewer.trigger("sek-pick-module"),sektionsData=o.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&o.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&o.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&o.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.sekCollectionSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,c){c.extend(CZRSeksPrototype,{setupSettingToBeSaved:function(){var e,t=this;e=s.czr_skopeBase.getSkopeProperty("sektions","local").db_values;var i=t.sekCollectionSettingId();if(_.isEmpty(i))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!s.has(i)){t.register({what:"setting",id:i,value:t.validateSettingValue(_.isObject(e)?e:t.defaultSektionSettingValue),transport:"postMessage",type:"option",track:!1});sektionsLocalizedData.isDevMode&&s(i,function(e){e.bind(function(e,t,i){s.infoLog("sektionSettingValue is updated",{newValue:e,previousValue:t,params:i})})})}},validateSettingValue:function(i){if(!_.isObject(i))return s.errare("validation error => the setting should be an object",i),null;var n={},o=!1,e=[],r=function(e){s.errare(e,i),s.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks the Nimble builder, you might try to reset the sections for this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),o=!0},a=function(t){if(!o)if(_.isUndefined(t)&&_.isEmpty(n)){if(t=c.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void r("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void r('validation error => the root level should not have a "level" or an "id" property');_.each(i.collection,function(e){n=t,a(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void r("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void r("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void r("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void r('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void r("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void r("validation error => missing collection property for level => "+t.level+" "+t.id);switch(t.level){case"location":if(!_.isEmpty(n.level))return void r("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=n.level)return void r("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=n.level)return void r("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=n.level)return void r("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=n.level)return void r("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){n=c.extend(!0,{},t),a(e)})}};return a(),o?null:i},resetCollectionSetting:function(){var e=this;if(_.isEmpty(e.sekCollectionSettingId()))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");s(e.sekCollectionSettingId())(e.defaultSektionSettingValue),s.previewer.refresh(),s.notifications.remove("sek-notify"),s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.Notification("sek-reset-done",{type:"success",message:sektionsLocalizedData.i18n["Reset complete"],dismissible:!0})),_.delay(function(){s.notifications.remove("sek-reset-done")},5e3)})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},a={},s=!0,e={"sek-add-section":{callback:function(e){return s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-module",{}),c.previewer.send("sek-focus-on",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-module",{})}},"sek-add-module":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.send("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-module",{}),o.updateAPISetting({action:"sek-update-fonts"}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-duplicate":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}c.previewer.send("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),c.previewer.send("sek-focus-on",{id:e.apiParams.id})}},"sek-resize-columns":function(e){return s=!0,a={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid()}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId}),o.updateAPISetting({action:"sek-update-fonts"}),c.previewer.send("sek-refresh-stylesheet",{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-pick-module":function(e){return s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered},o.generateUI(a)},"sek-pick-section":function(e){return s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:"section",was_triggered:!_.has(e,"was_triggered")||e.was_triggered},o.generateUI(a)},"sek-edit-options":function(e){return s=!0,r={},_.isEmpty(e.id)?l.Deferred(function(){this.reject("missing id")}):(a={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a))},"sek-edit-module":function(e){return s=!0,r={},a={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a)},"sek-notify":function(t){return s=!1,l.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification("sek-notify",{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove("sek-notify")},t.duration||5e3)}),this.resolve()})},"sek-refresh-level":function(e){return s=!0,l.Deferred(function(){r={action:"sek-refresh-level",level:e.level,id:e.id},a={},this.resolve()})}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){s?c.previewer.send(n,{skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:a,cloneId:!_.isEmpty(e)&&e}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:a}),o.trigger([n,"done"].join("_"),t)}).fail(function(t){c.errare("reactToPreviewMsg => error when firing "+n,t),c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification("sek-react-to-preview",{type:"info",message:t,dismissible:!0})),_.delay(function(){c.notifications.remove("sek-react-to-preview")},5e3)})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this,n=function(e){return e.id="",_.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&n(e)}),e};c.previewer.bind("sek-to-json",function(e){var t=l.extend(!0,{},i.getLevelModel(e.id));!function(e){w=400,h=300;var t=_.isUndefined(window.screenLeft)?window.screenX:window.screenLeft,i=_.isUndefined(window.screenTop)?window.screenY:window.screenTop,n=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,o=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,r=n/2-w/2+t,a=o/2-h/2+i,s=window.open("about:blank",null,"scrollbars=yes, width="+w+", height="+h+", top="+a+", left="+r),c=s.document;c.open("text/html"),c.write(e),c.close(),window.focus&&s.focus()}(JSON.stringify(n(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(g,p){p.extend(CZRSeksPrototype,{generateUI:function(n){var e,o=this,t=p.Deferred();switch(_.isEmpty(n.action)&&t.reject("generateUI => missing action"),n.action){case"sek-generate-draggable-candidates-picker-ui":var i=sektionsLocalizedData.optPrefixForSektionsNotSaved+("module"===n.content_type?"_sek_draggable_modules_ui":"_sek_draggable_sections_ui");if(o.isUIControlAlreadyRegistered(i)){g.control(i).focus({completeCallback:function(){var e=g.control(i).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}});break}o.cleanRegistered(),e=function(){g.has(i)||(g(i,function(e){e.bind(function(e,t){g.errare("MODULE / SECTION PICKER SETTING CHANGED")})}),o.register({level:n.level,what:"setting",id:i,dirty:!1,value:"",transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,what:"control",id:i,label:"module"===n.content_type?sektionsLocalizedData.i18n["Module Picker"]:sektionsLocalizedData.i18n["Section Picker"],type:"czr_module",module_type:"module"===n.content_type?"sek_module_picker_module":"sek_section_picker_module",section:i,priority:10,settings:{default:i},track:!1}).done(function(){g.control(i).focus({completeCallback:function(){}})})},g.section.when(i,function(){e()}),o.register({what:"section",id:i,title:"module"===n.content_type?sektionsLocalizedData.i18n["Module Picker"]:sektionsLocalizedData.i18n["Section Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:g.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})});break;case"sek-generate-module-ui":if(_.isEmpty(n.id)&&t.reject("generateUI => missing id"),o.isUIControlAlreadyRegistered(n.id)){g.control(n.id).focus({completeCallback:function(){}});break}o.cleanRegistered();var r=o.getLevelProperty({property:"value",id:n.id}),a=o.getLevelProperty({property:"module_type",id:n.id});_.isEmpty(a)&&t.reject("generateUI => module => invalid module_type"),e=function(){g.has(n.id)||(g(n.id,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(n,{action:"sek-set-module-value"}),settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:n.id,dirty:!1,value:r,transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,what:"control",id:n.id,label:sektionsLocalizedData.i18n["Customize the options for module :"]+" "+g.czrModuleMap[a].name,type:"czr_module",module_type:a,section:n.id,priority:10,settings:{default:n.id}}).done(function(){g.control(n.id).focus({completeCallback:function(){}})})},g.section.when(n.id,function(){e()}),o.register({what:"section",id:n.id,title:sektionsLocalizedData.i18n["Content for"]+" "+g.czrModuleMap[a].name,panel:sektionsLocalizedData.sektionsPanelId,priority:20});break;case"sek-generate-level-options-ui":var s=n.id+"__sectionLayout_options",c=n.id+"__bgBorder_options",l=n.id+"__height_options",d=n.id+"__spacing_options";if(o.isUIControlAlreadyRegistered(c)||o.isUIControlAlreadyRegistered(l)||o.isUIControlAlreadyRegistered(d)){g.section(g.control(c).section()).expanded(!0);break}o.cleanRegistered();var u=o.getLevelProperty({property:"options",id:n.id});u=_.isObject(u)?u:{},e=function(){"section"===n.level&&(g.has(l)||(g(s,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"layout",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:s,dirty:!1,value:u.layout||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,level_id:n.id,what:"control",id:s,label:sektionsLocalizedData.i18n["Layout settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_level_section_layout_module",section:n.id,priority:0,settings:{default:s}}).done(function(){g.control(s).focus({completeCallback:function(){}})})),g.has(c)||(g(c,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"bg_border",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:c,dirty:!1,value:u.bg_border||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,level_id:n.id,what:"control",id:c,label:sektionsLocalizedData.i18n["Background and border settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_level_bg_border_module",section:n.id,priority:10,settings:{default:c}}).done(function(){g.control(c).focus({completeCallback:function(){}})}),g.has(d)||(g(d,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"spacing",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:d,dirty:!1,value:u.spacing||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,what:"control",id:d,label:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_spacing_module",section:n.id,priority:15,settings:{default:d}}).done(function(){g.control(d).focus({completeCallback:function(){}})}),g.has(l)||(g(l,function(e){e.bind(_.debounce(function(e,t,i){try{o.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:_.extend(n,{action:"sek-set-level-options"}),options_type:"height",settingParams:{to:e,from:t,args:i}})}catch(e){g.errare("Error in updateAPISettingAndExecutePreviewActions",e)}},o.SETTING_UPDATE_BUFFER))}),o.register({level:n.level,what:"setting",id:l,dirty:!1,value:u.height||{},transport:"postMessage",type:"_nimble_ui_"})),o.register({level:n.level,level_id:n.id,what:"control",id:l,label:sektionsLocalizedData.i18n["Height settings for the"]+" "+sektionsLocalizedData.i18n[n.level],type:"czr_module",module_type:"sek_level_height_module",section:n.id,priority:20,settings:{default:l}}).done(function(){g.control(l).focus({completeCallback:function(){}})})},g.section.when(n.id,function(){e()}),o.register({what:"section",id:n.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+n.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1})}return"pending"==t.state()?t.resolve().promise():t.promise()},updateAPISettingAndExecutePreviewActions:function(e){if(!_.isEmpty(e.settingParams)&&_.has(e.settingParams,"to")){var t,i=this,n=e.settingParams.to,o=null,r=!1;if(!_.isEmpty(e.settingParams.args)&&_.has(e.settingParams.args,"moduleRegistrationParams")){var a=e.settingParams.args.moduleRegistrationParams.control,s=e.settingParams.args.moduleRegistrationParams.id,c=a.czr_Module(s);if(_.isEmpty(c)?g.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",e):(o=c.module_type,r=c.isMultiItem()),!r&&_.isObject(n)?t=i.normalizeAndSanitizeSingleItemInputValues(n,o):(t=[],_.each(n,function(e){t.push(i.normalizeAndSanitizeSingleItemInputValues(e,o))})),_.isEmpty(e.defaultPreviewAction))g.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",e);else{var l="refresh_stylesheet"===e.defaultPreviewAction,d="refresh_markup"===e.defaultPreviewAction,u="refresh_fonts"===e.defaultPreviewAction;_.isEmpty(e.settingParams.args.inputRegistrationParams)||(_.isUndefined(e.settingParams.args.inputRegistrationParams.refresh_stylesheet)||(l=Boolean(e.settingParams.args.inputRegistrationParams.refresh_stylesheet)),_.isUndefined(e.settingParams.args.inputRegistrationParams.refresh_markup)||(d=Boolean(e.settingParams.args.inputRegistrationParams.refresh_markup)),_.isUndefined(e.settingParams.args.inputRegistrationParams.refresh_fonts)||(u=Boolean(e.settingParams.args.inputRegistrationParams.refresh_fonts)));var p=function(){return i.updateAPISetting({action:e.uiParams.action,id:e.uiParams.id,value:t,in_column:e.uiParams.in_column,in_sektion:e.uiParams.in_sektion,options_type:e.options_type,settingParams:e.settingParams}).done(function(){!0===l&&g.previewer.send("sek-refresh-stylesheet",{skope_id:g.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:e.uiParams.id,level:e.uiParams.level}}),!0===d&&g.previewer.send("sek-refresh-level",{apiParams:{action:"sek-refresh-level",id:e.uiParams.id,level:e.uiParams.level},skope_id:g.czr_skopeBase.getSkopeProperty("skope_id")})})};if(!0===u){var m="";try{m="font_family_css"!=e.settingParams.args.input_changed?void g.errare("updateAPISettingAndExecutePreviewActions => Error when refreshing fonts => the input id is not font_family_css",e):e.settingParams.args.input_value}catch(e){return void g.errare("updateAPISettingAndExecutePreviewActions => Error when refreshing fonts",e)}if(!_.isString(m))return void g.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",er);-1<m.indexOf("gfont")?i.updateAPISetting({action:"sek-update-fonts",font_family:m}).done(function(){p().then(function(){i.updateAPISetting({action:"sek-update-fonts"})})}):p()}else p()}}else g.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",e)}else g.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",e)},normalizeAndSanitizeSingleItemInputValues:function(e,i){var n,o={},r={},a=null,s=this;return _.each(e,function(e,t){_.contains(["title","id"],t)||(null!==i&&"no_default_value_specified"===(a=s.getInputDefaultValue(t,i))&&g.infoLog("::updateAPISettingAndExecutePreviewActions => missing default value for input "+t+" in module "+i),e!==a&&(o[t]=e))}),_.each(o,function(e,t){switch(s.getInputType(t,i)){case"text":case"textarea":case"check":case"gutencheck":case"select":case"radio":case"number":case"upload":case"upload_url":case"color":case"wp_color_alpha":case"wp_color":case"content_picker":case"tiny_mce_editor":case"password":case"range":case"range_slider":case"hidden":case"h_alignment":case"h_text_alignment":case"spacing":case"bg_position":case"v_alignment":case"font_size":case"line_height":case"font_picker":default:n=e}r[t]=n}),r},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=g.control.has(t):(i=!0,1<e.length&&g.errare("generateUI => why is this control registered more than once ? => "+t)),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(H,Q){Q.extend(CZRSeksPrototype,{updateAPISetting:function($){var B=this,W=Q.Deferred();return H(B.sekCollectionSettingId(),function(e){var t,i,n,o,r,a,s,c,l=e(),d=_.isObject(l)?Q.extend(!0,{},l):B.defaultSektionSettingValue;switch(d.collection=_.isArray(d.collection)?d.collection:B.defaultSektionSettingValue.collection,$.action){case"sek-add-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");if(!0===$.is_nested){n=B.getLevelModel($.in_column,d.collection);var u=B.getLevelModel($.in_sektion,d.collection);if("no_match"==u){W.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===u.is_nested){W.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==n){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.push({id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+B.guid(),level:"column",collection:[]}],is_nested:!0})}else{if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}t.collection=_.isArray(t.collection)?t.collection:[],_.each(t.collection,function(e,t){$.before_section===e.id&&(M=t),$.after_section===e.id&&(M=t+1)}),t.collection=_.isArray(t.collection)?t.collection:[],t.collection.splice(M,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+B.guid(),level:"column",collection:[]}]})}break;case"sek-duplicate-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");var p;try{p=B.cloneLevel($.id)}catch(e){H.errare("updateAPISetting => "+$.action,e);break}var m=B.getLevelPositionInCollection($.id,d.collection);if(!0===$.is_nested){if("no_match"==(n=B.getLevelModel($.in_column,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection.splice(parseInt(m+1,10),0,p)}s=p.id;break;case"sek-remove-section":if(!0===$.is_nested)"no_match"!=(n=B.getLevelModel($.in_column,d.collection))?(n.collection=_.isArray(n.collection)?n.collection:[],n.collection=_.filter(n.collection,function(e){return e.id!=$.id})):H.errare("updateAPISetting => "+$.action+" => no parent column matched");else{if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}t.collection=_.filter(t.collection,function(e){return e.id!=$.id})}break;case"sek-move-section":var g,f,h=B.getLevelModel($.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+$.action+" => missing target location");if($.from_location!=$.to_location){var k=B.getLevelModel($.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+$.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],g=B.getLevelModel($.id,k.collection),f=Q.extend(!0,{},g),k.collection=_.filter(k.collection,function(e){return e.id!=$.id})}h.collection=_.isArray(h.collection)?h.collection:[],r=Q.extend(!0,[],h.collection),a=[],_.each($.newOrder,function(e){if($.from_location!=$.to_location&&e==f.id)a.push(f);else{if(i=B.getLevelModel(e,r),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => move section => missing section candidate");a.push(i)}}),h.collection=a;break;case"sek-add-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(i=B.getLevelModel($.in_sektion,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),W.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(i.collection=_.isArray(i.collection)?i.collection:[],B.MAX_NUMBER_OF_COLUMNS-1<_.size(i.collection)){W.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}_.each(i.collection,function(e){e.width=""}),i.collection.push({id:$.id,level:"column",collection:[]});break;case"sek-remove-column":if("no_match"!=(i=B.getLevelModel($.in_sektion,d.collection))){if(1===_.size(i.collection)){W.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}i.collection=_.isArray(i.collection)?i.collection:[],i.collection=_.filter(i.collection,function(e){return e.id!=$.id}),_.each(i.collection,function(e){e.width=""})}else H.errare("updateAPISetting => "+$.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(i=B.getLevelModel($.in_sektion,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),W.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(i.collection=_.isArray(i.collection)?i.collection:[],B.MAX_NUMBER_OF_COLUMNS-1<_.size(i.collection)){W.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var v;try{v=B.cloneLevel($.id)}catch(e){H.errare("updateAPISetting => "+$.action,e);break}var y=B.getLevelPositionInCollection($.id,d.collection);s=v.id,i.collection.splice(parseInt(y+1,10),0,v),_.each(i.collection,function(e){e.width=""});break;case"sek-resize-columns":if($.col_number<2)break;var w=B.getLevelModel($.resized_column,d.collection),b=B.getLevelModel($.sister_column,d.collection);if("no_match"==w){H.errare("updateAPISetting => "+$.action+" => no resized column matched"),W.reject("updateAPISetting => "+$.action+" => no resized column matched");break}w.width=parseFloat($.resizedColumnWidthInPercent);var P=B.getLevelModel($.in_sektion,d.collection),S=_.filter(P.collection,function(e){return e.id!=w.id&&e.id!=b.id}),z=parseFloat(w.width.toFixed(3));_.isEmpty(S)||_.each(S,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/$.col_number).toFixed(3))),z=parseFloat((z+e.width).toFixed(3))}),b.width=parseFloat((100-z).toFixed(3));break;case"sek-move-column":var I,E,D=B.getLevelModel($.to_sektion,d.collection);if(_.isEmpty(D)||"no_match"==D)throw new Error("updateAPISetting => "+$.action+" => missing target sektion");if($.from_sektion!=$.to_sektion){var C=B.getLevelModel($.from_sektion,d.collection);if(_.isEmpty(C)||"no_match"==C)throw new Error("updateAPISetting => "+$.action+" => missing source column");C.collection=_.isArray(C.collection)?C.collection:[],I=B.getLevelModel($.id,C.collection),E=Q.extend(!0,{},I),C.collection=_.filter(C.collection,function(e){return e.id!=$.id}),_.each(C.collection,function(e){e.width=""})}D.collection=_.isArray(D.collection)?D.collection:[],r=Q.extend(!0,[],D.collection),a=[],_.each($.newOrder,function(e){if($.from_sektion!=$.to_sektion&&e==E.id)a.push(E);else{if(n=B.getLevelModel(e,r),_.isEmpty(n)||"no_match"==n)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");a.push(n)}}),D.collection=a,_.each(D.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.module_type))throw new Error("updateAPISetting => "+$.action+" => missing module_type");if("no_match"===(n=B.getLevelModel($.in_column,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var M=0;n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_module===e.id&&(M=t),$.after_module===e.id&&(M=t+1)});var A={id:$.id,level:"module",module_type:$.module_type};"no_starting_value"!==(c=B.getModuleStartingValue($.module_type))&&(A.value=c),n.collection.splice(M,0,A);break;case"sek-duplicate-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(n=B.getLevelModel($.in_column,d.collection))){H.errare("updateAPISetting => "+$.action+" => no parent column matched"),W.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var x;n.collection=_.isArray(n.collection)?n.collection:[];try{x=B.cloneLevel($.id)}catch(e){H.errare("updateAPISetting => "+$.action,e),W.reject("updateAPISetting => "+$.action+" => error when cloning the level");break}var L=B.getLevelPositionInCollection($.id,d.collection);s=x.id,n.collection.splice(parseInt(L+1,10),0,x);break;case"sek-remove-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");"no_match"!=(n=B.getLevelModel($.in_column,d.collection))?(n.collection=_.isArray(n.collection)?n.collection:[],n.collection=_.filter(n.collection,function(e){return e.id!=$.id})):H.errare("updateAPISetting => "+$.action+" => no parent column matched");break;case"sek-move-module":var R,T,Z;if(R=B.getLevelModel($.to_column,d.collection),_.isEmpty(R)||"no_match"==R)throw new Error("updateAPISetting => "+$.action+" => missing target column");if($.from_column!=$.to_column){var O;if(O=B.getLevelModel($.from_column,d.collection),_.isEmpty(O)||"no_match"==O)throw new Error("updateAPISetting => "+$.action+" => missing source column");O.collection=_.isArray(O.collection)?O.collection:[],T=B.getLevelModel($.id,d.collection),Z=Q.extend(!0,{},T),O.collection=_.filter(O.collection,function(e){return e.id!=$.id})}if(R.collection=_.isArray(R.collection)?R.collection:[],r=Q.extend(!0,[],R.collection),a=[],_.each($.newOrder,function(e){if($.from_column!=$.to_column&&e==Z.id)a.push(Z);else{if(o=B.getLevelModel(e,d.collection),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => "+$.action+" => missing moduleCandidate");a.push(o)}}),a.length!=_.uniq(a).length)throw new Error("updateAPISetting => "+$.action+" => there are duplicated modules in column : "+R.id);R.collection=a;break;case"sek-set-module-value":o=B.getLevelModel($.id,d.collection);var j={};if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(j[t]=e)}),"no_match"==o){H.errare("updateAPISetting => "+$.action+" => no module matched",$),W.reject("updateAPISetting => "+$.action+" => error no module matched");break}o.value=j;break;case"sek-set-level-options":var U=B.getLevelModel($.id,d.collection),F={};if("no_match"===U){H.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),W.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}switch(U.options=U.options||{},_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(F[t]=e)}),_.isEmpty($.options_type)&&H.errare("updateAPISetting => "+$.action+" => missing options_type"),$.options_type){case"layout":U.options.layout=F;break;case"bg_border":U.options.bg_border=F;break;case"height":U.options.height=F;break;case"spacing":U.options.spacing=F}break;case"sek-add-content-in-new-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");M=0;if("no_match"==(t=B.getLevelModel($.location,d.collection))){H.errare("updateAPISetting => "+$.action+" => no location matched"),W.reject("updateAPISetting => "+$.action+" => no location matched");break}switch(t.collection=_.isArray(t.collection)?t.collection:[],_.each(t.collection,function(e,t){$.before_section===e.id&&(M=t),$.after_section===e.id&&(M=t+1)}),$.content_type){case"module":c=B.getModuleStartingValue($.content_id),t.collection.splice(M,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+B.guid(),level:"column",collection:[{id:$.droppedModuleId,level:"module",module_type:$.content_id,value:"no_starting_value"!==c?c:null}]}]});break;case"preset_section":var N;try{N=B.getPresetSectionCollection({presetSectionType:$.content_id,section_id:$.id})}catch(e){H.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",e),W.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()");break}if(!_.isObject(N)||_.isEmpty(N)){H.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,N),W.reject("updateAPISetting => "+$.action+" => preset section type not found or empty");break}t.collection.splice(M,0,N)}break;case"sek-update-fonts":var V=B.sniffGFonts();if(!_.isEmpty($.font_family)&&_.isString($.font_family)&&!_.contains(V,$.font_family)){if($.font_family.indexOf("gfont")<0){H.errare("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont"),W.reject("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont");break}V.push($.font_family)}d.fonts=V}"pending"==W.state()&&(_.isEqual(l,d)?W.reject("updateAPISetting => the new setting value is unchanged when firing action : "+$.action):null!==B.validateSettingValue(d)?(e(d,$),W.resolve(s)):W.reject("updateAPISetting => the new setting value did not pass the validation checks for action "+$.action))}),W.promise()},getPresetSectionCollection:function(e){var t=this,i=Q.extend(!0,{},sektionsLocalizedData.presetSections);if(!_.isObject(i)||_.isEmpty(i))throw new Error("getPresetSectionCollection => Invalid sektionsLocalizedData.presetSections");if(_.isEmpty(i[e.presetSectionType]))throw new Error("getPresetSectionCollection => "+e.presetSectionType+" has not been found in sektionsLocalizedData.presetSections");var n=i[e.presetSectionType];if("string"!=typeof n||"{"!==n[0])throw new Error("getPresetSectionCollection => "+e.presetSectionType+" is not JSON.parse-able");n=JSON.parse(n);var o=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),_.isArray(e.collection)&&o(e.collection)}),e};return n.id=e.section_id,n.collection=o(n.collection),n}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(f,h){h.extend(CZRSeksPrototype,{register:function(e){if(_.has(e,"id")){var t,i={};switch(e.what){case"setting":if(f.has(e.id))return e;t=h.extend(!0,{},f.Setting.prototype.defaults);var n=_.extend(t,{dirty:!_.isUndefined(e.dirty)&&e.dirty,value:e.value||[],transport:e.transport||"refresh",type:e.type||"option"}),o=f.settingConstructor[n.type]||f.Setting;try{f.add(new o(e.id,n.value,n))}catch(e){f.errare("czr_sektions::register => problem when adding a setting to the api",e)}break;case"panel":if(!_.has(e,"id"))throw new Error("registerPanel => missing panel id ");if(f.section.has(e.id))break;t=h.extend(!0,{},f.Panel.prototype.defaults);var r=_.extend(t,{id:e.id,title:e.title||e.id,priority:_.has(e,"priority")?e.priority:0}),a=_.isObject(e.constructWith)?e.constructWith:f.Panel;r=_.extend({params:r},r);try{i=f.panel.add(new a(e.id,r))}catch(e){f.errare("czr_sektions::register => problem when adding a panel to the api",e)}break;case"section":if(!_.has(e,"id"))throw new Error("registerSection => missing section id ");if(f.section.has(e.id))break;t=h.extend(!0,{},f.Section.prototype.defaults);var s=_.extend(t,{content:"",id:e.id,title:e.title,panel:e.panel,priority:e.priority,description_hidden:!1,customizeAction:sektionsLocalizedData.i18n.Customizing}),c=_.isUndefined(e.constructWith)?f.Section:e.constructWith;s=_.extend({params:s},s);try{i=f.section.add(new c(e.id,s))}catch(e){f.errare("czr_sektions::register => problem when adding a section to the api",e)}break;case"control":if(f.control.has(e.id))break;t=h.extend(!0,{},f.Control.prototype.defaults);var l,d=_.extend(t,{content:"",label:e.label||e.id,priority:e.priority,section:e.section,settings:e.settings,type:e.type,module_type:e.module_type,input_attrs:e.input_attrs,sek_registration_params:e}),u=f.controlConstructor[d.type]||f.Control;l=_.extend({params:d},d);try{i=f.control.add(new u(e.id,l))}catch(e){f.errare("czr_sektions::register => problem when adding a control to the api",e)}break;default:f.errorLog('invalid "what" when invoking the register() method')}if(i=_.isEmpty(i)?{deferred:{embedded:h.Deferred(function(){this.resolve()})}}:i,!1!==e.track){var p=this.registered(),m=h.extend(!0,[],p),g=_.findWhere(m,{id:e.id});if(!_.isEmpty(g)&&_.isEqual(g,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);m.push(e),this.registered(m)}return"setting"==e.what?e:i.deferred.embedded}f.errare("register => missing id ",e)},cleanRegistered:function(){var t=this,e=h.extend(!0,[],t.registered()||[]);e=_.filter(e,function(e){return"setting"!==e.what&&f[e.what].has(e.id)&&(_.isFunction(f[e.what](e.id).trigger)&&t.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),h.when(f[e.what](e.id).container.remove()).done(function(){f[e.what].remove(e.id),t.trigger("sek-ui-removed",{what:e.what,id:e.id})})),"setting"===e.what}),t.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{rootPanelFocus:function(){a.section.has(a.czr_activeSectionId())?a.section(a.czr_activeSectionId()).expanded(!1):a.section.each(function(e){e.expanded(!1)}),a.panel.each(function(e){e.expanded(!1)})},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()+e()+e()},getLevelModel:function(t,e){var i=this,n="no_match";if(_.isUndefined(e)){var o=a(i.sekCollectionSettingId())(),r=_.isObject(o)?s.extend(!0,{},o):i.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==n&&(t===e.id?n=e:_.isArray(e.collection)&&(n=i.getLevelModel(t,e.collection)))}),n},getLevelPositionInCollection:function(i,e){var n=this,o="no_match";if(_.isUndefined(e)){var t=a(n.sekCollectionSettingId())(),r=_.isObject(t)?s.extend(!0,{},t):n.defaultSektionSettingValue;e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e,t){"no_match"==o&&(i===e.id?o=t:_.isArray(e.collection)&&(o=n.getLevelPositionInCollection(i,e.collection)))}),o},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))a.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];a.errare("getLevelProperty => invalid model for id : "+e.id,t)}else a.errare("getLevelProperty => no level model found for id : "+e.id)}},cloneLevel:function(e){var t=this,i=t.getLevelModel(e);if("no_match"==i)throw new Error("cloneLevel => no match for level id : "+e);var n=s.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};var t=sektionsLocalizedData.registeredModules[e].tmpl["item-inputs"],i={id:"",title:""};return _.each(t,function(e,t){switch(t){case"tabs":_.each(e,function(e){_.each(e.inputs,function(e,t){i[t]=e.default||""})});break;default:i[t]=e.default||""}}),i},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sektionsLocalizedData.registeredModules[e][t]:"not_set"},isModuleRegistered:function(e){return sektionsLocalizedData.registeredModules&&!_.isUndefined(sektionsLocalizedData.registeredModules[e])},sniffGFonts:function(i,e){var n=this;if(i=i||[],_.isUndefined(e)){var t=a(n.sekCollectionSettingId())();e=_.isObject(t)?s.extend(!0,{},t):n.defaultSektionSettingValue}return _.each(e,function(e,t){"font_family_css"==t&&-1<e.indexOf("gfont")&&!_.contains(i,e)&&i.push(e),(_.isArray(e)||_.isObject(e))&&n.sniffGFonts(i,e)}),i},getInputDefaultValue:function(i,n,e){var o=this;if(o.cachedDefaultInputValues=o.cachedDefaultInputValues||{},o.cachedDefaultInputValues[n]=o.cachedDefaultInputValues[n]||{},_.has(o.cachedDefaultInputValues[n],i))return o.cachedDefaultInputValues[n][i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_default_value_specified";return _.each(e,function(e,t){"no_default_value_specified"===r&&(i!==t||_.isUndefined(e.default)||(r=e.default),"no_default_value_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputDefaultValue(i,n,e)),"no_default_value_specified"!==r&&(o.cachedDefaultInputValues[n][i]=r))}),r}a.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules")},getInputType:function(i,n,e){var o=this;if(o.cachedInputTypes=o.cachedInputTypes||{},o.cachedInputTypes[n]=o.cachedInputTypes[n]||{},_.has(o.cachedInputTypes[n],i))return o.cachedInputTypes[n][i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_input_type_specified";return _.each(e,function(e,t){"no_input_type_specified"===r&&(i!==t||_.isUndefined(e.input_type)||(r=e.input_type),"no_input_type_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputType(i,n,e)),"no_input_type_specified"!==r&&(o.cachedInputTypes[n][i]=r))}),r}a.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return a.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return a.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t=sektionsLocalizedData.registeredModules[e].starting_value;return _.isEmpty(t)?"no_starting_value":t}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,f){f.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){"draggable"in document.createElement("span")?t.setupNimbleDragZones(e.input_container):r.panel(sektionsLocalizedData.sektionsPanelId,function(e){r.notifications.add(new r.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){r.notifications.remove("drag-drop-support")},1e4)})}),r.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){r.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_section_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var t=this;e.find("[draggable]").each(function(){f(this).on("dragstart",function(e){(function(e){e.originalEvent.dataTransfer.setData("sek-content-type",f(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",f(this).data("sek-content-id"));try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){r.notifications.add(new r.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){r.notifications.remove("drag-drop-support")},1e4)})}t.dnd_draggedType=f(this).data("sek-content-type"),f("body").addClass("sek-dragging"),r.previewer.send("sek-drag-start",{type:t.dnd_draggedType})}).call(f(this),e)}).on("dragend",function(e){(function(e){f("body").removeClass("sek-dragging"),r.previewer.send("sek-drag-stop")}).call(f(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=f("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=f(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop(f(this))&&(e.stopPropagation(),t.dnd_OnEnterOver(f(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(f(this),e)||t.dnd_cleanOnLeaveDrop(f(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop(f(this)))return;e.preventDefault(),t.dnd_onDrop(f(this),e),t.dnd_cleanOnLeaveDrop(f(this),e),r.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_toggleDragApproachClassesToDropZones:function(g){this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.$dropZones.find(".sek-drop-zone").each(function(){var e=g.clientY,t=g.clientX,i=f(this)[0].getBoundingClientRect(),n=Math.abs(e-i.bottom),o=Math.abs(i.top-e),r=t-i.right,a=i.left-t,s=n<40||o<40,c=0<r&&r<40||0<a&&a<40,l=n<60||o<60,d=0<r&&r<60||0<a&&a<60,u=t<=i.right&&i.left<=t,p=e<=i.top&&i.bottom<=e,m=n<120||o<120,_=0<r&&r<120||0<a&&a<120;(s||p)&&(c||u)?(f(this).addClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-approaching")):(l||p)&&(d||u)?(f(this).addClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-approaching")):(m||p)&&(_||u)?(f(this).addClass("sek-drag-is-approaching"),f(this).removeClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-close")):(f(this).removeClass("sek-drag-is-very-close"),f(this).removeClass("sek-drag-is-close"),f(this).removeClass("sek-drag-is-approaching"))}),this.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=f(e.currentTarget);switch(this.dnd_draggedType){case"module":t=sektionsLocalizedData.i18n["Insert here"],0<n.length&&("between-sections"!==n.data("sek-location")&&"in-empty-location"!==n.data("sek-location")||(t=sektionsLocalizedData.i18n["Insert in a new section"])),i='<div class="sek-module-placeholder-content"><p>'+t+"</p></div>";break;case"preset_section":i='<div class="sek-module-placeholder-content"><p>'+(t=sektionsLocalizedData.i18n["Insert a new section here"])+"</p></div>";break;default:r.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return f(r.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=e&&0<e.length&&e.hasClass("sek-content-preset_section-drop-zone");return e.hasClass("sek-drop-zone")&&("preset_section"===this.dnd_draggedType&&t||"module"===this.dnd_draggedType&&!t)},dnd_OnEnterOver:function(e,t){t.preventDefault(),!0!==e.data("is-drag-entered")&&(e.data("is-drag-entered",!0),e.addClass("sek-active-drop-zone"),this.$dropZones.addClass("sek-is-dragging"));try{this.dnd_mayBePrintPreDropElement(e,t)}catch(e){r.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),f(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(f(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"))},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");f.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,a=i.right,s=i.top,c=i.bottom;return r<=n&&n-r<=a-r&&(s<=o&&o-s<=c-s)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();r.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id")})},reactToDrop:function(){this.bind("sek-content-dropped",function(e){try{!function(e){if(!_.isObject(e))throw new Error("Invalid params provided");if(e.drop_target_element.length<1)throw new Error("Invalid drop_target_element");var t="content-in-column";switch("between-sections"===e.drop_target_element.data("sek-location")&&(t="content-in-new-section"),"in-empty-location"===e.drop_target_element.data("sek-location")&&(t="content-in-empty-location"),"between-columns"===e.drop_target_element.data("sek-location")&&(t="content-in-new-column"),t){case"content-in-column":var i=e.drop_target_element.closest("div[data-sek-level]");if(i.length<1)throw new Error("No valid level dom element found");var n=i.data("sek-level"),o=i.data("sek-id");if(_.isEmpty(n)||_.isEmpty(o))throw new Error("No valid level id found");r.previewer.trigger("sek-add-module",{level:n,id:o,in_column:e.drop_target_element.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:e.drop_target_element.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-new-section":r.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"content-in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,r.previewer.trigger("sek-add-content-in-new-sektion",e)}}(e)}catch(e){r.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery),function(i,c,l){i.czrInputMap=i.czrInputMap||{},c.extend(i.czrInputMap,{spacing:function(e){var o=this,i=c(".sek-spacing-wrapper",o.container);i.on("keyup mouseup change",'input[type="number"]',function(e){var t=c(this).closest("[data-sek-spacing]").data("sek-spacing"),i=c.extend(!0,{},l.isObject(o())?o():{}),n=c(this).val();l.isString(n)&&!l.isEmpty(n)||l.isNumber(n)?i[t]=n:i=l.omit(t,i),o(i)}),i.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),i.find('input[type="number"]').each(function(){c(this).val("")}),o([])}),l.isObject(o())&&l.each(o(),function(e,t){c('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)})},bg_position:function(e){var t=this;c(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(c(this).val())}),l.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},v_alignment:function(e){var t=this,i=c(".sek-v-align-wrapper",t.container);i.find('div[data-sek-align="'+t()+'"]').addClass("selected"),i.on("click","[data-sek-align]",function(e){e.preventDefault(),i.find(".selected").removeClass("selected"),c.when(c(this).addClass("selected")).done(function(){t(c(this).data("sek-align"))})})},font_size:function(e){var t=this,i=c(".sek-font-size-wrapper",t.container);i.find('input[type="number"]').on("change",function(){t(c(this).val()+"px")}).stepper()},line_height:function(e){var t=this,i=c(".sek-line-height-wrapper",t.container);i.find('input[type="number"]').on("change",function(){t(c(this).val()+"px")}).stepper()},font_picker:function(e){var s=this,o=s.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+s.id+'"]',s.container);l.isNull(s())||l.isEmpty(s())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"),l.each([{title:sektionsLocalizedData.i18n["Web Safe Fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google Fonts"],type:"gfont",list:t.gfonts}],function(e){var t,r,a,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,a="",l.each(t,function(e){var t,i,n=e.name,o=l.isString(n)?n.replace(/[+|:]/g," "):n;t=n,i=r,(n=l.isString(t)?["[",i,"]",t].join(""):"")==s()?a+='<option selected="selected" value="'+n+'">'+o+"</option>":a+='<option value="'+n+'">'+o+"</option>"}),a)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.select2(i),c(".select2-selection__rendered",s.container).css(r(s()))},r=function(e){if(!l.isString(e)||l.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=a(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=l.isNumber(i)?i:400,n=o[1]&&-1!=o[1].indexOf("italic")?"italic":"",{"font-family":"none"==t?"inherit":t.replace(/[+|:]/g," "),"font-weight":i||400,"font-style":n||"normal"}},a=function(e){if(!l.isString(e)||l.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return l.isString(t[0])?t[0].replace(/[+|:]/g," "):""};o.bind("tab-switch",function(e){var t;c.when((t=c.Deferred(),l.isEmpty(s.sek_fontCollections)?i.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:s.module.id}).done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");s.sek_fontCollections=JSON.parse(e),t.resolve(s.sek_fontCollections)}).fail(function(e){t.reject(e)}):t.resolve(s.sek_fontCollections),t.promise())).done(function(t){var i;(i=c.Deferred(),void 0!==c.fn.select2&&void 0!==c.fn.select2.amd&&"function"==typeof c.fn.select2.amd.require?c.fn.select2.amd.require(["select2/results","select2/utils"],function(e,t){var n=function(e,t,i){n.__super__.constructor.call(this,e,t,i)};t.Extend(n,e),n.prototype.bind=function(e,t){var i=this;e.on("results:focus",function(e){"true"!=e.element.attr("aria-selected")&&i.trigger("select",{data:e.data})}),n.__super__.bind.call(this,e,t)},i.resolve(n)}):i.resolve(!1),i.promise()).done(function(e){n(e,t)})}).fail(function(e){i.errare("font_picker => fail response =>",e)})})}})}(wp.customize,jQuery,_);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var o=this;a.sekEditorExpanded=new a.Value(!1),a.sekEditorSynchronizedInput=new a.Value,o.editorEventsListenerSetup=!1;var r=function(){a.sekTinyMceEditor=a.sekTinyMceEditor||tinyMCE.get("czr-customize-content_editor"),!1===o.editorEventsListenerSetup&&(o.attachEventsToEditor(),o.editorEventsListenerSetup=!0,o.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};o.bind("sek-edit-module_done",function(e){"tiny_mce_editor"==e.clicked_input_type&&(a.sekEditorSynchronizedInput({control_id:e.id,input_id:e.clicked_input_id}),a.sekEditorExpanded(!0),a.sekTinyMceEditor.focus())}),s("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=s(this).data("czr-control-id"),t=s(this).data("czr-input-id");if(_.isEmpty(e)||_.isEmpty(t))a.errare("toggle-tinymce-editor => missing input or control id");else{var i=s.extend(!0,{},a.sekEditorSynchronizedInput()),n=_.extend(i,{input_id:t,control_id:e});a.sekEditorSynchronizedInput(n),a.sekEditorExpanded(!0),a.sekTinyMceEditor.focus()}}),a.sekEditorSynchronizedInput.bind(function(e,t){r();var i=o.getLevelProperty({property:"value",id:e.control_id}),n=_.isObject(i)&&!_.isEmpty(i[e.input_id])?i[e.input_id]:"";try{a.sekTinyMceEditor.setContent(n)}catch(e){a.errare("Error when setting the tiny mce editor content in setupTinyMceEditor",e)}a.sekTinyMceEditor.focus()}),a.sekEditorExpanded.bind(function(e){r(),e&&a.sekTinyMceEditor.focus(),s(document.body).toggleClass("czr-customize-content_editor-pane-open",e),s(window)[e?"on":"off"]("resize",function(){a.sekEditorExpanded()&&_.delay(function(){o.czrResizeEditor(window.innerHeight-o.$editorPane.height())},50)}),e?o.czrResizeEditor(window.innerHeight-o.$editorPane.height()):(o.$preview.css("bottom",""),o.$collapseSidebar.css("bottom",""))}),s("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){a.sekEditorExpanded(!1)}),s("#customize-controls").on("click",function(e){"open-tinymce-editor"!=s(e.target).data("czr-action")&&a.sekEditorExpanded(!1)}),s(document).on("keydown",_.throttle(function(e){27===e.keyCode&&a.sekEditorExpanded(!1)},50)),o.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=s(a.sekTinyMceEditor.iframeElement).contents().get(0);s(e).on("keydown",_.throttle(function(e){27===e.keyCode&&a.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-module","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?a.previewer.bind(e,function(){a.sekEditorExpanded(!1)}):a.previewer.bind(e,function(e){a.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachEventsToEditor:function(){var t=this;t.$editorTextArea=s("#czr-customize-content_editor"),t.$editorPane=s("#czr-customize-content_editor-pane"),t.$editorDragbar=s("#czr-customize-content_editor-dragbar"),t.$editorFrame=s("#czr-customize-content_editor_ifr"),t.$mceTools=s("#wp-czr-customize-content_editor-tools"),t.$mceToolbar=t.$editorPane.find(".mce-toolbar-grp"),t.$mceStatusbar=t.$editorPane.find(".mce-statusbar"),t.$preview=s("#customize-preview"),t.$collapseSidebar=s(".collapse-sidebar"),a.sekTinyMceEditor.on("input change keyup",function(e){if(a.control.has(a.sekEditorSynchronizedInput().control_id))try{a.control(a.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:a.sekEditorSynchronizedInput().input_id,html_content:a.sekTinyMceEditor.getContent(),modified_editor_element:a.sekTinyMceEditor})}catch(e){a.errare("Error when triggering tinyMceEditorUpdated",e)}}),t.$editorTextArea.on("input",function(e){try{a.control(a.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:a.sekEditorSynchronizedInput().input_id,html_content:t.$editorTextArea.val(),modified_editor_element:t.$editorTextArea})}catch(e){a.errare("Error when triggering tinyMceEditorUpdated",e)}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{});a.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=i.$mceTools.outerHeight()+i.$mceToolbar.outerHeight()+i.$mceStatusbar.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),i.$editorFrame.css("height",o.height-o.components),i.$collapseSidebar.css("bottom",n-o.height<56?i.$mceStatusbar.outerHeight()+4:o.height+8))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(t,e){jQuery.extend(CZRSeksPrototype,t.Events);var i=t.Class.extend(CZRSeksPrototype);try{t.czr_sektions=new i}catch(e){t.errare("api.czr_sektions => problem on instantiation",e)}}(wp.customize),function(a,o,s){var e={initialize:function(e,t){var i=this;i.inputConstructor=a.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=a.CZRItem.extend(i.CZRItemConstructor||{}),a.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){var n=this,e=(n.input_parent,n.module);s.isEmpty(sektionsLocalizedData.selectOptions[n.id])?a.errare("Missing select options for input id => "+n.id+" in module "+e.module_type):(s.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?o.extend(i,{selected:"selected"}):"px"===t&&o.extend(i,{selected:"selected"}),o("select[data-czrtype]",n.container).append(o("<option>",i))}),o("select[data-czrtype]",n.container).selecter())}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){a.errorLog("item.setInputVisibilityDeps() : "+e)}}),a.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module,r=function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})};n.czr_Input.each(function(i){switch(i.id){case"bg-image":s.each(["bg-position","bg-attachment","bg-scale","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay"],function(t){try{r.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!s.isEmpty(i()+"")&&a.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;default:e=!s.isEmpty(i()+"")}return e})}catch(e){a.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":s.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.call(i,e,function(){return!s.isEmpty(n.czr_Input("bg-image")()+"")&&a.CZR_Helpers.isChecked(i())})}catch(e){a.errare(o.id+" => error in setInputVisibilityDeps",e)}})}})}}};a.czrModuleMap=a.czrModuleMap||{},o.extend(a.czrModuleMap,{sek_level_bg_border_module:{mthds:e,crud:!1,name:a.czr_sektions.getRegisteredModuleProperty("sek_level_bg_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:s.extend({id:"",title:""},a.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_border_module"))}})}(wp.customize,jQuery,_),function(o,r,i){var e={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){var n=this,e=(n.input_parent,n.module);i.isEmpty(sektionsLocalizedData.selectOptions[n.id])?o.errare("Missing select options for input id => "+n.id+" in module "+e.module_type):(i.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?r.extend(i,{selected:"selected"}):"px"===t&&r.extend(i,{selected:"selected"}),r("select[data-czrtype]",n.container).append(r("<option>",i))}),r("select[data-czrtype]",n.container).selecter())}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(e){switch(e.id){case"height-type":(function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}).call(e,"custom-height",function(){return"custom"===e()})}})}}};o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{sek_level_height_module:{mthds:e,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(i,o,t){var e={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRInputMths:{setupSelect:function(){var n=this,e=(n.input_parent,n.module);t.isEmpty(sektionsLocalizedData.selectOptions[n.id])?i.errare("Missing select options for input id => "+n.id+" in module "+e.module_type):(t.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?o.extend(i,{selected:"selected"}):"px"===t&&o.extend(i,{selected:"selected"}),o("select[data-czrtype]",n.container).append(o("<option>",i))}),o("select[data-czrtype]",n.container).selecter())}}};i.czrModuleMap=i.czrModuleMap||{},o.extend(i.czrModuleMap,{sek_level_section_layout_module:{mthds:e,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_section_layout_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_section_layout_module"))}})}(wp.customize,jQuery,_),function(n,o,e){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRSpacingInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRSpacingItemMths||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRSpacingInputMths:{setupSelect:function(){var n=this;n.input_parent,n.module;e.each(sektionsLocalizedData.selectOptions.spacingUnits,function(e,t){var i={value:t,html:e};t==n()?o.extend(i,{selected:"selected"}):"px"===t&&o.extend(i,{selected:"selected"}),o("select[data-czrtype]",n.container).append(o("<option>",i))}),o("select[data-czrtype]",n.container).selecter()}},CZRSpacingItemMths:{initialize:function(e,t){n.CZRItem.prototype.initialize.call(this,e,t);var i=this;i.bind("tab-switch",function(e){device="desktop";try{device=i.container.find('[data-tab-id="'+e.id+'"]').data("sek-device")}catch(e){n.errare("spacing input => error when binding the tab switch event",e)}try{n.previewedDevice(device)}catch(e){n.errare("spacing input => error when setting the device on tab switch",e)}})}}};n.czrModuleMap=n.czrModuleMap||{},o.extend(n.czrModuleMap,{sek_spacing_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:e.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_spacing_module"))}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},e.extend(t.czrModuleMap,{sek_module_picker_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}}),t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})}})}(wp.customize,jQuery,_),function(o,r,a){var e={initialize:function(e,t){var i=this;o.CZRDynModule.prototype.initialize.call(i,e,t),i.inputConstructor=o.CZRInput.extend(i.CZRImageInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRImageInputMths:{setupSelect:function(){var n=this;n.input_parent,n.module;a.isEmpty(sektionsLocalizedData.selectOptions[n.id])?o.errare("Missing select options for input id => "+n.id+" in image module"):(a.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?r.extend(i,{selected:"selected"}):"px"===t&&r.extend(i,{selected:"selected"}),r("select[data-czrtype]",n.container).append(r("<option>",i))}),r("select[data-czrtype]",n.container).selecter())}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,e=(n.module,function(t,i){n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})});n.czr_Input.each(function(i){switch(i.id){case"link-to":a.each(["link-pick-url","link-custom-url","link-target"],function(t){try{e.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":e.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{czr_image_module:{mthds:e,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_module")}})}(wp.customize,jQuery,_),function(o,r,e){var t={initialize:function(e,t){o.CZRDynModule.prototype.initialize.call(this,e,t),this.inputConstructor=o.CZRInput.extend(this.CZRTextEditorInputMths||{})},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;o.CZRInput.prototype.initialize.call(i,e,t),"tiny_mce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")})},setupSelect:function(){var n=this;n.input_parent,n.module;e.isEmpty(sektionsLocalizedData.selectOptions[n.id])?o.errare("Missing select options for input id => "+n.id+" in image module"):(e.each(sektionsLocalizedData.selectOptions[n.id],function(e,t){var i={value:t,html:e};t==n()?r.extend(i,{selected:"selected"}):"px"===t&&r.extend(i,{selected:"selected"}),r("select[data-czrtype]",n.container).append(r("<option>",i))}),r("select[data-czrtype]",n.container).selecter())}}};o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{czr_tiny_mce_editor_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_tiny_mce_editor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tiny_mce_editor_module")}})}(wp.customize,jQuery,_);
|
assets/front/css/sek-base.css
CHANGED
@@ -560,10 +560,6 @@ fieldset[disabled] a.sek-btn {
|
|
560 |
clear: both;
|
561 |
}
|
562 |
|
563 |
-
.sek-sektion-inner {
|
564 |
-
padding: 15px;
|
565 |
-
}
|
566 |
-
|
567 |
/* To make vertical alignment possible in sections */
|
568 |
.sek-section, .sek-column, .sek-module {
|
569 |
display: -ms-flexbox;
|
@@ -578,6 +574,14 @@ fieldset[disabled] a.sek-btn {
|
|
578 |
max-width: 100%;
|
579 |
}
|
580 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
/* MODULE PLACEHOLDER */
|
582 |
/*@font-face {
|
583 |
font-family: 'Material Icons';
|
560 |
clear: both;
|
561 |
}
|
562 |
|
|
|
|
|
|
|
|
|
563 |
/* To make vertical alignment possible in sections */
|
564 |
.sek-section, .sek-column, .sek-module {
|
565 |
display: -ms-flexbox;
|
574 |
max-width: 100%;
|
575 |
}
|
576 |
|
577 |
+
/* a nested sektion should reset its parent column padding
|
578 |
+
@see https://github.com/presscustomizr/nimble-builder/issues/25
|
579 |
+
*/
|
580 |
+
[data-sek-is-nested="true"] .sek-container-fluid {
|
581 |
+
padding-right: 0;
|
582 |
+
padding-left: 0;
|
583 |
+
}
|
584 |
+
|
585 |
/* MODULE PLACEHOLDER */
|
586 |
/*@font-face {
|
587 |
font-family: 'Material Icons';
|
assets/front/css/sek-base.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.sektion-wrapper *,.sektion-wrapper ::after,.sektion-wrapper ::before{box-sizing:border-box}.sektion-wrapper img{max-width:100%;vertical-align:middle;border-style:none}.sektion-wrapper svg:not(:root){overflow:hidden}.sek-btn,.service-font{font-family:sans-serif;letter-spacing:1px}.sek-container{width:100%;padding-right:10px;padding-left:10px;margin-right:auto;margin-left:auto}@media (min-width:576px){.sek-container{max-width:540px}}@media (min-width:768px){.sek-container{max-width:720px}}@media (min-width:992px){.sek-container{max-width:960px}}@media (min-width:1200px){.sek-container{max-width:1140px}}.sek-container-fluid{width:100%;padding-right:10px;padding-left:10px;margin-right:auto;margin-left:auto}.sek-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-10px;margin-left:-10px}.sek-container-no-padding{padding-right:0;padding-left:0;overflow-x:hidden}.sek-no-gutters{margin-right:0;margin-left:0}.sek-no-gutters>.sek-col,.sek-no-gutters>[class*=sek-col-]{padding-right:0;padding-left:0}.sek-col,.sek-col-10,.sek-col-100,.sek-col-11,.sek-col-12,.sek-col-14,.sek-col-16,.sek-col-20,.sek-col-25,.sek-col-30,.sek-col-33,.sek-col-40,.sek-col-50,.sek-col-60,.sek-col-66,.sek-col-70,.sek-col-75,.sek-col-8,.sek-col-80,.sek-col-83,.sek-col-9,.sek-col-90,.sek-col-auto,.sek-col-base{position:relative;width:100%;min-height:1px;padding-right:10px;padding-left:10px}.sek-col-base{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.sek-col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.sek-col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}@media (min-width:768px){.sek-col-8{-ms-flex:0 0 8.333%;flex:0 0 8.333%;max-width:8.333%}.sek-col-9{-ms-flex:0 0 9.090909%;flex:0 0 9.090909%;max-width:9.090909%}.sek-col-10{-ms-flex:0 0 10%;flex:0 0 10%;max-width:10%}.sek-col-11{-ms-flex:0 0 11.111%;flex:0 0 11.111%;max-width:11.111%}.sek-col-12{-ms-flex:0 0 12.5%;flex:0 0 12.5%;max-width:12.5%}.sek-col-14{-ms-flex:0 0 14.285%;flex:0 0 14.285%;max-width:14.285%}.sek-col-16{-ms-flex:0 0 16.666%;flex:0 0 16.666%;max-width:16.666%}.sek-col-20{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.sek-col-25{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.sek-col-30{-ms-flex:0 0 30%;flex:0 0 30%;max-width:30%}.sek-col-33{-ms-flex:0 0 33.333%;flex:0 0 33.333%;max-width:33.333%}.sek-col-40{-ms-flex:0 0 40%;flex:0 0 40%;max-width:40%}.sek-col-50{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.sek-col-60{-ms-flex:0 0 60%;flex:0 0 60%;max-width:60%}.sek-col-66{-ms-flex:0 0 66.666%;flex:0 0 66.666%;max-width:66.666%}.sek-col-70{-ms-flex:0 0 70%;flex:0 0 70%;max-width:70%}.sek-col-75{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.sek-col-80{-ms-flex:0 0 80%;flex:0 0 80%;max-width:80%}.sek-col-83{-ms-flex:0 0 83.333%;flex:0 0 83.333%;max-width:83.333%}.sek-col-90{-ms-flex:0 0 90%;flex:0 0 90%;max-width:90%}.sek-col-100{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.sek-order-first{-ms-flex-order:-1;order:-1}.sek-order-last{-ms-flex-order:13;order:13}.sek-order-0{-ms-flex-order:0;order:0}.sek-order-1{-ms-flex-order:1;order:1}.sek-order-2{-ms-flex-order:2;order:2}.sek-order-3{-ms-flex-order:3;order:3}.sek-order-4{-ms-flex-order:4;order:4}.sek-order-5{-ms-flex-order:5;order:5}.sek-order-6{-ms-flex-order:6;order:6}.sek-order-7{-ms-flex-order:7;order:7}.sek-order-8{-ms-flex-order:8;order:8}.sek-order-9{-ms-flex-order:9;order:9}.sek-order-10{-ms-flex-order:10;order:10}.sek-order-11{-ms-flex-order:11;order:11}.sek-order-12{-ms-flex-order:12;order:12}}.sek-clearfix::after{display:block;clear:both;content:""}.sek-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sek-sr-only-focusable:active,.sek-sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.sek-btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5em 1em;border-radius:2px;border-width:2px;border-style:solid;font-size:1em;cursor:pointer;text-decoration:none;transition:all .2s ease-in-out}.sek-btn:focus,.sek-btn:hover{text-decoration:none}.focus.sek-btn,.sek-btn:focus{outline:0;box-shadow:2px,0,0,0,rgba(2,117,216,.25)}.disabled.sek-btn,.sek-btn:disabled{cursor:not-allowed;opacity:.65;box-shadow:none}.active.sek-btn,.sek-btn:active{background-image:none;box-shadow:2px,0,0,0,rgba(2,117,216,.25)}a.sek-btn.disabled,fieldset[disabled] a.sek-btn{pointer-events:none}[class*=sek__r-w]{position:relative;display:block;padding:0;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}[class*=sek__r-w]::before{display:block;content:""}.sek__r-wFP::before{padding-top:92.592593%}.sek-fp-widget{text-align:center;margin:auto!important}.sek-fp-widget .sek-fp-button-holder,.sek-fp-widget .sek-fp-text,.sek-fp-widget .sek-fp-title{width:90%;margin-left:auto;margin-right:auto}.sek-fp-widget .sek-fp-title{color:#5a5a5a;line-height:1.25em;margin-top:.625em;margin-bottom:1.25em;word-break:break-word;position:relative;font-weight:500;font-size:1.44em}.sek-fp-widget .sek-fp-title::after{content:"";position:absolute;width:1.25em;background:#5a5a5a;height:2px;top:100%;left:0;right:0;margin:.3125em auto 0;transition:all .6s ease}.sek-link-mask-p:hover .sek-fp-title::after{width:2.5em}.sek-fp-widget .sek-fp-text{color:#777;line-height:1.55em;margin:1.5em auto;word-wrap:break-word}.sek-fp-widget .sek-fp-text>a{padding:0!important;display:inline!important;line-height:1em!important}.sek-fp-widget .sek-fp-btn-link{text-transform:uppercase;margin-bottom:1.25em;white-space:normal;word-break:break-word;outline:0;background-color:#3b3b3b;color:#fff;border-color:#3b3b3b;font-size:.75em;line-height:2.5em;padding:0 2.5em}.sek-fp-widget .sek-fp-btn-link:active,.sek-fp-widget .sek-fp-btn-link:focus,.sek-fp-widget .sek-fp-btn-link:hover{color:#3b3b3b;background:0 0}.sek-fp-widget .sek-fp-thumb-wrapper{max-width:270px;margin:8px auto}.sek-fp-widget img{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-ms-transform:translate(0,0);-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute;top:0;left:0;z-index:0}.js-center-images-disabled .sek-fp-widget img{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-ms-transform:translate(-50%,-50%);top:50%;left:50%;max-width:100%}.sek-fp-widget img.h-centered{width:auto!important;max-width:none!important}.sek-fp-widget img.v-centered{height:auto!important;max-height:none!important;max-width:none!important;vertical-align:top}.sek-link-mask{position:absolute;border-color:#fff;left:0;right:0;top:0;bottom:0;overflow:hidden;z-index:1}.sek-link-mask.no-effect{border:none}.sek-link-mask::before{position:absolute;width:63%;padding-bottom:63%;content:'';z-index:1;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);border:150px solid;border-color:inherit;box-sizing:content-box;transition:all .3s ease}.round .sek-link-mask::before{border-radius:50%}.sek-link-mask-p:hover .sek-link-mask::before{-webkit-transform:translate(-50%,-50%) scale(1.4);transform:translate(-50%,-50%) scale(1.4);-webkit-transform:translate3d(-50%,-50%,0) scale(1.4);transform:translate3d(-50%,-50%,0) scale(1.4);-ms-transform:translate(-50%,-50%) scale(1.4)}.no-cssanimations .sek-link-mask{border:transparent}.no-cssanimations .sek-fp-thumb-wrapper{opacity:.7}.no-cssanimations .sek-fp-thumb-wrapper:hover{opacity:1}[data-sek-module-type=czr_image_module]{text-align:center}[data-sek-level=location]{clear:both}.sek-
|
1 |
+
.sektion-wrapper *,.sektion-wrapper ::after,.sektion-wrapper ::before{box-sizing:border-box}.sektion-wrapper img{max-width:100%;vertical-align:middle;border-style:none}.sektion-wrapper svg:not(:root){overflow:hidden}.sek-btn,.service-font{font-family:sans-serif;letter-spacing:1px}.sek-container{width:100%;padding-right:10px;padding-left:10px;margin-right:auto;margin-left:auto}@media (min-width:576px){.sek-container{max-width:540px}}@media (min-width:768px){.sek-container{max-width:720px}}@media (min-width:992px){.sek-container{max-width:960px}}@media (min-width:1200px){.sek-container{max-width:1140px}}.sek-container-fluid{width:100%;padding-right:10px;padding-left:10px;margin-right:auto;margin-left:auto}.sek-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-10px;margin-left:-10px}.sek-container-no-padding{padding-right:0;padding-left:0;overflow-x:hidden}.sek-no-gutters{margin-right:0;margin-left:0}.sek-no-gutters>.sek-col,.sek-no-gutters>[class*=sek-col-]{padding-right:0;padding-left:0}.sek-col,.sek-col-10,.sek-col-100,.sek-col-11,.sek-col-12,.sek-col-14,.sek-col-16,.sek-col-20,.sek-col-25,.sek-col-30,.sek-col-33,.sek-col-40,.sek-col-50,.sek-col-60,.sek-col-66,.sek-col-70,.sek-col-75,.sek-col-8,.sek-col-80,.sek-col-83,.sek-col-9,.sek-col-90,.sek-col-auto,.sek-col-base{position:relative;width:100%;min-height:1px;padding-right:10px;padding-left:10px}.sek-col-base{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.sek-col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.sek-col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}@media (min-width:768px){.sek-col-8{-ms-flex:0 0 8.333%;flex:0 0 8.333%;max-width:8.333%}.sek-col-9{-ms-flex:0 0 9.090909%;flex:0 0 9.090909%;max-width:9.090909%}.sek-col-10{-ms-flex:0 0 10%;flex:0 0 10%;max-width:10%}.sek-col-11{-ms-flex:0 0 11.111%;flex:0 0 11.111%;max-width:11.111%}.sek-col-12{-ms-flex:0 0 12.5%;flex:0 0 12.5%;max-width:12.5%}.sek-col-14{-ms-flex:0 0 14.285%;flex:0 0 14.285%;max-width:14.285%}.sek-col-16{-ms-flex:0 0 16.666%;flex:0 0 16.666%;max-width:16.666%}.sek-col-20{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.sek-col-25{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.sek-col-30{-ms-flex:0 0 30%;flex:0 0 30%;max-width:30%}.sek-col-33{-ms-flex:0 0 33.333%;flex:0 0 33.333%;max-width:33.333%}.sek-col-40{-ms-flex:0 0 40%;flex:0 0 40%;max-width:40%}.sek-col-50{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.sek-col-60{-ms-flex:0 0 60%;flex:0 0 60%;max-width:60%}.sek-col-66{-ms-flex:0 0 66.666%;flex:0 0 66.666%;max-width:66.666%}.sek-col-70{-ms-flex:0 0 70%;flex:0 0 70%;max-width:70%}.sek-col-75{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.sek-col-80{-ms-flex:0 0 80%;flex:0 0 80%;max-width:80%}.sek-col-83{-ms-flex:0 0 83.333%;flex:0 0 83.333%;max-width:83.333%}.sek-col-90{-ms-flex:0 0 90%;flex:0 0 90%;max-width:90%}.sek-col-100{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.sek-order-first{-ms-flex-order:-1;order:-1}.sek-order-last{-ms-flex-order:13;order:13}.sek-order-0{-ms-flex-order:0;order:0}.sek-order-1{-ms-flex-order:1;order:1}.sek-order-2{-ms-flex-order:2;order:2}.sek-order-3{-ms-flex-order:3;order:3}.sek-order-4{-ms-flex-order:4;order:4}.sek-order-5{-ms-flex-order:5;order:5}.sek-order-6{-ms-flex-order:6;order:6}.sek-order-7{-ms-flex-order:7;order:7}.sek-order-8{-ms-flex-order:8;order:8}.sek-order-9{-ms-flex-order:9;order:9}.sek-order-10{-ms-flex-order:10;order:10}.sek-order-11{-ms-flex-order:11;order:11}.sek-order-12{-ms-flex-order:12;order:12}}.sek-clearfix::after{display:block;clear:both;content:""}.sek-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sek-sr-only-focusable:active,.sek-sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.sek-btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5em 1em;border-radius:2px;border-width:2px;border-style:solid;font-size:1em;cursor:pointer;text-decoration:none;transition:all .2s ease-in-out}.sek-btn:focus,.sek-btn:hover{text-decoration:none}.focus.sek-btn,.sek-btn:focus{outline:0;box-shadow:2px,0,0,0,rgba(2,117,216,.25)}.disabled.sek-btn,.sek-btn:disabled{cursor:not-allowed;opacity:.65;box-shadow:none}.active.sek-btn,.sek-btn:active{background-image:none;box-shadow:2px,0,0,0,rgba(2,117,216,.25)}a.sek-btn.disabled,fieldset[disabled] a.sek-btn{pointer-events:none}[class*=sek__r-w]{position:relative;display:block;padding:0;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}[class*=sek__r-w]::before{display:block;content:""}.sek__r-wFP::before{padding-top:92.592593%}.sek-fp-widget{text-align:center;margin:auto!important}.sek-fp-widget .sek-fp-button-holder,.sek-fp-widget .sek-fp-text,.sek-fp-widget .sek-fp-title{width:90%;margin-left:auto;margin-right:auto}.sek-fp-widget .sek-fp-title{color:#5a5a5a;line-height:1.25em;margin-top:.625em;margin-bottom:1.25em;word-break:break-word;position:relative;font-weight:500;font-size:1.44em}.sek-fp-widget .sek-fp-title::after{content:"";position:absolute;width:1.25em;background:#5a5a5a;height:2px;top:100%;left:0;right:0;margin:.3125em auto 0;transition:all .6s ease}.sek-link-mask-p:hover .sek-fp-title::after{width:2.5em}.sek-fp-widget .sek-fp-text{color:#777;line-height:1.55em;margin:1.5em auto;word-wrap:break-word}.sek-fp-widget .sek-fp-text>a{padding:0!important;display:inline!important;line-height:1em!important}.sek-fp-widget .sek-fp-btn-link{text-transform:uppercase;margin-bottom:1.25em;white-space:normal;word-break:break-word;outline:0;background-color:#3b3b3b;color:#fff;border-color:#3b3b3b;font-size:.75em;line-height:2.5em;padding:0 2.5em}.sek-fp-widget .sek-fp-btn-link:active,.sek-fp-widget .sek-fp-btn-link:focus,.sek-fp-widget .sek-fp-btn-link:hover{color:#3b3b3b;background:0 0}.sek-fp-widget .sek-fp-thumb-wrapper{max-width:270px;margin:8px auto}.sek-fp-widget img{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-ms-transform:translate(0,0);-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute;top:0;left:0;z-index:0}.js-center-images-disabled .sek-fp-widget img{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-ms-transform:translate(-50%,-50%);top:50%;left:50%;max-width:100%}.sek-fp-widget img.h-centered{width:auto!important;max-width:none!important}.sek-fp-widget img.v-centered{height:auto!important;max-height:none!important;max-width:none!important;vertical-align:top}.sek-link-mask{position:absolute;border-color:#fff;left:0;right:0;top:0;bottom:0;overflow:hidden;z-index:1}.sek-link-mask.no-effect{border:none}.sek-link-mask::before{position:absolute;width:63%;padding-bottom:63%;content:'';z-index:1;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);border:150px solid;border-color:inherit;box-sizing:content-box;transition:all .3s ease}.round .sek-link-mask::before{border-radius:50%}.sek-link-mask-p:hover .sek-link-mask::before{-webkit-transform:translate(-50%,-50%) scale(1.4);transform:translate(-50%,-50%) scale(1.4);-webkit-transform:translate3d(-50%,-50%,0) scale(1.4);transform:translate3d(-50%,-50%,0) scale(1.4);-ms-transform:translate(-50%,-50%) scale(1.4)}.no-cssanimations .sek-link-mask{border:transparent}.no-cssanimations .sek-fp-thumb-wrapper{opacity:.7}.no-cssanimations .sek-fp-thumb-wrapper:hover{opacity:1}[data-sek-module-type=czr_image_module]{text-align:center}[data-sek-level=location]{clear:both}.sek-column,.sek-module,.sek-section{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sek-column-inner,.sek-module-inner{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}[data-sek-is-nested=true] .sek-container-fluid{padding-right:0;padding-left:0}@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:url(../fonts/material-icons/MaterialIcons-Regular.eot);src:local("Material Icons"),local("MaterialIcons-Regular"),url(../fonts/material-icons/MaterialIcons-Regular.woff2) format("woff2"),url(../fonts/material-icons/MaterialIcons-Regular.woff) format("woff"),url(../fonts/material-icons/MaterialIcons-Regular.ttf) format("truetype")}.material-icons{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:'liga';font-feature-settings:'liga'}.sek-module-placeholder{text-align:center}.sek-module-placeholder .material-icons{font-size:inherit;color:#cfcfcf}
|
inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.js
CHANGED
@@ -220,8 +220,6 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
|
|
220 |
api.errorLog( 'serverControlParams.paramsForDynamicRegistration should be an array');
|
221 |
}
|
222 |
|
223 |
-
//console.log( 'serverControlParams.paramsForDynamicRegistration', serverControlParams.paramsForDynamicRegistration );
|
224 |
-
|
225 |
_.each( serverControlParams.paramsForDynamicRegistration, function( dynParams, setId ) {
|
226 |
try { registerDynamicModuleSettingControl( dynParams ); } catch( er ) {
|
227 |
api.errorLog( er );
|
@@ -253,8 +251,9 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
|
|
253 |
|
254 |
}, args );
|
255 |
|
256 |
-
// we must have not empty setting_id,
|
257 |
-
if ( _.isEmpty( args.setting_id ) || _.isEmpty( args.
|
|
|
258 |
throw new Error( 'registerDynamicModuleSettingControl => missing params when registrating a setting');
|
259 |
}
|
260 |
|
@@ -263,7 +262,6 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
|
|
263 |
throw new Error( 'registerDynamicModuleSettingControl => the module values must be an array or an object');
|
264 |
}
|
265 |
|
266 |
-
// console.log( "args?", args );
|
267 |
var settingId = args.setting_id,
|
268 |
settingArgs = args.setting;
|
269 |
|
@@ -289,54 +287,69 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
|
|
289 |
// assign the value sent from the server
|
290 |
settingArgs.value = args.option_value;
|
291 |
|
292 |
-
// console.log('registerDynamicModuleSettingControl => SETTING DATA ?', settingId, settingArgs);
|
293 |
var SettingConstructor = api.settingConstructor[ settingArgs.type ] || api.Setting;
|
294 |
api.add( new SettingConstructor( settingId, settingArgs.value, settingArgs ) );
|
295 |
}
|
296 |
|
297 |
// MAYBE REGISTER THE SECTION
|
298 |
var sectionArgs = args.section;
|
|
|
|
|
|
|
|
|
|
|
299 |
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
description: _.isEmpty( sectionArgs.description ) ? '' : sectionArgs.description,
|
323 |
-
panel: _.isEmpty( sectionArgs.panel ) ? '' : sectionArgs.panel,
|
324 |
-
priority: sectionArgs.priority || 10
|
325 |
-
}
|
326 |
-
);
|
327 |
|
328 |
-
|
329 |
-
|
330 |
-
|
|
|
331 |
}
|
332 |
|
333 |
// REGISTER THE CONTROL
|
334 |
var controlId = settingId;
|
335 |
|
336 |
if ( ! api.control.has( controlId ) ) {
|
|
|
|
|
337 |
// start from a copy of a core control object
|
338 |
var controlArgs = args.control,
|
339 |
-
defaultControlArgs = $.extend( true, {} , api.settings.controls.blogdescription )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
// Then update it with our defaults set server side
|
341 |
// array(
|
342 |
// 'type' => 'czr_module',
|
@@ -348,7 +361,7 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
|
|
348 |
{
|
349 |
type : 'czr_module',
|
350 |
module_type : args.module_type,
|
351 |
-
section :
|
352 |
content : '',
|
353 |
label : controlArgs.label,
|
354 |
priority : controlArgs.priority
|
@@ -364,11 +377,9 @@ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push
|
|
364 |
|
365 |
// if the currently expanded section is the one of the dynamic control
|
366 |
// Awake the module => fire ready
|
367 |
-
if ( api.section(
|
368 |
api.control( controlId ).trigger( 'set-module-ready' );
|
369 |
}
|
370 |
-
// console.log('registerDynamicModuleSettingControl => CONTROL DATA ?', settingId, options);
|
371 |
-
// console.log('ALORS IN DYNAMIC REGISTRATION ? ', dataForSkopeToRegister, settingId );
|
372 |
}//if ( ! api.control.has( controlId ) )
|
373 |
|
374 |
return settingId;
|
@@ -1386,37 +1397,6 @@ api.CZR_Helpers = $.extend( api.CZR_Helpers, {
|
|
1386 |
*****************************************************************************/
|
1387 |
//Data are sent by the preview frame when the panel has sent the 'sync' or even better 'active' event
|
1388 |
api.bind( 'ready', function() {
|
1389 |
-
//observe widget settings changes
|
1390 |
-
api.previewer.bind('houston-widget-settings', function(data) {
|
1391 |
-
//get the difference
|
1392 |
-
var _candidates = _.filter( data.registeredSidebars, function( sb ) {
|
1393 |
-
return ! _.findWhere( _wpCustomizeWidgetsSettings.registeredSidebars, { id: sb.id } );
|
1394 |
-
});
|
1395 |
-
|
1396 |
-
var _inactives = _.filter( data.registeredSidebars, function( sb ) {
|
1397 |
-
return ! _.has( data.renderedSidebars, sb.id );
|
1398 |
-
});
|
1399 |
-
|
1400 |
-
_inactives = _.map( _inactives, function(obj) {
|
1401 |
-
return obj.id;
|
1402 |
-
});
|
1403 |
-
|
1404 |
-
var _registered = _.map( data.registeredSidebars, function(obj) {
|
1405 |
-
return obj.id;
|
1406 |
-
});
|
1407 |
-
|
1408 |
-
//stores and update the widget zone settings
|
1409 |
-
api.czr_widgetZoneSettings = api.czr_widgetZoneSettings || new api.Value();//will store all widget zones data sent by preview as an observable object
|
1410 |
-
api.czr_widgetZoneSettings.set( {
|
1411 |
-
actives : data.renderedSidebars,
|
1412 |
-
inactives : _inactives,
|
1413 |
-
registered : _registered,
|
1414 |
-
candidates : _candidates,
|
1415 |
-
available_locations : data.availableWidgetLocations//built server side
|
1416 |
-
} );
|
1417 |
-
|
1418 |
-
});
|
1419 |
-
|
1420 |
/* WP CONDITIONAL TAGS => stores and observes the WP conditional tags sent by the preview */
|
1421 |
api.previewer.bind( 'czr-query-data-ready', function( data ) {
|
1422 |
api.czr_wpQueryInfos = api.czr_wpQueryInfos || new api.Value();
|
@@ -2736,11 +2716,12 @@ $.extend( CZRItemMths , {
|
|
2736 |
module.itemsWrapper.append( $_view_el );
|
2737 |
|
2738 |
if ( module.isMultiItem() ) {
|
|
|
2739 |
// Do we have view content template script?
|
2740 |
// if yes, let's use it <= Old way
|
2741 |
// Otherwise let's fetch the html template from the server
|
2742 |
if ( ! _.isEmpty( module.rudItemPart ) ) {
|
2743 |
-
|
2744 |
//do we have view template script?
|
2745 |
if ( 1 > $( '#tmpl-' + _template_selector ).length ) {
|
2746 |
dfd.reject( 'Missing template for item ' + item.id + '. The provided template script has no been found : #tmpl-' + _template_selector );
|
@@ -2757,15 +2738,27 @@ $.extend( CZRItemMths , {
|
|
2757 |
};
|
2758 |
item.trigger( 'item-wrapper-tmpl-params-before-fetching', requestParams );
|
2759 |
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2767 |
}
|
2768 |
-
} else {
|
2769 |
appendAndResolve();
|
2770 |
}
|
2771 |
|
@@ -2987,8 +2980,10 @@ $.extend( CZRItemMths , {
|
|
2987 |
var tmplSelectorSuffix = module.getTemplateSelectorPart( 'itemInputList', item_model_for_template_injection );
|
2988 |
if ( 1 > $( '#tmpl-' + tmplSelectorSuffix ).length ) {
|
2989 |
dfd.reject( 'renderItemContent => No itemInputList content template defined for module ' + module.id + '. The template script id should be : #tmpl-' + tmplSelectorSuffix );
|
|
|
|
|
2990 |
}
|
2991 |
-
|
2992 |
} else {
|
2993 |
var requestParams = {
|
2994 |
tmpl : 'item-inputs',
|
@@ -3926,6 +3921,10 @@ $.extend( CZRModuleMths, {
|
|
3926 |
|
3927 |
//INSTANTIATE THE ITEMS
|
3928 |
_.each( _deepCopyOfItemCollection, function( item_candidate , key ) {
|
|
|
|
|
|
|
|
|
3929 |
//adds it to the collection and fire item.ready()
|
3930 |
if ( serverControlParams.isDevMode ) {
|
3931 |
module.instantiateItem( item_candidate ).ready();
|
@@ -3938,6 +3937,9 @@ $.extend( CZRModuleMths, {
|
|
3938 |
|
3939 |
//check if everything went well
|
3940 |
_.each( _deepCopyOfItemCollection, function( _item ) {
|
|
|
|
|
|
|
3941 |
if ( _.isUndefined( _.findWhere( module.itemCollection(), _item.id ) ) ) {
|
3942 |
throw new Error( 'populateSavedItemCollection : The saved items have not been properly populated in module : ' + module.id );
|
3943 |
}
|
@@ -4375,7 +4377,7 @@ $.extend( CZRModuleMths, {
|
|
4375 |
//console.log( 'renderModuleParts => success response =>', module.id, _serverTmpl_);
|
4376 |
appendAndResolve( api.CZR_Helpers.parseTemplate( _serverTmpl_ )( {} ) );
|
4377 |
}).fail( function( _r_ ) {
|
4378 |
-
|
4379 |
dfd.reject( 'renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : '+ module.id );
|
4380 |
});
|
4381 |
}
|
220 |
api.errorLog( 'serverControlParams.paramsForDynamicRegistration should be an array');
|
221 |
}
|
222 |
|
|
|
|
|
223 |
_.each( serverControlParams.paramsForDynamicRegistration, function( dynParams, setId ) {
|
224 |
try { registerDynamicModuleSettingControl( dynParams ); } catch( er ) {
|
225 |
api.errorLog( er );
|
251 |
|
252 |
}, args );
|
253 |
|
254 |
+
// we must have not empty setting_id, module_type
|
255 |
+
if ( _.isEmpty( args.setting_id ) || _.isEmpty( args.module_type ) ) {
|
256 |
+
api.errare( 'registerDynamicModuleSettingControl => args', args );
|
257 |
throw new Error( 'registerDynamicModuleSettingControl => missing params when registrating a setting');
|
258 |
}
|
259 |
|
262 |
throw new Error( 'registerDynamicModuleSettingControl => the module values must be an array or an object');
|
263 |
}
|
264 |
|
|
|
265 |
var settingId = args.setting_id,
|
266 |
settingArgs = args.setting;
|
267 |
|
287 |
// assign the value sent from the server
|
288 |
settingArgs.value = args.option_value;
|
289 |
|
|
|
290 |
var SettingConstructor = api.settingConstructor[ settingArgs.type ] || api.Setting;
|
291 |
api.add( new SettingConstructor( settingId, settingArgs.value, settingArgs ) );
|
292 |
}
|
293 |
|
294 |
// MAYBE REGISTER THE SECTION
|
295 |
var sectionArgs = args.section;
|
296 |
+
if ( ! _.isEmpty( sectionArgs ) ) {
|
297 |
+
// Check if we have a correct section
|
298 |
+
if ( ! _.has( sectionArgs, 'id' ) ){
|
299 |
+
throw new Error( 'registerDynamicModuleSettingControl => missing section id for the section of setting : ' + settingId );
|
300 |
+
}
|
301 |
|
302 |
+
if ( ! api.section.has( sectionArgs.id ) ) {
|
303 |
+
var _secData = _.extend(
|
304 |
+
{
|
305 |
+
active:true,
|
306 |
+
content:"",
|
307 |
+
customizeAction:"Customizing",
|
308 |
+
description:"",
|
309 |
+
description_hidden:false,
|
310 |
+
id: "",
|
311 |
+
instanceNumber: 99,
|
312 |
+
panel: "",
|
313 |
+
priority:0,
|
314 |
+
title: "",
|
315 |
+
type: "default",
|
316 |
+
}, {
|
317 |
+
id: sectionArgs.id,
|
318 |
+
title: sectionArgs.title || sectionArgs.id,
|
319 |
+
description: _.isEmpty( sectionArgs.description ) ? '' : sectionArgs.description,
|
320 |
+
panel: _.isEmpty( sectionArgs.panel ) ? '' : sectionArgs.panel,
|
321 |
+
priority: sectionArgs.priority || 10
|
322 |
+
}
|
323 |
+
);
|
|
|
|
|
|
|
|
|
|
|
324 |
|
325 |
+
var Constructor = api.sectionConstructor[ _secData.type ] || api.Section;
|
326 |
+
_secData = _.extend( { params: _secData }, _secData ); // Inclusion of params alias is for back-compat for custom sections that expect to augment this property.
|
327 |
+
api.section.add( new Constructor( _secData.id, _secData ) );
|
328 |
+
}
|
329 |
}
|
330 |
|
331 |
// REGISTER THE CONTROL
|
332 |
var controlId = settingId;
|
333 |
|
334 |
if ( ! api.control.has( controlId ) ) {
|
335 |
+
|
336 |
+
|
337 |
// start from a copy of a core control object
|
338 |
var controlArgs = args.control,
|
339 |
+
defaultControlArgs = $.extend( true, {} , api.settings.controls.blogdescription ),
|
340 |
+
ctrlSectionId;
|
341 |
+
|
342 |
+
// Do we have a section ?
|
343 |
+
if ( ! _.isEmpty( args.section ) ) {
|
344 |
+
ctrlSectionId = args.section.id;
|
345 |
+
} else {
|
346 |
+
ctrlSectionId = controlArgs.section;
|
347 |
+
}
|
348 |
+
|
349 |
+
if ( _.isEmpty( ctrlSectionId ) ) {
|
350 |
+
api.errare( 'registerDynamicModuleSettingControl => missing section id for the control', args );
|
351 |
+
throw new Error( 'registerDynamicModuleSettingControl => missing section id for the section of setting : ' + settingId );
|
352 |
+
}
|
353 |
// Then update it with our defaults set server side
|
354 |
// array(
|
355 |
// 'type' => 'czr_module',
|
361 |
{
|
362 |
type : 'czr_module',
|
363 |
module_type : args.module_type,
|
364 |
+
section : ctrlSectionId,
|
365 |
content : '',
|
366 |
label : controlArgs.label,
|
367 |
priority : controlArgs.priority
|
377 |
|
378 |
// if the currently expanded section is the one of the dynamic control
|
379 |
// Awake the module => fire ready
|
380 |
+
if ( api.section( ctrlSectionId ).expanded() ) {
|
381 |
api.control( controlId ).trigger( 'set-module-ready' );
|
382 |
}
|
|
|
|
|
383 |
}//if ( ! api.control.has( controlId ) )
|
384 |
|
385 |
return settingId;
|
1397 |
*****************************************************************************/
|
1398 |
//Data are sent by the preview frame when the panel has sent the 'sync' or even better 'active' event
|
1399 |
api.bind( 'ready', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1400 |
/* WP CONDITIONAL TAGS => stores and observes the WP conditional tags sent by the preview */
|
1401 |
api.previewer.bind( 'czr-query-data-ready', function( data ) {
|
1402 |
api.czr_wpQueryInfos = api.czr_wpQueryInfos || new api.Value();
|
2716 |
module.itemsWrapper.append( $_view_el );
|
2717 |
|
2718 |
if ( module.isMultiItem() ) {
|
2719 |
+
var _template_selector;
|
2720 |
// Do we have view content template script?
|
2721 |
// if yes, let's use it <= Old way
|
2722 |
// Otherwise let's fetch the html template from the server
|
2723 |
if ( ! _.isEmpty( module.rudItemPart ) ) {
|
2724 |
+
_template_selector = module.getTemplateSelectorPart( 'rudItemPart', item_model_for_template_injection );
|
2725 |
//do we have view template script?
|
2726 |
if ( 1 > $( '#tmpl-' + _template_selector ).length ) {
|
2727 |
dfd.reject( 'Missing template for item ' + item.id + '. The provided template script has no been found : #tmpl-' + _template_selector );
|
2738 |
};
|
2739 |
item.trigger( 'item-wrapper-tmpl-params-before-fetching', requestParams );
|
2740 |
|
2741 |
+
// Let's check if the filtered requested params can find a match of a printed tmpl of the module
|
2742 |
+
// this filter 'item-wrapper-tmpl-params-before-fetching', is used in the widget zone module of the Hueman theme (june 2018 )
|
2743 |
+
// it allows us to assign a specific template for the built-in widget zones
|
2744 |
+
if ( ! _.isEmpty( module[ requestParams.tmpl ] ) ) {
|
2745 |
+
_template_selector = module.getTemplateSelectorPart( requestParams.tmpl, item_model_for_template_injection );
|
2746 |
+
//do we have view template script?
|
2747 |
+
if ( 1 > $( '#tmpl-' + _template_selector ).length ) {
|
2748 |
+
dfd.reject( 'Missing template for item ' + item.id + '. The provided template script has no been found : #tmpl-' + _template_selector );
|
2749 |
+
}
|
2750 |
+
appendAndResolve( wp.template( _template_selector )( item_model_for_template_injection ) );
|
2751 |
+
} else {
|
2752 |
+
api.CZR_Helpers.getModuleTmpl( requestParams ).done( function( _serverTmpl_ ) {
|
2753 |
+
//console.log( 'renderItemWrapper => success response =>', module.id, _serverTmpl_);
|
2754 |
+
appendAndResolve( api.CZR_Helpers.parseTemplate( _serverTmpl_ )( {} ) );
|
2755 |
+
}).fail( function( _r_ ) {
|
2756 |
+
//console.log( 'renderItemWrapper => fail response =>', _r_);
|
2757 |
+
dfd.reject( 'renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : '+ module.id );
|
2758 |
+
});
|
2759 |
+
}
|
2760 |
}
|
2761 |
+
} else {//if ( module.isMultiItem() ) {}
|
2762 |
appendAndResolve();
|
2763 |
}
|
2764 |
|
2980 |
var tmplSelectorSuffix = module.getTemplateSelectorPart( 'itemInputList', item_model_for_template_injection );
|
2981 |
if ( 1 > $( '#tmpl-' + tmplSelectorSuffix ).length ) {
|
2982 |
dfd.reject( 'renderItemContent => No itemInputList content template defined for module ' + module.id + '. The template script id should be : #tmpl-' + tmplSelectorSuffix );
|
2983 |
+
} else {
|
2984 |
+
appendAndResolve( wp.template( tmplSelectorSuffix )( item_model_for_template_injection ) );
|
2985 |
}
|
2986 |
+
|
2987 |
} else {
|
2988 |
var requestParams = {
|
2989 |
tmpl : 'item-inputs',
|
3921 |
|
3922 |
//INSTANTIATE THE ITEMS
|
3923 |
_.each( _deepCopyOfItemCollection, function( item_candidate , key ) {
|
3924 |
+
if ( ! _.isObject( item_candidate ) ) {
|
3925 |
+
api.errare( 'populateSavedItemCollection => an item should be described by an object in module type : ' + module.module_type, 'module id : ' + module.id );
|
3926 |
+
return;
|
3927 |
+
}
|
3928 |
//adds it to the collection and fire item.ready()
|
3929 |
if ( serverControlParams.isDevMode ) {
|
3930 |
module.instantiateItem( item_candidate ).ready();
|
3937 |
|
3938 |
//check if everything went well
|
3939 |
_.each( _deepCopyOfItemCollection, function( _item ) {
|
3940 |
+
if ( ! _.isObject( _item ) ) {
|
3941 |
+
return;
|
3942 |
+
}
|
3943 |
if ( _.isUndefined( _.findWhere( module.itemCollection(), _item.id ) ) ) {
|
3944 |
throw new Error( 'populateSavedItemCollection : The saved items have not been properly populated in module : ' + module.id );
|
3945 |
}
|
4377 |
//console.log( 'renderModuleParts => success response =>', module.id, _serverTmpl_);
|
4378 |
appendAndResolve( api.CZR_Helpers.parseTemplate( _serverTmpl_ )( {} ) );
|
4379 |
}).fail( function( _r_ ) {
|
4380 |
+
api.errare( 'renderModuleParts => fail response =>', _r_);
|
4381 |
dfd.reject( 'renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : '+ module.id );
|
4382 |
});
|
4383 |
}
|
inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"function"!=typeof jQuery.fn.iCheck&&function(v){function _(e,t,n){var i=e[0],o=/er/.test(n)?z:/bl/.test(n)?$:x,r=n==R?{checked:i[x],disabled:i[$],indeterminate:"true"==e.attr(z)||"false"==e.attr(E)}:i[o];if(/^(ch|di|in)/.test(n)&&!r)y(e,o);else if(/^(un|en|de)/.test(n)&&r)b(e,o);else if(n==R)for(o in r)r[o]?y(e,o,!0):b(e,o,!0);else t&&"toggle"!=n||(t||e[P]("ifClicked"),r?i[O]!==I&&b(e,o):y(e,o))}function y(e,t,n){var i=e[0],o=e.parent(),r=t==x,s=t==z,a=t==$,l=s?E:r?g:"enabled",d=h(e,l+m(i[O])),c=h(e,t+m(i[O]));if(!0!==i[t]){if(!n&&t==x&&i[O]==I&&i.name){var u=e.closest("form"),p='input[name="'+i.name+'"]';(p=u.length?u.find(p):v(p)).each(function(){this!==i&&v(this).data(C)&&b(v(this),t)})}s?(i[t]=!0,i[x]&&b(e,x,"force")):(n||(i[t]=!0),r&&i[z]&&b(e,z,!1)),f(e,r,t,n)}i[$]&&h(e,D,!0)&&o.find("."+M).css(D,"default"),o[S](c||h(e,t)||""),a?o.attr("aria-disabled","true"):o.attr("aria-checked",s?"mixed":"true"),o[A](d||h(e,l)||"")}function b(e,t,n){var i=e[0],o=e.parent(),r=t==x,s=t==z,a=t==$,l=s?E:r?g:"enabled",d=h(e,l+m(i[O])),c=h(e,t+m(i[O]));!1!==i[t]&&((s||!n||"force"==n)&&(i[t]=!1),f(e,r,l,n)),!i[$]&&h(e,D,!0)&&o.find("."+M).css(D,"pointer"),o[A](c||h(e,t)||""),a?o.attr("aria-disabled","false"):o.attr("aria-checked","false"),o[S](d||h(e,l)||"")}function w(e,t){e.data(C)&&(e.parent().html(e.attr("style",e.data(C).s||"")),t&&e[P](t),e.off(".i").unwrap(),v(k+'[for="'+e[0].id+'"]').add(e.closest(k)).off(".i"))}function h(e,t,n){return e.data(C)?e.data(C).o[t+(n?"":"Class")]:void 0}function m(e){return e.charAt(0).toUpperCase()+e.slice(1)}function f(e,t,n,i){i||(t&&e[P]("ifToggled"),e[P]("ifChanged")[P]("if"+m(n)))}var C="iCheck",M=C+"-helper",I="radio",x="checked",g="un"+x,$="disabled",E="determinate",z="in"+E,R="update",O="type",S="addClass",A="removeClass",P="trigger",k="label",D="cursor",T=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);v.fn[C]=function(t,n){var i='input[type="checkbox"], input[type="'+I+'"]',o=v(),e=function(e){e.each(function(){var e=v(this);o=e.is(i)?o.add(e):o.add(e.find(i))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t))return t=t.toLowerCase(),e(this),o.each(function(){var e=v(this);"destroy"==t?w(e,"ifDestroyed"):_(e,!0,t),v.isFunction(n)&&n()});if("object"!=typeof t&&t)return this;var c=v.extend({checkedClass:x,disabledClass:$,indeterminateClass:z,labelHover:!0,aria:!1},t),r=c.handle,u=c.hoverClass||"hover",p=c.focusClass||"focus",h=c.activeClass||"active",m=!!c.labelHover,f=c.labelHoverClass||"hover",g=0|(""+c.increaseArea).replace("%","");return("checkbox"==r||r==I)&&(i='input[type="'+r+'"]'),g<-50&&(g=-50),e(this),o.each(function(){var i=v(this);w(i);var o=this,e=o.id,t={position:"absolute",top:n=-g+"%",left:n,display:"block",width:t=100+2*g+"%",height:t,margin:0,padding:0,background:"#fff",border:0,opacity:0},n=T?{position:"absolute",visibility:"hidden"}:g?t:{position:"absolute",opacity:0},r="checkbox"==o[O]?c.checkboxClass||"icheckbox":c.radioClass||"i"+I,s=v(k+'[for="'+e+'"]').add(i.closest(k)),a=!!c.aria,l=C+"-"+Math.random().toString(36).substr(2,6),d='<div class="'+r+'" '+(a?'role="'+o[O]+'" ':"");a&&s.each(function(){d+='aria-labelledby="',this.id?d+=this.id:(this.id=l,d+=l),d+='"'}),d=i.wrap(d+"/>")[P]("ifCreated").parent().append(c.insert),t=v('<ins class="'+M+'"/>').css(t).appendTo(d),i.data(C,{o:c,s:i.attr("style")}).css(n),c.inheritClass&&d[S](o.className||""),c.inheritID&&e&&d.attr("id",C+"-"+e),"static"==d.css("position")&&d.css("position","relative"),_(i,!0,R),s.length&&s.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(e){var t=e[O],n=v(this);if(!o[$]){if("click"==t){if(v(e.target).is("a"))return;_(i,!1,!0)}else m&&(/ut|nd/.test(t)?(d[A](u),n[A](f)):(d[S](u),n[S](f)));if(!T)return!1;e.stopPropagation()}}),i.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[O];return e=e.keyCode,"click"!=t&&("keydown"==t&&32==e?(o[O]==I&&o[x]||(o[x]?b(i,x):y(i,x)),!1):void("keyup"==t&&o[O]==I?!o[x]&&y(i,x):/us|ur/.test(t)&&d["blur"==t?A:S](p)))}),t.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(e){var t=e[O],n=/wn|up/.test(t)?h:u;if(!o[$]){if("click"==t?_(i,!1,!0):(/wn|er|in/.test(t)?d[S](n):d[A](n+" "+h),s.length&&m&&n==u&&s[/ut|nd/.test(t)?A:S](f)),!T)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&function(c,o){"use strict";function r(e,t){if(!e.hasClass("selecter-element")){(t=c.extend({},t,e.data("selecter-options"))).external&&(t.links=!0);var n=e.find("option, optgroup"),i=n.filter("option"),o=i.filter(":selected"),r=""!==t.label?-1:i.index(o),s=t.links?"nav":"div";t.tabIndex=e[0].tabIndex,e[0].tabIndex=-1,t.multiple=e.prop("multiple"),t.disabled=e.is(":disabled");var a="<"+s+' class="selecter '+t.customClass;w?a+=" mobile":t.cover&&(a+=" cover"),a+=t.multiple?" multiple":" closed",t.disabled&&(a+=" disabled"),a+='" tabindex="'+t.tabIndex+'">',t.multiple||(a+='<span class="selecter-selected'+(""!==t.label?" placeholder":"")+'">',a+=c("<span></span").text(y(""!==t.label?t.label:o.text(),t.trim)).html(),a+="</span>"),a+='<div class="selecter-options">',a+="</div>",a+="</"+s+">",e.addClass("selecter-element").after(a);var l=e.next(".selecter"),d=c.extend({$select:e,$allOptions:n,$options:i,$selecter:l,$selected:l.find(".selecter-selected"),$itemsWrapper:l.find(".selecter-options"),index:-1,guid:b++},t);u(d),_(r,d),void 0!==c.fn.scroller&&d.$itemsWrapper.scroller(),d.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",d,p).on("click.selecter",".selecter-item",d,m).on("close.selecter",d,h).data("selecter",d),d.$select.on("change.selecter",d,f),w||(d.$selecter.on("focus.selecter",d,g).on("blur.selecter",d,v),d.$select.on("focus.selecter",d,function(e){e.data.$selecter.trigger("focus")}))}}function u(e){for(var t="",n=e.links?"a":"span",i=0,o=e.$allOptions.length;i<o;i++){var r=e.$allOptions.eq(i);if("OPTGROUP"===r[0].tagName)t+='<span class="selecter-group',r.is(":disabled")&&(t+=" disabled"),t+='">'+r.attr("label")+"</span>";else{var s=r.val();r.attr("value")||r.attr("value",s),t+="<"+n+' class="selecter-item',r.is(":selected")&&""===e.label&&(t+=" selected"),r.is(":disabled")&&(t+=" disabled"),t+='" ',t+=e.links?'href="'+s+'"':'data-value="'+s+'"',t+=">"+c("<span></span>").text(y(r.text(),e.trim)).html()+"</"+n+">",0}}e.$itemsWrapper.html(t),e.$items=e.$selecter.find(".selecter-item")}function p(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$select.is(":disabled"))if(c(".selecter").not(t.$selecter).trigger("close.selecter",[t]),w){var n=t.$select[0];if(o.document.createEvent){var i=o.document.createEvent("MouseEvents");i.initMouseEvent("mousedown",!1,!0,o,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}else n.fireEvent&&n.fireEvent("onmousedown")}else t.$selecter.hasClass("closed")?function(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$selecter.hasClass("open")){var n=t.$selecter.offset(),i=d.outerHeight(),o=t.$itemsWrapper.outerHeight(!0),r=0<=t.index?t.$items.eq(t.index).position():{left:0,top:0};n.top+o>i&&t.$selecter.addClass("bottom"),t.$itemsWrapper.show(),t.$selecter.removeClass("closed").addClass("open"),d.on("click.selecter-"+t.guid,":not(.selecter-options)",t,s),void 0!==c.fn.scroller?t.$itemsWrapper.scroller("scroll",t.$itemsWrapper.find(".scroller-content").scrollTop()+r.top,0).scroller("reset"):t.$itemsWrapper.scrollTop(t.$itemsWrapper.scrollTop()+r.top)}}(e):t.$selecter.hasClass("open")&&h(e)}function s(e){e.preventDefault(),e.stopPropagation(),0===c(e.currentTarget).parents(".selecter").length&&h(e)}function h(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.hasClass("open")&&(t.$itemsWrapper.hide(),t.$selecter.removeClass("open bottom").addClass("closed"),d.off(".selecter-"+t.guid))}function m(e){e.preventDefault(),e.stopPropagation();var t=c(this),n=e.data;if(!n.$select.is(":disabled")){if(n.$itemsWrapper.is(":visible"))_(n.$items.index(t),n),a(n);n.multiple||h(e)}}function f(e,t){var n=c(this),i=e.data;t||i.multiple||(_(i.$options.index(i.$options.filter("[value='"+n.val().replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")+"']")),i),a(i))}function g(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$select.is(":disabled")||t.multiple||(t.$selecter.addClass("focus").on("keydown.selecter"+t.guid,t,n),c(".selecter").not(t.$selecter).trigger("close.selecter",[t]))}function v(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.removeClass("focus").off("keydown.selecter"+t.guid+" keyup.selecter"+t.guid),c(".selecter").not(t.$selecter).trigger("close.selecter",[t])}function n(e){var t=e.data;if(13===e.keyCode)t.$selecter.hasClass("open")&&(h(e),_(t.index,t)),a(t);else if(!(9===e.keyCode||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault(),e.stopPropagation();var n=t.$items.length-1,i=t.index<0?0:t.index;if(-1<c.inArray(e.keyCode,l?[38,40,37,39]:[38,40]))(i+=38===e.keyCode||l&&37===e.keyCode?-1:1)<0&&(i=0),n<i&&(i=n);else{var o,r=String.fromCharCode(e.keyCode).toUpperCase();for(o=t.index+1;o<=n;o++)if(t.$options.eq(o).text().charAt(0).toUpperCase()===r){i=o;break}if(i<0)for(o=0;o<=n;o++)if(t.$options.eq(o).text().charAt(0).toUpperCase()===r){i=o;break}}0<=i&&_(i,t)}}function _(e,t){var n=t.$items.eq(e),i=n.hasClass("selected");if(!n.hasClass("disabled")){if(-1===e&&""!==t.label)t.$selected.html(t.label);else if(i)t.multiple&&(t.$options.eq(e).prop("selected",null),n.removeClass("selected"));else{var o=n.html();n.data("value"),t.multiple?t.$options.eq(e).prop("selected",!0):(t.$selected.html(o).removeClass("placeholder"),t.$items.filter(".selected").removeClass("selected"),t.$select[0].selectedIndex=e),n.addClass("selected")}(!i||t.multiple)&&(t.index=e)}}function a(e){var t,n;e.links?(n=(t=e).$select.val(),t.external?o.open(n):o.location.href=n):(e.callback.call(e.$selecter,e.$select.val(),e.index),e.$select.trigger("change",[!0]))}function y(e,t){return 0===t?e:e.length>t?e.substring(0,t)+"...":e}var b=0,l=-1<o.navigator.userAgent.toLowerCase().indexOf("firefox"),w=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(o.navigator.userAgent||o.navigator.vendor||o.opera),d=null,C={callback:c.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},t={defaults:function(e){return C=c.extend(C,e||{}),c(this)},disable:function(o){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");if(n)if(void 0!==o){var i=n.$items.index(n.$items.filter("[data-value="+o+"]"));n.$items.eq(i).addClass("disabled"),n.$options.eq(i).prop("disabled",!0)}else n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),n.$selecter.addClass("disabled"),n.$select.prop("disabled",!0)})},enable:function(o){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");if(n)if(void 0!==o){var i=n.$items.index(n.$items.filter("[data-value="+o+"]"));n.$items.eq(i).removeClass("disabled"),n.$options.eq(i).prop("disabled",!1)}else n.$selecter.removeClass("disabled"),n.$select.prop("disabled",!1)})},destroy:function(){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");n&&(n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==c.fn.scroller&&n.$selecter.find(".selecter-options").scroller("destroy"),n.$select[0].tabIndex=n.tabIndex,n.$select.off(".selecter").removeClass("selecter-element").show(),n.$selecter.off(".selecter").remove())})},refresh:function(){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");if(n){var i=n.index;n.$allOptions=n.$select.find("option, optgroup"),n.$options=n.$allOptions.filter("option"),n.index=-1,i=n.$options.index(n.$options.filter(":selected")),u(n),_(i,n)}})}};c.fn.selecter=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=c.extend({},C,e||{}),null===d&&(d=c("body"));for(var t=c(this),n=0,i=t.length;n<i;n++)r(t.eq(n),e);return t}.apply(this,arguments)},c.selecter=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&function(d){"use strict";function o(e,t){if(!e.hasClass("stepper-input")){t=d.extend({},t,e.data("stepper-options"));var n=parseFloat(e.attr("min")),i=parseFloat(e.attr("max")),o=parseFloat(e.attr("step"))||1;e.addClass("stepper-input").wrap('<div class="stepper '+t.customClass+'" />').after('<span class="stepper-arrow up">'+t.labels.up+'</span><span class="stepper-arrow down">'+t.labels.down+"</span>");var r=e.parent(".stepper"),s=d.extend({$stepper:r,$input:e,$arrow:r.find(".stepper-arrow"),min:void 0!==typeof n&&!isNaN(n)&&n,max:void 0!==typeof i&&!isNaN(i)&&i,step:void 0===typeof o||isNaN(o)?1:o,timer:null},t);s.digits=(a=s.step,-1<(l=String(a)).indexOf(".")?l.length-l.indexOf(".")-1:0),e.is(":disabled")&&r.addClass("disabled"),r.on("touchstart.stepper mousedown.stepper",".stepper-arrow",s,c).data("stepper",s)}var a,l}function c(e){e.preventDefault(),e.stopPropagation(),s(e);var t,n,i,o=e.data;if(!o.$input.is(":disabled")&&!o.$stepper.hasClass("disabled")){var r=d(e.target).hasClass("up")?o.step:-o.step;o.timer=(t=o.timer,n=125,i=function(){a(o,r)},l(t),setInterval(i,n)),a(o,r),d("body").on("touchend.stepper mouseup.stepper",o,s)}}function s(e){e.preventDefault(),e.stopPropagation(),l(e.data.timer),d("body").off(".stepper")}function a(e,t){var n=parseFloat(e.$input.val()),i=t;void 0===typeof n||isNaN(n)?i=!1!==e.min?e.min:0:!1!==e.min&&n<e.min?i=e.min:i+=n;var o,r,s,a=(i-e.min)%e.step;0!==a&&(i-=a),!1!==e.min&&i<e.min&&(i=e.min),!1!==e.max&&i>e.max&&(i-=e.step),i!==n&&(o=i,r=e.digits,s=Math.pow(10,r),i=Math.round(o*s)/s,e.$input.val(i).trigger("change"))}function l(e){e&&(clearInterval(e),e=null)}var r={customClass:"",labels:{up:"Up",down:"Down"}},t={defaults:function(e){return r=d.extend(r,e||{}),d(this)},destroy:function(){return d(this).each(function(){var e=d(this).data("stepper");e&&(e.$stepper.off(".stepper").find(".stepper-arrow").remove(),e.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return d(this).each(function(){var e=d(this).data("stepper");e&&(e.$input.attr("disabled","disabled"),e.$stepper.addClass("disabled"))})},enable:function(){return d(this).each(function(){var e=d(this).data("stepper");e&&(e.$input.attr("disabled",null),e.$stepper.removeClass("disabled"))})}};d.fn.stepper=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=d.extend({},r,e||{});for(var t=d(this),n=0,i=t.length;n<i;n++)o(t.eq(n),e);return t}.apply(this,arguments)},d.stepper=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.select2&&n.fn.select2.amd)var e=n.fn.select2.amd;var t,o,d;return e&&e.requirejs||(e?o=e:e={},function(p){function h(e,t){return n.call(e,t)}function s(e,t){var n,i,o,r,s,a,l,d,c,u,p,h=t&&t.split("/"),m=w.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,w.nodeIdCompat&&M.test(e[s])&&(e[s]=e[s].replace(M,"")),e=h.slice(0,h.length-1).concat(e),c=0;c<e.length;c+=1)if("."===(p=e[c]))e.splice(c,1),c-=1;else if(".."===p){if(1===c&&(".."===e[2]||".."===e[0]))break;0<c&&(e.splice(c-1,2),c-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(c=(n=e.split("/")).length;0<c;c-=1){if(i=n.slice(0,c).join("/"),h)for(u=h.length;0<u;u-=1)if((o=m[h.slice(0,u).join("/")])&&(o=o[i])){r=o,a=c;break}if(r)break;!l&&f&&f[i]&&(l=f[i],d=c)}!r&&l&&(r=l,a=d),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function m(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),l.apply(p,e.concat([t,n]))}}function f(t){return function(e){y[t]=e}}function g(e){if(h(b,e)){var t=b[e];delete b[e],C[e]=!0,r.apply(p,t)}if(!h(y,e)&&!h(C,e))throw new Error("No "+e);return y[e]}function a(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var r,l,v,_,y={},b={},w={},C={},n=Object.prototype.hasOwnProperty,i=[].slice,M=/\.js$/;v=function(e,t){var n,i,o=a(e),r=o[0];return e=o[1],r&&(n=g(r=s(r,t))),r?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return s(e,i)})):s(e,t):(r=(o=a(e=s(e,t)))[0],e=o[1],r&&(n=g(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},_={require:function(e){return m(e)},exports:function(e){var t=y[e];return void 0!==t?t:y[e]={}},module:function(e){return{id:e,uri:"",exports:y[e],config:(t=e,function(){return w&&w.config&&w.config[t]||{}})};var t}},r=function(e,t,n,i){var o,r,s,a,l,d,c=[],u=typeof n;if(i=i||e,"undefined"===u||"function"===u){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(r=(a=v(t[l],i)).f))c[l]=_.require(e);else if("exports"===r)c[l]=_.exports(e),d=!0;else if("module"===r)o=c[l]=_.module(e);else if(h(y,r)||h(b,r)||h(C,r))c[l]=g(r);else{if(!a.p)throw new Error(e+" missing "+r);a.p.load(a.n,m(i,!0),f(r),{}),c[l]=y[r]}s=n?n.apply(y[e],c):void 0,e&&(o&&o.exports!==p&&o.exports!==y[e]?y[e]=o.exports:s===p&&d||(y[e]=s))}else e&&(y[e]=n)},t=o=l=function(e,t,n,i,o){if("string"==typeof e)return _[e]?_[e](t):g(v(e,t).f);if(!e.splice){if((w=e).deps&&l(w.deps,w.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=o),i?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),l},l.config=function(e){return l(e)},t._defined=y,(d=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),h(y,e)||h(b,e)||(b[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=o,e.define=d),e.define("almond",function(){}),e.define("jquery",[],function(){var e=n||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(r){function c(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}var e={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var o in t)i.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(i,o){function r(){var e=Array.prototype.unshift,t=o.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=o.prototype.constructor),n.apply(this,arguments)}var e=c(o),t=c(i);o.displayName=i.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var s=t[n];r.prototype[s]=i.prototype[s]}for(var a=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=o.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}},l=0;l<e.length;l++){var d=e[l];r.prototype[d]=a(d)}return r}},t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];(r=r.substring(0,1).toLowerCase()+r.substring(1))in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=r(t),i=t.style.overflowX,o=t.style.overflowY;return(i!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===i||"scroll"===o||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===r.fn.jquery.substr(0,3)){var n=r();r.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("select2/results",["jquery","./utils"],function(p,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=p('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var r=p(t),s=document.createElement("strong");s.className="select2-results__group",p(s),this.template(e,s);for(var a=[],l=0;l<e.children.length;l++){var d=e.children[l],c=this.option(d);a.push(c)}var u=p("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});u.append(a),r.append(s),r.append(u)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var r=l.$results.offset().top,s=o.offset().top,a=l.$results.scrollTop()+(s-r);0===i?l.$results.scrollTop(0):s-r<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=l.$results.offset().top+l.$results.outerHeight(!1),r=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+r-o;0===n?l.$results.scrollTop(0):o<r&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,o=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");return"true"===t.attr("aria-selected")?void(l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})):void l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,o=this.$results.scrollTop()+(i-n),r=i-n;o-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(r>this.$results.outerHeight()||r<0)&&this.$results.scrollTop(o)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),o=n(e,t);null==o?t.style.display="none":"string"==typeof o?t.innerHTML=i(o):p(t).append(o)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,e,o){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===o.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(t,e){var n=this;o.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},o}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function o(e,t){o.__super__.constructor.apply(this,arguments)}return a.Extend(o,e),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},o.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],o=this.selectionContainer(),r=this.display(i,o);o.append(r),o.prop("title",i.title||i.text),o.data("data",i),t.push(o)}var s=this.$selection.find(".select2-selection__rendered");a.appendMany(s,t)}},o}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),e.define("select2/selection/allowClear",["jquery","../keys"],function(i,o){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||(t.which==o.DELETE||t.which==o.BACKSPACE)&&this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=i('<span class="select2-selection__clear">×</span>');n.data("data",t),this.$selection.find(".select2-selection__rendered").prepend(n)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var o=document.documentMode,r=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){return r?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(r&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)}})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,o)){t=t||{};var n=s.Event("select2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,r)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("select2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return(n+=i.generateChars(4))+(null!=t.id?"-"+t.id.toString():"-"+i.generateChars(4))},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,t,a){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(o){var r=this;if(o.selected=!0,a(o.element).is("option"))return o.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(o=[o]).push.apply(o,e);for(var n=0;n<o.length;n++){var i=o[n].id;-1===a.inArray(i,t)&&t.push(i)}r.$element.val(t),r.$element.trigger("change")});else{var e=o.id;this.$element.val(e),this.$element.trigger("change")}},n.prototype.unselect=function(o){var r=this;if(this.$element.prop("multiple"))return o.selected=!1,a(o.element).is("option")?(o.element.selected=!1,void this.$element.trigger("change")):void this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==o.id&&-1===a.inArray(i,t)&&t.push(i)}r.$element.val(t),r.$element.trigger("change")})},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var o=[],r=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=r.item(e),n=r.matches(i,t);null!==n&&o.push(n)}}),e({results:o})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],o=0;o<n.length;o++){var r=a(n[o]),s=this.item(r);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){function t(e){return function(){return f(this).val()==e.id}}for(var n=this,i=this.$element.find("option"),o=i.map(function(){return n.item(f(this)).id}).get(),r=[],s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=f.inArray(a.id,o)){var l=i.filter(t(a)),d=this.item(l),c=f.extend(!0,{},a,d),u=this.option(c);l.replaceWith(u)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}r.push(p)}}return r},i}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){var i=r.ajax(e);return i.then(t),i.fail(n),i}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){function e(){var e=t.transport(t,function(e){var t=o.processResults(e,n);o.options.get("debug")&&window.console&&console.error&&(t&&t.results&&r.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){e.status&&"0"===e.status||o.trigger("results:message",{message:"errorLoading"})});o._request=e}var o=this;null!=this._request&&(r.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=r.extend({type:"GET"},this.ajaxOptions);"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(c){function e(e,t,n){var i=n.get("tags"),o=n.get("createTag");void 0!==o&&(this.createTag=o);var r=n.get("insertTag");if(void 0!==r&&(this.insertTag=r),e.call(this,t,n),c.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),d=this.option(l);this.$element.append(d)}}return e.prototype.query=function(e,d,c){var u=this;return this._removeOldTags(),null==d.term||null!=d.page?void e.call(this,d,c):void e.call(this,d,function e(t,n){for(var i=t.results,o=0;o<i.length;o++){var r=i[o],s=null!=r.children&&!e({results:r.children},!0);if(r.text===d.term||s)return!n&&(t.data=i,void c(t))}if(n)return!0;var a=u.createTag(d);if(null!=a){var l=u.option(a);l.attr("data-select2-tag",!0),u.addOptions([l]),u.insertTag(i,a)}t.results=i,c(t)})},e.prototype.createTag=function(e,t){var n=c.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-select2-tag]")).each(function(){this.selected||c(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var o=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=o._normalizeItem(e);if(!o.$element.find("option").filter(function(){return u(this).val()===n.id}).length){var i=o.option(n);i.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([i])}t=n,o.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var o=n.get("tokenSeparators")||[],r=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<r.length;){var l=r[s];if(-1!==u.inArray(l,o)){var d=r.substr(0,s),c=a(u.extend({},t,{term:d}));null!=c?(i(c),r=r.substr(s+1)||"",s=0):s++}else s++}return{term:r}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,o){var r=this;this.current(function(e){var t=null!=e?e.length:0;return 0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void n.call(r,i,o)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()&&i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(o){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=o.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=o.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=o('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=m("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,o="resize.select2."+t.id,r="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){m(this).data("select2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),s.on(i,function(e){var t=m(this).data("select2-scroll-position");m(this).scrollTop(t.y)}),m(window).on(i+" "+o+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+o)},e.prototype._positionDropdown=function(){var e=m(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=o.top,r.bottom=o.top+r.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),d=a<o.top-s,c=l>o.bottom+s,u={left:o.left,top:r.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();u.top-=h.top,u.left-=h.left,t||n||(i="below"),c||!d||t?!d&&c&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(u.top=r.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(u)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(m,f,g,v,_,y,b,w,C,M,I,t,x,$,E,z,R,O,S,A,P,k,D,T,j,Z,U,L,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=E:null!=t.data?t.dataAdapter=$:t.dataAdapter=x,0<t.minimumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,O)),0<t.maximumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,S)),0<t.maximumSelectionLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,A)),t.tags&&(t.dataAdapter=M.Decorate(t.dataAdapter,z)),(null!=t.tokenSeparators||null!=t.tokenizer)&&(t.dataAdapter=M.Decorate(t.dataAdapter,R)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=M.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=M.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,T)),null!=t.placeholder&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,U))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=P;else{var i=M.Decorate(P,k);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,Z)),t.closeOnSelect&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,L)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var o=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=M.Decorate(t.dropdownAdapter,o)}t.dropdownAdapter=M.Decorate(t.dropdownAdapter,j)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=_:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,y)),t.allowClear&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,w)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var r=f(t.amdBase+"compat/containerCss");t.selectionAdapter=M.Decorate(t.selectionAdapter,r)}t.selectionAdapter=M.Decorate(t.selectionAdapter,C)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var s=t.language.split("-")[0];t.language=[t.language,s]}else t.language=[t.language];if(m.isArray(t.language)){var a=new I;t.language.push("en");for(var l=t.language,d=0;d<l.length;d++){var c=l[d],u={};try{u=I.loadPath(c)}catch(e){try{c=this.defaults.amdLanguageBase+c,u=I.loadPath(c)}catch(e){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+c+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(u)}t.translations=a}else{var p=I.loadPath(this.defaults.amdLanguageBase+"en"),h=new I(t.language);h.extend(p),t.translations=h}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:M.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.extend(!0,{},n),o=n.children.length-1;0<=o;o--)null==e(t,n.children[o])&&i.children.splice(o,1);return 0<i.children.length?i:e(t,i)}var r=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<r.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[m.camelCase(e)]=t;var i=M._convertData(n);m.extend(this.defaults,i)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(i,r,o,s){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=o.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n;n=r.fn.jquery&&"1."==r.fn.jquery.substr(0,2)&&e[0].dataset?r.extend(!0,{},e[0].dataset,e.data()):e.data();var i=r.extend(!0,{},n);for(var o in i=s._convertData(i))-1<r.inArray(o,t)||(r.isPlainObject(this.options[o])?r.extend(this.options[o],i[o]):this.options[o]=i[o]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,d,n,i){var c=function(e,t){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new d(t,e),c.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var o=this.render();this._placeContainer(o);var r=this.options.get("selectionAdapter");this.selection=new r(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,o);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,o);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(c,n.Observable),c.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},c.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},c.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;a<l;a+=1){var d=s[a].replace(/\s/g,"").match(n);if(null!==d&&1<=d.length)return d[1]}return null}return t},c.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},c.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){o.each(e,t._syncA),o.each(e,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},c.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,i)&&n.trigger(e,t)})},c.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},c.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},c.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var o=0;o<t.addedNodes.length;o++){t.addedNodes[o].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},c.prototype.trigger=function(e,t){var n=c.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var o=i[e],r={prevented:!1,name:e,args:t};if(n.call(this,o,r),r.prevented)return void(t.prevented=!0)}n.call(this,e,t)},c.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},c.prototype.open=function(){this.isOpen()||this.trigger("query",{})},c.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},c.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},c.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},c.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},c.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},c.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},c.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},c.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},c.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},c}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(o,e,r,t){if(null==o.fn.select2){var s=["open","close","destroy"];o.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=o.extend(!0,{},t);new r(o(this),e)}),this;if("string"==typeof t){var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o(this).data("select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1<o.inArray(t,s)?this:n}throw new Error("Invalid arguments for Select2: "+t)}}return null==o.fn.select2.defaults&&(o.fn.select2.defaults=t),r}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return n.fn.select2.amd=e,t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(r){"use strict";function n(e,t){function n(e){void 0!==e.open&&(e.open=!e.open)}var i=function(e){for(var t=[],n=e.parentNode;(i=n)&&(0===i.offsetWidth||0===i.offsetHeight||!1===i.open);)t.push(n),n=n.parentNode;var i;return t}(e),o=i.length,r=[],s=e[t];if(o){for(var a=0;a<o;a++)r[a]=i[a].style.cssText,i[a].style.setProperty?i[a].style.setProperty("display","block","important"):i[a].style.cssText+=";display: block !important",i[a].style.height="0",i[a].style.overflow="hidden",i[a].style.visibility="hidden",n(i[a]);s=e[t];for(var l=0;l<o;l++)i[l].style.cssText=r[l],n(i[l])}return s}function i(e,t){var n=parseFloat(e);return Number.isNaN(n)?t:n}function o(e){return e.charAt(0).toUpperCase()+e.substr(1)}function s(e,t){if(this.$window=r(window),this.$document=r(document),this.$element=r(e),this.options=r.extend({},c,t),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=u.orientation[this.orientation].dimension,this.DIRECTION=u.orientation[this.orientation].direction,this.DIRECTION_STYLE=u.orientation[this.orientation].directionStyle,this.COORDINATE=u.orientation[this.orientation].coordinate,this.polyfill&&d)return!1;this.identifier="js-"+a+"-"+l++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=r('<div class="'+this.options.fillClass+'" />'),this.$handle=r('<div class="'+this.options.handleClass+'" />'),this.$range=r('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=r.proxy(this.handleDown,this),this.handleMove=r.proxy(this.handleMove,this),this.handleEnd=r.proxy(this.handleEnd,this),this.init();var n,i,o=this;this.$window.on("resize."+this.identifier,(n=function(){!function(e,t){var n=Array.prototype.slice.call(arguments,2);setTimeout(function(){return e.apply(null,n)},t)}(function(){o.update(!1,!1)},300)},i=(i=20)||100,function(){if(!n.debouncing){var e=Array.prototype.slice.apply(arguments);n.lastReturnVal=n.apply(window,e),n.debouncing=!0}return clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},i),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,t){if(!t||t.origin!==o.identifier){var n=e.target.value,i=o.getPositionFromValue(n);o.setPosition(i)}})}Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};var e,a="rangeslider",l=0,d=((e=document.createElement("input")).setAttribute("type","range"),"text"!==e.type),c={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},u={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return s.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},s.prototype.update=function(e,t){(e=e||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=n(this.$handle[0],"offset"+o(this.DIMENSION)),this.rangeDimension=n(this.$range[0],"offset"+o(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,t)},s.prototype.handleDown=function(e){if(e.preventDefault(),!(e.button&&0!==e.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),-1<(" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)))){var t=this.getRelativePosition(e),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=this.getPositionFromNode(this.$handle[0])-n,o="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(o),i<=t&&t<i+this.handleDimension&&(this.grabPos=t-i)}},s.prototype.handleMove=function(e){e.preventDefault();var t=this.getRelativePosition(e),n="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(n)},s.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},s.prototype.cap=function(e,t,n){return e<t?t:n<e?n:e},s.prototype.setPosition=function(e,t){var n,i;void 0===t&&(t=!0),n=this.getValueFromPosition(this.cap(e,0,this.maxHandlePos)),i=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=i+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=i+"px",this.setValue(n),this.position=i,this.value=n,t&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(i,n)},s.prototype.getPositionFromNode=function(e){for(var t=0;null!==e;)t+=e.offsetLeft,e=e.offsetParent;return t},s.prototype.getRelativePosition=function(e){var t=o(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==e.originalEvent["client"+t]?i=e.originalEvent["client"+t]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+t]?i=e.originalEvent.touches[0]["client"+t]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(i=e.currentPoint[this.COORDINATE]),i-n},s.prototype.getPositionFromValue=function(e){var t;return t=(e-this.min)/(this.max-this.min),Number.isNaN(t)?0:t*this.maxHandlePos},s.prototype.getValueFromPosition=function(e){var t,n;return t=e/(this.maxHandlePos||1),n=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min,Number(n.toFixed(this.toFixed))},s.prototype.setValue=function(e){e===this.value&&""!==this.$element[0].value||this.$element.val(e).trigger("input",{origin:this.identifier})},s.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+a),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},r.fn[a]=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this),t=e.data("plugin_"+a);t||e.data("plugin_"+a,t=new s(this,n)),"string"==typeof n&&t[n].apply(t,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(t,e,n){t.bind("ready",function(){t.previewedDevice&&t.previewedDevice.bind(function(e){t.previewer.send("previewed-device",e)})})}(wp.customize,jQuery,_),function(e,t,i){e.czr_skopeReady=t.Deferred(),!i.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn||e.czr_skopeReady.resolve();var o=function(e){e=i.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,n=Array.from(e.consoleArguments);return n=i.isEmpty(i.filter(n,function(e){return!i.isString(e)}))?n.join(" "):JSON.stringify(n.join(" ")),["%c "+(t=n,i.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},n=function(e,t,n){i.isUndefined(console)&&"function"!=typeof window.console.log||(serverControlParams.isDevMode?i.isUndefined(t)?console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:[e]})))};e.consoleLog=function(){serverControlParams.isDevMode&&(i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,o({consoleArguments:arguments})),console.log("Unstyled console message : ",arguments)))},e.errorLog=function(){i.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,o({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments}))},e.errare=function(e,t){n(e,t,"#ffd5a0")},e.infoLog=function(e,t){n(e,t,"#5ed1f5")},e.czr_isSkopOn=function(){return!i.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn&&i.has(e,"czr_skopeBase")},e.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(e,n,i){e.bind("ready",function(){var t=function(){i.isUndefined(window.themeServerControlParams)||i.isUndefined(themeServerControlParams.isThemeSwitchOn)||themeServerControlParams.isThemeSwitchOn||(e.panel("themes").active.callbacks=n.Callbacks(),e.panel("themes").active(themeServerControlParams.isThemeSwitchOn))};e.panel.has("themes")?t():e.panel.when("themes",function(e){t()})})}(wp.customize,jQuery,_),function(o,e,r){o.czr_activeSectionId=o.czr_activeSectionId||new o.Value(""),o.czr_activePanelId=o.czr_activePanelId||new o.Value(""),o.bind("ready",function(){if("function"!=typeof o.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var n=function(e,t){o.czr_activeSectionId(e?t:"")};o.section.each(function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})}),o.section.bind("add",function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})});var i=function(e,t){o.czr_activePanelId(e?t:""),r.isEmpty(o.czr_activePanelId())&&o.czr_activeSectionId("")};o.panel.each(function(t){t.expanded.bind(function(e){i(e,t.id)})}),o.panel.bind("add",function(t){t.expanded.bind(function(e){i(e,t.id)})})})}(wp.customize,jQuery,_),function(p,h,m){p.bind("ready",function(){serverControlParams.paramsForDynamicRegistration;m.isObject(serverControlParams.paramsForDynamicRegistration)||p.errorLog("serverControlParams.paramsForDynamicRegistration should be an array"),m.each(serverControlParams.paramsForDynamicRegistration,function(e,t){try{n(e)}catch(e){p.errorLog(e)}})});var n=function(e){if(e=m.extend({setting_id:"",module_type:"",option_value:[],setting:{},section:{id:"",title:""},control:{}},e),m.isEmpty(e.setting_id)||m.isEmpty(e.section)||m.isEmpty(e.module_type))throw new Error("registerDynamicModuleSettingControl => missing params when registrating a setting");if(!m.isArray(e.option_value)&&!m.isObject(e.option_value))throw new Error("registerDynamicModuleSettingControl => the module values must be an array or an object");var t=e.setting_id,n=e.setting;if(!p.has(t)){(n=m.extend({dirty:!1,value:[],previewer:p.previewer,transport:"refresh",type:"option"},{value:e.option_value,transport:n.transport||"refresh",type:n.type||"option"})).value=e.option_value;var i=p.settingConstructor[n.type]||p.Setting;p.add(new i(t,n.value,n))}var o=e.section;if(!m.has(o,"id"))throw new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);if(!p.section.has(o.id)){var r=m.extend({active:!0,content:"",customizeAction:"Customizing",description:"",description_hidden:!1,id:"",instanceNumber:99,panel:"",priority:0,title:"",type:"default"},{id:o.id,title:o.title||o.id,description:m.isEmpty(o.description)?"":o.description,panel:m.isEmpty(o.panel)?"":o.panel,priority:o.priority||10}),s=p.sectionConstructor[r.type]||p.Section;r=m.extend({params:r},r),p.section.add(new s(r.id,r))}var a=t;if(!p.control.has(a)){var l=e.control,d=h.extend(!0,{},p.settings.controls.blogdescription);(l=m.extend(d,{type:"czr_module",module_type:e.module_type,section:o.id,content:"",label:l.label,priority:l.priority})).settings.default=t;var c,u=p.controlConstructor[l.type]||p.Control;c=m.extend({params:l},l);p.control.add(new u(a,c));p.section(o.id).expanded()&&p.control(a).trigger("set-module-ready")}return t}}(wp.customize,jQuery,_),function(s,a,l){s.Value.prototype.set=function(t,n){var i=this._value,e=a.Deferred(),o=this,r=[];return t=this._setter.apply(this,arguments),t=this.validate(t),args=l.extend({silent:!1},l.isObject(n)?n:{}),null===t||l.isEqual(i,t)?e.resolveWith(o,[t,i,n]).promise():(this._value=t,(this._dirty=!0)===args.silent?e.resolveWith(o,[t,i,n]).promise():this._deferreds?(l.each(o._deferreds,function(e){r.push(e.apply(null,[t,i,n]))}),a.when.apply(null,r).fail(function(){s.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){o.callbacks.fireWith(o,[t,i,n]),e.resolveWith(o,[t,i,n])}),e.promise(o)):(this.callbacks.fireWith(this,[t,i,n]),e.resolveWith(o,[t,i,n]).promise(o)))},s.Value.prototype.bind=function(){var t=this,n=!1,i=[];return a.each(arguments,function(e,t){n||(n=l.isObject(t)&&t.deferred),l.isFunction(t)&&i.push(t)}),n?(t._deferreds=t._deferreds||[],l.each(i,function(e){l.contains(e,t._deferreds)||t._deferreds.push(e)})):t.callbacks.add.apply(t.callbacks,arguments),this},s.Setting.prototype.silent_set=function(e,t){var n=this._value,i=s.state("saved")();return e=this._setter.apply(this,arguments),null===(e=this.validate(e))||l.isEqual(n,e)||(this._value=e,this._dirty=l.isUndefined(t)||!l.isBoolean(t)?this._dirty:t,this.callbacks.fireWith(this,[e,n,{silent:!0}]),s.state("saved")(i)),this}}(wp.customize,jQuery,_),function(s,a,l){s.Setting.prototype.preview=function(e,t,n){var i,o=this,r=a.Deferred();return i=o.transport,serverControlParams.isSkopOn&&s.czr_isPreviewerSkopeAware&&"pending"==s.czr_isPreviewerSkopeAware.state()?(this.previewer.refresh(),r.resolve(arguments).promise()):l.isUndefined(t)||l.isEmpty(t)||l.isNull(t)||!l.isObject(n)||!0!==n.not_preview_sent?l.has(n,"silent")&&!1!==n.silent?r.resolve(arguments).promise():("postMessage"!==i||s.state("previewerAlive").get()||(i="refresh"),"postMessage"===i?(o.previewer.send("pre_setting",{set_id:o.id,data:n,value:e}),o.previewer.send("setting",[o.id,o()]),r.resolve(arguments)):"refresh"===i&&(serverControlParams.isSkopOn?o.previewer.refresh().always(function(){r.resolve(arguments)}):(o.previewer.refresh(),r.resolve(arguments))),r.promise()):r.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(e,o,r){if("function"==typeof e.Section){var n=e.Section.prototype.initialize;e.Section.prototype.initialize=function(e,t){n.apply(this,[e,t]);var i=this;this.expanded.callbacks.add(function(e){if(e){var t=i.container.closest(".wp-full-overlay-sidebar-content"),n=i.container.find(".accordion-section-content");_resizeContentHeight=function(){n.css("height",t.innerHeight())},_resizeContentHeight(),o(window).on("resize.customizer-section",r.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(c,u,p){c.CZR_Helpers=c.CZR_Helpers||{},c.CZR_Helpers=u.extend(c.CZR_Helpers,{getControlSettingId:function(e,t){return t="default",c.control.has(e)?!p.has(c.control(e),"settings")||p.isEmpty(c.control(e).settings)?e:p.has(c.control(e).settings,t)?p.isUndefined(c.control(e).settings[t].id)?(c.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+e),e):c.control(e).settings[t].id:(c.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+e+" , "+t),e):e},getDocSearchLink:function(e){var t=(e=p.isString(e)?e:"").replace(/ /g,"+");return['<a href="'+[serverControlParams.docURL,"search?query=",t].join("")+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="far fa-question-circle-o"></span>'].join("")},build_setId:function(e){return p.isUndefined(window.themeServerControlParams)||!p.isArray(themeServerControlParams.wpBuiltinSettings)?e:p.contains(themeServerControlParams.wpBuiltinSettings,e)?e:p.contains(themeServerControlParams.themeSettingList,e)&&-1==e.indexOf(themeServerControlParams.themeOptions)?[themeServerControlParams.themeOptions+"[",e,"]"].join(""):e},getOptionName:function(e){if(p.isEmpty(window.themeServerControlParams)||p.isEmpty(themeServerControlParams.themeOptions))return e;return-1==e.indexOf(themeServerControlParams.themeOptions)?e:e.replace(/\[|\]/g,"").replace(themeServerControlParams.themeOptions,"")},hasPartRefresh:function(n){if(p.has(c,"czr_partials"))return p.contains(p.map(c.czr_partials(),function(e,t){return p.contains(e.settings,n)}),!0)},getSectionControlIds:function(e){return e=e||c.czr_activeSectionId(),c.section.has(e)?p.map(c.section(e).controls(),function(e){return e.id}):[]},getSectionSettingIds:function(e){if(e=e||c.czr_activeSectionId(),c.section.has(e)){var n=[],t=this.getSectionControlIds(e);return p.each(t,function(e){p.each(c.control(e).settings,function(e,t){n.push(e.id)})}),n}},capitalize:function(e){return p.isString(e)?e.charAt(0).toUpperCase()+e.slice(1):e},truncate:function(e,t,n){if(!p.isString(e))return"";t=t||20;var i=e.length>t,o=i?e.substr(0,t-1):e;return o=n&&i?o.substr(0,o.lastIndexOf(" ")):o,i?o+"...":o},isMultiItemModule:function(e,t){if(!p.isUndefined(e)||p.isObject(t)){if(p.isObject(t)&&p.has(t,"module_type"))e=t.module_type;else if(p.isUndefined(e)||p.isNull(e))return;if(p.has(c.czrModuleMap,e))return c.czrModuleMap[e].crud||c.czrModuleMap[e].multi_item||!1}},isCrudModule:function(e,t){if(!p.isUndefined(e)||p.isObject(t)){if(p.isObject(t)&&p.has(t,"module_type"))e=t.module_type;else if(p.isUndefined(e)||p.isNull(e))return;if(p.has(c.czrModuleMap,e))return c.czrModuleMap[e].crud||!1}},hasModuleModOpt:function(e,t){if(!p.isUndefined(e)||p.isObject(t)){if(p.isObject(t)&&p.has(t,"module_type"))e=t.module_type;else if(p.isUndefined(e)||p.isNull(e))return;if(p.has(c.czrModuleMap,e))return c.czrModuleMap[e].has_mod_opt||!1}},setupInputCollectionFromDOM:function(){var r=this;if(!p.isFunction(r))throw new Error("setupInputCollectionFromDOM => inputParentInst is not valid.");var s=r.module,a=p.has(r(),"is_mod_opt");if(p.isEmpty(r.inputCollection())){r.czr_Input=r.czr_Input||new c.Values,r.inputConstructor=a?s.inputModOptConstructor:s.inputConstructor;var e=a?r.defaultModOptModel:r.defaultItemModel;if(p.isEmpty(e)||p.isUndefined(e))throw new Error("setupInputCollectionFromDOM => No default model found in item or mod opt "+r.id+".");var l=u.extend(!0,{},r());l=p.isObject(l)?u.extend(e,l):e;var d={};return u("."+s.control.css_attr.sub_set_wrapper,r.container).each(function(e){var t=u(this).find("[data-czrtype]").attr("data-czrtype"),n=p.has(l,t)?l[t]:"";if(p.isUndefined(t)||p.isEmpty(t))c.errare("setupInputCollectionFromDOM => missing data-czrtype id for input type "+u(this).data("input-type")+" in module "+s.id+". Check that the server input template is properly declared.");else{if(!p.has(l,t))throw new Error("setupInputCollectionFromDOM => The item or mod opt property : "+t+" has been found in the DOM but not in the item or mod opt model : "+r.id+". The input can not be instantiated.");var i=u(this).data("input-type"),o={id:t,type:i,transport:u(this).data("transport")||"inherit",input_value:n,input_options:p.has(s.inputOptions,i)?s.inputOptions[i]:{},container:u(this),input_parent:r,is_mod_opt:a,module:s};p.isUndefined(u(this).data("refresh-markup"))||(o.refresh_markup=u(this).data("refresh-markup")),p.isUndefined(u(this).data("refresh-stylesheet"))||(o.refresh_stylesheet=u(this).data("refresh-stylesheet")),p.isUndefined(u(this).data("refresh-fonts"))||(o.refresh_fonts=u(this).data("refresh-fonts")),c.trigger("input-args-before-instantiation",o),r.czr_Input.add(t,new r.inputConstructor(t,o)),r.czr_Input(t).ready(),d[t]=n}}),r.inputCollection(d),r}},removeInputCollection:function(){var t=this;if(!p.isFunction(t))throw new Error("removeInputCollection : inputParentInst is not valid.");p.has(t,"czr_Input")&&(t.czr_Input.each(function(e){t.czr_Input.remove(e.id)}),t.inputCollection({}))},refreshModuleControl:function(e){var t=c.controlConstructor.czr_module,n=(c.control(e).params.type,c.settings.controls[e]);u.when(c.control(e).container.remove()).done(function(){c.control.remove(e),c.control.add(e,new t(e,{params:n,previewer:c.previewer}))})},isChecked:function(e){return p.isBoolean(e)?e:p.isNumber(e)?0<e:!!p.isString(e)&&("0"!==e&&""!==e&&"off"!==e)},hexToRgb:function(t){try{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,i){return t+t+n+n+i+i})}catch(e){return c.errorLog("Error in Helpers::hexToRgb : "+e),t}var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+(e=e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[]).join(",")+")"},rgbToHex:function(e,t,n){var i=function(e){var t=e.toString(16);return 1==t.length?"0"+t:t};return"#"+i(e)+i(t)+i(n)},parseTemplate:p.memoize(function(t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(n=n||p.template(t,i))(e)}}),getModuleTmpl:function(t){var n=u.Deferred();if(t=p.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:c.settings.nonce.save},t),(p.isEmpty(t.tmpl)||p.isEmpty(t.module_type))&&n.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),c.CZR_Helpers.czr_cachedTmpl=c.CZR_Helpers.czr_cachedTmpl||{},c.CZR_Helpers.czr_cachedTmpl[t.module_type]=c.CZR_Helpers.czr_cachedTmpl[t.module_type]||{},!0===t.cache&&!p.isEmpty(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&p.isString(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]))n.resolve(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]);else{if(p.isObject(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&"pending"==c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl].state())return c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl];c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=wp.ajax.post("ac_get_template",t).done(function(e){n.resolve(e),c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=e}).fail(function(e){c.errare("api.CZR_Helpers.getModuleTmpl => Problem when fetching the "+t.tmpl+" tmpl from server for module : "+t.module_id+" "+t.module_type,e),n.reject(e)})}return n.promise()}})}(wp.customize,jQuery,_),function(a,l,d){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=l.extend(a.CZR_Helpers,{addActions:function(e,t,n){(n=n||this)[e]=n[e]||[],new_event_map=d.clone(n[e]),n[e]=d.union(new_event_map,d.isArray(t)?t:[t])},doActions:function(e,t,n){t.trigger(e,n)},setupDOMListeners:function(e,o,r){var s=this;r=r||s,d.isArray(e)?d.isObject(o)?(o=d.extend({model:{},dom_el:{}},o)).dom_el instanceof jQuery&&!(o.dom_el.length<1)?d.map(e,function(i){if(d.isString(i.selector)&&!d.isEmpty(i.selector))if(d.isString(i.selector)&&!d.isEmpty(i.selector)){var e=i.name&&!d.isEmpty(i.name)?i.name:[i.trigger,i.selector].join(""),t=o.dom_el.data("czr-listener-collection");if(t&&d.isArray(t)){if(t=d.isArray(t)?t:[],d.contains(t,e))return void a.errare("setupDOMListeners : aborting because listener already created for event : "+e);t.push(e)}else t=[e];o.dom_el.data("czr-listener-collection",t),o.dom_el.on(i.trigger,i.selector,function(e,t){if(e.stopPropagation(),!a.utils.isKeydownButNotEnterEvent(e)){e.preventDefault();var n=l.extend(!0,{},o);if(d.has(n,"model")&&d.has(n.model,"id")&&(d.has(r,"get")?n.model=r():n.model=r.getModel(n.model.id)),l.extend(n,{event:i,dom_event:e}),l.extend(n,t),d.has(n,"event")&&d.has(n.event,"actions"))if(serverControlParams.isDevMode)s.executeEventActionChain(n,r);else try{s.executeEventActionChain(n,r)}catch(e){a.errare("In setupDOMListeners : problem when trying to fire actions : "+n.event.actions,e)}else a.errare("executeEventActionChain : missing obj.event or obj.event.actions")}})}else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","));else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","))}):a.errare("setupDomListeners : dom element should be an existing dom element",o):a.errare("setupDomListeners : args should be an object",e):a.errare("setupDomListeners : event_map should be an array",o)},executeEventActionChain:function(i,o){var r=this;if("function"==typeof i.event.actions)return i.event.actions.call(o,i);d.isArray(i.event.actions)||(i.event.actions=[i.event.actions]);var s=!1;d.map(i.event.actions,function(e){if(!s){var t=function(){};if("function"==typeof e)t=e;else{if("function"!=typeof o[e])throw new Error("executeEventActionChain : the action : "+e+" has not been found when firing event : "+i.event.selector);t=o[e]}var n=d.has(i,"dom_el")&&-1!=i.dom_el.length?i.dom_el:r.container;"string"==typeof e&&n.trigger("before_"+e,d.omit(i,"event")),!1===t.call(o,i)&&(s=!0),"string"==typeof e&&n.trigger("after_"+e,d.omit(i,"event"))}})}})}(wp.customize,jQuery,_),function(o,t,r){o.bind("ready",function(){o.previewer.bind("houston-widget-settings",function(t){var e=r.filter(t.registeredSidebars,function(e){return!r.findWhere(_wpCustomizeWidgetsSettings.registeredSidebars,{id:e.id})}),n=r.filter(t.registeredSidebars,function(e){return!r.has(t.renderedSidebars,e.id)});n=r.map(n,function(e){return e.id});var i=r.map(t.registeredSidebars,function(e){return e.id});o.czr_widgetZoneSettings=o.czr_widgetZoneSettings||new o.Value,o.czr_widgetZoneSettings.set({actives:t.renderedSidebars,inactives:n,registered:i,candidates:e,available_locations:t.availableWidgetLocations})}),o.previewer.bind("czr-query-data-ready",function(e){o.czr_wpQueryInfos=o.czr_wpQueryInfos||new o.Value,o.czr_wpQueryInfos(e),o.czr_wpQueryDataReady=o.czr_wpQueryDataReady||t.Deferred(),"pending"==o.czr_wpQueryDataReady.state()&&o.czr_wpQueryDataReady.resolve(e)}),o.previewer.bind("czr-partial-refresh-data",function(e){o.czr_partials=o.czr_partials||new o.Value,o.czr_partials.set(e)}),o.previewer.bind("czr-partial-refresh-done",function(e){if(r.has(e,"set_id")){var t=o.CZR_Helpers.build_setId(e.set_id);if(o.has(t)){var n=o.CZR_Helpers.getControlSettingId(t);o.control.has(n)&&o.control(n).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(o,r,a){r.extend(CZRInputMths,{initialize:function(e,t){if(a.isUndefined(t.input_parent)||a.isEmpty(t.input_parent))throw new Error("No input_parent assigned to input "+t.id+". Aborting");if(a.isUndefined(t.module))throw new Error("No module assigned to input "+t.id+". Aborting");o.Value.prototype.initialize.call(this,null,t);var n=this;r.extend(n,t||{}),n.constructorOptions=r.extend(!0,{},t),n.isReady=r.Deferred(),a.isUndefined(t.input_value)||n.set(t.input_value);if(n.input_event_map=[{trigger:r.trim(["change",{text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"}[n.type]||""].join(" ")),selector:"input[data-czrtype], select[data-czrtype], textarea[data-czrtype]",name:"set_input_value",actions:function(e){if(!a.has(n.input_parent,"syncElements")||!a.has(n.input_parent.syncElements,n.id))throw new Error("WARNING : THE INPUT "+n.id+" HAS NO SYNCED ELEMENT.")}}],o.czrInputMap&&a.has(o.czrInputMap,n.type)){var i=o.czrInputMap[n.type];a.isFunction(n[i])?n[i](t.input_options||null):a.isFunction(o.czrInputMap[n.type])&&o.czrInputMap[n.type].apply(n,[t.input_options||null])}else o.errare("Warning the input : "+n.id+" with type "+n.type+" has no corresponding method defined in api.czrInputMap.");n.visible=new o.Value(!0),n.isReady.done(function(){n.visible.bind(function(e){e?n.container.stop(!0,!0).slideDown(200):n.container.stop(!0,!0).slideUp(200)})}),n.enabled=new o.Value(!0),n.isReady.done(function(){n.enabled.bind(function(e){n.container.toggleClass("disabled",!e)})})},ready:function(){var e=this;e.setupDOMListeners(e.input_event_map,{dom_el:e.container},e),e.callbacks.add(function(){return e.inputReact.apply(e,arguments)}),r.when(e.setupSynchronizer()).done(function(){e.isReady.resolve(e)})},setupSynchronizer:function(){var e=this,t=e.input_parent,n=e.container.find("[data-czrtype]");e.container.find("[data-czrtype]").is("textarea")&&o.errorLog("TO DO : THE TEXTAREA INPUT ARE NOT IMPLEMENTED YET IN THE SYNCHRONIZER!");var i=new o.Element(n);t.syncElements=t.syncElements||{},(t.syncElements[e.id]=i).sync(e),i.set(e())},inputReact:function(e,t,n){var i=this,o=i.input_parent(),r=a.clone(o),s=i.is_preItemInput;i.enabled()&&((r=!a.isObject(r)||a.isEmpty(r)?{}:r)[i.id]=e,i.input_parent.set(r,{input_changed:i.id,input_value:i(),input_transport:i.transport,not_preview_sent:"postMessage"===i.transport,inputRegistrationParams:i.constructorOptions}),s||(i.input_parent.trigger(i.id+":changed",e),a.isEmpty(t)&&(a.isUndefined(t)||"postMessage"!==i.transport)||i.module.sendInputToPreview({input_id:i.id,input_parent_id:i.input_parent.id,to:e,from:t})))},setupColorPicker:function(){this.container.find("input").iris({palettes:!0,hide:!1,change:function(e,t){r(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupColorPickerAlpha:function(){var n=this;n.container.find("input").wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){r(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")},clear:function(e,t){n("")}})},setupSelect:function(){r("select",this.container).not(".no-selecter-js").each(function(){r(this).selecter({})})},setupIcheck:function(e){r("input[type=checkbox]",this.container).each(function(e){0===r(this).closest('div[class^="icheckbox"]').length&&r(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){r(this).val(!1===r(this).is(":checked")?0:1),r(e.currentTarget).trigger("change")})})},setupGutenCheck:function(e){var t=this.container.find("input[type=checkbox]"),n=r(".czr-toggle-check",this.container),i=function(){t.closest(".czr-toggle-check").toggleClass("is-checked",t.is(":checked")),n.find("svg").remove(),n.append(t.is(":checked")?'<svg class="czr-toggle-check__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 6"><path d="M0 0h2v6H0z"></path></svg>':'<svg class="czr-toggle-check__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 6"><path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path></svg>')};t.on("change",i),i()},setupRadio:function(e){r("input[type=radio]",this.container).each(function(e){0===r(this).closest('div[class^="icheckbox"]').length&&r(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){r(e.currentTarget).trigger("change")})})},setupStepper:function(e){r('input[type="number"]',this.container).each(function(e){r(this).stepper()})},setupSimpleRange:function(){},setupRangeSlider:function(e){var n,i=this,o=function(e,t){e.textContent=t+i.container.find("input").data("unit")};r(i.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){n=r(".rangeslider__handle",this.$range),r(".rangeslider__handle",this.$range),o(n[0],this.value)},onSlide:function(e,t){o(n[0],t)}})},setupHAlignement:function(e){var t=this,n=r(".sek-h-align-wrapper",t.container);n.find('div[data-sek-align="'+t()+'"]').addClass("selected"),n.on("click","[data-sek-align]",function(e){e.preventDefault(),n.find(".selected").removeClass("selected"),r.when(r(this).addClass("selected")).done(function(){t(r(this).data("sek-align"))})})}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(o,i,r){i.extend(CZRInputMths,{setupImageUploaderSaveAsId:function(){this.setupImageUploader()},setupImageUploaderSaveAsUrl:function(){this.setupImageUploader({save_as_url:!0})},setupImageUploader:function(e){var t=this,n=t();if(e=r.extend({save_as_url:!1},e||{}),t.save_as_url=e.save_as_url,t.attachment={},!t.container)return this;t.tmplRendered=i.Deferred(),t.setupContentRendering(n,{}),t.tmplRendered.done(function(){t.czrImgUploaderBinding()}).fail(function(){o.errorLog("setupImageUploader => failed to fetch the template.")})},setupContentRendering:function(e,t){var n,i=this;i.attachment.id!=e&&t!==e?(r.isEmpty(e)?(i.attachment={},i.renderImageUploaderTemplate()):r.isNumber(e)||i.renderImageUploaderTemplate({fromUrl:!0,url:e}),n=wp.media.attachment(e),r.isObject(n)&&r.has(n,"attributes")&&r.has(n.attributes,"sizes")?(i.attachment=n.attributes,i.renderImageUploaderTemplate()):r.isNumber(e)&&wp.media.attachment(e).fetch().done(function(){i.attachment=this.attributes,i.renderImageUploaderTemplate()}).fail(function(){o.errorLog("renderImageUploaderTemplate => failed attempt to fetch an img with id : "+e)})):i.attachment.id&&i.attachment.id!==e||i.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var n=this;r.bindAll(n,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),n.container.on("click keydown",".upload-button",n.czrImgUploadOpenFrame),n.container.on("click keydown",".thumbnail-image img",n.czrImgUploadOpenFrame),n.container.on("click keydown",".remove-button",n.czrImgUploadRemoveFile),n.bind(n.id+":changed",function(e,t){n.tmplRendered=i.Deferred(),n.setupContentRendering(e,t)})},czrImgUploadOpenFrame:function(e){o.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var e=this.getUploaderLabels();this.frame=wp.media({button:{text:e.frame_button},states:[new wp.media.controller.Library({title:e.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),this.frame.on("select",this.czrImgUploadSelect)},czrImgUploadRemoveFile:function(e){o.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.attachment={},this.set(""))},czrImgUploadSelect:function(){var e=this.frame.state().get("selection").first().toJSON();window._wpmejsSettings;this.attachment=e,this.set(this.save_as_url?e.url:e.id)},renderImageUploaderTemplate:function(e){var t=this;e=r.extend({fromUrl:!1,url:""},e||{});var n=t.container.find("."+t.module.control.css_attr.img_upload_container);if(n.length&&!(t.container.length<1)){var i={button_labels:t.getUploaderLabels(),settings:t.id,attachment:t.attachment,fromUrl:e.url,canUpload:!0};return o.CZR_Helpers.getModuleTmpl({tmpl:"img-uploader",module_type:"all_modules",module_id:t.module.id}).done(function(e){n.html(o.CZR_Helpers.parseTemplate(e)(i)),t.tmplRendered.resolve(),t.container.trigger(t.id+":content_rendered")}).fail(function(e){t.tmplRendered.reject("renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : "+t.module.id)}),!0}},getUploaderLabels:function(){var e=serverControlParams.i18n,n=this,t={select:e.select_image,change:e.change_image,remove:e.remove_image,default:e.default_image,placeholder:e.placeholder_image,frame_title:e.frame_title_image,frame_button:e.frame_button_image},i={};return r.each(t,function(e,t){if(r.isEmpty(e))return o.errorLog("A translated string is missing ( "+t+" ) for the image uploader input in module : "+n.module.id),void(i[t]=t);i[t]=e}),i}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(s,a,l){a.extend(CZRInputMths,{setupContentPicker:function(e){var o=this;a.extend(l.isObject(e)?e:{},{post:"",taxonomy:""}),o.wpObjectTypes=e,o.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),o.input_event_map=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(e){var t=a(e.dom_event.currentTarget,e.dom_el),n=a(t,e.dom_el).select2("data"),i={};n=l.isArray(n)?n[0]:n,l.isObject(n)&&!l.isEmpty(n)?(l.each({id:"",type_label:"",title:"",object_type:"",url:""},function(e,t){"_custom_"===n.id||l.has(n,t)&&!l.isEmpty(n[t])?i[t]=n[t]:s.errare("content_picker : missing input param : "+t)}),o.set(i)):s.errare("Content Picker Input : the picked value should be an object not empty.")}}],o.isReady.done(function(){o.setupContentSelecter()})},setupContentSelecter:function(){var r=this;if(!l.isEmpty(r())){var e={value:r().id||"",title:r().title||"",selected:"selected"};r.container.find("select").append(a("<option>",e))}r.container.find("select").select2({placeholder:{id:"-1",title:"Select"},data:r.setupSelectedContents(),ajax:{url:wp.ajax.settings.url,type:"POST",dataType:"json",delay:250,debug:!0,data:function(e){var t=e.page?e.page:0;return t=e.term?e.page:t,{action:e.term?"search-available-content-items-customizer":"load-available-content-items-customizer",search:e.term,wp_customize:"on",page:t,wp_object_types:JSON.stringify(r.wpObjectTypes),nonce:s.settings.nonce.save}},processResults:function(e,t){var n={defaultOption:[]};if(r.input_parent&&r.input_parent.module?r.input_parent.module.trigger("set_default_content_picker_options",{defaultContentPickerOption:n}):s.infoLog(' content_picker input => ::processResults => event "set_default_content_picker_option" not triggered when in pre-item'),!e.success)return s.errare("request failure in setupContentPicker => processResults",e),{results:n.defaultOption};var i=e.data.items,o=[];return l.isEmpty(n.defaultOption)||o.push(n.defaultOption),l.each(i,function(e){o.push({id:e.id,title:e.title,type_label:e.type_label,object_type:e.object,url:e.url})}),{results:o,pagination:{more:10<=e.data.items.length}}}},templateSelection:r.czrFormatContentSelected,templateResult:r.czrFormatContentSelected,escapeMarkup:function(e){return e}})},czrFormatContentSelected:function(e){if(e.loading)return e.text;var t="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+e.title+"</span>";return e.type_label&&(t+="<span class='czr-picker-item-type'>"+e.type_label+"</span>"),t+="</div></div>"},setupSelectedContents:function(){return this()}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(n,e,t){e.extend(CZRInputMths,{setupTinyMceEditor:function(){var t=this;if(!t.container)throw new Error("The input container is not set for WP text editor in module :"+t.module.id);t.input_parent.control.bind("tinyMceEditorUpdated",function(e){n.sekEditorSynchronizedInput().control_id==t.input_parent.control.id&&n.sekEditorSynchronizedInput().input_id==t.id&&(t(wp.editor.removep(e.html_content||n.sekTinyMceEditor.getContent())),e.modified_editor_element&&0<e.modified_editor_element.length?e.modified_editor_element.focus():n.sekTinyMceEditor.focus())})}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(o,r,s){r.extend(CZRItemMths,{initialize:function(e,t){if(s.isUndefined(t.module)||s.isEmpty(t.module))throw new Error("No module assigned to item "+e+". Aborting");var n=this;o.Value.prototype.initialize.call(n,null,t),n.isReady=r.Deferred(),n.embedded=r.Deferred(),n.container=null,n.contentContainer=null,n.czr_Input=new o.Values,n.inputCollection=new o.Value({}),n.viewState=new o.Value("closed"),n.removeDialogVisible=new o.Value(!1),r.extend(n,t||{}),n.defaultItemModel=s.clone(t.defaultItemModel)||{id:"",title:""};var i=r.extend(n.defaultItemModel,t.initial_item_model);i=n.validateItemModelOnInitialize(i),n.set(i),n.userEventMap=new o.Value([{trigger:"click keydown",selector:["."+n.module.control.css_attr.display_alert_btn,"."+n.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:function(){var e=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!e)}},{trigger:"click keydown",selector:"."+n.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+n.module.control.css_attr.edit_view_btn,"."+n.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=r(e.dom_event.currentTarget,e.dom_el).attr("data-tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}]),n.isReady.done(function(){n.module.updateItemsCollection({item:n()}),n.callbacks.add(function(){return n.itemReact.apply(n,arguments)}),n.bind("contentRendered",function(){if(s.isEmpty(n.inputCollection()))if(serverControlParams.isDevMode)o.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n);else try{o.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n)}catch(e){o.errorLog("In item.isReady.done : "+e)}}),n.bind("contentRemoved",function(){s.has(n,"czr_Input")&&o.CZR_Helpers.removeInputCollection.call(n)}),n.canBeRendered()&&n.mayBeRenderItemWrapper(),n.embedded.done(function(){n.itemWrapperViewSetup(i)})})},ready:function(){this.isReady.resolve()},canBeRendered:function(){return!0},validateItemModelOnInitialize:function(e){return e},itemReact:function(e,t,n){var i=this,o=i.module;n=n||{},o.updateItemsCollection({item:e,params:n}).done(function(){i.writeItemViewTitle(e,n)})}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(s,a,l){a.extend(CZRItemMths,{_sendItem:function(n,e){var t=this,i=t.module,o=[];l.each(e,function(e,t){e!=n[t]&&o.push(t)}),l.each(o,function(e){s.previewer.send("sub_setting",{set_id:i.control.id,id:n.id,changed_prop:e,value:n[e]}),i.trigger("item_sent",{item:n,dom_el:t.container,changed_prop:e})})},removeItem:function(e){var t=this,n=this.module,i=l.clone(n.itemCollection());n.trigger("pre_item_dom_remove",t()),t._destroyView(),i=l.without(i,l.findWhere(i,{id:t.id})),n.itemCollection.set(i),n.trigger("pre_item_api_remove",t());var o=a.extend(!0,{},t());if(n.czr_Item.remove(t.id),"postMessage"!=s(n.control.id).transport||!l.has(e,"dom_event")||l.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(n.control.id))n.trigger("item-removed",o);else{var r=function(){s.previewer.unbind("ready",r),n.trigger("item-removed",o)};s.previewer.bind("ready",r),s.previewer.refresh()}},getModel:function(e){return this()}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(d,c,u){c.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var t=this;"pending"==t.embedded.state()&&(!u.isEmpty(t.container)&&0<t.container.length||c.when(t.renderItemWrapper()).done(function(e){if(t.container=e,u.isUndefined(t.container)||!t.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+t.id);t.embedded.resolve()}))},renderItemWrapper:function(e){var t,n=this,i=n.module,o=c.Deferred(),r=c.extend(!0,{},e||n()),s=function(e){i.isMultiItem()&&(u.isEmpty(e)&&o.reject("renderItemWrapper => Missing html template for module : "+i.id),t.append(e)),t.append(c("<div/>",{class:i.control.css_attr.item_content})),o.resolve(t)};if(n.trigger("item-model-before-item-wrapper-template-injection",r),t=c("<li>",{class:i.control.css_attr.single_item,"data-id":r.id,id:r.id}),i.itemsWrapper.append(t),i.isMultiItem())if(u.isEmpty(i.rudItemPart)){var a={tmpl:"rud-item-part",module_type:"all_modules",module_id:i.id,control_id:i.control.id};n.trigger("item-wrapper-tmpl-params-before-fetching",a),d.CZR_Helpers.getModuleTmpl(a).done(function(e){s(d.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){o.reject("renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : "+i.id)})}else{var l=i.getTemplateSelectorPart("rudItemPart",r);c("#tmpl-"+l).length<1&&o.reject("Missing template for item "+n.id+". The provided template script has no been found : #tmpl-"+l),s(wp.template(l)(r))}else s();return o.promise()},itemWrapperViewSetup:function(e){var o=this,i=this.module;item_model=o()||o.initial_item_model,o.writeItemViewTitle();var r=function(e,t,n){if(u.isUndefined(e)||!1===e.length)throw new Error("Module : "+o.module.id+", the item content has not been rendered for "+o.id);o.contentContainer=e,o.trigger("contentRendered",{item_content:e}),o.toggleItemExpansion(t,n)};o.module.isMultiItem()?o.viewState.callbacks.add(function(t,n){var e=-1!==t.indexOf("expanded");i.hasModOpt()&&e&&d.czr_ModOptVisible(!1),e?u.isObject(o.contentContainer)&&!1!==o.contentContainer.length?o.toggleItemExpansion(t,n):o.renderItemContent(o()||o.initial_item_model).done(function(e){r(e,t,n)}).fail(function(e){d.errorLog("multi-item module => failed item.renderItemContent for module : "+i.id,e)}):o.toggleItemExpansion(t,n).done(function(){u.isObject(o.contentContainer)&&!1!==o.contentContainer.length&&(o.trigger("beforeContenRemoved"),c("."+i.control.css_attr.item_content,o.container).children().each(function(){c(this).remove()}),c("."+i.control.css_attr.item_content,o.container).html(""),o.contentContainer=null,o.trigger("contentRemoved"))})}):(o.viewState.callbacks.add(function(e,t){o.toggleItemExpansion.apply(o,arguments)}),o.renderItemContent(item_model).done(function(e){r(e,!0)}).fail(function(e){d.errare("mono-item module => failed item.renderItemContent for module : "+i.id,e)})),d.CZR_Helpers.setupDOMListeners(o.userEventMap(),{model:item_model,dom_el:o.container},o),o.removeDialogVisible.bind(function(e){var t=o.module,n=c("."+t.control.css_attr.remove_alert_wrapper,o.container).first();if(e&&t.closeAllItems(),e&&t.hasModOpt()&&d.czr_ModOptVisible(!1),e&&u.has(t,"preItem")&&t.preItemExpanded(!1),c("."+t.control.css_attr.remove_alert_wrapper,o.container).not(n).each(function(){c(this).hasClass("open")&&c(this).slideToggle({duration:200,done:function(){c(this).toggleClass("open",!1),c(this).siblings().find("."+t.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),e)if(u.isEmpty(t.alertPart))d.CZR_Helpers.getModuleTmpl({tmpl:"rud-item-alert-part",module_type:"all_modules",module_id:t.id,control_id:t.control.id}).done(function(e){n.html(d.CZR_Helpers.parseTemplate(e)({title:o().title||o.id})),o.trigger("remove-dialog-rendered")}).fail(function(e){d.errare("item.removeDialogVisible => Problem when fetching the tmpl from server for module : "+t.id,e)});else{if(c("#tmpl-"+t.alertPart).length<1||u.isEmpty(o.container))return void d.errare("No removal alert template available for items in module :"+t.id);n.html(wp.template(t.alertPart)({title:o().title||o.id})),o.trigger("remove-dialog-rendered")}var i=function(e){n.toggleClass("open",e),o.container.find("."+t.control.css_attr.display_alert_btn).toggleClass("active",e),e&&t._adjustScrollExpandedBlock(o.container)};e?n.stop(!0,!0).slideDown(200,function(){i(e)}):n.stop(!0,!0).slideUp(200,function(){i(e)})})},renderItemContent:function(e){var n=this,i=this.module,o=c.Deferred(),t=c.extend(!0,{},e||n());n.trigger("item-model-before-item-content-template-injection",t);var r=function(e){u.isEmpty(e)&&o.reject("renderItemContent => Missing html template for module : "+i.id);var t=c("."+i.control.css_attr.item_content,n.container);c(e).appendTo(t),o.resolve(t)};if(!u.isEmpty(i.itemInputList)||u.isFunction(i.itemInputList)){var s=i.getTemplateSelectorPart("itemInputList",t);c("#tmpl-"+s).length<1&&o.reject("renderItemContent => No itemInputList content template defined for module "+i.id+". The template script id should be : #tmpl-"+s),r(wp.template(s)(t))}else{var a={tmpl:"item-inputs",module_type:i.module_type,module_id:i.id,control_id:i.control.id,item_model:t};i.trigger("filter-request-params-before-fetching-for-item-content-tmpl",a),d.CZR_Helpers.getModuleTmpl(a).done(function(e){r(d.CZR_Helpers.parseTemplate(e)(c.extend(t,{control_id:i.control.id})))}).fail(function(e){o.reject(e)})}return o.promise()},writeItemViewTitle:function(e){var t=this,n=t.module,i=e||t(),o=u.has(i,"title")&&!u.isEmpty(i.title)?d.CZR_Helpers.capitalize(i.title):i.id;o=d.CZR_Helpers.truncate(o,20),c("."+n.control.css_attr.item_title,t.container).text(o),d.CZR_Helpers.doActions("after_writeViewTitle",t.container,i,t)},setViewVisibility:function(e,t){var n=this.module;t?this.viewState.set("expanded_noscroll"):(n.closeAllItems(this.id),u.has(n,"preItem")&&n.preItemExpanded.set(!1),this.viewState.set("expanded"==this._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(n,e,t){var i="closed"!=n,o=this,r=this.module,s=c("."+r.control.css_attr.item_content,o.container).first(),a=c.Deferred(),l=function(e){o.container.toggleClass("open",e),e&&r.closeRemoveDialogs();var t=s.siblings().find("."+r.control.css_attr.edit_view_btn);t.toggleClass("active",e),e?t.removeClass("fa-pencil-alt").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):t.removeClass("fa-minus-square").addClass("fa-pencil-alt").attr("title",serverControlParams.i18n.edit),"expanded"==n&&r._adjustScrollExpandedBlock(o.container),a.resolve()};return i?s.stop(!0,!0).slideDown(t||200,function(){l(i)}):s.stop(!0,!0).slideUp(200,function(){l(i)}),a.promise()},_destroyView:function(e){this.container.fadeOut({duration:e||400,done:function(){c(this).remove()}})}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(r,s,a){s.extend(CZRModOptMths,{initialize:function(e){if(a.isUndefined(e.module)||a.isEmpty(e.module))throw new Error("No module assigned to modOpt.");var i=this;r.Value.prototype.initialize.call(i,null,e),i.isReady=s.Deferred(),i.container=null,i.inputCollection=new r.Value({}),s.extend(i,e||{}),i.defaultModOptModel=a.clone(e.defaultModOptModel)||{is_mod_opt:!0};var o=s.extend(i.defaultModOptModel,e.initial_modOpt_model),t=i.module.control;i.set(o),r.czr_ModOptVisible=new r.Value(!1),r.czr_ModOptVisible.bind(function(t,e,n){n=n||{},t?(i.module.closeRemoveDialogs().closeAllItems(),i.modOptWrapperViewSetup(o).done(function(e){i.container=e;try{r.CZR_Helpers.setupInputCollectionFromDOM.call(i).toggleModPanelView(t)}catch(e){r.consoleLog(e)}n.module&&n.focus&&a.delay(function(){!a.isNull(n.module.czr_ModOpt.container)&&n.module.czr_ModOpt.container.find('[data-tab-id="'+n.focus+'"] a').length&&n.module.czr_ModOpt.container.find('[data-tab-id="'+n.focus+'"] a').trigger("click")},200)})):i.toggleModPanelView(t).done(function(){!1!==i.container.length?s.when(i.container.remove()).done(function(){r.CZR_Helpers.removeInputCollection.call(i)}):r.CZR_Helpers.removeInputCollection.call(i),i.container=null})}),i.isReady.done(function(){s("."+t.css_attr.edit_modopt_icon,t.container).length||s.when(t.container.find(".customize-control-title").first().append(s("<span/>",{class:[t.css_attr.edit_modopt_icon,"fas fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){s("."+t.css_attr.edit_modopt_icon,t.container).fadeIn(400)}),r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+t.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){r.czr_ModOptVisible(!r.czr_ModOptVisible())}}],{dom_el:t.container},i)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);CZRModOptMths=CZRModOptMths||{};!function(r,s,a){s.extend(CZRModOptMths,{modOptWrapperViewSetup:function(e){var n=this,i=this.module,o=s.Deferred();return e=n()||n.initial_modOpt_model,n.renderModOptContent(e).done(function(e){if(a.isEmpty(e)||!(0<e.length))throw new Error("Module : "+n.module.id+", the modOpt content has not been rendered");var t;t=e,r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){r.czr_ModOptVisible(!1)}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){this.module.toggleTabVisibility.call(this,e)}}],{dom_el:t},n),o.resolve(e)}).fail(function(e){r.errorLog("failed modOpt.renderModOptContent for module : "+i.id,e)}).then(function(){n.module.setupTabNav.call(n)}),o.promise()},renderModOptContent:function(t){var n=this.module,i=s.Deferred();t=t||this();var o=function(e){a.isEmpty(e)&&i.reject("renderModOptContent => Missing html template for module : "+n.id);var t="";try{t=[serverControlParams.i18n["Options for"],n.control.params.label].join(" ")}catch(e){r.errorLog("renderItemContent => Problem with ctrl label => "+e),t=serverControlParams.i18n.Settings}s("#widgets-left").after(s("<div/>",{class:n.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',t,"</h2>"].join(""),'<span class="fas fa-times '+n.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),s("."+n.control.css_attr.mod_opt_wrapper).append(e),i.resolve(s("."+n.control.css_attr.mod_opt_wrapper))};if(a.isEmpty(n.itemPreAddEl))r.CZR_Helpers.getModuleTmpl({tmpl:"mod-opt",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){o(r.CZR_Helpers.parseTemplate(e)(t))}).fail(function(e){i.reject("renderPreItemView => Problem when fetching the mod-opt tmpl from server for module : "+n.id)});else{var e=n.getTemplateSelectorPart("modOptInputList",t);s("#tmpl-"+e).length<1&&i.reject("renderModOptContent => No modOpt content template defined for module "+n.id+". The template script id should be : #tmpl-"+e),o(wp.template(e)(t))}return i.promise()},toggleModPanelView:function(e){var t=this.module,n=(t.control,s.Deferred());return t.control.container.toggleClass("czr-modopt-visible",e),s("body").toggleClass("czr-editing-modopt",e),a.delay(function(){n.resolve()},200),n.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(i,s,r){s.extend(CZRModuleMths,{initialize:function(e,t){if(r.isUndefined(t.control)||r.isEmpty(t.control))throw new Error("No control assigned to module "+e);var n=this;i.Value.prototype.initialize.call(this,null,t),n.isReady=s.Deferred(),s.extend(n,t||{}),s.extend(n,{crudModulePart:"",rudItemPart:"",ruItemPart:"",alertPart:"",itemInputList:"",modOptInputList:""}),n.embedded=s.Deferred(),n.itemsWrapper="",n.container=s(n.control.selector),n.renderModuleParts().done(function(e){if(!1===e.length)throw new Error("The items wrapper has not been rendered for module : "+n.id);n.itemsWrapper=e,n.embedded.resolve()}).fail(function(e){throw new Error(["initialize module => failed module.renderModuleParts() for module : ",n.id,e].join(" "))}),n.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},n.defaultModOptModel={},n.modOptConstructor=i.CZRModOpt,n.itemCollection=new i.Value([]),n.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},n.defaultItemModel=i.czrModuleMap[n.module_type].defaultItemModel||{id:"",title:""},n.itemConstructor=n.itemConstructor||i.CZRItem,n.czr_Item=new i.Values,n.inputConstructor=n.inputConstructor||i.CZRInput,n.hasModOpt()&&(n.inputModOptConstructor=i.CZRInput),n.inputOptions={},n.isReady.done(function(){n.isDirty=new i.Value(t.dirty||!1),n.initializeModuleModel(t).done(function(e){n.set(e)}).fail(function(e){i.errare("Module : "+n.id+" initialize module model failed : ",e)}).always(function(e){n.callbacks.add(function(){return n.moduleReact.apply(n,arguments)}),n.control.isModuleRegistered(n.id)||n.control.updateModulesCollection({module:t,is_registered:!1}),n.bind("items-collection-populated",function(e){n.itemCollection.callbacks.add(function(){return n.itemCollectionReact.apply(n,arguments)}),n.isMultiItem()&&n._makeItemsSortable()}),n.populateSavedItemCollection(),n.hasModOpt()&&n.instantiateModOpt()})}),!0===i.czrModuleMap[n.module_type].ready_on_section_expanded&&(r.has(i,"czr_activeSectionId")&&n.control.section()==i.czr_activeSectionId()&&"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()}),i.section(n.control.section()).expanded.bind(function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})}))},ready:function(){this.isReady.resolve()},initializeModuleModel:function(e){var t=s.Deferred();if(!this.isMultiItem()&&!this.isCrud()&&r.isEmpty(e.items)){var n=r.clone(this.defaultItemModel);e.items=[s.extend(n,{id:this.id})]}return t.resolve(e).promise()},itemCollectionReact:function(e,t,n){var i=this(),o=s.extend(!0,{},i);o.items=e,this.isDirty.set(!0),this.set(o,n||{})},filterItemsBeforeCoreApiSettingValue:function(e){return e},moduleReact:function(e,t,n){var i=this.control;r.size(t.items)==r.size(e.items)&&r.isEmpty(r.difference(e.items,t.items)),e.column_id,t.column_id;i.updateModulesCollection({module:s.extend(!0,{},e),data:n})},getModuleSection:function(){return this.section},isMultiItem:function(){return i.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return i.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return i.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var r=this,e=r.prepareModOptForAPI(r().modOpt||{});r.czr_ModOpt=new r.modOptConstructor(e),r.czr_ModOpt.ready(),r.czr_ModOpt.callbacks.add(function(e,t,n){var i=r(),o=s.extend(!0,{},i);o.modOpt=e,r.isDirty(!0),r(o,n)})},prepareModOptForAPI:function(n){var i=this,o={};return n=r.isObject(n)?n:{},r.each(i.defaultAPImodOptModel,function(e,t){n[t];switch(t){case"initial_modOpt_model":r.each(i.getDefaultModOptModel(),function(e,t){r.has(n,t)||(n[t]=e)}),o[t]=n;break;case"defaultModOptModel":o[t]=r.clone(i.defaultModOptModel);break;case"control":o[t]=i.control;break;case"module":o[t]=i}}),o},getDefaultModOptModel:function(e){return s.extend(r.clone(this.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(e){var t=this;e=r.extend({input_id:"",input_parent_id:"",to:null,from:null},e),r.isEqual(e.to,e.from)||(i.previewer.send("czr_input",{set_id:i.CZR_Helpers.getControlSettingId(t.control.id),module_id:t.id,module:{items:s.extend(!0,{},t().items),modOpt:t.hasModOpt()?s.extend(!0,{},t().modOpt):{}},input_parent_id:e.input_parent_id,input_id:e.input_id,value:e.to,isPartialRefresh:e.isPartialRefresh}),t.trigger("input_sent",{input:e.to,dom_el:t.container}))},sendModuleInputsToPreview:function(i){var o=this,t=function(){var n=this,e=s.extend(!0,{},n());e=r.omit(e,"id"),r.each(e,function(e,t){o.sendInputToPreview({input_id:t,input_parent_id:n.id,to:e,from:null,isPartialRefresh:i.isPartialRefresh})})};o.czr_Item.each(function(e){t.call(e)}),o.hasModOpt()&&t.call(o.czr_ModOpt)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(i,s,a){s.extend(CZRModuleMths,{populateSavedItemCollection:function(e){var t,n=this;a.isArray(e||n().items)?(t=s.extend(!0,[],e||n().items),a.each(t,function(e,t){if(a.has(e,"is_mod_opt"))throw new Error("populateSavedItemCollection => there should be no mod opt to instantiate here.")}),n.trigger("filterItemCandidatesBeforeInstantiation",t),a.each(t,function(e,t){if(serverControlParams.isDevMode)n.instantiateItem(e).ready();else try{n.instantiateItem(e).ready()}catch(e){i.errare("populateSavedItemCollection : "+e)}}),a.each(t,function(e){if(a.isUndefined(a.findWhere(n.itemCollection(),e.id)))throw new Error("populateSavedItemCollection : The saved items have not been properly populated in module : "+n.id)}),n.trigger("items-collection-populated")):i.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+n.id)},instantiateItem:function(e,t){var n=this;if(item_candidate=n.prepareItemForAPI(e),item_candidate&&!a.isNull(item_candidate)){if(!a.has(item_candidate,"id"))throw new Error("CZRModule::instantiateItem() : an item has no id and could not be added in the collection of : "+this.id);if(n.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : the following item id "+item_candidate.id+" already exists in module.czr_Item() for module "+this.id);if(n.czr_Item.add(item_candidate.id,new n.itemConstructor(item_candidate.id,item_candidate)),!n.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : instantiation failed for item id "+item_candidate.id+" for module "+this.id);return n.czr_Item(item_candidate.id)}i.errare("item_candidate invalid. InstantiateItem aborted in module "+n.id)},prepareItemForAPI:function(i){var o=this,r={};return i=a.isObject(i)?i:{},a.each(o.defaultAPIitemModel,function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?r[t]=o.generateItemId(o.module_type):o.isItemRegistered(n)?o.generateItemId(n):r[t]=n;break;case"initial_item_model":a.each(o.getDefaultItemModel(),function(e,t){a.has(i,t)||(i[t]=e)}),r[t]=i;break;case"defaultItemModel":r[t]=a.clone(o.defaultItemModel);break;case"control":r[t]=o.control;break;case"module":r[t]=o;break;case"is_added_by_user":r[t]=!!a.isBoolean(n)&&n}}),a.has(r,"id")||(r.id=o.generateItemId(o.module_type)),r.initial_item_model.id=r.id,o.validateItemBeforeInstantiation(r)},validateItemBeforeInstantiation:function(e){return e},generateItemId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,o=e+"_"+(t=t||i._getNextItemKeyInCollection());if(!a.has(i,"itemCollection")||!a.isArray(i.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+i.id);return i.isItemRegistered(o)?(t++,n++,i.generateItemId(e,t,n)):o},_getNextItemKeyInCollection:function(){var e=this,t={},n=0;return a.isEmpty(e.itemCollection())||(t=a.isArray(e.itemCollection())&&1===a.size(e.itemCollection())?e.itemCollection()[0]:a.max(e.itemCollection(),function(e){return a.isNumber(e.id.replace(/[^\/\d]/g,""))?parseInt(e.id.replace(/[^\/\d]/g,""),10):0}),!a.isUndefined(t)&&a.isNumber(t.id.replace(/[^\/\d]/g,""))&&(n=parseInt(t.id.replace(/[^\/\d]/g,""),10)+1)),n},isItemRegistered:function(e){return!a.isUndefined(a.findWhere(this.itemCollection(),{id:e}))},updateItemsCollection:function(e){var t=this,n=t.itemCollection(),i=a.clone(n),o=s.Deferred();if(!a.has(e,"collection")){if(!a.has(e,"item"))throw new Error("updateItemsCollection, no item provided "+t.control.id+". Aborting");e=a.extend({params:{}},e);var r=a.clone(e.item);return a.each(t.defaultItemModel,function(e,t){if(!a.has(r,t))throw new Error('CZRModuleMths => updateItemsCollection : Missing property "'+t+'" for item candidate')}),a.findWhere(i,{id:r.id})?a.each(n,function(e,t){e.id==r.id&&(i[t]=r)}):i.push(r),t.itemCollection.set(i,e.params),o.resolve({collection:i,params:e.params}).promise()}t.itemCollection.set(e.collection)},_getSortedDOMItemCollection:function(){var n=a.clone(this.itemCollection()),i=[],e=s.Deferred();if(s("."+this.control.css_attr.single_item,this.container).each(function(e){var t=a.findWhere(n,{id:s(this).attr("data-id")});t&&(i[e]=t)}),n.length!=i.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+this.id);return e.resolve(i).promise()},refreshItemCollection:function(){var t=this;t.czr_Item.each(function(e){t.czr_Item(e.id).container&&0<t.czr_Item(e.id).container.length&&s.when(t.czr_Item(e.id).container.remove()).done(function(){t.czr_Item.remove(e.id)})}),t.itemCollection=new i.Value([]),t.populateSavedItemCollection()}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,r,s){r.extend(CZRModuleMths,{getDefaultItemModel:function(e){return r.extend(s.clone(this.defaultItemModel),{id:e||""})},_initNewItem:function(e,t){var n,i=this,o={id:""};return t=void 0!==t?t:s.size(i.itemCollection()),s.isNumber(t)?n=i.module_type+"_"+t:(n=t,t=0),o=e&&!s.isEmpty(e)?r.extend(e,{id:n}):this.getDefaultItemModel(n),s.has(o,"id")&&i._isItemIdPossible(n)?(s.map(i.getDefaultItemModel(),function(e,t){s.has(o,t)||(o[t]=e)}),o):i._initNewItem(o,t+1)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(r,s,a){s.extend(CZRModuleMths,{renderModuleParts:function(){var n=this,i=s(n.container),o=s.Deferred(),t=function(e){n.isCrud()&&(a.isEmpty(e)&&o.reject("renderModuleParts => Missing html template for module : "+n.id),i.append(e));var t=s("<ul/>",{class:[n.control.css_attr.items_wrapper,n.module_type,n.isMultiItem()?"multi-item-mod":"mono-item-mod",n.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});i.append(t),o.resolve(s(t,i))};return n.isCrud()?a.isEmpty(n.crudModulePart)?r.CZR_Helpers.getModuleTmpl({tmpl:"crud-module-part",module_type:"all_modules",module_id:n.id,control_id:n.control.id}).done(function(e){t(r.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){o.reject("renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : "+n.id)}):(s("#tmpl-"+n.crudModulePart).length<1&&o.reject("renderModuleParts => no crud Module Part template for module "+n.id+". The template script id should be : #tmpl-"+n.crudModulePart),t(wp.template(n.crudModulePart)({}))):t(),o.promise()},getTemplateSelectorPart:function(e,t){var n,i=this;switch(e){case"rudItemPart":n=i.rudItemPart;break;case"ruItemPart":n=i.ruItemPart;break;case"modOptInputList":n=i.modOptInputList;break;case"itemInputList":n=a.isFunction(i.itemInputList)?i.itemInputList(t):i.itemInputList}if(a.isEmpty(n))throw new Error("No valid template has been found in getTemplateSelectorPart() "+i.id+". Aborting");return n},getViewEl:function(e){return s('[data-id = "'+e+'"]',this.container)},closeAllItems:function(t){var n=this,e=a.clone(n.itemCollection()),i=a.filter(e,function(e){return e.id!=t});return a.each(i,function(e){n.czr_Item.has(e.id)&&"expanded"==n.czr_Item(e.id)._getViewState(e.id)&&n.czr_Item(e.id).viewState.set("closed")}),this},_adjustScrollExpandedBlock:function(e,t){if(e.length&&!a.isUndefined(this.getModuleSection())){var n,i=s(".accordion-section-content",this.section.container),o=i.scrollTop(),r=t||90;setTimeout(function(){e.offset().top+e.height()+r>s(window.top).height()&&0<(n=e.offset().top+e.height()+r-s(window.top).height())&&i.animate({scrollTop:o+n},500)},50)}},closeRemoveDialogs:function(){if(a.isArray(this.itemCollection()))return this.czr_Item.each(function(e){e.removeDialogVisible(!1)}),this},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&s.fn.sortable){var n=this;s("."+n.control.css_attr.items_wrapper,n.container).sortable({handle:"."+n.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){n._getSortedDOMItemCollection().done(function(e){n.itemCollection.set(e)}).then(function(){!function(){a.has(n,"preItem")&&n.preItemExpanded.set(!1),n.closeAllItems().closeRemoveDialogs();var e=function(){r.previewer.refresh()};"postMessage"!=r(n.control.id).transport||r.CZR_Helpers.hasPartRefresh(n.control.id)||(e=a.debounce(e,500))(),n.trigger("item-collection-sorted")}()})}})}},toggleTabVisibility:function(e){var t=this;s(t.container).find("li"),s(t.container).find("section");s(".tabs nav li",t.container).each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),s(t.container).find('li[data-tab-id="'+e+'"]').addClass("tab-current").removeClass("tab-inactive"),s("section",t.container).each(function(){s(this).removeClass("content-current")}),s(t.container).find('section[id="'+e+'"]').addClass("content-current")},setupTabNav:function(){var i=this;setTimeout(function(){(function(){var e=s.Deferred(),t=s(".tabs nav li",i.container);t.each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),t.first().addClass("tab-current").removeClass("tab-inactive"),s("section",i.container).first().addClass("content-current");var n=t.length;return t.each(function(){s(this).addClass(0<n?"cols-"+n:"")}),e.resolve().promise()})().done(function(){s(".tabs",i.container).fadeIn(450)})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(s,a,l){a.extend(CZRDynModuleMths,{initialize:function(e,t){var n=this;s.CZRModule.prototype.initialize.call(n,e,t),a.extend(n,{itemPreAddEl:""}),n.preItemsWrapper="",n.preItemExpanded=new s.Value(!1),n.itemAddedMessage=serverControlParams.i18n.successMessage,n.userEventMap=new s.Value([{trigger:"click keydown",selector:["."+n.control.css_attr.open_pre_add_btn,"."+n.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs",function(e){var t=this,n={addTheItem:!0};t.trigger("is-item-addition-possible",n),n.addTheItem&&t.hasPreItem?t.preItemExpanded.set(!t.preItemExpanded()):t.addItem(e).done(function(e){t.czr_Item(item_candidate.id,function(e){e.embedded.then(function(){t.czr_Item(item_candidate.id).viewState("expanded")})})})}]},{trigger:"click keydown",selector:"."+n.control.css_attr.add_new_btn,name:"add_item",actions:function(e){n.closeRemoveDialogs(e).closeAllItems(e).addItem(e).done(function(e){n.czr_Item(item_candidate.id,function(e){e.embedded.then(function(){n.czr_Item(item_candidate.id).viewState("expanded")})})})}}])},ready:function(){var t=this;t.setupDOMListeners(t.userEventMap(),{dom_el:t.container}),t.preItem=new s.Value(t.getDefaultItemModel()),t.preItemExpanded.callbacks.add(function(e){e?t.renderPreItemView().done(function(e){t.preItemsWrapper=e,t.preItem(t.getDefaultItemModel()),t.trigger("before-pre-item-input-collection-setup"),t.setupPreItemInputCollection()}).fail(function(e){s.errorLog("Pre-Item : "+e)}):a.when(t.preItemsWrapper.remove()).done(function(){t.preItem.czr_Input={},t.preItemsWrapper=null,t.trigger("pre-item-input-collection-destroyed")}),t._togglePreItemViewExpansion(e)}),s.CZRModule.prototype.ready.call(t)},setupPreItemInputCollection:function(){var n=this;n.preItem.czr_Input=new s.Values,a("."+n.control.css_attr.pre_add_wrapper,n.container).find("."+n.control.css_attr.sub_set_wrapper).each(function(e){var t=a(this).find("[data-czrtype]").attr("data-czrtype")||"sub_set_"+e;n.preItem.czr_Input.add(t,new n.inputConstructor(t,{id:t,type:a(this).attr("data-input-type"),container:a(this),input_parent:n.preItem,module:n,is_preItemInput:!0})),n.preItem.czr_Input(t).ready()}),n.trigger("pre-item-input-collection-ready")},validateItemBeforeAddition:function(e){return e},itemCanBeInstantiated:function(){return!0},addItem:function(n){if(this.itemCanBeInstantiated()){var i=this,o=i.preItem(),r=function(){i.preItemExpanded.set(!1)},e=a.Deferred();return l.isEmpty(o)||!l.isObject(o)?(s.errorLog("addItem : an item_candidate should be an object and not empty. In : "+i.id+". Aborted."),e.resolve().promise()):(r=l.debounce(r,200),!(o=i.validateItemBeforeAddition(o))||l.isNull(o)?(s.consoleLog("item_candidate invalid. InstantiateItem aborted in module "+i.id),e.resolve().promise()):(i.instantiateItem(o,!0).ready(),a.Deferred(function(){var t=this;i.czr_Item(o.id).isReady.then(function(){r(),i.trigger("item-added",o);var e=function(){s.previewer.unbind("ready",e),t.resolve()};i.refresh_on_add_item?"postMessage"!=s(i.control.id).transport||!l.has(n,"dom_event")||l.has(n.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id)||(s.previewer.bind("ready",e),s.previewer.refresh()):t.resolve()})}).always(function(){e.resolve(o.id)}),e.promise()))}}})}(wp.customize,jQuery,_);CZRDynModuleMths=CZRDynModuleMths||{};!function(o,r,s){r.extend(CZRDynModuleMths,{renderPreItemView:function(e){var n=this,i=r.Deferred();if(s.isObject(n.preItemsWrapper)&&0<n.preItemsWrapper.length)return i.resolve(n.preItemsWrapper).promise();var t=function(e){!s.isEmpty(e)&&n.container||i.reject("renderPreItemView => Missing html template for module : "+n.id);var t=r("."+n.control.css_attr.pre_add_item_content,n.container);t.prepend(r("<div>",{class:"pre-item-wrapper"})),t.find(".pre-item-wrapper").append(e),i.resolve(t.find(".pre-item-wrapper")).promise()};return s.isEmpty(n.itemPreAddEl)?o.CZR_Helpers.getModuleTmpl({tmpl:"pre-item",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){t(o.CZR_Helpers.parseTemplate(e)())}).fail(function(e){i.reject(["renderPreItemView for module : ",n.id,e].join(" "))}):(r("#tmpl-"+n.itemPreAddEl).length<1&&i.reject("renderPreItemView => Missing itemPreAddEl or template in module "+n.id),t(wp.template(n.itemPreAddEl)())),i.promise()},_getPreItemView:function(){return r("."+this.control.css_attr.pre_add_item_content,this.container)},_togglePreItemViewExpansion:function(t){var n=this;r("."+n.control.css_attr.pre_add_item_content,n.container).slideToggle({duration:200,done:function(){var e=r("."+n.control.css_attr.open_pre_add_btn,n.container);r(this).toggleClass("open",t),t?e.find(".fas").removeClass("fa-plus-square").addClass("fa-minus-square"):e.find(".fas").removeClass("fa-minus-square").addClass("fa-plus-square"),e.toggleClass("active",t),r(n.container).toggleClass(n.control.css_attr.adding_new,t),n._adjustScrollExpandedBlock(r(this),120)}})},toggleSuccessMessage:function(e){var t=this,n=t.itemAddedMessage,i=r("."+t.control.css_attr.pre_add_wrapper,t.container);return $_success_wrapper=r("."+t.control.css_attr.pre_add_success,t.container),"on"==e?($_success_wrapper.find("p").text(n),$_success_wrapper.css("z-index",1000001).css("height",i.height()+"px").css("line-height",i.height()+"px")):$_success_wrapper.attr("style",""),t.container.toggleClass("czr-model-added","on"==e),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(i,e,o){e.extend(CZRBaseControlMths,{initialize:function(e,t){var n=this;n.css_attr=o.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},i.Control.prototype.initialize.call(n,e,t),n.bind("czr-partial-refresh-done",function(){o.has(n,"czr_moduleCollection")&&o.each(n.czr_moduleCollection(),function(e){n.czr_Module(e.id)&&n.czr_Module(e.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(e){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(l,d,c){d.extend(CZRBaseModuleControlMths,{initialize:function(e,t){var n=this;if(!l.has(e))throw new Error("Missing a registered setting for control : "+e);n.czr_Module=new l.Values,n.czr_moduleCollection=new l.Value,n.czr_moduleCollection.set([]),n.moduleCollectionReady=d.Deferred(),n.moduleCollectionReady.done(function(e){n.czr_moduleCollection.callbacks.add(function(){return n.moduleCollectionReact.apply(n,arguments)})}),l.CZRBaseControl.prototype.initialize.call(n,e,t),l.section.has(n.section())?l.section(n.section()).expanded.bind(function(e){n.czr_Module.each(function(e){e.closeAllItems().closeRemoveDialogs(),c.has(e,"preItem")&&e.preItemExpanded(!1)})}):l.errare("The section "+n.params.section+" of control "+e+" has not been registered yet")},ready:function(){var n=this,i={};c.each(n.getSavedModules(),function(t,e){if(i=t,serverControlParams.isDevMode)n.instantiateModule(t,{});else try{n.instantiateModule(t,{})}catch(e){return void l.errare("Failed to instantiate module "+t.id,e)}n.container.attr("data-module",t.id)}),n.moduleCollectionReady.resolve(i)},getDefaultModuleApiModel:function(){return{id:"",module_type:"",modOpt:{},items:[],crud:!1,hasPreItem:!0,refresh_on_add_item:!0,multi_item:!1,sortable:!1,control:{},section:""}},getSavedModules:function(){var e,n=this,t=[],i=n.params.module_type,o=[],r={};!l.CZR_Helpers.isMultiItemModule(i)||c.isEmpty(l(n.id)())||c.isObject(l(n.id)())||l.errare(" getSavedModules => module Control Init for "+n.id+" : a mono item module control value should be an object if not empty.");var s=l.CZR_Helpers.getControlSettingId(n.id),a=l(s)();return e=c.isArray(a)?a:[a],c.each(e,function(e,t){l.CZR_Helpers.hasModuleModOpt(i)&&0===t&&(c.has(e,"id")?l.errare("getSavedModules : the module "+i+" in control "+n.id+" has no mod_opt defined while it should."):r=e),c.has(e,"is_mod_opt")||o.push(e)}),t.push({id:l.CZR_Helpers.getOptionName(n.id)+"_"+n.params.type,module_type:n.params.module_type,section:n.section(),modOpt:d.extend(!0,{},r),items:d.extend(!0,[],o)}),t},isModuleRegistered:function(e){return!c.isUndefined(c.findWhere(this.czr_moduleCollection(),{id:e}))}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,e,a){e.extend(CZRBaseModuleControlMths,{instantiateModule:function(e,t){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");var n=this;if((a.isUndefined(t)||a.isEmpty(t))&&(t=n.getModuleConstructor(e)),!a.isEmpty(e.id)&&n.czr_Module.has(e.id))throw new Error("The module id already exists in the collection in control : "+n.id);var i=n.prepareModuleForAPI(e);if(n.czr_Module.add(i.id,new t(i.id,i)),!n.czr_Module.has(i.id))throw new Error("instantiateModule() : instantiation failed for module id "+i.id+" in control "+n.id);return n.czr_Module(i.id)},getModuleConstructor:function(e){var t;if(!a.has(e,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+e.id);if(!a.has(s.czrModuleMap,e.module_type))throw new Error("Module type "+e.module_type+" is not listed in the module map api.czrModuleMap.");var n=s.czrModuleMap[e.module_type].mthds;if(t=(s.czrModuleMap[e.module_type].crud?s.CZRDynModule:s.CZRModule).extend(n),a.isUndefined(t)||a.isEmpty(t)||!t)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+e.module_type+".");return t},prepareModuleForAPI:function(i){if(!a.isObject(i))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var o=this,r={};return a.each(o.getDefaultModuleApiModel(),function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?r[t]=o.generateModuleId(i.module_type):r[t]=n;break;case"module_type":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module type must a string not empty");r[t]=n;break;case"items":if(!a.isArray(n))throw new Error("prepareModuleForAPI : a module item list must be an array");r[t]=n;break;case"modOpt":if(!a.isObject(n))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");r[t]=n;break;case"crud":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud||e;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');r[t]=n||!1;break;case"hasPreItem":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].hasPreItem||e;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "hasPreItem" must be a boolean');r[t]=n||!1;break;case"refresh_on_add_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].refresh_on_add_item||e;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "refresh_on_add_item" must be a boolean');r[t]=n||!1;break;case"multi_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud||s.czrModuleMap[i.module_type].multi_item;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');r[t]=n||!1;break;case"sortable":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].sortable||s.czrModuleMap[i.module_type].crud||s.czrModuleMap[i.module_type].multi_item;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');r[t]=n||!1;break;case"control":r[t]=o;break;case"section":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module section must be a string not empty");r[t]=n;break;case"dirty":r[t]=n||!1}}),r},generateModuleId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,o=e+"_"+(t=t||i._getNextModuleKeyInCollection());if(!a.has(i,"czr_moduleCollection")||!a.isArray(i.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+i.id);return i.isModuleRegistered(o)?(t++,n++,i.generateModuleId(e,t,n)):o},_getNextModuleKeyInCollection:function(){var e={},t=0;return a.isEmpty(this.czr_moduleCollection())||(e=a.max(this.czr_moduleCollection(),function(e){return parseInt(e.id.replace(/[^\/\d]/g,""),10)}),t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,a,l){a.extend(CZRBaseModuleControlMths,{updateModulesCollection:function(e){var t=this,n=t.czr_moduleCollection(),i=a.extend(!0,[],n);if(l.has(e,"collection"))t.czr_moduleCollection.set(e.collection,e.data||{});else{if(!l.has(e,"module"))throw new Error("updateModulesCollection, no module provided "+t.id+". Aborting");var o=t.prepareModuleForAPI(l.clone(e.module));l.findWhere(i,{id:o.id})?l.each(n,function(e,t){e.id==o.id&&(i[t]=o)}):i.push(o);var r={};l.has(e,"data")&&(r=a.extend(!0,{},e.data),a.extend(r,{module:o})),t.czr_moduleCollection.set(i,r)}},moduleCollectionReact:function(t,e,n){var i=l.size(t)>l.size(e),o=l.size(e)>l.size(t);l.size(e),l.size(t);if(is_collection_sorted=!1,o){var r=l.filter(e,function(e){return l.isUndefined(l.findWhere(t,{id:e.id}))});r=r[0],this.czr_Module.remove(r.id)}l.isObject(n)&&l.has(n,"module")&&(n.module_id=n.module.id,n.moduleRegistrationParams=n.module,n.module=this.prepareModuleForDB(a.extend(!0,{},n.module))),i||s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n)},filterModuleCollectionBeforeAjax:function(e){var t,i=this,o=a.extend(!0,[],e);if(l.each(e,function(e,t){var n=a.extend(!0,{},e);o[t]=i.prepareModuleForDB(n)}),1<l.size(e))throw new Error("There should not be several modules in the collection of control : "+i.id);if(!l.isArray(e)||l.isEmpty(e)||!l.has(e[0],"items"))throw new Error("The setting value could not be populated in control : "+i.id);var n=e[0].id;if(!i.czr_Module.has(n))throw new Error("The single module control ("+i.id+") has no module registered with the id "+n);var r=i.czr_Module(n);if(!l.isArray(r().items))throw new Error("The module "+n+" should be an array in control : "+i.id);return t=r.isMultiItem()?r().items:r().items[0]||[],t=r.filterItemsBeforeCoreApiSettingValue(t),r.hasModOpt()?l.union([r().modOpt],t):t},prepareModuleForDB:function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module must be an object.");var t={};if(!l.isArray(e.items))throw new Error("::prepareModuleForDB : a module item list must be an array");return t.items=e.items,t}})}(wp.customize,jQuery,_),function(e,t,n){t.extend(CZRBaseControlMths,e.Events),t.extend(e.Control.prototype,e.Events),t.extend(CZRModuleMths,e.Events),t.extend(CZRItemMths,e.Events),t.extend(CZRModOptMths,e.Events),t.extend(CZRBaseControlMths,e.CZR_Helpers),t.extend(CZRInputMths,e.CZR_Helpers),t.extend(CZRModuleMths,e.CZR_Helpers),e.CZRInput=e.Value.extend(CZRInputMths),e.czrInputMap=e.czrInputMap||{},t.extend(e.czrInputMap,{text:"",textarea:"",check:"setupIcheck",gutencheck:"setupGutenCheck",select:"setupSelect",radio:"setupRadio",number:"setupStepper",upload:"setupImageUploaderSaveAsId",upload_url:"setupImageUploaderSaveAsUrl",color:"setupColorPicker",wp_color_alpha:"setupColorPickerAlpha",wp_color:"setupWPColorPicker",content_picker:"setupContentPicker",tiny_mce_editor:"setupTinyMceEditor",password:"",range:"setupSimpleRange",range_slider:"setupRangeSlider",hidden:"",h_alignment:"setupHAlignement",h_text_alignment:"setupHAlignement"}),e.CZRItem=e.Value.extend(CZRItemMths),e.CZRModOpt=e.Value.extend(CZRModOptMths),e.CZRModule=e.Value.extend(CZRModuleMths),e.CZRDynModule=e.CZRModule.extend(CZRDynModuleMths),e.CZRBaseControl=e.Control.extend(CZRBaseControlMths),e.CZRBaseModuleControl=e.CZRBaseControl.extend(CZRBaseModuleControlMths),t.extend(e.controlConstructor,{czr_module:e.CZRBaseModuleControl})}(wp.customize,jQuery,_),function(i,e){jQuery(function(e){var t,n=i.customize||n;t=e("<span/>",{class:"customize-controls-home fas fa-home",html:'<span class="screen-reader-text">Home</span>'}),e.when(e("#customize-header-actions").append(t)).done(function(){t.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}).on("click.customize-controls-home",function(){n.section.has(n.czr_activeSectionId())?n.section(n.czr_activeSectionId()).expanded(!1):n.section.each(function(e){e.expanded(!1)}),n.panel.each(function(e){e.expanded(!1)})})})})}(wp);
|
1 |
+
"function"!=typeof jQuery.fn.iCheck&&function(v){function _(e,t,n){var i=e[0],o=/er/.test(n)?z:/bl/.test(n)?$:x,r=n==R?{checked:i[x],disabled:i[$],indeterminate:"true"==e.attr(z)||"false"==e.attr(E)}:i[o];if(/^(ch|di|in)/.test(n)&&!r)y(e,o);else if(/^(un|en|de)/.test(n)&&r)b(e,o);else if(n==R)for(o in r)r[o]?y(e,o,!0):b(e,o,!0);else t&&"toggle"!=n||(t||e[P]("ifClicked"),r?i[O]!==I&&b(e,o):y(e,o))}function y(e,t,n){var i=e[0],o=e.parent(),r=t==x,s=t==z,a=t==$,l=s?E:r?g:"enabled",d=h(e,l+m(i[O])),c=h(e,t+m(i[O]));if(!0!==i[t]){if(!n&&t==x&&i[O]==I&&i.name){var u=e.closest("form"),p='input[name="'+i.name+'"]';(p=u.length?u.find(p):v(p)).each(function(){this!==i&&v(this).data(C)&&b(v(this),t)})}s?(i[t]=!0,i[x]&&b(e,x,"force")):(n||(i[t]=!0),r&&i[z]&&b(e,z,!1)),f(e,r,t,n)}i[$]&&h(e,D,!0)&&o.find("."+M).css(D,"default"),o[A](c||h(e,t)||""),a?o.attr("aria-disabled","true"):o.attr("aria-checked",s?"mixed":"true"),o[S](d||h(e,l)||"")}function b(e,t,n){var i=e[0],o=e.parent(),r=t==x,s=t==z,a=t==$,l=s?E:r?g:"enabled",d=h(e,l+m(i[O])),c=h(e,t+m(i[O]));!1!==i[t]&&((s||!n||"force"==n)&&(i[t]=!1),f(e,r,l,n)),!i[$]&&h(e,D,!0)&&o.find("."+M).css(D,"pointer"),o[S](c||h(e,t)||""),a?o.attr("aria-disabled","false"):o.attr("aria-checked","false"),o[A](d||h(e,l)||"")}function w(e,t){e.data(C)&&(e.parent().html(e.attr("style",e.data(C).s||"")),t&&e[P](t),e.off(".i").unwrap(),v(k+'[for="'+e[0].id+'"]').add(e.closest(k)).off(".i"))}function h(e,t,n){return e.data(C)?e.data(C).o[t+(n?"":"Class")]:void 0}function m(e){return e.charAt(0).toUpperCase()+e.slice(1)}function f(e,t,n,i){i||(t&&e[P]("ifToggled"),e[P]("ifChanged")[P]("if"+m(n)))}var C="iCheck",M=C+"-helper",I="radio",x="checked",g="un"+x,$="disabled",E="determinate",z="in"+E,R="update",O="type",A="addClass",S="removeClass",P="trigger",k="label",D="cursor",T=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);v.fn[C]=function(t,n){var i='input[type="checkbox"], input[type="'+I+'"]',o=v(),e=function(e){e.each(function(){var e=v(this);o=e.is(i)?o.add(e):o.add(e.find(i))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t))return t=t.toLowerCase(),e(this),o.each(function(){var e=v(this);"destroy"==t?w(e,"ifDestroyed"):_(e,!0,t),v.isFunction(n)&&n()});if("object"!=typeof t&&t)return this;var c=v.extend({checkedClass:x,disabledClass:$,indeterminateClass:z,labelHover:!0,aria:!1},t),r=c.handle,u=c.hoverClass||"hover",p=c.focusClass||"focus",h=c.activeClass||"active",m=!!c.labelHover,f=c.labelHoverClass||"hover",g=0|(""+c.increaseArea).replace("%","");return("checkbox"==r||r==I)&&(i='input[type="'+r+'"]'),g<-50&&(g=-50),e(this),o.each(function(){var i=v(this);w(i);var o=this,e=o.id,t={position:"absolute",top:n=-g+"%",left:n,display:"block",width:t=100+2*g+"%",height:t,margin:0,padding:0,background:"#fff",border:0,opacity:0},n=T?{position:"absolute",visibility:"hidden"}:g?t:{position:"absolute",opacity:0},r="checkbox"==o[O]?c.checkboxClass||"icheckbox":c.radioClass||"i"+I,s=v(k+'[for="'+e+'"]').add(i.closest(k)),a=!!c.aria,l=C+"-"+Math.random().toString(36).substr(2,6),d='<div class="'+r+'" '+(a?'role="'+o[O]+'" ':"");a&&s.each(function(){d+='aria-labelledby="',this.id?d+=this.id:(this.id=l,d+=l),d+='"'}),d=i.wrap(d+"/>")[P]("ifCreated").parent().append(c.insert),t=v('<ins class="'+M+'"/>').css(t).appendTo(d),i.data(C,{o:c,s:i.attr("style")}).css(n),c.inheritClass&&d[A](o.className||""),c.inheritID&&e&&d.attr("id",C+"-"+e),"static"==d.css("position")&&d.css("position","relative"),_(i,!0,R),s.length&&s.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(e){var t=e[O],n=v(this);if(!o[$]){if("click"==t){if(v(e.target).is("a"))return;_(i,!1,!0)}else m&&(/ut|nd/.test(t)?(d[S](u),n[S](f)):(d[A](u),n[A](f)));if(!T)return!1;e.stopPropagation()}}),i.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[O];return e=e.keyCode,"click"!=t&&("keydown"==t&&32==e?(o[O]==I&&o[x]||(o[x]?b(i,x):y(i,x)),!1):void("keyup"==t&&o[O]==I?!o[x]&&y(i,x):/us|ur/.test(t)&&d["blur"==t?S:A](p)))}),t.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(e){var t=e[O],n=/wn|up/.test(t)?h:u;if(!o[$]){if("click"==t?_(i,!1,!0):(/wn|er|in/.test(t)?d[A](n):d[S](n+" "+h),s.length&&m&&n==u&&s[/ut|nd/.test(t)?S:A](f)),!T)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&function(c,o){"use strict";function r(e,t){if(!e.hasClass("selecter-element")){(t=c.extend({},t,e.data("selecter-options"))).external&&(t.links=!0);var n=e.find("option, optgroup"),i=n.filter("option"),o=i.filter(":selected"),r=""!==t.label?-1:i.index(o),s=t.links?"nav":"div";t.tabIndex=e[0].tabIndex,e[0].tabIndex=-1,t.multiple=e.prop("multiple"),t.disabled=e.is(":disabled");var a="<"+s+' class="selecter '+t.customClass;w?a+=" mobile":t.cover&&(a+=" cover"),a+=t.multiple?" multiple":" closed",t.disabled&&(a+=" disabled"),a+='" tabindex="'+t.tabIndex+'">',t.multiple||(a+='<span class="selecter-selected'+(""!==t.label?" placeholder":"")+'">',a+=c("<span></span").text(y(""!==t.label?t.label:o.text(),t.trim)).html(),a+="</span>"),a+='<div class="selecter-options">',a+="</div>",a+="</"+s+">",e.addClass("selecter-element").after(a);var l=e.next(".selecter"),d=c.extend({$select:e,$allOptions:n,$options:i,$selecter:l,$selected:l.find(".selecter-selected"),$itemsWrapper:l.find(".selecter-options"),index:-1,guid:b++},t);u(d),_(r,d),void 0!==c.fn.scroller&&d.$itemsWrapper.scroller(),d.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",d,p).on("click.selecter",".selecter-item",d,m).on("close.selecter",d,h).data("selecter",d),d.$select.on("change.selecter",d,f),w||(d.$selecter.on("focus.selecter",d,g).on("blur.selecter",d,v),d.$select.on("focus.selecter",d,function(e){e.data.$selecter.trigger("focus")}))}}function u(e){for(var t="",n=e.links?"a":"span",i=0,o=e.$allOptions.length;i<o;i++){var r=e.$allOptions.eq(i);if("OPTGROUP"===r[0].tagName)t+='<span class="selecter-group',r.is(":disabled")&&(t+=" disabled"),t+='">'+r.attr("label")+"</span>";else{var s=r.val();r.attr("value")||r.attr("value",s),t+="<"+n+' class="selecter-item',r.is(":selected")&&""===e.label&&(t+=" selected"),r.is(":disabled")&&(t+=" disabled"),t+='" ',t+=e.links?'href="'+s+'"':'data-value="'+s+'"',t+=">"+c("<span></span>").text(y(r.text(),e.trim)).html()+"</"+n+">",0}}e.$itemsWrapper.html(t),e.$items=e.$selecter.find(".selecter-item")}function p(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$select.is(":disabled"))if(c(".selecter").not(t.$selecter).trigger("close.selecter",[t]),w){var n=t.$select[0];if(o.document.createEvent){var i=o.document.createEvent("MouseEvents");i.initMouseEvent("mousedown",!1,!0,o,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}else n.fireEvent&&n.fireEvent("onmousedown")}else t.$selecter.hasClass("closed")?function(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$selecter.hasClass("open")){var n=t.$selecter.offset(),i=d.outerHeight(),o=t.$itemsWrapper.outerHeight(!0),r=0<=t.index?t.$items.eq(t.index).position():{left:0,top:0};n.top+o>i&&t.$selecter.addClass("bottom"),t.$itemsWrapper.show(),t.$selecter.removeClass("closed").addClass("open"),d.on("click.selecter-"+t.guid,":not(.selecter-options)",t,s),void 0!==c.fn.scroller?t.$itemsWrapper.scroller("scroll",t.$itemsWrapper.find(".scroller-content").scrollTop()+r.top,0).scroller("reset"):t.$itemsWrapper.scrollTop(t.$itemsWrapper.scrollTop()+r.top)}}(e):t.$selecter.hasClass("open")&&h(e)}function s(e){e.preventDefault(),e.stopPropagation(),0===c(e.currentTarget).parents(".selecter").length&&h(e)}function h(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.hasClass("open")&&(t.$itemsWrapper.hide(),t.$selecter.removeClass("open bottom").addClass("closed"),d.off(".selecter-"+t.guid))}function m(e){e.preventDefault(),e.stopPropagation();var t=c(this),n=e.data;if(!n.$select.is(":disabled")){if(n.$itemsWrapper.is(":visible"))_(n.$items.index(t),n),a(n);n.multiple||h(e)}}function f(e,t){var n=c(this),i=e.data;t||i.multiple||(_(i.$options.index(i.$options.filter("[value='"+n.val().replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")+"']")),i),a(i))}function g(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$select.is(":disabled")||t.multiple||(t.$selecter.addClass("focus").on("keydown.selecter"+t.guid,t,n),c(".selecter").not(t.$selecter).trigger("close.selecter",[t]))}function v(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.removeClass("focus").off("keydown.selecter"+t.guid+" keyup.selecter"+t.guid),c(".selecter").not(t.$selecter).trigger("close.selecter",[t])}function n(e){var t=e.data;if(13===e.keyCode)t.$selecter.hasClass("open")&&(h(e),_(t.index,t)),a(t);else if(!(9===e.keyCode||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault(),e.stopPropagation();var n=t.$items.length-1,i=t.index<0?0:t.index;if(-1<c.inArray(e.keyCode,l?[38,40,37,39]:[38,40]))(i+=38===e.keyCode||l&&37===e.keyCode?-1:1)<0&&(i=0),n<i&&(i=n);else{var o,r=String.fromCharCode(e.keyCode).toUpperCase();for(o=t.index+1;o<=n;o++)if(t.$options.eq(o).text().charAt(0).toUpperCase()===r){i=o;break}if(i<0)for(o=0;o<=n;o++)if(t.$options.eq(o).text().charAt(0).toUpperCase()===r){i=o;break}}0<=i&&_(i,t)}}function _(e,t){var n=t.$items.eq(e),i=n.hasClass("selected");if(!n.hasClass("disabled")){if(-1===e&&""!==t.label)t.$selected.html(t.label);else if(i)t.multiple&&(t.$options.eq(e).prop("selected",null),n.removeClass("selected"));else{var o=n.html();n.data("value"),t.multiple?t.$options.eq(e).prop("selected",!0):(t.$selected.html(o).removeClass("placeholder"),t.$items.filter(".selected").removeClass("selected"),t.$select[0].selectedIndex=e),n.addClass("selected")}(!i||t.multiple)&&(t.index=e)}}function a(e){var t,n;e.links?(n=(t=e).$select.val(),t.external?o.open(n):o.location.href=n):(e.callback.call(e.$selecter,e.$select.val(),e.index),e.$select.trigger("change",[!0]))}function y(e,t){return 0===t?e:e.length>t?e.substring(0,t)+"...":e}var b=0,l=-1<o.navigator.userAgent.toLowerCase().indexOf("firefox"),w=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(o.navigator.userAgent||o.navigator.vendor||o.opera),d=null,C={callback:c.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},t={defaults:function(e){return C=c.extend(C,e||{}),c(this)},disable:function(o){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");if(n)if(void 0!==o){var i=n.$items.index(n.$items.filter("[data-value="+o+"]"));n.$items.eq(i).addClass("disabled"),n.$options.eq(i).prop("disabled",!0)}else n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),n.$selecter.addClass("disabled"),n.$select.prop("disabled",!0)})},enable:function(o){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");if(n)if(void 0!==o){var i=n.$items.index(n.$items.filter("[data-value="+o+"]"));n.$items.eq(i).removeClass("disabled"),n.$options.eq(i).prop("disabled",!1)}else n.$selecter.removeClass("disabled"),n.$select.prop("disabled",!1)})},destroy:function(){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");n&&(n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==c.fn.scroller&&n.$selecter.find(".selecter-options").scroller("destroy"),n.$select[0].tabIndex=n.tabIndex,n.$select.off(".selecter").removeClass("selecter-element").show(),n.$selecter.off(".selecter").remove())})},refresh:function(){return c(this).each(function(e,t){var n=c(t).next(".selecter").data("selecter");if(n){var i=n.index;n.$allOptions=n.$select.find("option, optgroup"),n.$options=n.$allOptions.filter("option"),n.index=-1,i=n.$options.index(n.$options.filter(":selected")),u(n),_(i,n)}})}};c.fn.selecter=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=c.extend({},C,e||{}),null===d&&(d=c("body"));for(var t=c(this),n=0,i=t.length;n<i;n++)r(t.eq(n),e);return t}.apply(this,arguments)},c.selecter=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&function(d){"use strict";function o(e,t){if(!e.hasClass("stepper-input")){t=d.extend({},t,e.data("stepper-options"));var n=parseFloat(e.attr("min")),i=parseFloat(e.attr("max")),o=parseFloat(e.attr("step"))||1;e.addClass("stepper-input").wrap('<div class="stepper '+t.customClass+'" />').after('<span class="stepper-arrow up">'+t.labels.up+'</span><span class="stepper-arrow down">'+t.labels.down+"</span>");var r=e.parent(".stepper"),s=d.extend({$stepper:r,$input:e,$arrow:r.find(".stepper-arrow"),min:void 0!==typeof n&&!isNaN(n)&&n,max:void 0!==typeof i&&!isNaN(i)&&i,step:void 0===typeof o||isNaN(o)?1:o,timer:null},t);s.digits=(a=s.step,-1<(l=String(a)).indexOf(".")?l.length-l.indexOf(".")-1:0),e.is(":disabled")&&r.addClass("disabled"),r.on("touchstart.stepper mousedown.stepper",".stepper-arrow",s,c).data("stepper",s)}var a,l}function c(e){e.preventDefault(),e.stopPropagation(),s(e);var t,n,i,o=e.data;if(!o.$input.is(":disabled")&&!o.$stepper.hasClass("disabled")){var r=d(e.target).hasClass("up")?o.step:-o.step;o.timer=(t=o.timer,n=125,i=function(){a(o,r)},l(t),setInterval(i,n)),a(o,r),d("body").on("touchend.stepper mouseup.stepper",o,s)}}function s(e){e.preventDefault(),e.stopPropagation(),l(e.data.timer),d("body").off(".stepper")}function a(e,t){var n=parseFloat(e.$input.val()),i=t;void 0===typeof n||isNaN(n)?i=!1!==e.min?e.min:0:!1!==e.min&&n<e.min?i=e.min:i+=n;var o,r,s,a=(i-e.min)%e.step;0!==a&&(i-=a),!1!==e.min&&i<e.min&&(i=e.min),!1!==e.max&&i>e.max&&(i-=e.step),i!==n&&(o=i,r=e.digits,s=Math.pow(10,r),i=Math.round(o*s)/s,e.$input.val(i).trigger("change"))}function l(e){e&&(clearInterval(e),e=null)}var r={customClass:"",labels:{up:"Up",down:"Down"}},t={defaults:function(e){return r=d.extend(r,e||{}),d(this)},destroy:function(){return d(this).each(function(){var e=d(this).data("stepper");e&&(e.$stepper.off(".stepper").find(".stepper-arrow").remove(),e.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return d(this).each(function(){var e=d(this).data("stepper");e&&(e.$input.attr("disabled","disabled"),e.$stepper.addClass("disabled"))})},enable:function(){return d(this).each(function(){var e=d(this).data("stepper");e&&(e.$input.attr("disabled",null),e.$stepper.removeClass("disabled"))})}};d.fn.stepper=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=d.extend({},r,e||{});for(var t=d(this),n=0,i=t.length;n<i;n++)o(t.eq(n),e);return t}.apply(this,arguments)},d.stepper=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.select2&&n.fn.select2.amd)var e=n.fn.select2.amd;var t,o,d;return e&&e.requirejs||(e?o=e:e={},function(p){function h(e,t){return n.call(e,t)}function s(e,t){var n,i,o,r,s,a,l,d,c,u,p,h=t&&t.split("/"),m=w.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,w.nodeIdCompat&&M.test(e[s])&&(e[s]=e[s].replace(M,"")),e=h.slice(0,h.length-1).concat(e),c=0;c<e.length;c+=1)if("."===(p=e[c]))e.splice(c,1),c-=1;else if(".."===p){if(1===c&&(".."===e[2]||".."===e[0]))break;0<c&&(e.splice(c-1,2),c-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(c=(n=e.split("/")).length;0<c;c-=1){if(i=n.slice(0,c).join("/"),h)for(u=h.length;0<u;u-=1)if((o=m[h.slice(0,u).join("/")])&&(o=o[i])){r=o,a=c;break}if(r)break;!l&&f&&f[i]&&(l=f[i],d=c)}!r&&l&&(r=l,a=d),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function m(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),l.apply(p,e.concat([t,n]))}}function f(t){return function(e){y[t]=e}}function g(e){if(h(b,e)){var t=b[e];delete b[e],C[e]=!0,r.apply(p,t)}if(!h(y,e)&&!h(C,e))throw new Error("No "+e);return y[e]}function a(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var r,l,v,_,y={},b={},w={},C={},n=Object.prototype.hasOwnProperty,i=[].slice,M=/\.js$/;v=function(e,t){var n,i,o=a(e),r=o[0];return e=o[1],r&&(n=g(r=s(r,t))),r?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return s(e,i)})):s(e,t):(r=(o=a(e=s(e,t)))[0],e=o[1],r&&(n=g(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},_={require:function(e){return m(e)},exports:function(e){var t=y[e];return void 0!==t?t:y[e]={}},module:function(e){return{id:e,uri:"",exports:y[e],config:(t=e,function(){return w&&w.config&&w.config[t]||{}})};var t}},r=function(e,t,n,i){var o,r,s,a,l,d,c=[],u=typeof n;if(i=i||e,"undefined"===u||"function"===u){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(r=(a=v(t[l],i)).f))c[l]=_.require(e);else if("exports"===r)c[l]=_.exports(e),d=!0;else if("module"===r)o=c[l]=_.module(e);else if(h(y,r)||h(b,r)||h(C,r))c[l]=g(r);else{if(!a.p)throw new Error(e+" missing "+r);a.p.load(a.n,m(i,!0),f(r),{}),c[l]=y[r]}s=n?n.apply(y[e],c):void 0,e&&(o&&o.exports!==p&&o.exports!==y[e]?y[e]=o.exports:s===p&&d||(y[e]=s))}else e&&(y[e]=n)},t=o=l=function(e,t,n,i,o){if("string"==typeof e)return _[e]?_[e](t):g(v(e,t).f);if(!e.splice){if((w=e).deps&&l(w.deps,w.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=o),i?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),l},l.config=function(e){return l(e)},t._defined=y,(d=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),h(y,e)||h(b,e)||(b[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=o,e.define=d),e.define("almond",function(){}),e.define("jquery",[],function(){var e=n||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(r){function c(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}var e={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var o in t)i.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(i,o){function r(){var e=Array.prototype.unshift,t=o.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=o.prototype.constructor),n.apply(this,arguments)}var e=c(o),t=c(i);o.displayName=i.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var s=t[n];r.prototype[s]=i.prototype[s]}for(var a=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=o.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}},l=0;l<e.length;l++){var d=e[l];r.prototype[d]=a(d)}return r}},t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];(r=r.substring(0,1).toLowerCase()+r.substring(1))in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=r(t),i=t.style.overflowX,o=t.style.overflowY;return(i!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===i||"scroll"===o||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===r.fn.jquery.substr(0,3)){var n=r();r.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("select2/results",["jquery","./utils"],function(p,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=p('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var r=p(t),s=document.createElement("strong");s.className="select2-results__group",p(s),this.template(e,s);for(var a=[],l=0;l<e.children.length;l++){var d=e.children[l],c=this.option(d);a.push(c)}var u=p("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});u.append(a),r.append(s),r.append(u)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var r=l.$results.offset().top,s=o.offset().top,a=l.$results.scrollTop()+(s-r);0===i?l.$results.scrollTop(0):s-r<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=l.$results.offset().top+l.$results.outerHeight(!1),r=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+r-o;0===n?l.$results.scrollTop(0):o<r&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,o=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");return"true"===t.attr("aria-selected")?void(l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})):void l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,o=this.$results.scrollTop()+(i-n),r=i-n;o-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(r>this.$results.outerHeight()||r<0)&&this.$results.scrollTop(o)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),o=n(e,t);null==o?t.style.display="none":"string"==typeof o?t.innerHTML=i(o):p(t).append(o)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,e,o){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===o.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(t,e){var n=this;o.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},o}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function o(e,t){o.__super__.constructor.apply(this,arguments)}return a.Extend(o,e),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},o.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],o=this.selectionContainer(),r=this.display(i,o);o.append(r),o.prop("title",i.title||i.text),o.data("data",i),t.push(o)}var s=this.$selection.find(".select2-selection__rendered");a.appendMany(s,t)}},o}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),e.define("select2/selection/allowClear",["jquery","../keys"],function(i,o){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||(t.which==o.DELETE||t.which==o.BACKSPACE)&&this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=i('<span class="select2-selection__clear">×</span>');n.data("data",t),this.$selection.find(".select2-selection__rendered").prepend(n)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var o=document.documentMode,r=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){return r?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(r&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)}})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,o)){t=t||{};var n=s.Event("select2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,r)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("select2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return(n+=i.generateChars(4))+(null!=t.id?"-"+t.id.toString():"-"+i.generateChars(4))},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,t,a){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(o){var r=this;if(o.selected=!0,a(o.element).is("option"))return o.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(o=[o]).push.apply(o,e);for(var n=0;n<o.length;n++){var i=o[n].id;-1===a.inArray(i,t)&&t.push(i)}r.$element.val(t),r.$element.trigger("change")});else{var e=o.id;this.$element.val(e),this.$element.trigger("change")}},n.prototype.unselect=function(o){var r=this;if(this.$element.prop("multiple"))return o.selected=!1,a(o.element).is("option")?(o.element.selected=!1,void this.$element.trigger("change")):void this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==o.id&&-1===a.inArray(i,t)&&t.push(i)}r.$element.val(t),r.$element.trigger("change")})},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var o=[],r=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=r.item(e),n=r.matches(i,t);null!==n&&o.push(n)}}),e({results:o})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],o=0;o<n.length;o++){var r=a(n[o]),s=this.item(r);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){function t(e){return function(){return f(this).val()==e.id}}for(var n=this,i=this.$element.find("option"),o=i.map(function(){return n.item(f(this)).id}).get(),r=[],s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=f.inArray(a.id,o)){var l=i.filter(t(a)),d=this.item(l),c=f.extend(!0,{},a,d),u=this.option(c);l.replaceWith(u)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}r.push(p)}}return r},i}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){var i=r.ajax(e);return i.then(t),i.fail(n),i}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){function e(){var e=t.transport(t,function(e){var t=o.processResults(e,n);o.options.get("debug")&&window.console&&console.error&&(t&&t.results&&r.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){e.status&&"0"===e.status||o.trigger("results:message",{message:"errorLoading"})});o._request=e}var o=this;null!=this._request&&(r.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=r.extend({type:"GET"},this.ajaxOptions);"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(c){function e(e,t,n){var i=n.get("tags"),o=n.get("createTag");void 0!==o&&(this.createTag=o);var r=n.get("insertTag");if(void 0!==r&&(this.insertTag=r),e.call(this,t,n),c.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),d=this.option(l);this.$element.append(d)}}return e.prototype.query=function(e,d,c){var u=this;return this._removeOldTags(),null==d.term||null!=d.page?void e.call(this,d,c):void e.call(this,d,function e(t,n){for(var i=t.results,o=0;o<i.length;o++){var r=i[o],s=null!=r.children&&!e({results:r.children},!0);if(r.text===d.term||s)return!n&&(t.data=i,void c(t))}if(n)return!0;var a=u.createTag(d);if(null!=a){var l=u.option(a);l.attr("data-select2-tag",!0),u.addOptions([l]),u.insertTag(i,a)}t.results=i,c(t)})},e.prototype.createTag=function(e,t){var n=c.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-select2-tag]")).each(function(){this.selected||c(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var o=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=o._normalizeItem(e);if(!o.$element.find("option").filter(function(){return u(this).val()===n.id}).length){var i=o.option(n);i.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([i])}t=n,o.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var o=n.get("tokenSeparators")||[],r=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<r.length;){var l=r[s];if(-1!==u.inArray(l,o)){var d=r.substr(0,s),c=a(u.extend({},t,{term:d}));null!=c?(i(c),r=r.substr(s+1)||"",s=0):s++}else s++}return{term:r}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,o){var r=this;this.current(function(e){var t=null!=e?e.length:0;return 0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void n.call(r,i,o)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()&&i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(o){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=o.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=o.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=o('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=m("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,o="resize.select2."+t.id,r="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){m(this).data("select2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),s.on(i,function(e){var t=m(this).data("select2-scroll-position");m(this).scrollTop(t.y)}),m(window).on(i+" "+o+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+o)},e.prototype._positionDropdown=function(){var e=m(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=o.top,r.bottom=o.top+r.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),d=a<o.top-s,c=l>o.bottom+s,u={left:o.left,top:r.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();u.top-=h.top,u.left-=h.left,t||n||(i="below"),c||!d||t?!d&&c&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(u.top=r.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(u)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(m,f,g,v,_,y,b,w,C,M,I,t,x,$,E,z,R,O,A,S,P,k,D,T,j,Z,U,L,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=E:null!=t.data?t.dataAdapter=$:t.dataAdapter=x,0<t.minimumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,O)),0<t.maximumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,A)),0<t.maximumSelectionLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,S)),t.tags&&(t.dataAdapter=M.Decorate(t.dataAdapter,z)),(null!=t.tokenSeparators||null!=t.tokenizer)&&(t.dataAdapter=M.Decorate(t.dataAdapter,R)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=M.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=M.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,T)),null!=t.placeholder&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,U))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=P;else{var i=M.Decorate(P,k);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,Z)),t.closeOnSelect&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,L)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var o=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=M.Decorate(t.dropdownAdapter,o)}t.dropdownAdapter=M.Decorate(t.dropdownAdapter,j)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=_:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,y)),t.allowClear&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,w)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var r=f(t.amdBase+"compat/containerCss");t.selectionAdapter=M.Decorate(t.selectionAdapter,r)}t.selectionAdapter=M.Decorate(t.selectionAdapter,C)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var s=t.language.split("-")[0];t.language=[t.language,s]}else t.language=[t.language];if(m.isArray(t.language)){var a=new I;t.language.push("en");for(var l=t.language,d=0;d<l.length;d++){var c=l[d],u={};try{u=I.loadPath(c)}catch(e){try{c=this.defaults.amdLanguageBase+c,u=I.loadPath(c)}catch(e){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+c+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(u)}t.translations=a}else{var p=I.loadPath(this.defaults.amdLanguageBase+"en"),h=new I(t.language);h.extend(p),t.translations=h}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:M.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.extend(!0,{},n),o=n.children.length-1;0<=o;o--)null==e(t,n.children[o])&&i.children.splice(o,1);return 0<i.children.length?i:e(t,i)}var r=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<r.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[m.camelCase(e)]=t;var i=M._convertData(n);m.extend(this.defaults,i)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(i,r,o,s){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=o.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n;n=r.fn.jquery&&"1."==r.fn.jquery.substr(0,2)&&e[0].dataset?r.extend(!0,{},e[0].dataset,e.data()):e.data();var i=r.extend(!0,{},n);for(var o in i=s._convertData(i))-1<r.inArray(o,t)||(r.isPlainObject(this.options[o])?r.extend(this.options[o],i[o]):this.options[o]=i[o]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,d,n,i){var c=function(e,t){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new d(t,e),c.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var o=this.render();this._placeContainer(o);var r=this.options.get("selectionAdapter");this.selection=new r(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,o);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,o);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(c,n.Observable),c.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},c.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},c.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;a<l;a+=1){var d=s[a].replace(/\s/g,"").match(n);if(null!==d&&1<=d.length)return d[1]}return null}return t},c.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},c.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){o.each(e,t._syncA),o.each(e,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},c.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,i)&&n.trigger(e,t)})},c.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},c.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},c.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var o=0;o<t.addedNodes.length;o++){t.addedNodes[o].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},c.prototype.trigger=function(e,t){var n=c.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var o=i[e],r={prevented:!1,name:e,args:t};if(n.call(this,o,r),r.prevented)return void(t.prevented=!0)}n.call(this,e,t)},c.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},c.prototype.open=function(){this.isOpen()||this.trigger("query",{})},c.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},c.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},c.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},c.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},c.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},c.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},c.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},c.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},c.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},c}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(o,e,r,t){if(null==o.fn.select2){var s=["open","close","destroy"];o.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=o.extend(!0,{},t);new r(o(this),e)}),this;if("string"==typeof t){var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o(this).data("select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1<o.inArray(t,s)?this:n}throw new Error("Invalid arguments for Select2: "+t)}}return null==o.fn.select2.defaults&&(o.fn.select2.defaults=t),r}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return n.fn.select2.amd=e,t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(r){"use strict";function n(e,t){function n(e){void 0!==e.open&&(e.open=!e.open)}var i=function(e){for(var t=[],n=e.parentNode;(i=n)&&(0===i.offsetWidth||0===i.offsetHeight||!1===i.open);)t.push(n),n=n.parentNode;var i;return t}(e),o=i.length,r=[],s=e[t];if(o){for(var a=0;a<o;a++)r[a]=i[a].style.cssText,i[a].style.setProperty?i[a].style.setProperty("display","block","important"):i[a].style.cssText+=";display: block !important",i[a].style.height="0",i[a].style.overflow="hidden",i[a].style.visibility="hidden",n(i[a]);s=e[t];for(var l=0;l<o;l++)i[l].style.cssText=r[l],n(i[l])}return s}function i(e,t){var n=parseFloat(e);return Number.isNaN(n)?t:n}function o(e){return e.charAt(0).toUpperCase()+e.substr(1)}function s(e,t){if(this.$window=r(window),this.$document=r(document),this.$element=r(e),this.options=r.extend({},c,t),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=u.orientation[this.orientation].dimension,this.DIRECTION=u.orientation[this.orientation].direction,this.DIRECTION_STYLE=u.orientation[this.orientation].directionStyle,this.COORDINATE=u.orientation[this.orientation].coordinate,this.polyfill&&d)return!1;this.identifier="js-"+a+"-"+l++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=r('<div class="'+this.options.fillClass+'" />'),this.$handle=r('<div class="'+this.options.handleClass+'" />'),this.$range=r('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=r.proxy(this.handleDown,this),this.handleMove=r.proxy(this.handleMove,this),this.handleEnd=r.proxy(this.handleEnd,this),this.init();var n,i,o=this;this.$window.on("resize."+this.identifier,(n=function(){!function(e,t){var n=Array.prototype.slice.call(arguments,2);setTimeout(function(){return e.apply(null,n)},t)}(function(){o.update(!1,!1)},300)},i=(i=20)||100,function(){if(!n.debouncing){var e=Array.prototype.slice.apply(arguments);n.lastReturnVal=n.apply(window,e),n.debouncing=!0}return clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},i),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,t){if(!t||t.origin!==o.identifier){var n=e.target.value,i=o.getPositionFromValue(n);o.setPosition(i)}})}Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};var e,a="rangeslider",l=0,d=((e=document.createElement("input")).setAttribute("type","range"),"text"!==e.type),c={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},u={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return s.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},s.prototype.update=function(e,t){(e=e||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=n(this.$handle[0],"offset"+o(this.DIMENSION)),this.rangeDimension=n(this.$range[0],"offset"+o(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,t)},s.prototype.handleDown=function(e){if(e.preventDefault(),!(e.button&&0!==e.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),-1<(" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)))){var t=this.getRelativePosition(e),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=this.getPositionFromNode(this.$handle[0])-n,o="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(o),i<=t&&t<i+this.handleDimension&&(this.grabPos=t-i)}},s.prototype.handleMove=function(e){e.preventDefault();var t=this.getRelativePosition(e),n="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(n)},s.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},s.prototype.cap=function(e,t,n){return e<t?t:n<e?n:e},s.prototype.setPosition=function(e,t){var n,i;void 0===t&&(t=!0),n=this.getValueFromPosition(this.cap(e,0,this.maxHandlePos)),i=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=i+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=i+"px",this.setValue(n),this.position=i,this.value=n,t&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(i,n)},s.prototype.getPositionFromNode=function(e){for(var t=0;null!==e;)t+=e.offsetLeft,e=e.offsetParent;return t},s.prototype.getRelativePosition=function(e){var t=o(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==e.originalEvent["client"+t]?i=e.originalEvent["client"+t]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+t]?i=e.originalEvent.touches[0]["client"+t]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(i=e.currentPoint[this.COORDINATE]),i-n},s.prototype.getPositionFromValue=function(e){var t;return t=(e-this.min)/(this.max-this.min),Number.isNaN(t)?0:t*this.maxHandlePos},s.prototype.getValueFromPosition=function(e){var t,n;return t=e/(this.maxHandlePos||1),n=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min,Number(n.toFixed(this.toFixed))},s.prototype.setValue=function(e){e===this.value&&""!==this.$element[0].value||this.$element.val(e).trigger("input",{origin:this.identifier})},s.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+a),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},r.fn[a]=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this),t=e.data("plugin_"+a);t||e.data("plugin_"+a,t=new s(this,n)),"string"==typeof n&&t[n].apply(t,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(t,e,n){t.bind("ready",function(){t.previewedDevice&&t.previewedDevice.bind(function(e){t.previewer.send("previewed-device",e)})})}(wp.customize,jQuery,_),function(e,t,i){e.czr_skopeReady=t.Deferred(),!i.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn||e.czr_skopeReady.resolve();var o=function(e){e=i.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,n=Array.from(e.consoleArguments);return n=i.isEmpty(i.filter(n,function(e){return!i.isString(e)}))?n.join(" "):JSON.stringify(n.join(" ")),["%c "+(t=n,i.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},n=function(e,t,n){i.isUndefined(console)&&"function"!=typeof window.console.log||(serverControlParams.isDevMode?i.isUndefined(t)?console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,o({bgCol:n,textCol:"#000",consoleArguments:[e]})))};e.consoleLog=function(){serverControlParams.isDevMode&&(i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,o({consoleArguments:arguments})),console.log("Unstyled console message : ",arguments)))},e.errorLog=function(){i.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,o({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments}))},e.errare=function(e,t){n(e,t,"#ffd5a0")},e.infoLog=function(e,t){n(e,t,"#5ed1f5")},e.czr_isSkopOn=function(){return!i.isUndefined(serverControlParams.isSkopOn)&&serverControlParams.isSkopOn&&i.has(e,"czr_skopeBase")},e.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(e,n,i){e.bind("ready",function(){var t=function(){i.isUndefined(window.themeServerControlParams)||i.isUndefined(themeServerControlParams.isThemeSwitchOn)||themeServerControlParams.isThemeSwitchOn||(e.panel("themes").active.callbacks=n.Callbacks(),e.panel("themes").active(themeServerControlParams.isThemeSwitchOn))};e.panel.has("themes")?t():e.panel.when("themes",function(e){t()})})}(wp.customize,jQuery,_),function(o,e,r){o.czr_activeSectionId=o.czr_activeSectionId||new o.Value(""),o.czr_activePanelId=o.czr_activePanelId||new o.Value(""),o.bind("ready",function(){if("function"!=typeof o.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var n=function(e,t){o.czr_activeSectionId(e?t:"")};o.section.each(function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})}),o.section.bind("add",function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})});var i=function(e,t){o.czr_activePanelId(e?t:""),r.isEmpty(o.czr_activePanelId())&&o.czr_activeSectionId("")};o.panel.each(function(t){t.expanded.bind(function(e){i(e,t.id)})}),o.panel.bind("add",function(t){t.expanded.bind(function(e){i(e,t.id)})})})}(wp.customize,jQuery,_),function(h,m,f){h.bind("ready",function(){serverControlParams.paramsForDynamicRegistration;f.isObject(serverControlParams.paramsForDynamicRegistration)||h.errorLog("serverControlParams.paramsForDynamicRegistration should be an array"),f.each(serverControlParams.paramsForDynamicRegistration,function(e,t){try{n(e)}catch(e){h.errorLog(e)}})});var n=function(e){if(e=f.extend({setting_id:"",module_type:"",option_value:[],setting:{},section:{id:"",title:""},control:{}},e),f.isEmpty(e.setting_id)||f.isEmpty(e.module_type))throw h.errare("registerDynamicModuleSettingControl => args",e),new Error("registerDynamicModuleSettingControl => missing params when registrating a setting");if(!f.isArray(e.option_value)&&!f.isObject(e.option_value))throw new Error("registerDynamicModuleSettingControl => the module values must be an array or an object");var t=e.setting_id,n=e.setting;if(!h.has(t)){(n=f.extend({dirty:!1,value:[],previewer:h.previewer,transport:"refresh",type:"option"},{value:e.option_value,transport:n.transport||"refresh",type:n.type||"option"})).value=e.option_value;var i=h.settingConstructor[n.type]||h.Setting;h.add(new i(t,n.value,n))}var o=e.section;if(!f.isEmpty(o)){if(!f.has(o,"id"))throw new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);if(!h.section.has(o.id)){var r=f.extend({active:!0,content:"",customizeAction:"Customizing",description:"",description_hidden:!1,id:"",instanceNumber:99,panel:"",priority:0,title:"",type:"default"},{id:o.id,title:o.title||o.id,description:f.isEmpty(o.description)?"":o.description,panel:f.isEmpty(o.panel)?"":o.panel,priority:o.priority||10}),s=h.sectionConstructor[r.type]||h.Section;r=f.extend({params:r},r),h.section.add(new s(r.id,r))}}var a=t;if(!h.control.has(a)){var l,d=e.control,c=m.extend(!0,{},h.settings.controls.blogdescription);if(l=f.isEmpty(e.section)?d.section:e.section.id,f.isEmpty(l))throw h.errare("registerDynamicModuleSettingControl => missing section id for the control",e),new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);(d=f.extend(c,{type:"czr_module",module_type:e.module_type,section:l,content:"",label:d.label,priority:d.priority})).settings.default=t;var u,p=h.controlConstructor[d.type]||h.Control;u=f.extend({params:d},d);h.control.add(new p(a,u));h.section(l).expanded()&&h.control(a).trigger("set-module-ready")}return t}}(wp.customize,jQuery,_),function(s,a,l){s.Value.prototype.set=function(t,n){var i=this._value,e=a.Deferred(),o=this,r=[];return t=this._setter.apply(this,arguments),t=this.validate(t),args=l.extend({silent:!1},l.isObject(n)?n:{}),null===t||l.isEqual(i,t)?e.resolveWith(o,[t,i,n]).promise():(this._value=t,(this._dirty=!0)===args.silent?e.resolveWith(o,[t,i,n]).promise():this._deferreds?(l.each(o._deferreds,function(e){r.push(e.apply(null,[t,i,n]))}),a.when.apply(null,r).fail(function(){s.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){o.callbacks.fireWith(o,[t,i,n]),e.resolveWith(o,[t,i,n])}),e.promise(o)):(this.callbacks.fireWith(this,[t,i,n]),e.resolveWith(o,[t,i,n]).promise(o)))},s.Value.prototype.bind=function(){var t=this,n=!1,i=[];return a.each(arguments,function(e,t){n||(n=l.isObject(t)&&t.deferred),l.isFunction(t)&&i.push(t)}),n?(t._deferreds=t._deferreds||[],l.each(i,function(e){l.contains(e,t._deferreds)||t._deferreds.push(e)})):t.callbacks.add.apply(t.callbacks,arguments),this},s.Setting.prototype.silent_set=function(e,t){var n=this._value,i=s.state("saved")();return e=this._setter.apply(this,arguments),null===(e=this.validate(e))||l.isEqual(n,e)||(this._value=e,this._dirty=l.isUndefined(t)||!l.isBoolean(t)?this._dirty:t,this.callbacks.fireWith(this,[e,n,{silent:!0}]),s.state("saved")(i)),this}}(wp.customize,jQuery,_),function(s,a,l){s.Setting.prototype.preview=function(e,t,n){var i,o=this,r=a.Deferred();return i=o.transport,serverControlParams.isSkopOn&&s.czr_isPreviewerSkopeAware&&"pending"==s.czr_isPreviewerSkopeAware.state()?(this.previewer.refresh(),r.resolve(arguments).promise()):l.isUndefined(t)||l.isEmpty(t)||l.isNull(t)||!l.isObject(n)||!0!==n.not_preview_sent?l.has(n,"silent")&&!1!==n.silent?r.resolve(arguments).promise():("postMessage"!==i||s.state("previewerAlive").get()||(i="refresh"),"postMessage"===i?(o.previewer.send("pre_setting",{set_id:o.id,data:n,value:e}),o.previewer.send("setting",[o.id,o()]),r.resolve(arguments)):"refresh"===i&&(serverControlParams.isSkopOn?o.previewer.refresh().always(function(){r.resolve(arguments)}):(o.previewer.refresh(),r.resolve(arguments))),r.promise()):r.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(e,o,r){if("function"==typeof e.Section){var n=e.Section.prototype.initialize;e.Section.prototype.initialize=function(e,t){n.apply(this,[e,t]);var i=this;this.expanded.callbacks.add(function(e){if(e){var t=i.container.closest(".wp-full-overlay-sidebar-content"),n=i.container.find(".accordion-section-content");_resizeContentHeight=function(){n.css("height",t.innerHeight())},_resizeContentHeight(),o(window).on("resize.customizer-section",r.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(c,u,p){c.CZR_Helpers=c.CZR_Helpers||{},c.CZR_Helpers=u.extend(c.CZR_Helpers,{getControlSettingId:function(e,t){return t="default",c.control.has(e)?!p.has(c.control(e),"settings")||p.isEmpty(c.control(e).settings)?e:p.has(c.control(e).settings,t)?p.isUndefined(c.control(e).settings[t].id)?(c.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+e),e):c.control(e).settings[t].id:(c.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+e+" , "+t),e):e},getDocSearchLink:function(e){var t=(e=p.isString(e)?e:"").replace(/ /g,"+");return['<a href="'+[serverControlParams.docURL,"search?query=",t].join("")+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="far fa-question-circle-o"></span>'].join("")},build_setId:function(e){return p.isUndefined(window.themeServerControlParams)||!p.isArray(themeServerControlParams.wpBuiltinSettings)?e:p.contains(themeServerControlParams.wpBuiltinSettings,e)?e:p.contains(themeServerControlParams.themeSettingList,e)&&-1==e.indexOf(themeServerControlParams.themeOptions)?[themeServerControlParams.themeOptions+"[",e,"]"].join(""):e},getOptionName:function(e){if(p.isEmpty(window.themeServerControlParams)||p.isEmpty(themeServerControlParams.themeOptions))return e;return-1==e.indexOf(themeServerControlParams.themeOptions)?e:e.replace(/\[|\]/g,"").replace(themeServerControlParams.themeOptions,"")},hasPartRefresh:function(n){if(p.has(c,"czr_partials"))return p.contains(p.map(c.czr_partials(),function(e,t){return p.contains(e.settings,n)}),!0)},getSectionControlIds:function(e){return e=e||c.czr_activeSectionId(),c.section.has(e)?p.map(c.section(e).controls(),function(e){return e.id}):[]},getSectionSettingIds:function(e){if(e=e||c.czr_activeSectionId(),c.section.has(e)){var n=[],t=this.getSectionControlIds(e);return p.each(t,function(e){p.each(c.control(e).settings,function(e,t){n.push(e.id)})}),n}},capitalize:function(e){return p.isString(e)?e.charAt(0).toUpperCase()+e.slice(1):e},truncate:function(e,t,n){if(!p.isString(e))return"";t=t||20;var i=e.length>t,o=i?e.substr(0,t-1):e;return o=n&&i?o.substr(0,o.lastIndexOf(" ")):o,i?o+"...":o},isMultiItemModule:function(e,t){if(!p.isUndefined(e)||p.isObject(t)){if(p.isObject(t)&&p.has(t,"module_type"))e=t.module_type;else if(p.isUndefined(e)||p.isNull(e))return;if(p.has(c.czrModuleMap,e))return c.czrModuleMap[e].crud||c.czrModuleMap[e].multi_item||!1}},isCrudModule:function(e,t){if(!p.isUndefined(e)||p.isObject(t)){if(p.isObject(t)&&p.has(t,"module_type"))e=t.module_type;else if(p.isUndefined(e)||p.isNull(e))return;if(p.has(c.czrModuleMap,e))return c.czrModuleMap[e].crud||!1}},hasModuleModOpt:function(e,t){if(!p.isUndefined(e)||p.isObject(t)){if(p.isObject(t)&&p.has(t,"module_type"))e=t.module_type;else if(p.isUndefined(e)||p.isNull(e))return;if(p.has(c.czrModuleMap,e))return c.czrModuleMap[e].has_mod_opt||!1}},setupInputCollectionFromDOM:function(){var r=this;if(!p.isFunction(r))throw new Error("setupInputCollectionFromDOM => inputParentInst is not valid.");var s=r.module,a=p.has(r(),"is_mod_opt");if(p.isEmpty(r.inputCollection())){r.czr_Input=r.czr_Input||new c.Values,r.inputConstructor=a?s.inputModOptConstructor:s.inputConstructor;var e=a?r.defaultModOptModel:r.defaultItemModel;if(p.isEmpty(e)||p.isUndefined(e))throw new Error("setupInputCollectionFromDOM => No default model found in item or mod opt "+r.id+".");var l=u.extend(!0,{},r());l=p.isObject(l)?u.extend(e,l):e;var d={};return u("."+s.control.css_attr.sub_set_wrapper,r.container).each(function(e){var t=u(this).find("[data-czrtype]").attr("data-czrtype"),n=p.has(l,t)?l[t]:"";if(p.isUndefined(t)||p.isEmpty(t))c.errare("setupInputCollectionFromDOM => missing data-czrtype id for input type "+u(this).data("input-type")+" in module "+s.id+". Check that the server input template is properly declared.");else{if(!p.has(l,t))throw new Error("setupInputCollectionFromDOM => The item or mod opt property : "+t+" has been found in the DOM but not in the item or mod opt model : "+r.id+". The input can not be instantiated.");var i=u(this).data("input-type"),o={id:t,type:i,transport:u(this).data("transport")||"inherit",input_value:n,input_options:p.has(s.inputOptions,i)?s.inputOptions[i]:{},container:u(this),input_parent:r,is_mod_opt:a,module:s};p.isUndefined(u(this).data("refresh-markup"))||(o.refresh_markup=u(this).data("refresh-markup")),p.isUndefined(u(this).data("refresh-stylesheet"))||(o.refresh_stylesheet=u(this).data("refresh-stylesheet")),p.isUndefined(u(this).data("refresh-fonts"))||(o.refresh_fonts=u(this).data("refresh-fonts")),c.trigger("input-args-before-instantiation",o),r.czr_Input.add(t,new r.inputConstructor(t,o)),r.czr_Input(t).ready(),d[t]=n}}),r.inputCollection(d),r}},removeInputCollection:function(){var t=this;if(!p.isFunction(t))throw new Error("removeInputCollection : inputParentInst is not valid.");p.has(t,"czr_Input")&&(t.czr_Input.each(function(e){t.czr_Input.remove(e.id)}),t.inputCollection({}))},refreshModuleControl:function(e){var t=c.controlConstructor.czr_module,n=(c.control(e).params.type,c.settings.controls[e]);u.when(c.control(e).container.remove()).done(function(){c.control.remove(e),c.control.add(e,new t(e,{params:n,previewer:c.previewer}))})},isChecked:function(e){return p.isBoolean(e)?e:p.isNumber(e)?0<e:!!p.isString(e)&&("0"!==e&&""!==e&&"off"!==e)},hexToRgb:function(t){try{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,i){return t+t+n+n+i+i})}catch(e){return c.errorLog("Error in Helpers::hexToRgb : "+e),t}var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+(e=e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[]).join(",")+")"},rgbToHex:function(e,t,n){var i=function(e){var t=e.toString(16);return 1==t.length?"0"+t:t};return"#"+i(e)+i(t)+i(n)},parseTemplate:p.memoize(function(t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(n=n||p.template(t,i))(e)}}),getModuleTmpl:function(t){var n=u.Deferred();if(t=p.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:c.settings.nonce.save},t),(p.isEmpty(t.tmpl)||p.isEmpty(t.module_type))&&n.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),c.CZR_Helpers.czr_cachedTmpl=c.CZR_Helpers.czr_cachedTmpl||{},c.CZR_Helpers.czr_cachedTmpl[t.module_type]=c.CZR_Helpers.czr_cachedTmpl[t.module_type]||{},!0===t.cache&&!p.isEmpty(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&p.isString(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]))n.resolve(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]);else{if(p.isObject(c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&"pending"==c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl].state())return c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl];c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=wp.ajax.post("ac_get_template",t).done(function(e){n.resolve(e),c.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=e}).fail(function(e){c.errare("api.CZR_Helpers.getModuleTmpl => Problem when fetching the "+t.tmpl+" tmpl from server for module : "+t.module_id+" "+t.module_type,e),n.reject(e)})}return n.promise()}})}(wp.customize,jQuery,_),function(a,l,d){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=l.extend(a.CZR_Helpers,{addActions:function(e,t,n){(n=n||this)[e]=n[e]||[],new_event_map=d.clone(n[e]),n[e]=d.union(new_event_map,d.isArray(t)?t:[t])},doActions:function(e,t,n){t.trigger(e,n)},setupDOMListeners:function(e,o,r){var s=this;r=r||s,d.isArray(e)?d.isObject(o)?(o=d.extend({model:{},dom_el:{}},o)).dom_el instanceof jQuery&&!(o.dom_el.length<1)?d.map(e,function(i){if(d.isString(i.selector)&&!d.isEmpty(i.selector))if(d.isString(i.selector)&&!d.isEmpty(i.selector)){var e=i.name&&!d.isEmpty(i.name)?i.name:[i.trigger,i.selector].join(""),t=o.dom_el.data("czr-listener-collection");if(t&&d.isArray(t)){if(t=d.isArray(t)?t:[],d.contains(t,e))return void a.errare("setupDOMListeners : aborting because listener already created for event : "+e);t.push(e)}else t=[e];o.dom_el.data("czr-listener-collection",t),o.dom_el.on(i.trigger,i.selector,function(e,t){if(e.stopPropagation(),!a.utils.isKeydownButNotEnterEvent(e)){e.preventDefault();var n=l.extend(!0,{},o);if(d.has(n,"model")&&d.has(n.model,"id")&&(d.has(r,"get")?n.model=r():n.model=r.getModel(n.model.id)),l.extend(n,{event:i,dom_event:e}),l.extend(n,t),d.has(n,"event")&&d.has(n.event,"actions"))if(serverControlParams.isDevMode)s.executeEventActionChain(n,r);else try{s.executeEventActionChain(n,r)}catch(e){a.errare("In setupDOMListeners : problem when trying to fire actions : "+n.event.actions,e)}else a.errare("executeEventActionChain : missing obj.event or obj.event.actions")}})}else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","));else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","))}):a.errare("setupDomListeners : dom element should be an existing dom element",o):a.errare("setupDomListeners : args should be an object",e):a.errare("setupDomListeners : event_map should be an array",o)},executeEventActionChain:function(i,o){var r=this;if("function"==typeof i.event.actions)return i.event.actions.call(o,i);d.isArray(i.event.actions)||(i.event.actions=[i.event.actions]);var s=!1;d.map(i.event.actions,function(e){if(!s){var t=function(){};if("function"==typeof e)t=e;else{if("function"!=typeof o[e])throw new Error("executeEventActionChain : the action : "+e+" has not been found when firing event : "+i.event.selector);t=o[e]}var n=d.has(i,"dom_el")&&-1!=i.dom_el.length?i.dom_el:r.container;"string"==typeof e&&n.trigger("before_"+e,d.omit(i,"event")),!1===t.call(o,i)&&(s=!0),"string"==typeof e&&n.trigger("after_"+e,d.omit(i,"event"))}})}})}(wp.customize,jQuery,_),function(i,t,o){i.bind("ready",function(){i.previewer.bind("czr-query-data-ready",function(e){i.czr_wpQueryInfos=i.czr_wpQueryInfos||new i.Value,i.czr_wpQueryInfos(e),i.czr_wpQueryDataReady=i.czr_wpQueryDataReady||t.Deferred(),"pending"==i.czr_wpQueryDataReady.state()&&i.czr_wpQueryDataReady.resolve(e)}),i.previewer.bind("czr-partial-refresh-data",function(e){i.czr_partials=i.czr_partials||new i.Value,i.czr_partials.set(e)}),i.previewer.bind("czr-partial-refresh-done",function(e){if(o.has(e,"set_id")){var t=i.CZR_Helpers.build_setId(e.set_id);if(i.has(t)){var n=i.CZR_Helpers.getControlSettingId(t);i.control.has(n)&&i.control(n).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(o,r,a){r.extend(CZRInputMths,{initialize:function(e,t){if(a.isUndefined(t.input_parent)||a.isEmpty(t.input_parent))throw new Error("No input_parent assigned to input "+t.id+". Aborting");if(a.isUndefined(t.module))throw new Error("No module assigned to input "+t.id+". Aborting");o.Value.prototype.initialize.call(this,null,t);var n=this;r.extend(n,t||{}),n.constructorOptions=r.extend(!0,{},t),n.isReady=r.Deferred(),a.isUndefined(t.input_value)||n.set(t.input_value);if(n.input_event_map=[{trigger:r.trim(["change",{text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"}[n.type]||""].join(" ")),selector:"input[data-czrtype], select[data-czrtype], textarea[data-czrtype]",name:"set_input_value",actions:function(e){if(!a.has(n.input_parent,"syncElements")||!a.has(n.input_parent.syncElements,n.id))throw new Error("WARNING : THE INPUT "+n.id+" HAS NO SYNCED ELEMENT.")}}],o.czrInputMap&&a.has(o.czrInputMap,n.type)){var i=o.czrInputMap[n.type];a.isFunction(n[i])?n[i](t.input_options||null):a.isFunction(o.czrInputMap[n.type])&&o.czrInputMap[n.type].apply(n,[t.input_options||null])}else o.errare("Warning the input : "+n.id+" with type "+n.type+" has no corresponding method defined in api.czrInputMap.");n.visible=new o.Value(!0),n.isReady.done(function(){n.visible.bind(function(e){e?n.container.stop(!0,!0).slideDown(200):n.container.stop(!0,!0).slideUp(200)})}),n.enabled=new o.Value(!0),n.isReady.done(function(){n.enabled.bind(function(e){n.container.toggleClass("disabled",!e)})})},ready:function(){var e=this;e.setupDOMListeners(e.input_event_map,{dom_el:e.container},e),e.callbacks.add(function(){return e.inputReact.apply(e,arguments)}),r.when(e.setupSynchronizer()).done(function(){e.isReady.resolve(e)})},setupSynchronizer:function(){var e=this,t=e.input_parent,n=e.container.find("[data-czrtype]");e.container.find("[data-czrtype]").is("textarea")&&o.errorLog("TO DO : THE TEXTAREA INPUT ARE NOT IMPLEMENTED YET IN THE SYNCHRONIZER!");var i=new o.Element(n);t.syncElements=t.syncElements||{},(t.syncElements[e.id]=i).sync(e),i.set(e())},inputReact:function(e,t,n){var i=this,o=i.input_parent(),r=a.clone(o),s=i.is_preItemInput;i.enabled()&&((r=!a.isObject(r)||a.isEmpty(r)?{}:r)[i.id]=e,i.input_parent.set(r,{input_changed:i.id,input_value:i(),input_transport:i.transport,not_preview_sent:"postMessage"===i.transport,inputRegistrationParams:i.constructorOptions}),s||(i.input_parent.trigger(i.id+":changed",e),a.isEmpty(t)&&(a.isUndefined(t)||"postMessage"!==i.transport)||i.module.sendInputToPreview({input_id:i.id,input_parent_id:i.input_parent.id,to:e,from:t})))},setupColorPicker:function(){this.container.find("input").iris({palettes:!0,hide:!1,change:function(e,t){r(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupColorPickerAlpha:function(){var n=this;n.container.find("input").wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){r(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")},clear:function(e,t){n("")}})},setupSelect:function(){r("select",this.container).not(".no-selecter-js").each(function(){r(this).selecter({})})},setupIcheck:function(e){r("input[type=checkbox]",this.container).each(function(e){0===r(this).closest('div[class^="icheckbox"]').length&&r(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){r(this).val(!1===r(this).is(":checked")?0:1),r(e.currentTarget).trigger("change")})})},setupGutenCheck:function(e){var t=this.container.find("input[type=checkbox]"),n=r(".czr-toggle-check",this.container),i=function(){t.closest(".czr-toggle-check").toggleClass("is-checked",t.is(":checked")),n.find("svg").remove(),n.append(t.is(":checked")?'<svg class="czr-toggle-check__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 6"><path d="M0 0h2v6H0z"></path></svg>':'<svg class="czr-toggle-check__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 6"><path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path></svg>')};t.on("change",i),i()},setupRadio:function(e){r("input[type=radio]",this.container).each(function(e){0===r(this).closest('div[class^="icheckbox"]').length&&r(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){r(e.currentTarget).trigger("change")})})},setupStepper:function(e){r('input[type="number"]',this.container).each(function(e){r(this).stepper()})},setupSimpleRange:function(){},setupRangeSlider:function(e){var n,i=this,o=function(e,t){e.textContent=t+i.container.find("input").data("unit")};r(i.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){n=r(".rangeslider__handle",this.$range),r(".rangeslider__handle",this.$range),o(n[0],this.value)},onSlide:function(e,t){o(n[0],t)}})},setupHAlignement:function(e){var t=this,n=r(".sek-h-align-wrapper",t.container);n.find('div[data-sek-align="'+t()+'"]').addClass("selected"),n.on("click","[data-sek-align]",function(e){e.preventDefault(),n.find(".selected").removeClass("selected"),r.when(r(this).addClass("selected")).done(function(){t(r(this).data("sek-align"))})})}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(o,i,r){i.extend(CZRInputMths,{setupImageUploaderSaveAsId:function(){this.setupImageUploader()},setupImageUploaderSaveAsUrl:function(){this.setupImageUploader({save_as_url:!0})},setupImageUploader:function(e){var t=this,n=t();if(e=r.extend({save_as_url:!1},e||{}),t.save_as_url=e.save_as_url,t.attachment={},!t.container)return this;t.tmplRendered=i.Deferred(),t.setupContentRendering(n,{}),t.tmplRendered.done(function(){t.czrImgUploaderBinding()}).fail(function(){o.errorLog("setupImageUploader => failed to fetch the template.")})},setupContentRendering:function(e,t){var n,i=this;i.attachment.id!=e&&t!==e?(r.isEmpty(e)?(i.attachment={},i.renderImageUploaderTemplate()):r.isNumber(e)||i.renderImageUploaderTemplate({fromUrl:!0,url:e}),n=wp.media.attachment(e),r.isObject(n)&&r.has(n,"attributes")&&r.has(n.attributes,"sizes")?(i.attachment=n.attributes,i.renderImageUploaderTemplate()):r.isNumber(e)&&wp.media.attachment(e).fetch().done(function(){i.attachment=this.attributes,i.renderImageUploaderTemplate()}).fail(function(){o.errorLog("renderImageUploaderTemplate => failed attempt to fetch an img with id : "+e)})):i.attachment.id&&i.attachment.id!==e||i.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var n=this;r.bindAll(n,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),n.container.on("click keydown",".upload-button",n.czrImgUploadOpenFrame),n.container.on("click keydown",".thumbnail-image img",n.czrImgUploadOpenFrame),n.container.on("click keydown",".remove-button",n.czrImgUploadRemoveFile),n.bind(n.id+":changed",function(e,t){n.tmplRendered=i.Deferred(),n.setupContentRendering(e,t)})},czrImgUploadOpenFrame:function(e){o.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var e=this.getUploaderLabels();this.frame=wp.media({button:{text:e.frame_button},states:[new wp.media.controller.Library({title:e.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),this.frame.on("select",this.czrImgUploadSelect)},czrImgUploadRemoveFile:function(e){o.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.attachment={},this.set(""))},czrImgUploadSelect:function(){var e=this.frame.state().get("selection").first().toJSON();window._wpmejsSettings;this.attachment=e,this.set(this.save_as_url?e.url:e.id)},renderImageUploaderTemplate:function(e){var t=this;e=r.extend({fromUrl:!1,url:""},e||{});var n=t.container.find("."+t.module.control.css_attr.img_upload_container);if(n.length&&!(t.container.length<1)){var i={button_labels:t.getUploaderLabels(),settings:t.id,attachment:t.attachment,fromUrl:e.url,canUpload:!0};return o.CZR_Helpers.getModuleTmpl({tmpl:"img-uploader",module_type:"all_modules",module_id:t.module.id}).done(function(e){n.html(o.CZR_Helpers.parseTemplate(e)(i)),t.tmplRendered.resolve(),t.container.trigger(t.id+":content_rendered")}).fail(function(e){t.tmplRendered.reject("renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : "+t.module.id)}),!0}},getUploaderLabels:function(){var e=serverControlParams.i18n,n=this,t={select:e.select_image,change:e.change_image,remove:e.remove_image,default:e.default_image,placeholder:e.placeholder_image,frame_title:e.frame_title_image,frame_button:e.frame_button_image},i={};return r.each(t,function(e,t){if(r.isEmpty(e))return o.errorLog("A translated string is missing ( "+t+" ) for the image uploader input in module : "+n.module.id),void(i[t]=t);i[t]=e}),i}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(s,a,l){a.extend(CZRInputMths,{setupContentPicker:function(e){var o=this;a.extend(l.isObject(e)?e:{},{post:"",taxonomy:""}),o.wpObjectTypes=e,o.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),o.input_event_map=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(e){var t=a(e.dom_event.currentTarget,e.dom_el),n=a(t,e.dom_el).select2("data"),i={};n=l.isArray(n)?n[0]:n,l.isObject(n)&&!l.isEmpty(n)?(l.each({id:"",type_label:"",title:"",object_type:"",url:""},function(e,t){"_custom_"===n.id||l.has(n,t)&&!l.isEmpty(n[t])?i[t]=n[t]:s.errare("content_picker : missing input param : "+t)}),o.set(i)):s.errare("Content Picker Input : the picked value should be an object not empty.")}}],o.isReady.done(function(){o.setupContentSelecter()})},setupContentSelecter:function(){var r=this;if(!l.isEmpty(r())){var e={value:r().id||"",title:r().title||"",selected:"selected"};r.container.find("select").append(a("<option>",e))}r.container.find("select").select2({placeholder:{id:"-1",title:"Select"},data:r.setupSelectedContents(),ajax:{url:wp.ajax.settings.url,type:"POST",dataType:"json",delay:250,debug:!0,data:function(e){var t=e.page?e.page:0;return t=e.term?e.page:t,{action:e.term?"search-available-content-items-customizer":"load-available-content-items-customizer",search:e.term,wp_customize:"on",page:t,wp_object_types:JSON.stringify(r.wpObjectTypes),nonce:s.settings.nonce.save}},processResults:function(e,t){var n={defaultOption:[]};if(r.input_parent&&r.input_parent.module?r.input_parent.module.trigger("set_default_content_picker_options",{defaultContentPickerOption:n}):s.infoLog(' content_picker input => ::processResults => event "set_default_content_picker_option" not triggered when in pre-item'),!e.success)return s.errare("request failure in setupContentPicker => processResults",e),{results:n.defaultOption};var i=e.data.items,o=[];return l.isEmpty(n.defaultOption)||o.push(n.defaultOption),l.each(i,function(e){o.push({id:e.id,title:e.title,type_label:e.type_label,object_type:e.object,url:e.url})}),{results:o,pagination:{more:10<=e.data.items.length}}}},templateSelection:r.czrFormatContentSelected,templateResult:r.czrFormatContentSelected,escapeMarkup:function(e){return e}})},czrFormatContentSelected:function(e){if(e.loading)return e.text;var t="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+e.title+"</span>";return e.type_label&&(t+="<span class='czr-picker-item-type'>"+e.type_label+"</span>"),t+="</div></div>"},setupSelectedContents:function(){return this()}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(n,e,t){e.extend(CZRInputMths,{setupTinyMceEditor:function(){var t=this;if(!t.container)throw new Error("The input container is not set for WP text editor in module :"+t.module.id);t.input_parent.control.bind("tinyMceEditorUpdated",function(e){n.sekEditorSynchronizedInput().control_id==t.input_parent.control.id&&n.sekEditorSynchronizedInput().input_id==t.id&&(t(wp.editor.removep(e.html_content||n.sekTinyMceEditor.getContent())),e.modified_editor_element&&0<e.modified_editor_element.length?e.modified_editor_element.focus():n.sekTinyMceEditor.focus())})}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(o,r,s){r.extend(CZRItemMths,{initialize:function(e,t){if(s.isUndefined(t.module)||s.isEmpty(t.module))throw new Error("No module assigned to item "+e+". Aborting");var n=this;o.Value.prototype.initialize.call(n,null,t),n.isReady=r.Deferred(),n.embedded=r.Deferred(),n.container=null,n.contentContainer=null,n.czr_Input=new o.Values,n.inputCollection=new o.Value({}),n.viewState=new o.Value("closed"),n.removeDialogVisible=new o.Value(!1),r.extend(n,t||{}),n.defaultItemModel=s.clone(t.defaultItemModel)||{id:"",title:""};var i=r.extend(n.defaultItemModel,t.initial_item_model);i=n.validateItemModelOnInitialize(i),n.set(i),n.userEventMap=new o.Value([{trigger:"click keydown",selector:["."+n.module.control.css_attr.display_alert_btn,"."+n.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:function(){var e=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!e)}},{trigger:"click keydown",selector:"."+n.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+n.module.control.css_attr.edit_view_btn,"."+n.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=r(e.dom_event.currentTarget,e.dom_el).attr("data-tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}]),n.isReady.done(function(){n.module.updateItemsCollection({item:n()}),n.callbacks.add(function(){return n.itemReact.apply(n,arguments)}),n.bind("contentRendered",function(){if(s.isEmpty(n.inputCollection()))if(serverControlParams.isDevMode)o.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n);else try{o.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n)}catch(e){o.errorLog("In item.isReady.done : "+e)}}),n.bind("contentRemoved",function(){s.has(n,"czr_Input")&&o.CZR_Helpers.removeInputCollection.call(n)}),n.canBeRendered()&&n.mayBeRenderItemWrapper(),n.embedded.done(function(){n.itemWrapperViewSetup(i)})})},ready:function(){this.isReady.resolve()},canBeRendered:function(){return!0},validateItemModelOnInitialize:function(e){return e},itemReact:function(e,t,n){var i=this,o=i.module;n=n||{},o.updateItemsCollection({item:e,params:n}).done(function(){i.writeItemViewTitle(e,n)})}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(s,a,l){a.extend(CZRItemMths,{_sendItem:function(n,e){var t=this,i=t.module,o=[];l.each(e,function(e,t){e!=n[t]&&o.push(t)}),l.each(o,function(e){s.previewer.send("sub_setting",{set_id:i.control.id,id:n.id,changed_prop:e,value:n[e]}),i.trigger("item_sent",{item:n,dom_el:t.container,changed_prop:e})})},removeItem:function(e){var t=this,n=this.module,i=l.clone(n.itemCollection());n.trigger("pre_item_dom_remove",t()),t._destroyView(),i=l.without(i,l.findWhere(i,{id:t.id})),n.itemCollection.set(i),n.trigger("pre_item_api_remove",t());var o=a.extend(!0,{},t());if(n.czr_Item.remove(t.id),"postMessage"!=s(n.control.id).transport||!l.has(e,"dom_event")||l.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(n.control.id))n.trigger("item-removed",o);else{var r=function(){s.previewer.unbind("ready",r),n.trigger("item-removed",o)};s.previewer.bind("ready",r),s.previewer.refresh()}},getModel:function(e){return this()}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(d,c,u){c.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var t=this;"pending"==t.embedded.state()&&(!u.isEmpty(t.container)&&0<t.container.length||c.when(t.renderItemWrapper()).done(function(e){if(t.container=e,u.isUndefined(t.container)||!t.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+t.id);t.embedded.resolve()}))},renderItemWrapper:function(e){var t,n,i=this,o=i.module,r=c.Deferred(),s=c.extend(!0,{},e||i()),a=function(e){o.isMultiItem()&&(u.isEmpty(e)&&r.reject("renderItemWrapper => Missing html template for module : "+o.id),t.append(e)),t.append(c("<div/>",{class:o.control.css_attr.item_content})),r.resolve(t)};if(i.trigger("item-model-before-item-wrapper-template-injection",s),t=c("<li>",{class:o.control.css_attr.single_item,"data-id":s.id,id:s.id}),o.itemsWrapper.append(t),o.isMultiItem())if(u.isEmpty(o.rudItemPart)){var l={tmpl:"rud-item-part",module_type:"all_modules",module_id:o.id,control_id:o.control.id};i.trigger("item-wrapper-tmpl-params-before-fetching",l),u.isEmpty(o[l.tmpl])?d.CZR_Helpers.getModuleTmpl(l).done(function(e){a(d.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){r.reject("renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : "+o.id)}):(n=o.getTemplateSelectorPart(l.tmpl,s),c("#tmpl-"+n).length<1&&r.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s)))}else n=o.getTemplateSelectorPart("rudItemPart",s),c("#tmpl-"+n).length<1&&r.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s));else a();return r.promise()},itemWrapperViewSetup:function(e){var o=this,i=this.module;item_model=o()||o.initial_item_model,o.writeItemViewTitle();var r=function(e,t,n){if(u.isUndefined(e)||!1===e.length)throw new Error("Module : "+o.module.id+", the item content has not been rendered for "+o.id);o.contentContainer=e,o.trigger("contentRendered",{item_content:e}),o.toggleItemExpansion(t,n)};o.module.isMultiItem()?o.viewState.callbacks.add(function(t,n){var e=-1!==t.indexOf("expanded");i.hasModOpt()&&e&&d.czr_ModOptVisible(!1),e?u.isObject(o.contentContainer)&&!1!==o.contentContainer.length?o.toggleItemExpansion(t,n):o.renderItemContent(o()||o.initial_item_model).done(function(e){r(e,t,n)}).fail(function(e){d.errorLog("multi-item module => failed item.renderItemContent for module : "+i.id,e)}):o.toggleItemExpansion(t,n).done(function(){u.isObject(o.contentContainer)&&!1!==o.contentContainer.length&&(o.trigger("beforeContenRemoved"),c("."+i.control.css_attr.item_content,o.container).children().each(function(){c(this).remove()}),c("."+i.control.css_attr.item_content,o.container).html(""),o.contentContainer=null,o.trigger("contentRemoved"))})}):(o.viewState.callbacks.add(function(e,t){o.toggleItemExpansion.apply(o,arguments)}),o.renderItemContent(item_model).done(function(e){r(e,!0)}).fail(function(e){d.errare("mono-item module => failed item.renderItemContent for module : "+i.id,e)})),d.CZR_Helpers.setupDOMListeners(o.userEventMap(),{model:item_model,dom_el:o.container},o),o.removeDialogVisible.bind(function(e){var t=o.module,n=c("."+t.control.css_attr.remove_alert_wrapper,o.container).first();if(e&&t.closeAllItems(),e&&t.hasModOpt()&&d.czr_ModOptVisible(!1),e&&u.has(t,"preItem")&&t.preItemExpanded(!1),c("."+t.control.css_attr.remove_alert_wrapper,o.container).not(n).each(function(){c(this).hasClass("open")&&c(this).slideToggle({duration:200,done:function(){c(this).toggleClass("open",!1),c(this).siblings().find("."+t.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),e)if(u.isEmpty(t.alertPart))d.CZR_Helpers.getModuleTmpl({tmpl:"rud-item-alert-part",module_type:"all_modules",module_id:t.id,control_id:t.control.id}).done(function(e){n.html(d.CZR_Helpers.parseTemplate(e)({title:o().title||o.id})),o.trigger("remove-dialog-rendered")}).fail(function(e){d.errare("item.removeDialogVisible => Problem when fetching the tmpl from server for module : "+t.id,e)});else{if(c("#tmpl-"+t.alertPart).length<1||u.isEmpty(o.container))return void d.errare("No removal alert template available for items in module :"+t.id);n.html(wp.template(t.alertPart)({title:o().title||o.id})),o.trigger("remove-dialog-rendered")}var i=function(e){n.toggleClass("open",e),o.container.find("."+t.control.css_attr.display_alert_btn).toggleClass("active",e),e&&t._adjustScrollExpandedBlock(o.container)};e?n.stop(!0,!0).slideDown(200,function(){i(e)}):n.stop(!0,!0).slideUp(200,function(){i(e)})})},renderItemContent:function(e){var n=this,i=this.module,o=c.Deferred(),t=c.extend(!0,{},e||n());n.trigger("item-model-before-item-content-template-injection",t);var r=function(e){u.isEmpty(e)&&o.reject("renderItemContent => Missing html template for module : "+i.id);var t=c("."+i.control.css_attr.item_content,n.container);c(e).appendTo(t),o.resolve(t)};if(!u.isEmpty(i.itemInputList)||u.isFunction(i.itemInputList)){var s=i.getTemplateSelectorPart("itemInputList",t);c("#tmpl-"+s).length<1?o.reject("renderItemContent => No itemInputList content template defined for module "+i.id+". The template script id should be : #tmpl-"+s):r(wp.template(s)(t))}else{var a={tmpl:"item-inputs",module_type:i.module_type,module_id:i.id,control_id:i.control.id,item_model:t};i.trigger("filter-request-params-before-fetching-for-item-content-tmpl",a),d.CZR_Helpers.getModuleTmpl(a).done(function(e){r(d.CZR_Helpers.parseTemplate(e)(c.extend(t,{control_id:i.control.id})))}).fail(function(e){o.reject(e)})}return o.promise()},writeItemViewTitle:function(e){var t=this,n=t.module,i=e||t(),o=u.has(i,"title")&&!u.isEmpty(i.title)?d.CZR_Helpers.capitalize(i.title):i.id;o=d.CZR_Helpers.truncate(o,20),c("."+n.control.css_attr.item_title,t.container).text(o),d.CZR_Helpers.doActions("after_writeViewTitle",t.container,i,t)},setViewVisibility:function(e,t){var n=this.module;t?this.viewState.set("expanded_noscroll"):(n.closeAllItems(this.id),u.has(n,"preItem")&&n.preItemExpanded.set(!1),this.viewState.set("expanded"==this._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(n,e,t){var i="closed"!=n,o=this,r=this.module,s=c("."+r.control.css_attr.item_content,o.container).first(),a=c.Deferred(),l=function(e){o.container.toggleClass("open",e),e&&r.closeRemoveDialogs();var t=s.siblings().find("."+r.control.css_attr.edit_view_btn);t.toggleClass("active",e),e?t.removeClass("fa-pencil-alt").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):t.removeClass("fa-minus-square").addClass("fa-pencil-alt").attr("title",serverControlParams.i18n.edit),"expanded"==n&&r._adjustScrollExpandedBlock(o.container),a.resolve()};return i?s.stop(!0,!0).slideDown(t||200,function(){l(i)}):s.stop(!0,!0).slideUp(200,function(){l(i)}),a.promise()},_destroyView:function(e){this.container.fadeOut({duration:e||400,done:function(){c(this).remove()}})}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(r,s,a){s.extend(CZRModOptMths,{initialize:function(e){if(a.isUndefined(e.module)||a.isEmpty(e.module))throw new Error("No module assigned to modOpt.");var i=this;r.Value.prototype.initialize.call(i,null,e),i.isReady=s.Deferred(),i.container=null,i.inputCollection=new r.Value({}),s.extend(i,e||{}),i.defaultModOptModel=a.clone(e.defaultModOptModel)||{is_mod_opt:!0};var o=s.extend(i.defaultModOptModel,e.initial_modOpt_model),t=i.module.control;i.set(o),r.czr_ModOptVisible=new r.Value(!1),r.czr_ModOptVisible.bind(function(t,e,n){n=n||{},t?(i.module.closeRemoveDialogs().closeAllItems(),i.modOptWrapperViewSetup(o).done(function(e){i.container=e;try{r.CZR_Helpers.setupInputCollectionFromDOM.call(i).toggleModPanelView(t)}catch(e){r.consoleLog(e)}n.module&&n.focus&&a.delay(function(){!a.isNull(n.module.czr_ModOpt.container)&&n.module.czr_ModOpt.container.find('[data-tab-id="'+n.focus+'"] a').length&&n.module.czr_ModOpt.container.find('[data-tab-id="'+n.focus+'"] a').trigger("click")},200)})):i.toggleModPanelView(t).done(function(){!1!==i.container.length?s.when(i.container.remove()).done(function(){r.CZR_Helpers.removeInputCollection.call(i)}):r.CZR_Helpers.removeInputCollection.call(i),i.container=null})}),i.isReady.done(function(){s("."+t.css_attr.edit_modopt_icon,t.container).length||s.when(t.container.find(".customize-control-title").first().append(s("<span/>",{class:[t.css_attr.edit_modopt_icon,"fas fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){s("."+t.css_attr.edit_modopt_icon,t.container).fadeIn(400)}),r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+t.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){r.czr_ModOptVisible(!r.czr_ModOptVisible())}}],{dom_el:t.container},i)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);CZRModOptMths=CZRModOptMths||{};!function(r,s,a){s.extend(CZRModOptMths,{modOptWrapperViewSetup:function(e){var n=this,i=this.module,o=s.Deferred();return e=n()||n.initial_modOpt_model,n.renderModOptContent(e).done(function(e){if(a.isEmpty(e)||!(0<e.length))throw new Error("Module : "+n.module.id+", the modOpt content has not been rendered");var t;t=e,r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){r.czr_ModOptVisible(!1)}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){this.module.toggleTabVisibility.call(this,e)}}],{dom_el:t},n),o.resolve(e)}).fail(function(e){r.errorLog("failed modOpt.renderModOptContent for module : "+i.id,e)}).then(function(){n.module.setupTabNav.call(n)}),o.promise()},renderModOptContent:function(t){var n=this.module,i=s.Deferred();t=t||this();var o=function(e){a.isEmpty(e)&&i.reject("renderModOptContent => Missing html template for module : "+n.id);var t="";try{t=[serverControlParams.i18n["Options for"],n.control.params.label].join(" ")}catch(e){r.errorLog("renderItemContent => Problem with ctrl label => "+e),t=serverControlParams.i18n.Settings}s("#widgets-left").after(s("<div/>",{class:n.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',t,"</h2>"].join(""),'<span class="fas fa-times '+n.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),s("."+n.control.css_attr.mod_opt_wrapper).append(e),i.resolve(s("."+n.control.css_attr.mod_opt_wrapper))};if(a.isEmpty(n.itemPreAddEl))r.CZR_Helpers.getModuleTmpl({tmpl:"mod-opt",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){o(r.CZR_Helpers.parseTemplate(e)(t))}).fail(function(e){i.reject("renderPreItemView => Problem when fetching the mod-opt tmpl from server for module : "+n.id)});else{var e=n.getTemplateSelectorPart("modOptInputList",t);s("#tmpl-"+e).length<1&&i.reject("renderModOptContent => No modOpt content template defined for module "+n.id+". The template script id should be : #tmpl-"+e),o(wp.template(e)(t))}return i.promise()},toggleModPanelView:function(e){var t=this.module,n=(t.control,s.Deferred());return t.control.container.toggleClass("czr-modopt-visible",e),s("body").toggleClass("czr-editing-modopt",e),a.delay(function(){n.resolve()},200),n.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(i,s,r){s.extend(CZRModuleMths,{initialize:function(e,t){if(r.isUndefined(t.control)||r.isEmpty(t.control))throw new Error("No control assigned to module "+e);var n=this;i.Value.prototype.initialize.call(this,null,t),n.isReady=s.Deferred(),s.extend(n,t||{}),s.extend(n,{crudModulePart:"",rudItemPart:"",ruItemPart:"",alertPart:"",itemInputList:"",modOptInputList:""}),n.embedded=s.Deferred(),n.itemsWrapper="",n.container=s(n.control.selector),n.renderModuleParts().done(function(e){if(!1===e.length)throw new Error("The items wrapper has not been rendered for module : "+n.id);n.itemsWrapper=e,n.embedded.resolve()}).fail(function(e){throw new Error(["initialize module => failed module.renderModuleParts() for module : ",n.id,e].join(" "))}),n.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},n.defaultModOptModel={},n.modOptConstructor=i.CZRModOpt,n.itemCollection=new i.Value([]),n.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},n.defaultItemModel=i.czrModuleMap[n.module_type].defaultItemModel||{id:"",title:""},n.itemConstructor=n.itemConstructor||i.CZRItem,n.czr_Item=new i.Values,n.inputConstructor=n.inputConstructor||i.CZRInput,n.hasModOpt()&&(n.inputModOptConstructor=i.CZRInput),n.inputOptions={},n.isReady.done(function(){n.isDirty=new i.Value(t.dirty||!1),n.initializeModuleModel(t).done(function(e){n.set(e)}).fail(function(e){i.errare("Module : "+n.id+" initialize module model failed : ",e)}).always(function(e){n.callbacks.add(function(){return n.moduleReact.apply(n,arguments)}),n.control.isModuleRegistered(n.id)||n.control.updateModulesCollection({module:t,is_registered:!1}),n.bind("items-collection-populated",function(e){n.itemCollection.callbacks.add(function(){return n.itemCollectionReact.apply(n,arguments)}),n.isMultiItem()&&n._makeItemsSortable()}),n.populateSavedItemCollection(),n.hasModOpt()&&n.instantiateModOpt()})}),!0===i.czrModuleMap[n.module_type].ready_on_section_expanded&&(r.has(i,"czr_activeSectionId")&&n.control.section()==i.czr_activeSectionId()&&"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()}),i.section(n.control.section()).expanded.bind(function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})}))},ready:function(){this.isReady.resolve()},initializeModuleModel:function(e){var t=s.Deferred();if(!this.isMultiItem()&&!this.isCrud()&&r.isEmpty(e.items)){var n=r.clone(this.defaultItemModel);e.items=[s.extend(n,{id:this.id})]}return t.resolve(e).promise()},itemCollectionReact:function(e,t,n){var i=this(),o=s.extend(!0,{},i);o.items=e,this.isDirty.set(!0),this.set(o,n||{})},filterItemsBeforeCoreApiSettingValue:function(e){return e},moduleReact:function(e,t,n){var i=this.control;r.size(t.items)==r.size(e.items)&&r.isEmpty(r.difference(e.items,t.items)),e.column_id,t.column_id;i.updateModulesCollection({module:s.extend(!0,{},e),data:n})},getModuleSection:function(){return this.section},isMultiItem:function(){return i.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return i.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return i.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var r=this,e=r.prepareModOptForAPI(r().modOpt||{});r.czr_ModOpt=new r.modOptConstructor(e),r.czr_ModOpt.ready(),r.czr_ModOpt.callbacks.add(function(e,t,n){var i=r(),o=s.extend(!0,{},i);o.modOpt=e,r.isDirty(!0),r(o,n)})},prepareModOptForAPI:function(n){var i=this,o={};return n=r.isObject(n)?n:{},r.each(i.defaultAPImodOptModel,function(e,t){n[t];switch(t){case"initial_modOpt_model":r.each(i.getDefaultModOptModel(),function(e,t){r.has(n,t)||(n[t]=e)}),o[t]=n;break;case"defaultModOptModel":o[t]=r.clone(i.defaultModOptModel);break;case"control":o[t]=i.control;break;case"module":o[t]=i}}),o},getDefaultModOptModel:function(e){return s.extend(r.clone(this.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(e){var t=this;e=r.extend({input_id:"",input_parent_id:"",to:null,from:null},e),r.isEqual(e.to,e.from)||(i.previewer.send("czr_input",{set_id:i.CZR_Helpers.getControlSettingId(t.control.id),module_id:t.id,module:{items:s.extend(!0,{},t().items),modOpt:t.hasModOpt()?s.extend(!0,{},t().modOpt):{}},input_parent_id:e.input_parent_id,input_id:e.input_id,value:e.to,isPartialRefresh:e.isPartialRefresh}),t.trigger("input_sent",{input:e.to,dom_el:t.container}))},sendModuleInputsToPreview:function(i){var o=this,t=function(){var n=this,e=s.extend(!0,{},n());e=r.omit(e,"id"),r.each(e,function(e,t){o.sendInputToPreview({input_id:t,input_parent_id:n.id,to:e,from:null,isPartialRefresh:i.isPartialRefresh})})};o.czr_Item.each(function(e){t.call(e)}),o.hasModOpt()&&t.call(o.czr_ModOpt)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(i,s,a){s.extend(CZRModuleMths,{populateSavedItemCollection:function(e){var t,n=this;a.isArray(e||n().items)?(t=s.extend(!0,[],e||n().items),a.each(t,function(e,t){if(a.has(e,"is_mod_opt"))throw new Error("populateSavedItemCollection => there should be no mod opt to instantiate here.")}),n.trigger("filterItemCandidatesBeforeInstantiation",t),a.each(t,function(e,t){if(a.isObject(e))if(serverControlParams.isDevMode)n.instantiateItem(e).ready();else try{n.instantiateItem(e).ready()}catch(e){i.errare("populateSavedItemCollection : "+e)}else i.errare("populateSavedItemCollection => an item should be described by an object in module type : "+n.module_type,"module id : "+n.id)}),a.each(t,function(e){if(a.isObject(e)&&a.isUndefined(a.findWhere(n.itemCollection(),e.id)))throw new Error("populateSavedItemCollection : The saved items have not been properly populated in module : "+n.id)}),n.trigger("items-collection-populated")):i.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+n.id)},instantiateItem:function(e,t){var n=this;if(item_candidate=n.prepareItemForAPI(e),item_candidate&&!a.isNull(item_candidate)){if(!a.has(item_candidate,"id"))throw new Error("CZRModule::instantiateItem() : an item has no id and could not be added in the collection of : "+this.id);if(n.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : the following item id "+item_candidate.id+" already exists in module.czr_Item() for module "+this.id);if(n.czr_Item.add(item_candidate.id,new n.itemConstructor(item_candidate.id,item_candidate)),!n.czr_Item.has(item_candidate.id))throw new Error("CZRModule::instantiateItem() : instantiation failed for item id "+item_candidate.id+" for module "+this.id);return n.czr_Item(item_candidate.id)}i.errare("item_candidate invalid. InstantiateItem aborted in module "+n.id)},prepareItemForAPI:function(i){var o=this,r={};return i=a.isObject(i)?i:{},a.each(o.defaultAPIitemModel,function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?r[t]=o.generateItemId(o.module_type):o.isItemRegistered(n)?o.generateItemId(n):r[t]=n;break;case"initial_item_model":a.each(o.getDefaultItemModel(),function(e,t){a.has(i,t)||(i[t]=e)}),r[t]=i;break;case"defaultItemModel":r[t]=a.clone(o.defaultItemModel);break;case"control":r[t]=o.control;break;case"module":r[t]=o;break;case"is_added_by_user":r[t]=!!a.isBoolean(n)&&n}}),a.has(r,"id")||(r.id=o.generateItemId(o.module_type)),r.initial_item_model.id=r.id,o.validateItemBeforeInstantiation(r)},validateItemBeforeInstantiation:function(e){return e},generateItemId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,o=e+"_"+(t=t||i._getNextItemKeyInCollection());if(!a.has(i,"itemCollection")||!a.isArray(i.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+i.id);return i.isItemRegistered(o)?(t++,n++,i.generateItemId(e,t,n)):o},_getNextItemKeyInCollection:function(){var e=this,t={},n=0;return a.isEmpty(e.itemCollection())||(t=a.isArray(e.itemCollection())&&1===a.size(e.itemCollection())?e.itemCollection()[0]:a.max(e.itemCollection(),function(e){return a.isNumber(e.id.replace(/[^\/\d]/g,""))?parseInt(e.id.replace(/[^\/\d]/g,""),10):0}),!a.isUndefined(t)&&a.isNumber(t.id.replace(/[^\/\d]/g,""))&&(n=parseInt(t.id.replace(/[^\/\d]/g,""),10)+1)),n},isItemRegistered:function(e){return!a.isUndefined(a.findWhere(this.itemCollection(),{id:e}))},updateItemsCollection:function(e){var t=this,n=t.itemCollection(),i=a.clone(n),o=s.Deferred();if(!a.has(e,"collection")){if(!a.has(e,"item"))throw new Error("updateItemsCollection, no item provided "+t.control.id+". Aborting");e=a.extend({params:{}},e);var r=a.clone(e.item);return a.each(t.defaultItemModel,function(e,t){if(!a.has(r,t))throw new Error('CZRModuleMths => updateItemsCollection : Missing property "'+t+'" for item candidate')}),a.findWhere(i,{id:r.id})?a.each(n,function(e,t){e.id==r.id&&(i[t]=r)}):i.push(r),t.itemCollection.set(i,e.params),o.resolve({collection:i,params:e.params}).promise()}t.itemCollection.set(e.collection)},_getSortedDOMItemCollection:function(){var n=a.clone(this.itemCollection()),i=[],e=s.Deferred();if(s("."+this.control.css_attr.single_item,this.container).each(function(e){var t=a.findWhere(n,{id:s(this).attr("data-id")});t&&(i[e]=t)}),n.length!=i.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+this.id);return e.resolve(i).promise()},refreshItemCollection:function(){var t=this;t.czr_Item.each(function(e){t.czr_Item(e.id).container&&0<t.czr_Item(e.id).container.length&&s.when(t.czr_Item(e.id).container.remove()).done(function(){t.czr_Item.remove(e.id)})}),t.itemCollection=new i.Value([]),t.populateSavedItemCollection()}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,r,s){r.extend(CZRModuleMths,{getDefaultItemModel:function(e){return r.extend(s.clone(this.defaultItemModel),{id:e||""})},_initNewItem:function(e,t){var n,i=this,o={id:""};return t=void 0!==t?t:s.size(i.itemCollection()),s.isNumber(t)?n=i.module_type+"_"+t:(n=t,t=0),o=e&&!s.isEmpty(e)?r.extend(e,{id:n}):this.getDefaultItemModel(n),s.has(o,"id")&&i._isItemIdPossible(n)?(s.map(i.getDefaultItemModel(),function(e,t){s.has(o,t)||(o[t]=e)}),o):i._initNewItem(o,t+1)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(r,s,a){s.extend(CZRModuleMths,{renderModuleParts:function(){var n=this,i=s(n.container),o=s.Deferred(),t=function(e){n.isCrud()&&(a.isEmpty(e)&&o.reject("renderModuleParts => Missing html template for module : "+n.id),i.append(e));var t=s("<ul/>",{class:[n.control.css_attr.items_wrapper,n.module_type,n.isMultiItem()?"multi-item-mod":"mono-item-mod",n.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});i.append(t),o.resolve(s(t,i))};return n.isCrud()?a.isEmpty(n.crudModulePart)?r.CZR_Helpers.getModuleTmpl({tmpl:"crud-module-part",module_type:"all_modules",module_id:n.id,control_id:n.control.id}).done(function(e){t(r.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){r.errare("renderModuleParts => fail response =>",e),o.reject("renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : "+n.id)}):(s("#tmpl-"+n.crudModulePart).length<1&&o.reject("renderModuleParts => no crud Module Part template for module "+n.id+". The template script id should be : #tmpl-"+n.crudModulePart),t(wp.template(n.crudModulePart)({}))):t(),o.promise()},getTemplateSelectorPart:function(e,t){var n,i=this;switch(e){case"rudItemPart":n=i.rudItemPart;break;case"ruItemPart":n=i.ruItemPart;break;case"modOptInputList":n=i.modOptInputList;break;case"itemInputList":n=a.isFunction(i.itemInputList)?i.itemInputList(t):i.itemInputList}if(a.isEmpty(n))throw new Error("No valid template has been found in getTemplateSelectorPart() "+i.id+". Aborting");return n},getViewEl:function(e){return s('[data-id = "'+e+'"]',this.container)},closeAllItems:function(t){var n=this,e=a.clone(n.itemCollection()),i=a.filter(e,function(e){return e.id!=t});return a.each(i,function(e){n.czr_Item.has(e.id)&&"expanded"==n.czr_Item(e.id)._getViewState(e.id)&&n.czr_Item(e.id).viewState.set("closed")}),this},_adjustScrollExpandedBlock:function(e,t){if(e.length&&!a.isUndefined(this.getModuleSection())){var n,i=s(".accordion-section-content",this.section.container),o=i.scrollTop(),r=t||90;setTimeout(function(){e.offset().top+e.height()+r>s(window.top).height()&&0<(n=e.offset().top+e.height()+r-s(window.top).height())&&i.animate({scrollTop:o+n},500)},50)}},closeRemoveDialogs:function(){if(a.isArray(this.itemCollection()))return this.czr_Item.each(function(e){e.removeDialogVisible(!1)}),this},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&s.fn.sortable){var n=this;s("."+n.control.css_attr.items_wrapper,n.container).sortable({handle:"."+n.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){n._getSortedDOMItemCollection().done(function(e){n.itemCollection.set(e)}).then(function(){!function(){a.has(n,"preItem")&&n.preItemExpanded.set(!1),n.closeAllItems().closeRemoveDialogs();var e=function(){r.previewer.refresh()};"postMessage"!=r(n.control.id).transport||r.CZR_Helpers.hasPartRefresh(n.control.id)||(e=a.debounce(e,500))(),n.trigger("item-collection-sorted")}()})}})}},toggleTabVisibility:function(e){var t=this;s(t.container).find("li"),s(t.container).find("section");s(".tabs nav li",t.container).each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),s(t.container).find('li[data-tab-id="'+e+'"]').addClass("tab-current").removeClass("tab-inactive"),s("section",t.container).each(function(){s(this).removeClass("content-current")}),s(t.container).find('section[id="'+e+'"]').addClass("content-current")},setupTabNav:function(){var i=this;setTimeout(function(){(function(){var e=s.Deferred(),t=s(".tabs nav li",i.container);t.each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),t.first().addClass("tab-current").removeClass("tab-inactive"),s("section",i.container).first().addClass("content-current");var n=t.length;return t.each(function(){s(this).addClass(0<n?"cols-"+n:"")}),e.resolve().promise()})().done(function(){s(".tabs",i.container).fadeIn(450)})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(s,a,l){a.extend(CZRDynModuleMths,{initialize:function(e,t){var n=this;s.CZRModule.prototype.initialize.call(n,e,t),a.extend(n,{itemPreAddEl:""}),n.preItemsWrapper="",n.preItemExpanded=new s.Value(!1),n.itemAddedMessage=serverControlParams.i18n.successMessage,n.userEventMap=new s.Value([{trigger:"click keydown",selector:["."+n.control.css_attr.open_pre_add_btn,"."+n.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs",function(e){var t=this,n={addTheItem:!0};t.trigger("is-item-addition-possible",n),n.addTheItem&&t.hasPreItem?t.preItemExpanded.set(!t.preItemExpanded()):t.addItem(e).done(function(e){t.czr_Item(item_candidate.id,function(e){e.embedded.then(function(){t.czr_Item(item_candidate.id).viewState("expanded")})})})}]},{trigger:"click keydown",selector:"."+n.control.css_attr.add_new_btn,name:"add_item",actions:function(e){n.closeRemoveDialogs(e).closeAllItems(e).addItem(e).done(function(e){n.czr_Item(item_candidate.id,function(e){e.embedded.then(function(){n.czr_Item(item_candidate.id).viewState("expanded")})})})}}])},ready:function(){var t=this;t.setupDOMListeners(t.userEventMap(),{dom_el:t.container}),t.preItem=new s.Value(t.getDefaultItemModel()),t.preItemExpanded.callbacks.add(function(e){e?t.renderPreItemView().done(function(e){t.preItemsWrapper=e,t.preItem(t.getDefaultItemModel()),t.trigger("before-pre-item-input-collection-setup"),t.setupPreItemInputCollection()}).fail(function(e){s.errorLog("Pre-Item : "+e)}):a.when(t.preItemsWrapper.remove()).done(function(){t.preItem.czr_Input={},t.preItemsWrapper=null,t.trigger("pre-item-input-collection-destroyed")}),t._togglePreItemViewExpansion(e)}),s.CZRModule.prototype.ready.call(t)},setupPreItemInputCollection:function(){var n=this;n.preItem.czr_Input=new s.Values,a("."+n.control.css_attr.pre_add_wrapper,n.container).find("."+n.control.css_attr.sub_set_wrapper).each(function(e){var t=a(this).find("[data-czrtype]").attr("data-czrtype")||"sub_set_"+e;n.preItem.czr_Input.add(t,new n.inputConstructor(t,{id:t,type:a(this).attr("data-input-type"),container:a(this),input_parent:n.preItem,module:n,is_preItemInput:!0})),n.preItem.czr_Input(t).ready()}),n.trigger("pre-item-input-collection-ready")},validateItemBeforeAddition:function(e){return e},itemCanBeInstantiated:function(){return!0},addItem:function(n){if(this.itemCanBeInstantiated()){var i=this,o=i.preItem(),r=function(){i.preItemExpanded.set(!1)},e=a.Deferred();return l.isEmpty(o)||!l.isObject(o)?(s.errorLog("addItem : an item_candidate should be an object and not empty. In : "+i.id+". Aborted."),e.resolve().promise()):(r=l.debounce(r,200),!(o=i.validateItemBeforeAddition(o))||l.isNull(o)?(s.consoleLog("item_candidate invalid. InstantiateItem aborted in module "+i.id),e.resolve().promise()):(i.instantiateItem(o,!0).ready(),a.Deferred(function(){var t=this;i.czr_Item(o.id).isReady.then(function(){r(),i.trigger("item-added",o);var e=function(){s.previewer.unbind("ready",e),t.resolve()};i.refresh_on_add_item?"postMessage"!=s(i.control.id).transport||!l.has(n,"dom_event")||l.has(n.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id)||(s.previewer.bind("ready",e),s.previewer.refresh()):t.resolve()})}).always(function(){e.resolve(o.id)}),e.promise()))}}})}(wp.customize,jQuery,_);CZRDynModuleMths=CZRDynModuleMths||{};!function(o,r,s){r.extend(CZRDynModuleMths,{renderPreItemView:function(e){var n=this,i=r.Deferred();if(s.isObject(n.preItemsWrapper)&&0<n.preItemsWrapper.length)return i.resolve(n.preItemsWrapper).promise();var t=function(e){!s.isEmpty(e)&&n.container||i.reject("renderPreItemView => Missing html template for module : "+n.id);var t=r("."+n.control.css_attr.pre_add_item_content,n.container);t.prepend(r("<div>",{class:"pre-item-wrapper"})),t.find(".pre-item-wrapper").append(e),i.resolve(t.find(".pre-item-wrapper")).promise()};return s.isEmpty(n.itemPreAddEl)?o.CZR_Helpers.getModuleTmpl({tmpl:"pre-item",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){t(o.CZR_Helpers.parseTemplate(e)())}).fail(function(e){i.reject(["renderPreItemView for module : ",n.id,e].join(" "))}):(r("#tmpl-"+n.itemPreAddEl).length<1&&i.reject("renderPreItemView => Missing itemPreAddEl or template in module "+n.id),t(wp.template(n.itemPreAddEl)())),i.promise()},_getPreItemView:function(){return r("."+this.control.css_attr.pre_add_item_content,this.container)},_togglePreItemViewExpansion:function(t){var n=this;r("."+n.control.css_attr.pre_add_item_content,n.container).slideToggle({duration:200,done:function(){var e=r("."+n.control.css_attr.open_pre_add_btn,n.container);r(this).toggleClass("open",t),t?e.find(".fas").removeClass("fa-plus-square").addClass("fa-minus-square"):e.find(".fas").removeClass("fa-minus-square").addClass("fa-plus-square"),e.toggleClass("active",t),r(n.container).toggleClass(n.control.css_attr.adding_new,t),n._adjustScrollExpandedBlock(r(this),120)}})},toggleSuccessMessage:function(e){var t=this,n=t.itemAddedMessage,i=r("."+t.control.css_attr.pre_add_wrapper,t.container);return $_success_wrapper=r("."+t.control.css_attr.pre_add_success,t.container),"on"==e?($_success_wrapper.find("p").text(n),$_success_wrapper.css("z-index",1000001).css("height",i.height()+"px").css("line-height",i.height()+"px")):$_success_wrapper.attr("style",""),t.container.toggleClass("czr-model-added","on"==e),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(i,e,o){e.extend(CZRBaseControlMths,{initialize:function(e,t){var n=this;n.css_attr=o.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},i.Control.prototype.initialize.call(n,e,t),n.bind("czr-partial-refresh-done",function(){o.has(n,"czr_moduleCollection")&&o.each(n.czr_moduleCollection(),function(e){n.czr_Module(e.id)&&n.czr_Module(e.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(e){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(l,d,c){d.extend(CZRBaseModuleControlMths,{initialize:function(e,t){var n=this;if(!l.has(e))throw new Error("Missing a registered setting for control : "+e);n.czr_Module=new l.Values,n.czr_moduleCollection=new l.Value,n.czr_moduleCollection.set([]),n.moduleCollectionReady=d.Deferred(),n.moduleCollectionReady.done(function(e){n.czr_moduleCollection.callbacks.add(function(){return n.moduleCollectionReact.apply(n,arguments)})}),l.CZRBaseControl.prototype.initialize.call(n,e,t),l.section.has(n.section())?l.section(n.section()).expanded.bind(function(e){n.czr_Module.each(function(e){e.closeAllItems().closeRemoveDialogs(),c.has(e,"preItem")&&e.preItemExpanded(!1)})}):l.errare("The section "+n.params.section+" of control "+e+" has not been registered yet")},ready:function(){var n=this,i={};c.each(n.getSavedModules(),function(t,e){if(i=t,serverControlParams.isDevMode)n.instantiateModule(t,{});else try{n.instantiateModule(t,{})}catch(e){return void l.errare("Failed to instantiate module "+t.id,e)}n.container.attr("data-module",t.id)}),n.moduleCollectionReady.resolve(i)},getDefaultModuleApiModel:function(){return{id:"",module_type:"",modOpt:{},items:[],crud:!1,hasPreItem:!0,refresh_on_add_item:!0,multi_item:!1,sortable:!1,control:{},section:""}},getSavedModules:function(){var e,n=this,t=[],i=n.params.module_type,o=[],r={};!l.CZR_Helpers.isMultiItemModule(i)||c.isEmpty(l(n.id)())||c.isObject(l(n.id)())||l.errare(" getSavedModules => module Control Init for "+n.id+" : a mono item module control value should be an object if not empty.");var s=l.CZR_Helpers.getControlSettingId(n.id),a=l(s)();return e=c.isArray(a)?a:[a],c.each(e,function(e,t){l.CZR_Helpers.hasModuleModOpt(i)&&0===t&&(c.has(e,"id")?l.errare("getSavedModules : the module "+i+" in control "+n.id+" has no mod_opt defined while it should."):r=e),c.has(e,"is_mod_opt")||o.push(e)}),t.push({id:l.CZR_Helpers.getOptionName(n.id)+"_"+n.params.type,module_type:n.params.module_type,section:n.section(),modOpt:d.extend(!0,{},r),items:d.extend(!0,[],o)}),t},isModuleRegistered:function(e){return!c.isUndefined(c.findWhere(this.czr_moduleCollection(),{id:e}))}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,e,a){e.extend(CZRBaseModuleControlMths,{instantiateModule:function(e,t){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");var n=this;if((a.isUndefined(t)||a.isEmpty(t))&&(t=n.getModuleConstructor(e)),!a.isEmpty(e.id)&&n.czr_Module.has(e.id))throw new Error("The module id already exists in the collection in control : "+n.id);var i=n.prepareModuleForAPI(e);if(n.czr_Module.add(i.id,new t(i.id,i)),!n.czr_Module.has(i.id))throw new Error("instantiateModule() : instantiation failed for module id "+i.id+" in control "+n.id);return n.czr_Module(i.id)},getModuleConstructor:function(e){var t;if(!a.has(e,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+e.id);if(!a.has(s.czrModuleMap,e.module_type))throw new Error("Module type "+e.module_type+" is not listed in the module map api.czrModuleMap.");var n=s.czrModuleMap[e.module_type].mthds;if(t=(s.czrModuleMap[e.module_type].crud?s.CZRDynModule:s.CZRModule).extend(n),a.isUndefined(t)||a.isEmpty(t)||!t)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+e.module_type+".");return t},prepareModuleForAPI:function(i){if(!a.isObject(i))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var o=this,r={};return a.each(o.getDefaultModuleApiModel(),function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?r[t]=o.generateModuleId(i.module_type):r[t]=n;break;case"module_type":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module type must a string not empty");r[t]=n;break;case"items":if(!a.isArray(n))throw new Error("prepareModuleForAPI : a module item list must be an array");r[t]=n;break;case"modOpt":if(!a.isObject(n))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");r[t]=n;break;case"crud":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud||e;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');r[t]=n||!1;break;case"hasPreItem":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].hasPreItem||e;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "hasPreItem" must be a boolean');r[t]=n||!1;break;case"refresh_on_add_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].refresh_on_add_item||e;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "refresh_on_add_item" must be a boolean');r[t]=n||!1;break;case"multi_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud||s.czrModuleMap[i.module_type].multi_item;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');r[t]=n||!1;break;case"sortable":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].sortable||s.czrModuleMap[i.module_type].crud||s.czrModuleMap[i.module_type].multi_item;else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');r[t]=n||!1;break;case"control":r[t]=o;break;case"section":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module section must be a string not empty");r[t]=n;break;case"dirty":r[t]=n||!1}}),r},generateModuleId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,o=e+"_"+(t=t||i._getNextModuleKeyInCollection());if(!a.has(i,"czr_moduleCollection")||!a.isArray(i.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+i.id);return i.isModuleRegistered(o)?(t++,n++,i.generateModuleId(e,t,n)):o},_getNextModuleKeyInCollection:function(){var e={},t=0;return a.isEmpty(this.czr_moduleCollection())||(e=a.max(this.czr_moduleCollection(),function(e){return parseInt(e.id.replace(/[^\/\d]/g,""),10)}),t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,a,l){a.extend(CZRBaseModuleControlMths,{updateModulesCollection:function(e){var t=this,n=t.czr_moduleCollection(),i=a.extend(!0,[],n);if(l.has(e,"collection"))t.czr_moduleCollection.set(e.collection,e.data||{});else{if(!l.has(e,"module"))throw new Error("updateModulesCollection, no module provided "+t.id+". Aborting");var o=t.prepareModuleForAPI(l.clone(e.module));l.findWhere(i,{id:o.id})?l.each(n,function(e,t){e.id==o.id&&(i[t]=o)}):i.push(o);var r={};l.has(e,"data")&&(r=a.extend(!0,{},e.data),a.extend(r,{module:o})),t.czr_moduleCollection.set(i,r)}},moduleCollectionReact:function(t,e,n){var i=l.size(t)>l.size(e),o=l.size(e)>l.size(t);l.size(e),l.size(t);if(is_collection_sorted=!1,o){var r=l.filter(e,function(e){return l.isUndefined(l.findWhere(t,{id:e.id}))});r=r[0],this.czr_Module.remove(r.id)}l.isObject(n)&&l.has(n,"module")&&(n.module_id=n.module.id,n.moduleRegistrationParams=n.module,n.module=this.prepareModuleForDB(a.extend(!0,{},n.module))),i||s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n)},filterModuleCollectionBeforeAjax:function(e){var t,i=this,o=a.extend(!0,[],e);if(l.each(e,function(e,t){var n=a.extend(!0,{},e);o[t]=i.prepareModuleForDB(n)}),1<l.size(e))throw new Error("There should not be several modules in the collection of control : "+i.id);if(!l.isArray(e)||l.isEmpty(e)||!l.has(e[0],"items"))throw new Error("The setting value could not be populated in control : "+i.id);var n=e[0].id;if(!i.czr_Module.has(n))throw new Error("The single module control ("+i.id+") has no module registered with the id "+n);var r=i.czr_Module(n);if(!l.isArray(r().items))throw new Error("The module "+n+" should be an array in control : "+i.id);return t=r.isMultiItem()?r().items:r().items[0]||[],t=r.filterItemsBeforeCoreApiSettingValue(t),r.hasModOpt()?l.union([r().modOpt],t):t},prepareModuleForDB:function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module must be an object.");var t={};if(!l.isArray(e.items))throw new Error("::prepareModuleForDB : a module item list must be an array");return t.items=e.items,t}})}(wp.customize,jQuery,_),function(e,t,n){t.extend(CZRBaseControlMths,e.Events),t.extend(e.Control.prototype,e.Events),t.extend(CZRModuleMths,e.Events),t.extend(CZRItemMths,e.Events),t.extend(CZRModOptMths,e.Events),t.extend(CZRBaseControlMths,e.CZR_Helpers),t.extend(CZRInputMths,e.CZR_Helpers),t.extend(CZRModuleMths,e.CZR_Helpers),e.CZRInput=e.Value.extend(CZRInputMths),e.czrInputMap=e.czrInputMap||{},t.extend(e.czrInputMap,{text:"",textarea:"",check:"setupIcheck",gutencheck:"setupGutenCheck",select:"setupSelect",radio:"setupRadio",number:"setupStepper",upload:"setupImageUploaderSaveAsId",upload_url:"setupImageUploaderSaveAsUrl",color:"setupColorPicker",wp_color_alpha:"setupColorPickerAlpha",wp_color:"setupWPColorPicker",content_picker:"setupContentPicker",tiny_mce_editor:"setupTinyMceEditor",password:"",range:"setupSimpleRange",range_slider:"setupRangeSlider",hidden:"",h_alignment:"setupHAlignement",h_text_alignment:"setupHAlignement"}),e.CZRItem=e.Value.extend(CZRItemMths),e.CZRModOpt=e.Value.extend(CZRModOptMths),e.CZRModule=e.Value.extend(CZRModuleMths),e.CZRDynModule=e.CZRModule.extend(CZRDynModuleMths),e.CZRBaseControl=e.Control.extend(CZRBaseControlMths),e.CZRBaseModuleControl=e.CZRBaseControl.extend(CZRBaseModuleControlMths),t.extend(e.controlConstructor,{czr_module:e.CZRBaseModuleControl})}(wp.customize,jQuery,_),function(i,e){jQuery(function(e){var t,n=i.customize||n;t=e("<span/>",{class:"customize-controls-home fas fa-home",html:'<span class="screen-reader-text">Home</span>'}),e.when(e("#customize-header-actions").append(t)).done(function(){t.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}).on("click.customize-controls-home",function(){n.section.has(n.czr_activeSectionId())?n.section(n.czr_activeSectionId()).expanded(!1):n.section.each(function(e){e.expanded(!1)}),n.panel.each(function(e){e.expanded(!1)})})})})}(wp);
|
inc/czr-base-fmk/assets/js/_1_ccat_czr-theme-fmk.js
CHANGED
@@ -83,7 +83,7 @@
|
|
83 |
/*****************************************************************************
|
84 |
* ADD PRO BEFORE SPECIFIC SECTIONS AND PANELS
|
85 |
*****************************************************************************/
|
86 |
-
if ( themeServerControlParams.isPro ) {
|
87 |
_.each( [
|
88 |
//WFC
|
89 |
'tc_font_customizer_settings',
|
83 |
/*****************************************************************************
|
84 |
* ADD PRO BEFORE SPECIFIC SECTIONS AND PANELS
|
85 |
*****************************************************************************/
|
86 |
+
if ( window.themeServerControlParams && themeServerControlParams.isPro ) {
|
87 |
_.each( [
|
88 |
//WFC
|
89 |
'tc_font_customizer_settings',
|
inc/czr-base-fmk/assets/js/_1_ccat_czr-theme-fmk.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t,i){"function"==typeof e.Section&&e.control.bind("add",function(t){t.params.ubq_section&&t.params.ubq_section.section&&(t.params.original_priority=t.params.priority,t.params.original_section=t.params.section,e.section.when(t.params.ubq_section.section,function(e){e.expanded.bind(function(e){e?(t.params.ubq_section.priority&&t.priority(t.params.ubq_section.priority),t.section(t.params.ubq_section.section)):(t.priority(t.params.original_priority),t.section(t.params.original_section))})}))}),"function"==typeof e.Panel&&e.section.bind("add",function(t){t.params.ubq_panel&&t.params.ubq_panel.panel&&(t.params.original_priority=t.params.priority,t.params.original_panel=t.params.panel,e.panel.when(t.params.ubq_panel.panel,function(e){e.expanded.bind(function(e){e?(t.params.ubq_panel.priority&&t.priority(t.params.ubq_panel.priority),t.panel(t.params.ubq_panel.panel)):(t.priority(t.params.original_priority),t.panel(t.params.original_panel))})}))});var n=function(){i.has(e,"czr_ModOptVisible")&&e.czr_ModOptVisible(!1)};e.bind("ready",function(){e.czr_activeSectionId.bind(n),e.czr_activePanelId.bind(n)})}(wp.customize,jQuery,_),function(t,e,i){t.bind("ready",function(){if(themeServerControlParams.isPro&&(i.each(["tc_font_customizer_settings","header_image_sec","content_blog_sec","static_front_page","content_single_sec","tc_fpu","nav","post_lists_sec","galleries_sec","footer_customizer_sec","custom_scripts_sec","contact_info_sec"],function(e){i.delay(function(){t.section.when(e,function(e){e.headContainer.length<=1&&e.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})},1e3)}),i.each([],function(e){t.panel.when(e,function(e){e.headContainer.length<=1&&e.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})})),!themeServerControlParams.isPro&&i.isFunction(t.Section)){if(proSectionInstance=t.section("go_pro_sec"),!i.isObject(proSectionInstance))return;proSectionInstance.attachEvents=function(){},proSectionInstance.isContextuallyActive=function(){return this.active()},proSectionInstance._toggleActive=function(){return!0},proSectionInstance.active(!0)}})}(wp.customize,jQuery,_);var CZRMultiplePickerMths=CZRMultiplePickerMths||{};!function(e,i,t){i.extend(CZRMultiplePickerMths,{ready:function(){var t=this,e=this.container.find("select");e.select2({closeOnSelect:!1,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),e.on("change",function(e){0===i(this).find("option:selected").length&&t.setting.set([])})}})}(wp.customize,jQuery,_);var CZRCroppedImageMths=CZRCroppedImageMths||{};!function(e,t,i){"function"==typeof wp.media.controller.Cropper&&"function"==typeof e.CroppedImageControl&&(wp.media.controller.CZRCustomizeImageCropper=wp.media.controller.Cropper.extend({doCrop:function(e){var t=e.get("cropDetails"),i=this.get("control");return t.dst_width=i.params.dst_width,t.dst_height=i.params.dst_height,wp.ajax.post("crop-image",{wp_customize:"on",nonce:e.get("nonces").edit,id:e.get("id"),context:i.id,cropDetails:t})}}),t.extend(CZRCroppedImageMths,{initFrame:function(){var e=_wpMediaViewsL10n;this.frame=wp.media({button:{text:e.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CZRCustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var e=this.frame.state().get("selection").first().toJSON();e.mime&&-1<e.mime.indexOf("image")?i.contains(["image/svg+xml","image/gif"],e.mime)||this.params.width===e.width&&this.params.height===e.height&&!this.params.flex_width&&!this.params.flex_height?(this.setImageFromAttachment(e),this.frame.close()):this.frame.setState("cropper"):this.frame.trigger("content:error")}}))}(wp.customize,jQuery,_);var CZRUploadMths=CZRUploadMths||{};!function(e,i,t){i.extend(CZRUploadMths,{ready:function(){var t=this;this.params.removed=this.params.removed||"",this.success=i.proxy(this.success,this),this.uploader=i.extend({container:this.container,browser:this.container.find(".czr-upload"),success:this.success,plupload:{},params:{}},this.uploader||{}),t.params.extensions&&(t.uploader.plupload.filters=[{title:e.l10n.allowedFiles,extensions:t.params.extensions}]),t.params.context&&(t.uploader.params["post_data[context]"]=this.params.context),e.settings.theme.stylesheet&&(t.uploader.params["post_data[theme]"]=e.settings.theme.stylesheet),this.uploader=new wp.Uploader(this.uploader),this.remover=this.container.find(".remove"),this.remover.on("click keydown",function(e){"keydown"===e.type&&13!==e.which||(t.setting.set(t.params.removed),e.preventDefault())}),this.removerVisibility=i.proxy(this.removerVisibility,this),this.setting.bind(this.removerVisibility),this.removerVisibility(this.setting())},success:function(e){this.setting.set(e.get("id"))},removerVisibility:function(e){this.remover.toggle(e!=this.params.removed)}})}(wp.customize,jQuery,_);var CZRLayoutSelectMths=CZRLayoutSelectMths||{};!function(e,s,r){s.extend(CZRLayoutSelectMths,{ready:function(){this.setupSelect()},setupSelect:function(e){var o=this;function t(e){if(!e.id)return e.text;if(r.has(o.params.layouts,e.element.value)){var t=o.params.layouts[e.element.value],i=t.src,n=t.label;return s('<img src="'+i+'" class="czr-layout-img" title="'+n+'" /><span class="czr-layout-title">'+n+"</span>")}}$_select=this.container.find("select"),$_select.select2({templateResult:t,templateSelection:t,minimumResultsForSearch:1/0})}})}(wp.customize,jQuery,_),function(e,t,i){e.CZRUploadControl=e.Control.extend(CZRUploadMths),e.CZRLayoutControl=e.Control.extend(CZRLayoutSelectMths),e.CZRMultiplePickerControl=e.Control.extend(CZRMultiplePickerMths),t.extend(e.controlConstructor,{czr_upload:e.CZRUploadControl,czr_multiple_picker:e.CZRMultiplePickerControl,czr_layouts:e.CZRLayoutControl}),"function"==typeof e.CroppedImageControl&&(e.CZRCroppedImageControl=e.CroppedImageControl.extend(CZRCroppedImageMths),t.extend(e.controlConstructor,{czr_cropped_image:e.CZRCroppedImageControl})),"function"==typeof e.CodeEditorControl&&t.extend(e.controlConstructor,{czr_code_editor:e.CodeEditorControl})}(wp.customize,jQuery,_),function(l,p,d){var e=serverControlParams.i18n||{};l.czr_CrtlDependenciesReady=p.Deferred(),l.bind("ready",function(){d.has(l,"czr_ctrlDependencies")||(serverControlParams.isSkopOn?"resolved"!=l.czr_skopeReady.state()&&l.czr_skopeReady.done(function(){l.czr_ctrlDependencies=new l.CZR_ctrlDependencies,l.czr_CrtlDependenciesReady.resolve()}):(l.czr_ctrlDependencies=new l.CZR_ctrlDependencies,l.czr_CrtlDependenciesReady.resolve()))}),l.CZR_ctrlDependencies=l.Class.extend({dominiDeps:[],initialize:function(){var t=this;if(this.defaultDominusParams={dominus:"",servi:[],visibility:null,actions:null,onSectionExpand:!0},this.dominiDeps=d.extend(this.dominiDeps,this._getControlDeps()),!d.isArray(t.dominiDeps))throw new Error("Visibilities : the dominos dependency array is not an array.");l.czr_activeSectionId.bind(function(e){if(!d.isEmpty(e)&&l.section.has(e))try{t.setServiDependencies(e)}catch(e){l.errorLog("In api.CZR_ctrlDependencies : "+e)}}),l.bind("awaken-section",function(e){if(serverControlParams.isSkopOn&&d.has(l,"czr_skopeBase"))l.czr_skopeBase.processSilentUpdates({candidates:{},section_id:e.target,refresh:!1}).then(function(){try{t.setServiDependencies(e.target,e.source)}catch(e){l.errorLog("On awaken-section, ctrl deps : "+e)}});else try{t.setServiDependencies(e.target,e.source)}catch(e){l.errorLog("On awaken-section, ctrl deps : "+e)}}),this._handleFaviconNote()},setServiDependencies:function(i,n,o){var s=this,r=p.Deferred();if(o=o||!1,d.isUndefined(i)||!l.section.has(i))throw new Error("Control Dependencies : the targetSectionId is missing or not registered : "+i);if(l.section(i).czr_ctrlDependenciesReady=l.section(i).czr_ctrlDependenciesReady||p.Deferred(),!o&&"resolved"==l.section(i).czr_ctrlDependenciesReady.state())return r.resolve().promise();d.each(s.dominiDeps,function(e){if(!d.has(e,"dominus")||!d.isString(e.dominus)||d.isEmpty(e.dominus))throw new Error("Control Dependencies : a dominus control id must be a not empty string.");var t=l.CZR_Helpers.build_setId(e.dominus);l.control.has(t)&&l.control(t).section()==i&&(e=s._prepareDominusParams(e),d.isEmpty(e)||s._processDominusCallbacks(e.dominus,e,o).fail(function(){l.consoleLog("self._processDominusCallbacks fail for section "+i),r.reject()}).done(function(){r.resolve()}))});var e=l.CZR_Helpers.getSectionControlIds(i),t=function(t){var i=[];return d.each(s.dominiDeps,function(e){if(d.has(e,"servi")&&d.isArray(e.servi)&&d.has(e,"dominus")&&!d.isEmpty(e.dominus)){if(d.contains(e.servi,t)&&!d.contains(i,e.dominus)){if(e=s._prepareDominusParams(e),d.isEmpty(e))return;i.push(e.dominus)}}else l.errorLog("Control Dependencies : wrong params in _getServusDomini.")}),d.isArray(i)?i:[]},a=[];return d.each(e,function(e){d.isEmpty(t(e))||(a=d.union(a,t(e)))}),d.each(a,function(e){var t=l.CZR_Helpers.build_setId(e);l.control(t).section()!=i&&n!=l.control(t).section()&&l.trigger("awaken-section",{target:l.control(t).section(),source:i})}),r.always(function(){l.section(i).czr_ctrlDependenciesReady.resolve()}),r.promise()},_deferCallbackForControl:function(e,t,i){var n=p.Deferred();if(d.isEmpty(e)||!d.isString(e))throw new Error("_deferCallbackForControl : the control id is missing.");if(!d.isFunction(t))throw new Error("_deferCallbackForControl : callback must be a funtion.");return i=d.isUndefined(i)||!d.isArray(i)?[]:i,l.control.has(e)?"resolved"==l.control(e).deferred.embedded.state()?p.when(t.apply(null,i)).fail(function(){n.reject()}).done(function(){n.resolve()}):l.control(e).deferred.embedded.then(function(){p.when(t.apply(null,i)).fail(function(){n.reject()}).done(function(){n.resolve()})}):l.control.when(e,function(){l.control(e).deferred.embedded.then(function(){p.when(t.apply(null,i)).fail(function(){n.reject()}).done(function(){n.resolve()})})}),n.promise()},_processDominusCallbacks:function(e,o,t){var s=this,i=l.CZR_Helpers.build_setId(e),r=l(i),a=p.Deferred(),c=!1;return d.each(o.servi,function(i){if(l.control.has(l.CZR_Helpers.build_setId(i))){var n=function(e,t,i,n){var o=arguments;d.each(i,function(e,t){switch(t){case"visibility":s._setVisibility.apply(null,o);break;case"actions":d.isFunction(e)&&e.apply(null,o)}})},t=function(e){e=e||r();var t=l.CZR_Helpers.build_setId(i);s._deferCallbackForControl(t,n,[e,i,o]).always(function(){c=!0}).fail(function(){a.reject()}).done(function(){a.resolve()})};t(),d.has(r,"czr_visibilityServi")||(r.czr_visibilityServi=new l.Value([]));var e=r.czr_visibilityServi();d.contains(e,i)||(r.bind(function(e){t(e)}),r.czr_visibilityServi(d.union(e,[i])))}}),c?a.promise():a.resolve().promise()},_setVisibility:function(e,t,i,n){var o=l.CZR_Helpers.build_setId(t),s=i.visibility(e,t,i.dominus);if(n=n||!1,d.isBoolean(s)&&("unchanged"!=s||n)){var r=function(){l.state.has("silent-update-processing")&&l.state("silent-update-processing")()||(l.control(o,function(e){d.has(e,"active")&&(s=s&&e.active()),d.has(e,"defaultActiveArguments")&&control.defaultActiveArguments,e.onChangeActive(s,e.defaultActiveArguments)}),l.state.has("silent-update-processing")&&l.state("silent-update-processing").unbind(r))};l.state.has("silent-update-processing")&&l.state("silent-update-processing")()?l.state("silent-update-processing").bind(r):r()}},_getControlDeps:function(){return{}},_prepareDominusParams:function(n){var o={};if(!d.isObject(n))return l.errorLog("Visibilities : a dominus param definition must be an object."),o;if(!d.has(n,"visibility")&&!d.has(n,"actions"))return l.errorLog("Visibilities : a dominus definition must include a visibility or an actions callback."),o;if(!d.has(n,"dominus")||!d.isString(n.dominus)||d.isEmpty(n.dominus))return l.errorLog("Visibilities : a dominus control id must be a not empty string."),o;var e=l.CZR_Helpers.build_setId(n.dominus);return l.control.has(e)?!d.has(n,"servi")||d.isUndefined(n.servi)||!d.isArray(n.servi)||d.isEmpty(n.servi)?l.errorLog("Visibilities : servi must be set as an array not empty."):d.each(this.defaultDominusParams,function(e,t){var i=n[t];switch(t){case"visibility":if(!d.isUndefined(i)&&!d.isEmpty(i)&&!d.isFunction(i))throw new Error("Visibilities : a dominus visibility callback must be a function : "+n.dominus);break;case"actions":if(!d.isUndefined(i)&&!d.isEmpty(i)&&!d.isFunction(i))throw new Error("Visibilities : a dominus actions callback must be a function : "+n.dominus);break;case"onSectionExpand":if(!d.isUndefined(i)&&!d.isEmpty(i)&&!d.isBoolean(i))throw new Error("Visibilities : a dominus onSectionExpand param must be a boolean : "+n.dominus)}o[t]=i}):l.errorLog("Visibilities : a dominus control id is not registered : "+e),o},_handleFaviconNote:function(){var t=this,i=l.CZR_Helpers.build_setId(serverControlParams.faviconOptionName);if(!(!l.has("site_icon")||!l.control("site_icon")||l.has(i)&&0==+l(i)()||0<+l("site_icon")())){var n=l.control("site_icon").params.description;_newDes=["<strong>",e.faviconNote||"","</strong><br/><br/>"].join("")+n,t._printFaviconNote(_newDes),l("site_icon").callbacks.add(function(e){0<+e?(l.control("site_icon").container.find(".description").text(n),l.has(i)&&l(i).set("")):t._printFaviconNote(_newDes)})}},_printFaviconNote:function(e){l.control("site_icon").container.find(".description").html(e)}})}(wp.customize,jQuery,_),function(e,t){jQuery(function(n){var o=e.customize||o;n(".accordion-section").not(".control-panel").click(function(){var e,t;e=n(this),0!==(t=e.siblings(".open")).length&&t.offset().top<0&&n(".wp-full-overlay-sidebar-content").animate({scrollTop:-n("#customize-theme-controls").offset().top-t.height()+e.offset().top+n(".wp-full-overlay-sidebar-content").offset().top},700)}),o.czrSetupCheckbox=function(e,t){var i=o.control(e);n("input[type=checkbox]",i.container).each(function(){"tc_font_customizer_settings"!=i.params.section&&(0===n(this).val()||"0"==n(this).val()||"off"==n(this).val()||_.isEmpty(n(this).val())?n(this).prop("checked",!1):n(this).prop("checked",!0),0===n(this).closest('div[class^="icheckbox"]').length&&n(this).iCheck({checkboxClass:"icheckbox_flat-grey",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){n(this).val(!1===n(this).is(":checked")?0:1),n(e.currentTarget).trigger("change")}))})},o.czrSetupSelect=function(e,t){n("select[data-customize-setting-link]",o.control(e).container).not(".no-selecter-js").each(function(){n(this).selecter({})})},o.czrSetupStepper=function(e,t){var i=o.control(e);n('input[type="number"]',i.container).each(function(){n(this).stepper()})},o.control.each(function(e){if(_.has(e,"id")){"widget_"!=e.id.substring(0,"widget_".length)&&"nav_menu"!=e.id.substring(0,"nav_menu".length)&&o.czrSetupCheckbox(e.id),"nav_menu_locations"!=e.id.substring(0,"nav_menu_locations".length)&&o.czrSetupSelect(e.id);0<e.container.find('input[type="number"]').length&&e.params&&e.params.section&&!_.contains(["publish_settings","tc_font_customizer_settings"],e.params.section)&&o.czrSetupStepper(e.id)}})})}(wp);
|
1 |
+
!function(e,t,i){"function"==typeof e.Section&&e.control.bind("add",function(t){t.params.ubq_section&&t.params.ubq_section.section&&(t.params.original_priority=t.params.priority,t.params.original_section=t.params.section,e.section.when(t.params.ubq_section.section,function(e){e.expanded.bind(function(e){e?(t.params.ubq_section.priority&&t.priority(t.params.ubq_section.priority),t.section(t.params.ubq_section.section)):(t.priority(t.params.original_priority),t.section(t.params.original_section))})}))}),"function"==typeof e.Panel&&e.section.bind("add",function(t){t.params.ubq_panel&&t.params.ubq_panel.panel&&(t.params.original_priority=t.params.priority,t.params.original_panel=t.params.panel,e.panel.when(t.params.ubq_panel.panel,function(e){e.expanded.bind(function(e){e?(t.params.ubq_panel.priority&&t.priority(t.params.ubq_panel.priority),t.panel(t.params.ubq_panel.panel)):(t.priority(t.params.original_priority),t.panel(t.params.original_panel))})}))});var n=function(){i.has(e,"czr_ModOptVisible")&&e.czr_ModOptVisible(!1)};e.bind("ready",function(){e.czr_activeSectionId.bind(n),e.czr_activePanelId.bind(n)})}(wp.customize,jQuery,_),function(t,e,i){t.bind("ready",function(){if(window.themeServerControlParams&&themeServerControlParams.isPro&&(i.each(["tc_font_customizer_settings","header_image_sec","content_blog_sec","static_front_page","content_single_sec","tc_fpu","nav","post_lists_sec","galleries_sec","footer_customizer_sec","custom_scripts_sec","contact_info_sec"],function(e){i.delay(function(){t.section.when(e,function(e){e.headContainer.length<=1&&e.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})},1e3)}),i.each([],function(e){t.panel.when(e,function(e){e.headContainer.length<=1&&e.headContainer.find(".accordion-section-title").prepend('<span class="pro-title-block">Pro</span>')})})),!themeServerControlParams.isPro&&i.isFunction(t.Section)){if(proSectionInstance=t.section("go_pro_sec"),!i.isObject(proSectionInstance))return;proSectionInstance.attachEvents=function(){},proSectionInstance.isContextuallyActive=function(){return this.active()},proSectionInstance._toggleActive=function(){return!0},proSectionInstance.active(!0)}})}(wp.customize,jQuery,_);var CZRMultiplePickerMths=CZRMultiplePickerMths||{};!function(e,i,t){i.extend(CZRMultiplePickerMths,{ready:function(){var t=this,e=this.container.find("select");e.select2({closeOnSelect:!1,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),e.on("change",function(e){0===i(this).find("option:selected").length&&t.setting.set([])})}})}(wp.customize,jQuery,_);var CZRCroppedImageMths=CZRCroppedImageMths||{};!function(e,t,i){"function"==typeof wp.media.controller.Cropper&&"function"==typeof e.CroppedImageControl&&(wp.media.controller.CZRCustomizeImageCropper=wp.media.controller.Cropper.extend({doCrop:function(e){var t=e.get("cropDetails"),i=this.get("control");return t.dst_width=i.params.dst_width,t.dst_height=i.params.dst_height,wp.ajax.post("crop-image",{wp_customize:"on",nonce:e.get("nonces").edit,id:e.get("id"),context:i.id,cropDetails:t})}}),t.extend(CZRCroppedImageMths,{initFrame:function(){var e=_wpMediaViewsL10n;this.frame=wp.media({button:{text:e.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CZRCustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var e=this.frame.state().get("selection").first().toJSON();e.mime&&-1<e.mime.indexOf("image")?i.contains(["image/svg+xml","image/gif"],e.mime)||this.params.width===e.width&&this.params.height===e.height&&!this.params.flex_width&&!this.params.flex_height?(this.setImageFromAttachment(e),this.frame.close()):this.frame.setState("cropper"):this.frame.trigger("content:error")}}))}(wp.customize,jQuery,_);var CZRUploadMths=CZRUploadMths||{};!function(e,i,t){i.extend(CZRUploadMths,{ready:function(){var t=this;this.params.removed=this.params.removed||"",this.success=i.proxy(this.success,this),this.uploader=i.extend({container:this.container,browser:this.container.find(".czr-upload"),success:this.success,plupload:{},params:{}},this.uploader||{}),t.params.extensions&&(t.uploader.plupload.filters=[{title:e.l10n.allowedFiles,extensions:t.params.extensions}]),t.params.context&&(t.uploader.params["post_data[context]"]=this.params.context),e.settings.theme.stylesheet&&(t.uploader.params["post_data[theme]"]=e.settings.theme.stylesheet),this.uploader=new wp.Uploader(this.uploader),this.remover=this.container.find(".remove"),this.remover.on("click keydown",function(e){"keydown"===e.type&&13!==e.which||(t.setting.set(t.params.removed),e.preventDefault())}),this.removerVisibility=i.proxy(this.removerVisibility,this),this.setting.bind(this.removerVisibility),this.removerVisibility(this.setting())},success:function(e){this.setting.set(e.get("id"))},removerVisibility:function(e){this.remover.toggle(e!=this.params.removed)}})}(wp.customize,jQuery,_);var CZRLayoutSelectMths=CZRLayoutSelectMths||{};!function(e,s,r){s.extend(CZRLayoutSelectMths,{ready:function(){this.setupSelect()},setupSelect:function(e){var o=this;function t(e){if(!e.id)return e.text;if(r.has(o.params.layouts,e.element.value)){var t=o.params.layouts[e.element.value],i=t.src,n=t.label;return s('<img src="'+i+'" class="czr-layout-img" title="'+n+'" /><span class="czr-layout-title">'+n+"</span>")}}$_select=this.container.find("select"),$_select.select2({templateResult:t,templateSelection:t,minimumResultsForSearch:1/0})}})}(wp.customize,jQuery,_),function(e,t,i){e.CZRUploadControl=e.Control.extend(CZRUploadMths),e.CZRLayoutControl=e.Control.extend(CZRLayoutSelectMths),e.CZRMultiplePickerControl=e.Control.extend(CZRMultiplePickerMths),t.extend(e.controlConstructor,{czr_upload:e.CZRUploadControl,czr_multiple_picker:e.CZRMultiplePickerControl,czr_layouts:e.CZRLayoutControl}),"function"==typeof e.CroppedImageControl&&(e.CZRCroppedImageControl=e.CroppedImageControl.extend(CZRCroppedImageMths),t.extend(e.controlConstructor,{czr_cropped_image:e.CZRCroppedImageControl})),"function"==typeof e.CodeEditorControl&&t.extend(e.controlConstructor,{czr_code_editor:e.CodeEditorControl})}(wp.customize,jQuery,_),function(l,p,d){var e=serverControlParams.i18n||{};l.czr_CrtlDependenciesReady=p.Deferred(),l.bind("ready",function(){d.has(l,"czr_ctrlDependencies")||(serverControlParams.isSkopOn?"resolved"!=l.czr_skopeReady.state()&&l.czr_skopeReady.done(function(){l.czr_ctrlDependencies=new l.CZR_ctrlDependencies,l.czr_CrtlDependenciesReady.resolve()}):(l.czr_ctrlDependencies=new l.CZR_ctrlDependencies,l.czr_CrtlDependenciesReady.resolve()))}),l.CZR_ctrlDependencies=l.Class.extend({dominiDeps:[],initialize:function(){var t=this;if(this.defaultDominusParams={dominus:"",servi:[],visibility:null,actions:null,onSectionExpand:!0},this.dominiDeps=d.extend(this.dominiDeps,this._getControlDeps()),!d.isArray(t.dominiDeps))throw new Error("Visibilities : the dominos dependency array is not an array.");l.czr_activeSectionId.bind(function(e){if(!d.isEmpty(e)&&l.section.has(e))try{t.setServiDependencies(e)}catch(e){l.errorLog("In api.CZR_ctrlDependencies : "+e)}}),l.bind("awaken-section",function(e){if(serverControlParams.isSkopOn&&d.has(l,"czr_skopeBase"))l.czr_skopeBase.processSilentUpdates({candidates:{},section_id:e.target,refresh:!1}).then(function(){try{t.setServiDependencies(e.target,e.source)}catch(e){l.errorLog("On awaken-section, ctrl deps : "+e)}});else try{t.setServiDependencies(e.target,e.source)}catch(e){l.errorLog("On awaken-section, ctrl deps : "+e)}}),this._handleFaviconNote()},setServiDependencies:function(i,n,o){var s=this,r=p.Deferred();if(o=o||!1,d.isUndefined(i)||!l.section.has(i))throw new Error("Control Dependencies : the targetSectionId is missing or not registered : "+i);if(l.section(i).czr_ctrlDependenciesReady=l.section(i).czr_ctrlDependenciesReady||p.Deferred(),!o&&"resolved"==l.section(i).czr_ctrlDependenciesReady.state())return r.resolve().promise();d.each(s.dominiDeps,function(e){if(!d.has(e,"dominus")||!d.isString(e.dominus)||d.isEmpty(e.dominus))throw new Error("Control Dependencies : a dominus control id must be a not empty string.");var t=l.CZR_Helpers.build_setId(e.dominus);l.control.has(t)&&l.control(t).section()==i&&(e=s._prepareDominusParams(e),d.isEmpty(e)||s._processDominusCallbacks(e.dominus,e,o).fail(function(){l.consoleLog("self._processDominusCallbacks fail for section "+i),r.reject()}).done(function(){r.resolve()}))});var e=l.CZR_Helpers.getSectionControlIds(i),t=function(t){var i=[];return d.each(s.dominiDeps,function(e){if(d.has(e,"servi")&&d.isArray(e.servi)&&d.has(e,"dominus")&&!d.isEmpty(e.dominus)){if(d.contains(e.servi,t)&&!d.contains(i,e.dominus)){if(e=s._prepareDominusParams(e),d.isEmpty(e))return;i.push(e.dominus)}}else l.errorLog("Control Dependencies : wrong params in _getServusDomini.")}),d.isArray(i)?i:[]},a=[];return d.each(e,function(e){d.isEmpty(t(e))||(a=d.union(a,t(e)))}),d.each(a,function(e){var t=l.CZR_Helpers.build_setId(e);l.control(t).section()!=i&&n!=l.control(t).section()&&l.trigger("awaken-section",{target:l.control(t).section(),source:i})}),r.always(function(){l.section(i).czr_ctrlDependenciesReady.resolve()}),r.promise()},_deferCallbackForControl:function(e,t,i){var n=p.Deferred();if(d.isEmpty(e)||!d.isString(e))throw new Error("_deferCallbackForControl : the control id is missing.");if(!d.isFunction(t))throw new Error("_deferCallbackForControl : callback must be a funtion.");return i=d.isUndefined(i)||!d.isArray(i)?[]:i,l.control.has(e)?"resolved"==l.control(e).deferred.embedded.state()?p.when(t.apply(null,i)).fail(function(){n.reject()}).done(function(){n.resolve()}):l.control(e).deferred.embedded.then(function(){p.when(t.apply(null,i)).fail(function(){n.reject()}).done(function(){n.resolve()})}):l.control.when(e,function(){l.control(e).deferred.embedded.then(function(){p.when(t.apply(null,i)).fail(function(){n.reject()}).done(function(){n.resolve()})})}),n.promise()},_processDominusCallbacks:function(e,o,t){var s=this,i=l.CZR_Helpers.build_setId(e),r=l(i),a=p.Deferred(),c=!1;return d.each(o.servi,function(i){if(l.control.has(l.CZR_Helpers.build_setId(i))){var n=function(e,t,i,n){var o=arguments;d.each(i,function(e,t){switch(t){case"visibility":s._setVisibility.apply(null,o);break;case"actions":d.isFunction(e)&&e.apply(null,o)}})},t=function(e){e=e||r();var t=l.CZR_Helpers.build_setId(i);s._deferCallbackForControl(t,n,[e,i,o]).always(function(){c=!0}).fail(function(){a.reject()}).done(function(){a.resolve()})};t(),d.has(r,"czr_visibilityServi")||(r.czr_visibilityServi=new l.Value([]));var e=r.czr_visibilityServi();d.contains(e,i)||(r.bind(function(e){t(e)}),r.czr_visibilityServi(d.union(e,[i])))}}),c?a.promise():a.resolve().promise()},_setVisibility:function(e,t,i,n){var o=l.CZR_Helpers.build_setId(t),s=i.visibility(e,t,i.dominus);if(n=n||!1,d.isBoolean(s)&&("unchanged"!=s||n)){var r=function(){l.state.has("silent-update-processing")&&l.state("silent-update-processing")()||(l.control(o,function(e){d.has(e,"active")&&(s=s&&e.active()),d.has(e,"defaultActiveArguments")&&control.defaultActiveArguments,e.onChangeActive(s,e.defaultActiveArguments)}),l.state.has("silent-update-processing")&&l.state("silent-update-processing").unbind(r))};l.state.has("silent-update-processing")&&l.state("silent-update-processing")()?l.state("silent-update-processing").bind(r):r()}},_getControlDeps:function(){return{}},_prepareDominusParams:function(n){var o={};if(!d.isObject(n))return l.errorLog("Visibilities : a dominus param definition must be an object."),o;if(!d.has(n,"visibility")&&!d.has(n,"actions"))return l.errorLog("Visibilities : a dominus definition must include a visibility or an actions callback."),o;if(!d.has(n,"dominus")||!d.isString(n.dominus)||d.isEmpty(n.dominus))return l.errorLog("Visibilities : a dominus control id must be a not empty string."),o;var e=l.CZR_Helpers.build_setId(n.dominus);return l.control.has(e)?!d.has(n,"servi")||d.isUndefined(n.servi)||!d.isArray(n.servi)||d.isEmpty(n.servi)?l.errorLog("Visibilities : servi must be set as an array not empty."):d.each(this.defaultDominusParams,function(e,t){var i=n[t];switch(t){case"visibility":if(!d.isUndefined(i)&&!d.isEmpty(i)&&!d.isFunction(i))throw new Error("Visibilities : a dominus visibility callback must be a function : "+n.dominus);break;case"actions":if(!d.isUndefined(i)&&!d.isEmpty(i)&&!d.isFunction(i))throw new Error("Visibilities : a dominus actions callback must be a function : "+n.dominus);break;case"onSectionExpand":if(!d.isUndefined(i)&&!d.isEmpty(i)&&!d.isBoolean(i))throw new Error("Visibilities : a dominus onSectionExpand param must be a boolean : "+n.dominus)}o[t]=i}):l.errorLog("Visibilities : a dominus control id is not registered : "+e),o},_handleFaviconNote:function(){var t=this,i=l.CZR_Helpers.build_setId(serverControlParams.faviconOptionName);if(!(!l.has("site_icon")||!l.control("site_icon")||l.has(i)&&0==+l(i)()||0<+l("site_icon")())){var n=l.control("site_icon").params.description;_newDes=["<strong>",e.faviconNote||"","</strong><br/><br/>"].join("")+n,t._printFaviconNote(_newDes),l("site_icon").callbacks.add(function(e){0<+e?(l.control("site_icon").container.find(".description").text(n),l.has(i)&&l(i).set("")):t._printFaviconNote(_newDes)})}},_printFaviconNote:function(e){l.control("site_icon").container.find(".description").html(e)}})}(wp.customize,jQuery,_),function(e,t){jQuery(function(n){var o=e.customize||o;n(".accordion-section").not(".control-panel").click(function(){var e,t;e=n(this),0!==(t=e.siblings(".open")).length&&t.offset().top<0&&n(".wp-full-overlay-sidebar-content").animate({scrollTop:-n("#customize-theme-controls").offset().top-t.height()+e.offset().top+n(".wp-full-overlay-sidebar-content").offset().top},700)}),o.czrSetupCheckbox=function(e,t){var i=o.control(e);n("input[type=checkbox]",i.container).each(function(){"tc_font_customizer_settings"!=i.params.section&&(0===n(this).val()||"0"==n(this).val()||"off"==n(this).val()||_.isEmpty(n(this).val())?n(this).prop("checked",!1):n(this).prop("checked",!0),0===n(this).closest('div[class^="icheckbox"]').length&&n(this).iCheck({checkboxClass:"icheckbox_flat-grey",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){n(this).val(!1===n(this).is(":checked")?0:1),n(e.currentTarget).trigger("change")}))})},o.czrSetupSelect=function(e,t){n("select[data-customize-setting-link]",o.control(e).container).not(".no-selecter-js").each(function(){n(this).selecter({})})},o.czrSetupStepper=function(e,t){var i=o.control(e);n('input[type="number"]',i.container).each(function(){n(this).stepper()})},o.control.each(function(e){if(_.has(e,"id")){"widget_"!=e.id.substring(0,"widget_".length)&&"nav_menu"!=e.id.substring(0,"nav_menu".length)&&o.czrSetupCheckbox(e.id),"nav_menu_locations"!=e.id.substring(0,"nav_menu_locations".length)&&o.czrSetupSelect(e.id);0<e.container.find('input[type="number"]').length&&e.params&&e.params.section&&!_.contains(["publish_settings","tc_font_customizer_settings"],e.params.section)&&o.czrSetupStepper(e.id)}})})}(wp);
|
inc/czr-base-fmk/assets/js/czr-preview-base.js
CHANGED
@@ -1,219 +1,212 @@
|
|
1 |
|
2 |
( function( api, $, _ ) {
|
3 |
-
|
4 |
-
|
5 |
-
if ( ! _.has( o, 'id') || ! $('[data-module-id="' + o.id +'"]').length )
|
6 |
-
|
7 |
-
$('html, body').animate({
|
8 |
-
|
9 |
-
}, 'slow');
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
if ( ! _.has( o, 'id') || ! $('[data-module-id="' + o.id +'"]').length )
|
14 |
-
|
15 |
-
var $_module = $('[data-module-id="' + o.id +'"]'),
|
16 |
-
|
17 |
-
|
18 |
-
$_module.closest('.czr-sektion').find('.czr-hover-placeholder').each( function(){ $(this).remove(); } );
|
19 |
-
$.when( $_module.append( $( '<div/>', {
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
) ).done( function() {
|
25 |
-
|
26 |
-
});
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
if ( ! _.has( o, 'id') || ! $('[data-module-id="' + o.id +'"]').length )
|
31 |
-
|
32 |
-
|
33 |
-
var $_module = $('[data-module-id="' + o.id +'"]');
|
34 |
-
$.when( $_module.find('.czr-hover-placeholder').fadeOut(200) ).done( function() {$_module.find('.czr-hover-placeholder').remove(); });
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
77 |
}
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
}
|
85 |
-
});
|
86 |
-
});
|
87 |
-
}
|
88 |
-
|
89 |
-
var czrPreviewConstructor = {
|
90 |
-
setting_cbs : {},
|
91 |
-
subsetting_cbs : {},//nested sub settings
|
92 |
-
input_cbs : {},
|
93 |
-
initialize: function() {
|
94 |
-
var self = this;
|
95 |
-
this.pre_setting_cbs = _.extend( self.pre_setting_cbs, self.getPreSettingCbs() );
|
96 |
-
this.setting_cbs = _.extend( self.setting_cbs, self.getSettingCbs() );
|
97 |
-
this.subsetting_cbs = _.extend( self.subsetting_cbs, self.getSubSettingCbs() );
|
98 |
-
this.input_cbs = _.extend( self.input_cbs, self.getInputCbs() );
|
99 |
-
|
100 |
-
this.syncData();
|
101 |
-
|
102 |
-
this.addCbs();
|
103 |
-
$( 'body' ).removeClass( 'wp-customizer-unloading' );
|
104 |
-
},
|
105 |
-
getPreSettingCbs : function() { return {}; },
|
106 |
-
getSettingCbs : function() { return {}; },
|
107 |
-
getSubSettingCbs : function() { return {}; },
|
108 |
-
getInputCbs : function() { return {}; },
|
109 |
-
syncData : function() {
|
110 |
-
api.preview.send( 'czr-query-data-ready', api.settings.czr_wpQueryInfos );
|
111 |
-
api.preview.send( 'houston-widget-settings',
|
112 |
-
_.extend( _wpWidgetCustomizerPreviewSettings,
|
113 |
-
{
|
114 |
-
availableWidgetLocations : _.values( api.settings.availableWidgetLocations )
|
115 |
-
}
|
116 |
-
)
|
117 |
-
);
|
118 |
-
api.preview.send(
|
119 |
-
'czr-partial-refresh-data',
|
120 |
-
typeof( undefined ) === typeof( _customizePartialRefreshExports ) ? {} : _customizePartialRefreshExports.partials
|
121 |
-
);
|
122 |
-
},
|
123 |
-
|
124 |
-
addCbs : function() {
|
125 |
-
var self = this;
|
126 |
-
api.preview.bind( 'pre_setting', function( args ) {
|
127 |
-
args = args || {};
|
128 |
-
var _setId = args.set_id;
|
129 |
-
if ( ! api.has( self._build_setId( _setId ) ) )
|
130 |
-
return;
|
131 |
-
var _opt_name = self._get_option_name( args.set_id );
|
132 |
-
if ( ! _.has( self.pre_setting_cbs, _opt_name ) || ! _.isFunction( self.pre_setting_cbs[ _opt_name ] ) )
|
133 |
-
return;
|
134 |
-
self.pre_setting_cbs[ _opt_name ]( args );
|
135 |
-
});
|
136 |
-
_.each( self.setting_cbs, function( _cb, _setId ) {
|
137 |
-
if ( ! api.has( self._build_setId( _setId ) ) )
|
138 |
-
return;
|
139 |
-
if ( _.isFunction( self.setting_cbs[ _setId ] ) ) {
|
140 |
-
api( self._build_setId(_setId) ).bind( self.setting_cbs[ _setId ] );
|
141 |
-
}
|
142 |
-
} );
|
143 |
-
api.preview.bind( 'sub_setting', function( args ) {
|
144 |
-
var _opt_name = self._get_option_name( args.set_id );
|
145 |
-
if ( ! _.has(self.subsetting_cbs, _opt_name) )
|
146 |
-
return;
|
147 |
-
if ( ! _.has( self.subsetting_cbs[ _opt_name ], args.changed_prop ) )
|
148 |
-
return;
|
149 |
-
self.subsetting_cbs[ _opt_name ][ args.changed_prop ]( args );
|
150 |
-
});
|
151 |
-
api.preview.bind( 'czr_input', function( args ) {
|
152 |
-
var _defaults = {
|
153 |
-
set_id : '',
|
154 |
-
module_id : '',
|
155 |
-
item_id : '',
|
156 |
-
input_id : '',
|
157 |
-
value : null
|
158 |
-
};
|
159 |
-
args = _.extend ( _defaults, args );
|
160 |
-
var _opt_name = self._get_option_name( args.set_id );
|
161 |
-
if ( ! _.has( self.input_cbs, _opt_name ) )
|
162 |
-
return;
|
163 |
-
if ( ! _.has( self.input_cbs[ _opt_name ], args.input_id ) )
|
164 |
-
return;
|
165 |
-
self.input_cbs[ _opt_name ][ args.input_id ]( args );
|
166 |
-
});
|
167 |
-
api.selectiveRefresh.bind( 'partial-content-rendered', function( params ) {
|
168 |
-
if ( ! _.has( params, 'partial' ) || ! _.has( params.partial, 'id' ) )
|
169 |
-
return;
|
170 |
-
var _shortOptName = params.partial.id;
|
171 |
-
api.preview.send( 'czr-partial-refresh-done', { set_id : self._build_setId( params.partial.id ) } );
|
172 |
});
|
173 |
-
},
|
174 |
-
_build_setId : function ( name ) {
|
175 |
-
var self = this;
|
176 |
-
if ( _.isEmpty( window.themeServerPreviewParams ) )
|
177 |
-
return name;
|
178 |
-
|
179 |
-
// do nothing if part of the the wp builtins setting
|
180 |
-
if ( ! _.isArray( themeServerPreviewParams.wpBuiltinSettings ) || _.contains( themeServerPreviewParams.wpBuiltinSettings, name ) )
|
181 |
-
return name;
|
182 |
-
|
183 |
-
var themeOptionsPrefix = themeServerPreviewParams.themeOptionsPrefix;
|
184 |
-
if ( _.isEmpty( themeOptionsPrefix ) )
|
185 |
-
return name;
|
186 |
-
|
187 |
-
return -1 == name.indexOf( themeOptionsPrefix ) ? [ themeOptionsPrefix + '[' , name , ']' ].join('') : name;
|
188 |
-
},
|
189 |
-
|
190 |
-
_get_option_name : function( name ) {
|
191 |
-
if ( _.isEmpty( window.themeServerPreviewParams ) )
|
192 |
-
return name;
|
193 |
-
|
194 |
-
var themeOptionsPrefix = themeServerPreviewParams.themeOptionsPrefix;
|
195 |
-
if ( _.isEmpty( themeOptionsPrefix ) )
|
196 |
-
return name;
|
197 |
-
|
198 |
-
var self = this;
|
199 |
-
return name.replace(/\[|\]/g, '').replace( themeOptionsPrefix, '');
|
200 |
-
},
|
201 |
-
_is_external : function( _href ) {
|
202 |
-
var _thisHref = $.trim( _href ),
|
203 |
-
_main_domain = (location.host).split('.').slice(-2).join('.'),
|
204 |
-
_reg = new RegExp( _main_domain );
|
205 |
-
|
206 |
-
if ( _thisHref !== '' && _thisHref != '#' && _isValidURL( _thisHref ) )
|
207 |
-
return ! _reg.test( _thisHref );
|
208 |
-
return;
|
209 |
-
},
|
210 |
-
_isValidURL : function(_url){
|
211 |
-
var _pattern = /(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
|
212 |
-
return _pattern.test( _url );
|
213 |
}
|
214 |
-
};//czrPreviewConstructor
|
215 |
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
|
219 |
} )( wp.customize, jQuery, _ );
|
1 |
|
2 |
( function( api, $, _ ) {
|
3 |
+
wp.customize.bind( 'preview-ready', function() {
|
4 |
+
// wp.customize.preview.bind('edit_module', function(o) {
|
5 |
+
// if ( ! _.has( o, 'id') || ! $('[data-module-id="' + o.id +'"]').length )
|
6 |
+
// return;
|
7 |
+
// $('html, body').animate({
|
8 |
+
// scrollTop : $('[data-module-id="' + o.id +'"]').offset().top - 50
|
9 |
+
// }, 'slow');
|
10 |
+
// });
|
11 |
+
|
12 |
+
// wp.customize.preview.bind('start_hovering_module', function(o) {
|
13 |
+
// if ( ! _.has( o, 'id') || ! $('[data-module-id="' + o.id +'"]').length )
|
14 |
+
// return;
|
15 |
+
// var $_module = $('[data-module-id="' + o.id +'"]'),
|
16 |
+
// _width = $_module.outerWidth(),
|
17 |
+
// _height = $_module.outerHeight();
|
18 |
+
// $_module.closest('.czr-sektion').find('.czr-hover-placeholder').each( function(){ $(this).remove(); } );
|
19 |
+
// $.when( $_module.append( $( '<div/>', {
|
20 |
+
// class : 'czr-hover-placeholder',
|
21 |
+
// style : 'width:' + _width +'px;height:' + _height +'px;line-height:' + _height +'px;',
|
22 |
+
// html : '<i class="material-icons">create</i>'
|
23 |
+
// })
|
24 |
+
// ) ).done( function() {
|
25 |
+
// $('.czr-hover-placeholder').css('opacity', 1).fitText( 0.3, { minFontSize: '50px', maxFontSize: '100px' } );
|
26 |
+
// });
|
27 |
+
// });
|
28 |
+
|
29 |
+
// wp.customize.preview.bind('stop_hovering_module', function(o) {
|
30 |
+
// if ( ! _.has( o, 'id') || ! $('[data-module-id="' + o.id +'"]').length )
|
31 |
+
// return;
|
32 |
+
|
33 |
+
// var $_module = $('[data-module-id="' + o.id +'"]');
|
34 |
+
// $.when( $_module.find('.czr-hover-placeholder').fadeOut(200) ).done( function() {$_module.find('.czr-hover-placeholder').remove(); });
|
35 |
+
// });
|
36 |
+
|
37 |
+
// wp.customize.preview.bind('edit_sek', function(o) {
|
38 |
+
// if ( ! _.has( o, 'id') || ! $('[data-sek-id="' + o.id +'"]').length )
|
39 |
+
// return;
|
40 |
+
// $('html, body').animate({
|
41 |
+
// scrollTop : $('[data-sek-id="' + o.id +'"]').offset().top - 50
|
42 |
+
// }, 'slow');
|
43 |
+
// });
|
44 |
+
|
45 |
+
// wp.customize.preview.bind('start_hovering_sek', function(o) {
|
46 |
+
// if ( ! _.has( o, 'id') || ! $('[data-sek-id="' + o.id +'"]').length )
|
47 |
+
// return;
|
48 |
+
// var $_sek = $('[data-sek-id="' + o.id +'"]'),
|
49 |
+
// _width = $_sek.outerWidth(),
|
50 |
+
// _height = $_sek.outerHeight();
|
51 |
+
// $_sek.closest('.czr-sektion').find('.czr-hover-placeholder').each( function(){ $(this).remove(); } );
|
52 |
+
// $.when( $_sek.append( $( '<div/>', {
|
53 |
+
// class : 'czr-hover-placeholder',
|
54 |
+
// style : 'width:' + _width +'px;height:' + _height +'px;line-height:' + _height +'px;',
|
55 |
+
// html : '<i class="material-icons">create</i>'
|
56 |
+
// })
|
57 |
+
// ) ).done( function() {
|
58 |
+
// $('.czr-hover-placeholder').css('opacity', 1).fitText( 0.3, { minFontSize: '50px', maxFontSize: '100px' } );
|
59 |
+
// });
|
60 |
+
// });
|
61 |
+
|
62 |
+
// wp.customize.preview.bind('stop_hovering_sek', function(o) {
|
63 |
+
// if ( ! _.has( o, 'id') || ! $('[data-sek-id="' + o.id +'"]').length )
|
64 |
+
// return;
|
65 |
+
|
66 |
+
// var $_sek = $('[data-sek-id="' + o.id +'"]');
|
67 |
+
// $.when( $_sek.find('.czr-hover-placeholder').fadeOut(200) ).done( function() {$_sek.find('.czr-hover-placeholder').remove(); });
|
68 |
+
// });
|
69 |
+
});// 'preview-ready'
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
if ( serverPreviewParams && ! serverPreviewParams.preview_ready_event_exists ) {
|
75 |
+
try { api.czr_preview = new api.CZR_preview(); } catch( _er_ ) {
|
76 |
+
console.log( "new api.CZR_preview() => error => ", _er_ );
|
77 |
+
}
|
78 |
}
|
79 |
+
else {
|
80 |
+
api.bind( 'preview-ready', function(){
|
81 |
+
api.preview.bind( 'active', function() {
|
82 |
+
try { api.czr_preview = new api.CZR_preview(); } catch( _er_ ) {
|
83 |
+
console.log( "new api.CZR_preview() => error => ", _er_ );
|
84 |
+
}
|
85 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
|
|
88 |
|
89 |
+
var czrPreviewConstructor = {
|
90 |
+
setting_cbs : {},
|
91 |
+
subsetting_cbs : {},//nested sub settings
|
92 |
+
input_cbs : {},
|
93 |
+
initialize: function() {
|
94 |
+
var self = this;
|
95 |
+
this.pre_setting_cbs = _.extend( self.pre_setting_cbs, self.getPreSettingCbs() );
|
96 |
+
this.setting_cbs = _.extend( self.setting_cbs, self.getSettingCbs() );
|
97 |
+
this.subsetting_cbs = _.extend( self.subsetting_cbs, self.getSubSettingCbs() );
|
98 |
+
this.input_cbs = _.extend( self.input_cbs, self.getInputCbs() );
|
99 |
+
|
100 |
+
this.syncData();
|
101 |
+
|
102 |
+
this.addCbs();
|
103 |
+
$( 'body' ).removeClass( 'wp-customizer-unloading' );
|
104 |
+
},
|
105 |
+
getPreSettingCbs : function() { return {}; },
|
106 |
+
getSettingCbs : function() { return {}; },
|
107 |
+
getSubSettingCbs : function() { return {}; },
|
108 |
+
getInputCbs : function() { return {}; },
|
109 |
+
syncData : function() {
|
110 |
+
api.preview.send( 'czr-query-data-ready', api.settings.czr_wpQueryInfos );
|
111 |
+
api.preview.send(
|
112 |
+
'czr-partial-refresh-data',
|
113 |
+
typeof( undefined ) === typeof( _customizePartialRefreshExports ) ? {} : _customizePartialRefreshExports.partials
|
114 |
+
);
|
115 |
+
},
|
116 |
+
|
117 |
+
addCbs : function() {
|
118 |
+
var self = this;
|
119 |
+
api.preview.bind( 'pre_setting', function( args ) {
|
120 |
+
args = args || {};
|
121 |
+
var _setId = args.set_id;
|
122 |
+
if ( ! api.has( self._build_setId( _setId ) ) )
|
123 |
+
return;
|
124 |
+
var _opt_name = self._get_option_name( args.set_id );
|
125 |
+
if ( ! _.has( self.pre_setting_cbs, _opt_name ) || ! _.isFunction( self.pre_setting_cbs[ _opt_name ] ) )
|
126 |
+
return;
|
127 |
+
self.pre_setting_cbs[ _opt_name ]( args );
|
128 |
+
});
|
129 |
+
_.each( self.setting_cbs, function( _cb, _setId ) {
|
130 |
+
if ( ! api.has( self._build_setId( _setId ) ) )
|
131 |
+
return;
|
132 |
+
if ( _.isFunction( self.setting_cbs[ _setId ] ) ) {
|
133 |
+
api( self._build_setId(_setId) ).bind( self.setting_cbs[ _setId ] );
|
134 |
+
}
|
135 |
+
} );
|
136 |
+
api.preview.bind( 'sub_setting', function( args ) {
|
137 |
+
var _opt_name = self._get_option_name( args.set_id );
|
138 |
+
if ( ! _.has(self.subsetting_cbs, _opt_name) )
|
139 |
+
return;
|
140 |
+
if ( ! _.has( self.subsetting_cbs[ _opt_name ], args.changed_prop ) )
|
141 |
+
return;
|
142 |
+
self.subsetting_cbs[ _opt_name ][ args.changed_prop ]( args );
|
143 |
+
});
|
144 |
+
api.preview.bind( 'czr_input', function( args ) {
|
145 |
+
var _defaults = {
|
146 |
+
set_id : '',
|
147 |
+
module_id : '',
|
148 |
+
item_id : '',
|
149 |
+
input_id : '',
|
150 |
+
value : null
|
151 |
+
};
|
152 |
+
args = _.extend ( _defaults, args );
|
153 |
+
var _opt_name = self._get_option_name( args.set_id );
|
154 |
+
if ( ! _.has( self.input_cbs, _opt_name ) )
|
155 |
+
return;
|
156 |
+
if ( ! _.has( self.input_cbs[ _opt_name ], args.input_id ) )
|
157 |
+
return;
|
158 |
+
self.input_cbs[ _opt_name ][ args.input_id ]( args );
|
159 |
+
});
|
160 |
+
api.selectiveRefresh.bind( 'partial-content-rendered', function( params ) {
|
161 |
+
if ( ! _.has( params, 'partial' ) || ! _.has( params.partial, 'id' ) )
|
162 |
+
return;
|
163 |
+
var _shortOptName = params.partial.id;
|
164 |
+
api.preview.send( 'czr-partial-refresh-done', { set_id : self._build_setId( params.partial.id ) } );
|
165 |
+
});
|
166 |
+
},
|
167 |
+
_build_setId : function ( name ) {
|
168 |
+
var self = this;
|
169 |
+
if ( _.isEmpty( window.themeServerPreviewParams ) )
|
170 |
+
return name;
|
171 |
+
|
172 |
+
// do nothing if part of the the wp builtins setting
|
173 |
+
if ( ! _.isArray( themeServerPreviewParams.wpBuiltinSettings ) || _.contains( themeServerPreviewParams.wpBuiltinSettings, name ) )
|
174 |
+
return name;
|
175 |
+
|
176 |
+
var themeOptionsPrefix = themeServerPreviewParams.themeOptionsPrefix;
|
177 |
+
if ( _.isEmpty( themeOptionsPrefix ) )
|
178 |
+
return name;
|
179 |
+
|
180 |
+
return -1 == name.indexOf( themeOptionsPrefix ) ? [ themeOptionsPrefix + '[' , name , ']' ].join('') : name;
|
181 |
+
},
|
182 |
+
|
183 |
+
_get_option_name : function( name ) {
|
184 |
+
if ( _.isEmpty( window.themeServerPreviewParams ) )
|
185 |
+
return name;
|
186 |
+
|
187 |
+
var themeOptionsPrefix = themeServerPreviewParams.themeOptionsPrefix;
|
188 |
+
if ( _.isEmpty( themeOptionsPrefix ) )
|
189 |
+
return name;
|
190 |
+
|
191 |
+
var self = this;
|
192 |
+
return name.replace(/\[|\]/g, '').replace( themeOptionsPrefix, '');
|
193 |
+
},
|
194 |
+
_is_external : function( _href ) {
|
195 |
+
var _thisHref = $.trim( _href ),
|
196 |
+
_main_domain = (location.host).split('.').slice(-2).join('.'),
|
197 |
+
_reg = new RegExp( _main_domain );
|
198 |
+
|
199 |
+
if ( _thisHref !== '' && _thisHref != '#' && _isValidURL( _thisHref ) )
|
200 |
+
return ! _reg.test( _thisHref );
|
201 |
+
return;
|
202 |
+
},
|
203 |
+
_isValidURL : function(_url){
|
204 |
+
var _pattern = /(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
|
205 |
+
return _pattern.test( _url );
|
206 |
+
}
|
207 |
+
};//czrPreviewConstructor
|
208 |
+
|
209 |
+
api.CZR_preview = api.Class.extend( czrPreviewConstructor );
|
210 |
|
211 |
|
212 |
} )( wp.customize, jQuery, _ );
|
inc/czr-base-fmk/assets/js/czr-preview-base.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(s,r,a){if(wp.customize.bind("preview-ready",function(){
|
1 |
+
!function(s,r,a){if(wp.customize.bind("preview-ready",function(){}),serverPreviewParams&&!serverPreviewParams.preview_ready_event_exists)try{s.czr_preview=new s.CZR_preview}catch(e){console.log("new api.CZR_preview() => error => ",e)}else s.bind("preview-ready",function(){s.preview.bind("active",function(){try{s.czr_preview=new s.CZR_preview}catch(e){console.log("new api.CZR_preview() => error => ",e)}})});var e={setting_cbs:{},subsetting_cbs:{},input_cbs:{},initialize:function(){var e=this;this.pre_setting_cbs=a.extend(e.pre_setting_cbs,e.getPreSettingCbs()),this.setting_cbs=a.extend(e.setting_cbs,e.getSettingCbs()),this.subsetting_cbs=a.extend(e.subsetting_cbs,e.getSubSettingCbs()),this.input_cbs=a.extend(e.input_cbs,e.getInputCbs()),this.syncData(),this.addCbs(),r("body").removeClass("wp-customizer-unloading")},getPreSettingCbs:function(){return{}},getSettingCbs:function(){return{}},getSubSettingCbs:function(){return{}},getInputCbs:function(){return{}},syncData:function(){s.preview.send("czr-query-data-ready",s.settings.czr_wpQueryInfos),s.preview.send("czr-partial-refresh-data","undefined"==typeof _customizePartialRefreshExports?{}:_customizePartialRefreshExports.partials)},addCbs:function(){var n=this;s.preview.bind("pre_setting",function(e){var t=(e=e||{}).set_id;if(s.has(n._build_setId(t))){var i=n._get_option_name(e.set_id);a.has(n.pre_setting_cbs,i)&&a.isFunction(n.pre_setting_cbs[i])&&n.pre_setting_cbs[i](e)}}),a.each(n.setting_cbs,function(e,t){s.has(n._build_setId(t))&&a.isFunction(n.setting_cbs[t])&&s(n._build_setId(t)).bind(n.setting_cbs[t])}),s.preview.bind("sub_setting",function(e){var t=n._get_option_name(e.set_id);a.has(n.subsetting_cbs,t)&&a.has(n.subsetting_cbs[t],e.changed_prop)&&n.subsetting_cbs[t][e.changed_prop](e)}),s.preview.bind("czr_input",function(e){e=a.extend({set_id:"",module_id:"",item_id:"",input_id:"",value:null},e);var t=n._get_option_name(e.set_id);a.has(n.input_cbs,t)&&a.has(n.input_cbs[t],e.input_id)&&n.input_cbs[t][e.input_id](e)}),s.selectiveRefresh.bind("partial-content-rendered",function(e){if(a.has(e,"partial")&&a.has(e.partial,"id")){e.partial.id;s.preview.send("czr-partial-refresh-done",{set_id:n._build_setId(e.partial.id)})}})},_build_setId:function(e){if(a.isEmpty(window.themeServerPreviewParams))return e;if(!a.isArray(themeServerPreviewParams.wpBuiltinSettings)||a.contains(themeServerPreviewParams.wpBuiltinSettings,e))return e;var t=themeServerPreviewParams.themeOptionsPrefix;return a.isEmpty(t)?e:-1==e.indexOf(t)?[t+"[",e,"]"].join(""):e},_get_option_name:function(e){if(a.isEmpty(window.themeServerPreviewParams))return e;var t=themeServerPreviewParams.themeOptionsPrefix;if(a.isEmpty(t))return e;return e.replace(/\[|\]/g,"").replace(t,"")},_is_external:function(e){var t=r.trim(e),i=location.host.split(".").slice(-2).join("."),n=new RegExp(i);if(""!==t&&"#"!=t&&_isValidURL(t))return!n.test(t)},_isValidURL:function(e){return/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(e)}};s.CZR_preview=s.Class.extend(e)}(wp.customize,jQuery,_);
|
inc/czr-base-fmk/czr-base-fmk.php
CHANGED
@@ -449,18 +449,6 @@ if ( ! class_exists( 'CZR_Fmk_Base_Ajax_Filter' ) ) :
|
|
449 |
<?php
|
450 |
break;
|
451 |
|
452 |
-
// only used in the Widget module for the Hueman theme
|
453 |
-
// to prevent the removal of the theme's builtin widget zones
|
454 |
-
case 'ru-item-part' :
|
455 |
-
?>
|
456 |
-
<div class="<?php echo $css_attr['item_header']; ?> czr-custom-model">
|
457 |
-
<div class="<?php echo $css_attr['item_title']; ?> <?php echo $css_attr['item_sort_handle']; ?>"><h4>{{ data.title }}</h4></div>
|
458 |
-
<div class="<?php echo $css_attr['item_btns']; ?>"><a title="<?php _e('Edit', 'nimble-builder'); ?>" href="javascript:void(0);" class="fas fa-pencil-alt <?php echo $css_attr['edit_view_btn']; ?>"></a></div>
|
459 |
-
</div>
|
460 |
-
</div>
|
461 |
-
<?php
|
462 |
-
break;
|
463 |
-
|
464 |
case 'rud-item-alert-part' :
|
465 |
?>
|
466 |
<p class="czr-item-removal-title"><?php _e('Are you sure you want to remove : <strong>{{ data.title }} ?</strong>', 'nimble-builder'); ?></p>
|
@@ -1270,6 +1258,8 @@ if ( ! class_exists( 'CZR_Fmk_Base' ) ) :
|
|
1270 |
if ( ! is_array( $this->registered_modules ) || empty( $this->registered_modules ) )
|
1271 |
return;
|
1272 |
|
|
|
|
|
1273 |
// loop on each registered modules
|
1274 |
foreach ( $this->registered_modules as $module_type => $params ) {
|
1275 |
$params = wp_parse_args( $params, $this -> default_dynamic_module_params );
|
@@ -1278,13 +1268,17 @@ if ( ! class_exists( 'CZR_Fmk_Base' ) ) :
|
|
1278 |
// Enqueue the list of registered scripts
|
1279 |
if ( ! empty( $control_js_params ) ) {
|
1280 |
foreach ( $control_js_params as $handle => $script_args ) {
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
|
|
|
|
|
|
|
|
1288 |
}
|
1289 |
|
1290 |
}
|
449 |
<?php
|
450 |
break;
|
451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
case 'rud-item-alert-part' :
|
453 |
?>
|
454 |
<p class="czr-item-removal-title"><?php _e('Are you sure you want to remove : <strong>{{ data.title }} ?</strong>', 'nimble-builder'); ?></p>
|
1258 |
if ( ! is_array( $this->registered_modules ) || empty( $this->registered_modules ) )
|
1259 |
return;
|
1260 |
|
1261 |
+
$wp_scripts = wp_scripts();
|
1262 |
+
|
1263 |
// loop on each registered modules
|
1264 |
foreach ( $this->registered_modules as $module_type => $params ) {
|
1265 |
$params = wp_parse_args( $params, $this -> default_dynamic_module_params );
|
1268 |
// Enqueue the list of registered scripts
|
1269 |
if ( ! empty( $control_js_params ) ) {
|
1270 |
foreach ( $control_js_params as $handle => $script_args ) {
|
1271 |
+
if ( ! isset( $wp_scripts->registered[$handle] ) ) {
|
1272 |
+
wp_enqueue_script(
|
1273 |
+
$handle,
|
1274 |
+
array_key_exists( 'src', $script_args ) ? $script_args['src'] : null,
|
1275 |
+
array_key_exists( 'deps', $script_args ) ? $script_args['deps'] : null,
|
1276 |
+
array_key_exists( 'ver', $script_args ) ? $script_args['ver'] : null,
|
1277 |
+
array_key_exists( 'in_footer', $script_args ) ? $script_args['in_footer'] : false
|
1278 |
+
);
|
1279 |
+
} else {
|
1280 |
+
error_log( __CLASS__ . '::' . __FUNCTION__ . " => handle already registered : " . $handle . " , this asset won't be enqueued => " . $script_args['src'] );
|
1281 |
+
}
|
1282 |
}
|
1283 |
|
1284 |
}
|
inc/czr-skope/index.php
CHANGED
@@ -1,5 +1,16 @@
|
|
1 |
<?php
|
2 |
namespace Nimble;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
//Creates a new instance
|
4 |
function Flat_Skop_Base( $params = array() ) {
|
5 |
return Flat_Skop_Base::skp_get_instance( $params );
|
1 |
<?php
|
2 |
namespace Nimble;
|
3 |
+
if ( did_action('nimble_skope_loaded') ) {
|
4 |
+
error_log( __FILE__ . ' => The czr_base_fmk has already been loaded' );
|
5 |
+
return;
|
6 |
+
}
|
7 |
+
|
8 |
+
// Set the namsepace as a global so we can use it when fired from another theme/plugin using the fmk
|
9 |
+
global $czr_skope_namespace;
|
10 |
+
$czr_skope_namespace = __NAMESPACE__ . '\\';
|
11 |
+
|
12 |
+
do_action( 'nimble_skope_loaded' );
|
13 |
+
|
14 |
//Creates a new instance
|
15 |
function Flat_Skop_Base( $params = array() ) {
|
16 |
return Flat_Skop_Base::skp_get_instance( $params );
|
inc/sektions/ccat-sektions.php
CHANGED
@@ -1476,7 +1476,7 @@ function sek_set_input_tmpl___line_height( $input_id, $input_data ) {
|
|
1476 |
<?php
|
1477 |
}
|
1478 |
?><?php
|
1479 |
-
// The base fmk is loaded
|
1480 |
add_action( 'after_setup_theme', '\Nimble\sek_register_modules', 50 );
|
1481 |
function sek_register_modules() {
|
1482 |
foreach( [
|
@@ -3007,10 +3007,10 @@ class Sek_Dyn_CSS_Handler {
|
|
3007 |
*/
|
3008 |
private function _schedule_css_and_fonts_enqueuing_or_printing_maybe_on_custom_hook() {
|
3009 |
if ( $this->hook ) {
|
3010 |
-
add_action( $this->hook, array( $this, '
|
3011 |
} else {
|
3012 |
//enqueue or print
|
3013 |
-
$this->
|
3014 |
}
|
3015 |
}
|
3016 |
|
@@ -3028,7 +3028,7 @@ class Sek_Dyn_CSS_Handler {
|
|
3028 |
* @access public
|
3029 |
* @return void()
|
3030 |
*/
|
3031 |
-
public function
|
3032 |
// CSS FILE
|
3033 |
//case enqueue file : front end + user with customize caps not logged in
|
3034 |
if ( self::MODE_FILE == $this->mode ) {
|
@@ -3066,7 +3066,7 @@ class Sek_Dyn_CSS_Handler {
|
|
3066 |
|
3067 |
//if $this->mode != 'file' or the file enqueuing didn't go through (fall back)
|
3068 |
//print inline style
|
3069 |
-
if ( $this->css_string_to_enqueue_or_print ) {
|
3070 |
$dep = array_pop( $this->dep );
|
3071 |
|
3072 |
if ( !$dep || wp_style_is( $dep, 'done' ) || !wp_style_is( $dep, 'done' ) && ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
@@ -4247,6 +4247,14 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
|
|
4247 |
}
|
4248 |
}
|
4249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4250 |
// Walk a model tree recursively and render each level with a specific template
|
4251 |
function render( $model = array(), $location = 'loop_start' ) {
|
4252 |
//sek_error_log('LEVEL MODEL IN ::RENDER()', $model );
|
@@ -4272,19 +4280,20 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
|
|
4272 |
|
4273 |
switch ( $level ) {
|
4274 |
case 'location' :
|
|
|
4275 |
?>
|
4276 |
-
|
4277 |
-
|
4278 |
-
|
4279 |
-
|
4280 |
-
|
4281 |
-
|
4282 |
-
|
4283 |
-
|
4284 |
-
|
4285 |
-
|
4286 |
-
|
4287 |
-
|
4288 |
<?php
|
4289 |
break;
|
4290 |
|
1476 |
<?php
|
1477 |
}
|
1478 |
?><?php
|
1479 |
+
// The base fmk is loaded @after_setup_theme:10
|
1480 |
add_action( 'after_setup_theme', '\Nimble\sek_register_modules', 50 );
|
1481 |
function sek_register_modules() {
|
1482 |
foreach( [
|
3007 |
*/
|
3008 |
private function _schedule_css_and_fonts_enqueuing_or_printing_maybe_on_custom_hook() {
|
3009 |
if ( $this->hook ) {
|
3010 |
+
add_action( $this->hook, array( $this, 'sek_dyn_css_enqueue_or_print_and_google_fonts_print' ), $this->priority );
|
3011 |
} else {
|
3012 |
//enqueue or print
|
3013 |
+
$this->sek_dyn_css_enqueue_or_print_and_google_fonts_print();
|
3014 |
}
|
3015 |
}
|
3016 |
|
3028 |
* @access public
|
3029 |
* @return void()
|
3030 |
*/
|
3031 |
+
public function sek_dyn_css_enqueue_or_print_and_google_fonts_print() {
|
3032 |
// CSS FILE
|
3033 |
//case enqueue file : front end + user with customize caps not logged in
|
3034 |
if ( self::MODE_FILE == $this->mode ) {
|
3066 |
|
3067 |
//if $this->mode != 'file' or the file enqueuing didn't go through (fall back)
|
3068 |
//print inline style
|
3069 |
+
if ( $this->css_string_to_enqueue_or_print && ! $this->enqueued_or_printed ) {
|
3070 |
$dep = array_pop( $this->dep );
|
3071 |
|
3072 |
if ( !$dep || wp_style_is( $dep, 'done' ) || !wp_style_is( $dep, 'done' ) && ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
4247 |
}
|
4248 |
}
|
4249 |
|
4250 |
+
|
4251 |
+
|
4252 |
+
|
4253 |
+
|
4254 |
+
|
4255 |
+
|
4256 |
+
|
4257 |
+
|
4258 |
// Walk a model tree recursively and render each level with a specific template
|
4259 |
function render( $model = array(), $location = 'loop_start' ) {
|
4260 |
//sek_error_log('LEVEL MODEL IN ::RENDER()', $model );
|
4280 |
|
4281 |
switch ( $level ) {
|
4282 |
case 'location' :
|
4283 |
+
//empty sektions wrapper are only printed when customizing
|
4284 |
?>
|
4285 |
+
<?php if ( skp_is_customizing() || ( ! skp_is_customizing() && ! empty( $collection ) ) ) : ?>
|
4286 |
+
<div class="sektion-wrapper" data-sek-level="location" data-sek-id="<?php echo $id ?>">
|
4287 |
+
<?php
|
4288 |
+
$this -> parent_model = $model;
|
4289 |
+
foreach ( $collection as $_key => $sec_model ) { $this -> render( $sec_model ); }
|
4290 |
+
?>
|
4291 |
+
|
4292 |
+
<?php if ( empty( $collection ) ) : ?>
|
4293 |
+
<div class="sek-empty-location-placeholder"></div>
|
4294 |
+
<?php endif; ?>
|
4295 |
+
</div>
|
4296 |
+
<?php endif; ?>
|
4297 |
<?php
|
4298 |
break;
|
4299 |
|
nimble-builder.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Nimble Builder
|
4 |
* Description: Drag and drop page builder for the WordPress live customizer.
|
5 |
-
* Version: 1.0.
|
6 |
* Text Domain: nimble-builder
|
7 |
* Author: Press Customizr
|
8 |
* Author URI: https://presscustomizr.com
|
@@ -11,7 +11,7 @@
|
|
11 |
/* ------------------------------------------------------------------------- *
|
12 |
* CONSTANTS
|
13 |
/* ------------------------------------------------------------------------- */
|
14 |
-
$current_version = "1.0.
|
15 |
if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
|
16 |
if ( !defined( 'NIMBLE_ASSETS_VERSION' ) ) {
|
17 |
define( 'NIMBLE_ASSETS_VERSION', ( ( defined( 'NIMBLE_DEV' ) && NIMBLE_DEV ) || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) ? time() : NIMBLE_VERSION );
|
2 |
/**
|
3 |
* Plugin Name: Nimble Builder
|
4 |
* Description: Drag and drop page builder for the WordPress live customizer.
|
5 |
+
* Version: 1.0.4
|
6 |
* Text Domain: nimble-builder
|
7 |
* Author: Press Customizr
|
8 |
* Author URI: https://presscustomizr.com
|
11 |
/* ------------------------------------------------------------------------- *
|
12 |
* CONSTANTS
|
13 |
/* ------------------------------------------------------------------------- */
|
14 |
+
$current_version = "1.0.4";
|
15 |
if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
|
16 |
if ( !defined( 'NIMBLE_ASSETS_VERSION' ) ) {
|
17 |
define( 'NIMBLE_ASSETS_VERSION', ( ( defined( 'NIMBLE_DEV' ) && NIMBLE_DEV ) || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) ? time() : NIMBLE_VERSION );
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: customizer, editor, page builder, drag and drop
|
|
6 |
Requires at least: 4.7
|
7 |
Requires PHP: 5.4
|
8 |
Tested up to: 4.9.6
|
9 |
-
Stable tag: 1.0.
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
@@ -41,18 +41,23 @@ The Nimble Builder is a lightweight drag and drop page builder designed to work
|
|
41 |
Yes, the Nimble Builder works with any WordPress theme. If you experience any problem with a particular theme, please report it in the [plugin support forum](https://wordpress.org/support/plugin/nimble-builder).
|
42 |
|
43 |
== Upgrade Notice ==
|
44 |
-
= 1.0.
|
45 |
-
* fixed :
|
46 |
-
* fixed :
|
47 |
-
* fixed :
|
48 |
-
*
|
49 |
-
*
|
50 |
-
*
|
51 |
-
* added : encapsulate the singular post / page content inside a dom element so we can generate a dynamic ui around it when customizing + add an edit link to the post or page
|
52 |
-
* added : introduced a loader overlay printed when the markup of any level being refreshed.
|
53 |
-
* added : a "+" icon to add module from the sections dynamic UI
|
54 |
|
55 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
= 1.0.3 : June 9th, 2018 =
|
57 |
* fixed : missing dropzones around nested sections
|
58 |
* fixed : reseting the spacing of a level was not changing the main setting.
|
6 |
Requires at least: 4.7
|
7 |
Requires PHP: 5.4
|
8 |
Tested up to: 4.9.6
|
9 |
+
Stable tag: 1.0.4
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
41 |
Yes, the Nimble Builder works with any WordPress theme. If you experience any problem with a particular theme, please report it in the [plugin support forum](https://wordpress.org/support/plugin/nimble-builder).
|
42 |
|
43 |
== Upgrade Notice ==
|
44 |
+
= 1.0.4 : June 14th, 2018 =
|
45 |
+
* fixed : when margins and paddings are not defined ( number field emptied ), no related CSS properties should be printed.
|
46 |
+
* fixed : sek-sektion-inner should not have a padding of 15px on front.
|
47 |
+
* fixed : a nested sektion should reset its parent column padding.
|
48 |
+
* fixed : empty sektions wrapper should only be printed when customizing.
|
49 |
+
* fixed : prevent element in the wp content to be displayed out of the wp-content-wrapper when previewing.
|
50 |
+
* fixed : dynamic CSS can be printed twice : inline and enqueued as CSS file when user logged in.
|
|
|
|
|
|
|
51 |
|
52 |
== Changelog ==
|
53 |
+
= 1.0.4 : June 14th, 2018 =
|
54 |
+
* fixed : when margins and paddings are not defined ( number field emptied ), no related CSS properties should be printed.
|
55 |
+
* fixed : sek-sektion-inner should not have a padding of 15px on front.
|
56 |
+
* fixed : a nested sektion should reset its parent column padding.
|
57 |
+
* fixed : empty sektions wrapper should only be printed when customizing.
|
58 |
+
* fixed : prevent element in the wp content to be displayed out of the wp-content-wrapper when previewing.
|
59 |
+
* fixed : dynamic CSS can be printed twice : inline and enqueued as CSS file when user logged in.
|
60 |
+
|
61 |
= 1.0.3 : June 9th, 2018 =
|
62 |
* fixed : missing dropzones around nested sections
|
63 |
* fixed : reseting the spacing of a level was not changing the main setting.
|