Version Description
March 13th 2021 = * fixed : [tiny MCE editor][customizer] make sure window.tinyMCE global is declared * improved : [customizer][font-picker and icon picker] automatically opens the select options after first click * improved : [customizer] added a link to the documentation to the template notification + various wording style improvements
Download this release
Release Info
Developer | nikeo |
Plugin | Nimble Page Builder |
Version | 2.2.6 |
Comparing to | |
See all releases |
Code changes from version 2.2.2 to 2.2.6
- assets/czr/sek/css/sek-control.css +8 -0
- assets/czr/sek/css/sek-control.min.css +1 -1
- assets/czr/sek/js/ccat-sek-control.js +131 -61
- assets/czr/sek/js/ccat-sek-control.min.js +1 -1
- assets/czr/sek/js/ccat-sek-preview.js +2 -2
- assets/czr/sek/js/ccat-sek-preview.min.js +1 -1
- inc/admin/nb-options.php +2 -2
- inc/admin/nimble-admin.php +5 -5
- inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.js +1 -1
- inc/sektions/ccat-constants-and-helper-functions.php +404 -174
- inc/sektions/ccat-czr-sektions.php +40 -87
- inc/sektions/ccat-sektions-base.php +23 -18
- inc/sektions/ccat-sektions-front-modules.php +14 -14
- inc/sektions/seks_setting_class.php +34 -8
- nimble-builder.php +4 -2
- readme.txt +23 -127
- tmpl/modules/accordion_tmpl.php +2 -2
- tmpl/modules/button_module_tmpl.php +1 -1
- tmpl/modules/heading_module_tmpl.php +2 -2
- tmpl/modules/img_slider_tmpl.php +1 -1
- tmpl/modules/quote_module_tmpl.php +2 -2
- tmpl/modules/shortcode_module_tmpl.php +1 -1
- tmpl/modules/simple_html_module_tmpl.php +1 -1
- tmpl/modules/tinymce_editor_module_tmpl.php +1 -1
assets/czr/sek/css/sek-control.css
CHANGED
@@ -1506,6 +1506,10 @@ body.nimble-top-bar-visible #nimble-top-bar {
|
|
1506 |
/* flex-direction: column; */
|
1507 |
flex: 0 0 100%;
|
1508 |
max-width: 100%;
|
|
|
|
|
|
|
|
|
1509 |
}
|
1510 |
.rtl #nimble-top-bar .sek-nimble-doc {
|
1511 |
left:10px;
|
@@ -1528,6 +1532,10 @@ body.nimble-top-bar-visible #nimble-top-bar {
|
|
1528 |
#nimble-top-bar .sek-notifications {
|
1529 |
max-width: 410px;
|
1530 |
overflow: hidden;
|
|
|
|
|
|
|
|
|
1531 |
}
|
1532 |
|
1533 |
/* May 2020 : debug mode notification */
|
1506 |
/* flex-direction: column; */
|
1507 |
flex: 0 0 100%;
|
1508 |
max-width: 100%;
|
1509 |
+
font-size: 12px;
|
1510 |
+
}
|
1511 |
+
#nimble-top-bar .sek-nimble-doc .sek-pointer {
|
1512 |
+
text-decoration: underline;
|
1513 |
}
|
1514 |
.rtl #nimble-top-bar .sek-nimble-doc {
|
1515 |
left:10px;
|
1532 |
#nimble-top-bar .sek-notifications {
|
1533 |
max-width: 410px;
|
1534 |
overflow: hidden;
|
1535 |
+
padding: 0 10px;
|
1536 |
+
font-size: 12px;
|
1537 |
+
text-decoration: underline;
|
1538 |
+
cursor: pointer;
|
1539 |
}
|
1540 |
|
1541 |
/* May 2020 : debug mode notification */
|
assets/czr/sek/css/sek-control.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@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'}#customize-preview iframe,#nimble-level-tree{-webkit-transition:top .3s ease-in-out;-moz-transition:top,.3s ease-in-out;-ms-transition:top,.3s ease-in-out;-o-transition:top,.3s ease-in-out;transition:top .3s ease-in-out}#customize-preview iframe{z-index:1}ul[id*=sub-accordion-section-__nimble__]{background:#f2f2f2!important}#customize-theme-controls .customize-pane-child[id*="__nimble__"]{-webkit-transition:unset;-o-transition:unset;transition:unset}li[id*="__nimble__"].customize-control{margin:8px 0;padding:2px;width:calc(100% - 4px);border:1px solid rgba(221,221,221,.43);box-shadow:1px 1px 2px 0 rgba(75,75,85,.2);-webkit-box-shadow:1px 1px 2px 0 rgba(75,75,85,.2);background-color:#fff}li[id*="__nimble__"].customize-control span.customize-control-title:first-child{margin-left:21px}#customize-theme-controls ul[id*=sub-accordion-section-__nimble__].open{top:0!important}.sek-float-right{float:right}.sek-float-left{float:left}.sek-flex-vertical-center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}li[id^=accordion-section-__nimble__]{margin-top:16px}li[id^=accordion-section-__nimble__]>h3{border-top:1px solid #ddd}[data-sek-content-type]{float:left;padding:0;margin:1.8%;text-align:center;cursor:move;-webkit-transition:-webkit-box-shadow .2s ease;transition:-webkit-box-shadow .2s ease;-o-transition:box-shadow .2s ease;transition:box-shadow .2s ease;transition:box-shadow .2s ease,-webkit-box-shadow .2s ease;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.25);box-shadow:0 2px 5px rgba(0,0,0,.25);border-radius:4px}[data-sek-content-type=module]{width:29%;height:130px;position:relative}.sek-is-pro{position:absolute;top:5px;z-index:10;right:5px;height:20px;width:28px}[data-sek-content-type=preset_section]:hover .sek-is-pro img,[data-sek-tmpl-item-id]:hover .sek-is-pro img{opacity:.5}li[id*=sek_draggable_modules] [data-sek-content-type=preset_section]{width:29%;height:130px}.sek-content-type-wrapper [data-sek-content-type=preset_section]{width:95%;height:165px;position:relative;overflow:hidden}.sek-demo-link{position:absolute;bottom:-22px;z-index:20;height:18px;width:100%;padding:2px 0;background:#000;background-color:rgba(0,0,0,.5);color:#fff;font-size:13px;cursor:pointer;-webkit-transition:bottom .2s ease-in-out;-moz-transition:bottom,.2s ease-in-out;-ms-transition:bottom,.2s ease-in-out;-o-transition:bottom,.2s ease-in-out;transition:bottom .2s ease-in-out}.sek-demo-link a,.sek-demo-link a:focus,.sek-demo-link a:visited,.sek-demo-link i{color:#fff}.sek-demo-link a{text-decoration:none;text-transform:uppercase;font-size:12px}.sek-demo-link a:hover{color:#fff;text-decoration:underline}[data-sek-content-type=preset_section]:hover .sek-demo-link{bottom:0}[data-sek-content-type=preset_section] .sek-overlay{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:0;-webkit-transition:opacity .35s ease;transition:opacity .35s ease;-o-transition:opacity .35s ease}[data-sek-content-type=preset_section]:hover .sek-overlay{opacity:.15}[data-sek-content-type][draggable=true]:hover{-webkit-box-shadow:0 12px 20px rgba(0,0,0,.2);box-shadow:0 12px 20px rgba(0,0,0,.2)}[data-sek-content-type][draggable=false]{background:#eee;opacity:.8}.sek-user-section-wrapper{margin-bottom:15px;float:left;width:100%}.sek-user-section-wrapper [data-sek-content-type=preset_section] .sek-overlay{opacity:.4}.sek-user-section-wrapper [data-sek-content-type=preset_section]:hover .sek-overlay{opacity:.5}.sek-user-section-wrapper [data-sek-is-user-section=true]{height:165px;margin:0;width:97%}.sek-user-section-wrapper .sek-sec-thumb{position:absolute;opacity:.5;z-index:0;top:0;bottom:0;height:100%;width:100%}.sek-user-section-wrapper .sek-sec-info{position:relative;color:#fff;padding:2%;overflow:hidden;height:100%;max-height:138px;padding:10px}.sek-sec-info .sec-title{color:#fff;margin:0;line-height:20px;max-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sek-sec-info .sec-date,.sek-sec-info .sec-desc{margin:0;margin-top:5px;font-size:12px}.sek-sec-info .sec-date{font-size:italic}.sek-sec-info>.edit-user-sec,.sek-sec-info>.remove-user-sec{cursor:pointer;font-size:16px;width:30px;height:30px;color:#535353;background:rgba(255,255,255,.7);border-radius:30px;opacity:.3;-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);-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;position:absolute}.sek-sec-info>.remove-user-sec{bottom:0;right:5px}.sek-sec-info>.edit-user-sec{bottom:0;left:5px}.sek-sec-info:hover>.remove-user-sec{opacity:.7}.sek-sec-info:hover>.edit-user-sec{opacity:.7}.sek-sec-info>.remove-user-sec:hover{opacity:.95;color:red}.sek-sec-info>.edit-user-sec:hover{opacity:.95;color:#000}.sek-dragging [data-sek-content-type]{-webkit-box-shadow:0 2px 5px rgba(0,0,0,.25)!important;box-shadow:0 2px 5px rgba(0,0,0,.25)!important}.sek-dragged{background:#33b3db3d;background:rgba(51,179,219,.24)}[data-sek-content-type] .sek-module-icon{display:block;padding:0}[data-sek-content-type] .sek-module-icon .nimble-module-icons{font-size:3rem;max-width:100%;color:#878787;max-height:86px}[data-sek-content-type] .sek-module-icon.is-font-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%;min-height:70%}[data-sek-content-type] .sek-module-icon.is-font-icon i{font-size:35px}[data-sek-content-type] .sek-module-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 6px 0;font-size:.75rem;height:45px;justify-content:center;position:relative;top:-18px}.sek-centered-module-title{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.sek-new-label{background:#ff0;border:1px solid #ff0;padding:3px 4px;line-height:12px;border-radius:8px;font-size:12px}.sek-accord-title{color:#4b4a4a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:120px;height:23px;line-height:22px;font-size:13px;float:left;padding-left:10px}.sek-pad-marg-inner{font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:10px auto 10px auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:0;background-color:#e6e6e6;border:1px solid #c5c5c5;height:192px;width:232px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-transition:background-color .2s ease;-o-transition:background-color .2s ease;transition:background-color .2s ease}.sek-pm-top-bottom-wrap{height:46px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-flex-center-stretch{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.sek-pm-input{width:35px;height:15px;padding:0;text-align:center;font-family:Source Sans Pro;padding:5px;border-radius:3px;text-align:left;font-size:13px;outline:0;-webkit-box-shadow:inset 1px 1px 3px rgba(0,0,0,.15);box-shadow:inset 1px 1px 3px rgba(0,0,0,.15);border:1px solid #ced6d9}.sek-pm-input-parent .sek-pm-input{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;display:block;margin:auto 3px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:1px 3px;font-size:12px;font-weight:300;min-width:34px;min-height:20px;color:#313131}.sek-pm-middle-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;height:100px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.sek-pm-margin-left,.sek-pm-margin-right{width:46px}.sek-pm-padding-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background-color:#fff;border:1px solid #ced6d9;height:100px;width:140px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:5px;-webkit-transition:background-color .2s ease;-o-transition:background-color .2s ease;transition:background-color .2s ease;-webkit-box-sizing:border-box;box-sizing:border-box;margin:auto}.sek-flex-justify-center{min-height:0;min-width:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-flex-space-between{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.sek-pm-input-parent{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex}.sek-pm-input-parent .sek-pm-input{min-height:25px;min-width:40px;background-color:#fff}.sek-pm-input-parent .sek-pm-input{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;display:block;margin:auto 3px!important;-webkit-box-sizing:border-box;box-sizing:border-box;padding:1px 3px;font-size:12px;font-weight:300;min-width:34px;min-height:20px;color:#313131;width:40px!important;text-align:center}.sek-pm-padding-wrapper label{margin:0}.sek-pad-marg-inner label{-webkit-box-flex:0;-ms-flex:0;flex:0}.reset-spacing-wrap{padding:10px 0 0;font-size:.8em;text-decoration:underline;cursor:pointer;text-align:center}.reset-spacing-wrap:hover{color:#006799}.sek-bg-pos-wrapper{padding:10px;text-align:center;display:inline-block;width:90px;height:90px}.sek-bg-pos-wrapper{display:inline-block;width:90px;height:90px}.sek-bg-pos-wrapper .sek-bg-pos{cursor:pointer;width:24px;height:24px;margin:3px;float:left}.sek-bg-pos-wrapper input[type=radio]{display:none}.sek-bg-pos-wrapper .sek-bg-pos span{display:inline-block;width:100%;height:100%;border-radius:6px;background:#e6e6e6 no-repeat center;-webkit-transition:background-color .2s ease;-o-transition:background-color .2s ease;transition:background-color .2s ease}.sek-bg-pos-wrapper .sek-bg-pos span:hover{background-color:#33b3db}.sek-bg-pos-wrapper .sek-bg-pos span:hover svg{visibility:visible}.sek-bg-pos-wrapper .sek-bg-pos input[type=radio]:checked+span{background-color:#33b3db}.sek-bg-pos-wrapper .sek-bg-pos input[type=radio]:checked+span svg{visibility:visible}.sek-bg-pos-wrapper .sek-bg-pos span svg{visibility:hidden;shape-rendering:crispEdges}.sek-bg-pos-wrapper .sek-svg-bg-pos{fill:#fff}div[data-sek-align]{margin:0 5px;padding:4px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;position:relative;text-align:center;width:23px;height:24px;top:-4px;border-radius:4px;cursor:pointer}div[data-input-type=horizTextAlignmentWithDeviceSwitcher] .czr-input{text-align:center}div[data-input-type=horizTextAlignmentWithDeviceSwitcher] .sek-h-align-wrapper{display:inline-block}div[data-input-type=horizAlignmentWithDeviceSwitcher] .czr-input{text-align:center}div[data-input-type=horizAlignmentWithDeviceSwitcher] .sek-h-align-wrapper{display:inline-block}.sek-h-align-wrapper .sek-align-icons{float:right}div[data-sek-align]:hover{-webkit-box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff;box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff}div[data-sek-align].selected{outline:0;color:#fff;-webkit-box-shadow:none;box-shadow:none;background:#555d66}div[data-sek-grid-layout]{margin:0 5px;padding:1px 3px 1px 1px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;position:relative;text-align:center;border-radius:4px;cursor:pointer}div[data-sek-grid-layout] i{font-size:50px}div[data-input-type=grid_layout] .czr-input{text-align:center}div[data-input-type=grid_layout] .sek-grid-layout-wrapper{display:inline-block}.sek-grid-layout-wrapper .sek-grid-icons{float:right}div[data-sek-grid-layout]:hover{-webkit-box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff;box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff}div[data-sek-grid-layout].selected{outline:0;color:#fff;-webkit-box-shadow:none;box-shadow:none;background:#33b3db}.customize-control select[data-czrtype=categories]{height:28px}.sek-input-device-switcher .sek-switcher:before,.sek-mobile-device-icons .sek-switcher:before{display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/30px dashicons;vertical-align:top;color:#656a6f;position:relative;top:-5px}.sek-input-device-switcher .sek-switcher{cursor:pointer}.sek-input-device-switcher .sek-switcher,.sek-mobile-device-icons .sek-switcher{background:0 0;border:none;padding:0 1px;margin:0 0 0 -2px;box-shadow:none;border-top:1px solid transparent;border-bottom:4px solid transparent;-webkit-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;-o-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out}.sek-input-device-switcher .sek-switcher:focus,.sek-input-device-switcher .sek-switcher:hover{background-color:#fff}.sek-input-device-switcher .sek-switcher.active:before{color:#191e23}.sek-input-device-switcher .sek-switcher:focus:before,.sek-input-device-switcher .sek-switcher:hover:before{color:#0073aa}.sek-input-device-switcher .preview-desktop:before,.sek-mobile-device-icons .preview-desktop:before{content:"\f472"}.sek-input-device-switcher .preview-tablet:before,.sek-mobile-device-icons .preview-tablet:before{content:"\f471"}.sek-input-device-switcher .preview-mobile:before,.sek-mobile-device-icons .preview-mobile:before{content:"\f470"}.sek-borders{width:100%;float:left;margin-bottom:8px}.sek-borders>div{float:left;width:100%}.sek-borders .sek-range-unit-wrapper>div{float:left}.sek-borders .sek-border-type-wrapper{margin-bottom:5px}.sek-borders .sek-range-unit-wrapper{margin-bottom:5px}.sek-borders .sek-range-unit-wrapper .sek-unit-wrapper{float:right}.sek-borders .sek-color-wrapper{width:100%}.sek-borders .sek-color-wrapper .sek-color-picker{width:50%;float:left}.sek-borders .sek-color-wrapper .sek-reset-button{width:50%;float:right}[data-sek-radius-type=top_right]>i.material-icons{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}[data-sek-radius-type=bottom_right]>i.material-icons{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}[data-sek-radius-type=bottom_left]>i.material-icons{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sek-range-with-unit-picker-wrapper{width:100%;float:left;margin-bottom:8px}.sek-range-with-unit-picker-wrapper .sek-unit-wrapper{float:right}.sek-range-with-unit-picker-wrapper>div{float:left}.sek-range-wrapper{width:44%;margin-right:4px}.sek-no-unit-picker .sek-range-wrapper{width:70%}.sek-number-wrapper,.sek-simple-number-wrapper{width:60px;margin-right:5px}.sek-simple-number-wrapper{text-align:right}.sek-range-input{flex:1;width:100%;padding:0;-webkit-appearance:none;background:0 0;height:26px}.sek-range-input::-webkit-slider-thumb{-webkit-appearance:none;height:20px;width:20px;border-radius:50%;cursor:pointer;background:#555d66;border:4px solid transparent;background-clip:padding-box;box-sizing:border-box;margin-top:-8px}.sek-range-input::-moz-range-thumb{height:20px;width:20px;border-radius:50%;cursor:pointer;background:#555d66;border:4px solid transparent;background-clip:padding-box;box-sizing:border-box;margin-top:-7px}.sek-range-input::-ms-thumb{height:20px;width:20px;border-radius:50%;cursor:pointer;background:#555d66;border:4px solid transparent;background-clip:padding-box;box-sizing:border-box;margin-top:-8px}.sek-range-input:focus{outline:0}.sek-range-input::-webkit-slider-runnable-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px;margin-top:-4px}.sek-range-input::-moz-range-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.sek-range-input::-ms-track{margin-top:-4px;background:0 0;border-color:transparent;color:transparent;height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.sek-import-btn-wrap{padding:20px 0}.sek-import-btn-wrap input.sek-import-file{margin-bottom:10px}.sek-export-btn-wrap{padding-bottom:20px;border-bottom:1px solid #ddd}.sek-import-file{background:#eee;width:100%;margin:10px 0;padding:10px;font-size:12px}.sek-uploading{background:#eee;display:none;margin:10px 0;padding:10px;font-size:12px}.czr-import-dialog{display:none;padding:11px}.czr-import-message{padding-bottom:10px}.sek-import-btn-wrap .czr-import-dialog .czr-import-message{font-size:12px!important}.sek-import-btn-wrap .czr-import-dialog .button{margin:4px 0;font-size:12px!important}.sek-slide-thumb{width:32px;height:32px;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;float:left}.sek-slide-title{color:#4b4a4a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:120px;height:32px;line-height:32px;font-size:13px;float:left;padding-left:10px}.sek-pro-notice{position:relative;padding-left:36px;font-size:13px}.sek-pro-notice a,.sek-pro-notice a:focus,.sek-pro-notice a:hover{color:#f07829;font-weight:700;text-decoration:none}.sek-pro-notice a:hover{text-decoration:underline}.sek-pro-icon{position:absolute;width:32px;left:0;top:-2px}.sek-pro-notice .sek-pro-notice-icon-bef-text{display:inline-block;width:23px;height:15px;position:relative}.sek-pro-notice .sek-pro-notice-icon-bef-text img{position:absolute;top:0}.sek-unit-wrapper{text-align:center}.sek-ui-button-group{display:inline-block}.sek-ui-button-group .sek-ui-button:first-child{border-radius:3px 0 0 3px}.sek-ui-button-group .sek-ui-button+.sek-ui-button{margin-left:-1px}.sek-ui-button-group .sek-ui-button:last-child{border-radius:0 3px 3px 0}.sek-ui-button{height:28px;padding:0 10px 2px;border-radius:3px;white-space:nowrap;border-width:1px;border-style:solid;display:inline-flex;text-decoration:none;font-size:12px;line-height:25px;font-weight:400;margin:0;cursor:pointer;-webkit-appearance:none;background:0 0;color:#555;border-color:#ccc;background:#f7f7f7;box-shadow:inset 0 -1px 0 #ccc;vertical-align:top;-webkit-transition:opacity .2s ease-in-out;-moz-transition:opacity .2s ease-in-out;-ms-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.sek-ui-button:hover{background:#fafafa;border-color:#999;box-shadow:inset 0 -1px 0 #999;color:#23282d;opacity:1!important}.sek-ui-button:active:not(:disabled){background:#eee;border-color:#999;box-shadow:inset 0 1px 0 #999}.sek-ui-button:focus:not(:disabled){background:#fafafa;color:#23282d;border-color:#999;box-shadow:inset 0 -1px 0 #999,0 0 0 2px #fbfbfb;outline:0}.sek-ui-button[aria-pressed=true]{background:#555d66;border-color:#555d66;box-shadow:inset 0 -1px 0 #555d66;color:#fff;text-decoration:none}.sek-ui-button[aria-pressed=true]:focus:not(:disabled),.sek-ui-button[aria-pressed=true]:hover{background:#555d66;border-color:#4f4f4f;color:#fff}.sek-ui-button[aria-pressed=true]:focus:not(:disabled){box-shadow:inset 0 -1px 0 #4f4f4f}.sek-ui-button[aria-pressed=true]:focus:not(:disabled){outline:0}.sek-content-type-wrapper,.sek-save-section-action,.sek-save-section-mode-switcher,.sek-save-tmpl-action,.sek-save-tmpl-mode-switcher{margin-bottom:8px;width:100%;float:left}#nimble-tmpl-gallery .sek-ui-button-group,.sek-content-type-wrapper .sek-ui-button-group,.sek-save-section-action .sek-ui-button-group,.sek-save-section-mode-switcher .sek-ui-button-group,.sek-save-tmpl-action .sek-ui-button-group,.sek-save-tmpl-mode-switcher .sek-ui-button-group{display:block}#nimble-tmpl-gallery .sek-ui-button,.sek-content-type-wrapper .sek-ui-button,.sek-save-section-action .sek-ui-button,.sek-save-section-mode-switcher .sek-ui-button,.sek-save-tmpl-action .sek-ui-button,.sek-save-tmpl-mode-switcher .sek-ui-button{text-align:center;display:inline-block;padding:3px 10px;height:auto;text-transform:uppercase}.sek-content-type-wrapper .sek-ui-button{width:49%}.sek-save-section-mode-switcher .sek-ui-button,.sek-save-tmpl-mode-switcher .sek-ui-button{width:32%}.sek-content-type-wrapper [data-sek-content-type=template]{width:98%;margin-top:5px}[data-input-type=module_option_switcher] .sek-content-type-wrapper{margin-bottom:0}[data-input-type=module_option_switcher] [aria-pressed=false]{opacity:.7}[data-input-type=module_option_switcher] [data-sek-option-type]{position:relative}.sek-wrap-opt-switch-btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-input-type=module_option_switcher] [data-sek-option-type] .sek-wrap-opt-switch-btn>i{font-size:21px;line-height:24px}[data-input-type=module_option_switcher] [data-sek-option-type] .sek-wrap-opt-switch-btn>span{position:relative;padding-left:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.wp-core-ui .button.sek-reset-button{font-size:11px;padding:0 5px 1px;line-height:18px;height:25px;min-height:25px;color:#555;border-color:#ccc}.sek-animated-arrow{position:absolute;left:-20px;margin-left:6px;top:3px;font-size:10px;color:#617379;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);-webkit-transition:-webkit-transform .2s ease-in-out;transition:-webkit-transform .2s ease-in-out;-o-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-sek-expanded=true] label>.customize-control-title .sek-animated-arrow{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}[data-sek-expanded=true] label>.customize-control-title .sek-ctrl-accordion-title,[data-sek-expanded] label>.customize-control-title .sek-ctrl-accordion-title:hover{text-decoration:underline;text-underline-position:under}.customize-control-title .sek-ctrl-accordion-title>i{font-size:1.2em;position:relative;top:4px;padding-right:4px}.sek-level-option-icon{padding-right:5px;min-width:22px;text-align:center}.sek-input-title-icon{position:relative;top:6px}.sek-pro-icon-next-title{padding:5px;min-width:22px}[data-sek-expanded=false]>.czr-open-pre-add-new{display:none}[data-sek-expanded=false]>.czr-items-wrapper{display:none}.sek-side-nimble-logo-wrapper{padding:4px 25px 0 2px!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%}.sek-side-nimble-logo-wrapper .sek-nimble-logo{height:45px}.sek-side-nimble-logo-wrapper .sek-pro-pastil{height:30px}[data-input-type=code_editor] .czr-input{width:100%;float:left}#customize-preview iframe{top:36px}#nimble-top-bar{max-height:36px;position:absolute;text-align:center;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;opacity:.3;top:0;background:rgba(0,0,0,.5);padding:2px;z-index:99999;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%}.outer-section-open #nimble-top-bar,.themes-panel-expanded #nimble-top-bar{display:none}body.nimble-top-bar-visible #nimble-top-bar{opacity:1}#nimble-top-bar:hover{background:rgba(0,0,0,.7)}#nimble-top-bar .nimble-top-bar-content{display:inline-block;line-height:20px;width:80%}#nimble-top-bar .sek-do-undo .icon:before{display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/30px dashicons;vertical-align:top;color:#fff}#nimble-top-bar .sek-settings,#nimble-top-bar .sek-tmpl-saving{font-size:18px;padding:0 5px}#nimble-top-bar button{background:0 0;border:none;color:#fff;cursor:pointer}#nimble-top-bar button[data-nimble-state=disabled]{cursor:inherit;opacity:.4!important;cursor:not-allowed}#nimble-top-bar .sek-do-undo button:hover{opacity:1}#nimble-top-bar .sek-do-undo button:focus{outline:0}#nimble-top-bar .sek-do-undo .icon:before{position:relative}#nimble-top-bar .sek-do-undo .icon.undo:before{content:"\f171";-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#nimble-top-bar .sek-do-undo .icon.do:before{content:"\f172";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#nimble-top-bar .sek-add-content button{padding-top:3px}#nimble-top-bar .sek-nimble-doc{position:absolute;right:10px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%}.rtl #nimble-top-bar .sek-nimble-doc{left:10px;right:auto}#nimble-top-bar .sek-nimble-doc img{width:30px;height:30px;position:relative;top:2px;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-filter:gray;filter:gray}#nimble-top-bar .sek-nimble-doc:hover img{-webkit-filter:none;filter:none}#nimble-top-bar .sek-notifications{max-width:410px;overflow:hidden}#nimble-top-bar .sek-notifications .debug-mode-notif{color:red;line-height:1.5em;padding:3px;background:#fff;display:inline-block;overflow:hidden}#nimble-top-section-save-ui,#nimble-top-tmpl-save-ui{height:auto;min-height:300px;padding:20px;position:absolute;top:-300px;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;opacity:.3;background:rgba(0,0,0,.7);z-index:99999;max-width:100%;font-size:16px;line-height:1.5em}#nimble-top-section-save-ui .nb-section-save-inner,#nimble-top-tmpl-save-ui .nb-tmpl-save-inner{max-width:800px;margin:auto}body.sek-save-section-ui-visible #nimble-top-section-save-ui,body.sek-save-tmpl-ui-visible #nimble-top-tmpl-save-ui{opacity:1;top:36px}#nimble-top-section-save-ui .sek-close-dialog,#nimble-top-tmpl-save-ui .sek-close-dialog{position:absolute;bottom:10px;right:10px;border-radius:3px!important}#nimble-top-section-save-ui #sek-saved-section-title.error,#nimble-top-tmpl-save-ui #sek-saved-tmpl-title.error{border:1px solid red}.sek-section-description,.sek-section-title,.sek-tmpl-description,.sek-tmpl-title,select.sek-saved-section-picker,select.sek-saved-tmpl-picker{margin-top:10px;float:left;clear:both;width:100%}.sek-section-description textarea,.sek-tmpl-description textarea,input#sek-saved-section-title,input#sek-saved-tmpl-title,select.sek-saved-section-picker,select.sek-saved-tmpl-picker{width:97%;max-width:none;margin-bottom:10px}.sek-section-description textarea,.sek-tmpl-description textarea{min-height:100px}.sek-save-section-action .sek-do-save-section,.sek-save-section-action .sek-do-update-section,.sek-save-section-action .sek-open-remove-confirmation,.sek-save-tmpl-action .sek-do-save-tmpl,.sek-save-tmpl-action .sek-do-update-tmpl,.sek-save-tmpl-action .sek-open-remove-confirmation,.sek-saved-section-picker,.sek-saved-tmpl-picker,.sek-section-description,.sek-section-title,.sek-tmpl-description,.sek-tmpl-title{display:none}.section-collection-populated .sek-saved-section-picker,.tmpl-collection-populated .sek-saved-tmpl-picker{display:block}.sek-section-remove-dialog,.sek-tmpl-remove-dialog{display:none;color:red;background:#fff;padding:5px;text-transform:uppercase;float:left;width:96%}.sek-section-remove-dialog .sek-do-remove-section,.sek-tmpl-remove-dialog .sek-do-remove-tmpl{color:red}[data-sek-tmpl-dialog-mode=save] [data-tmpl-mode-switcher=remove]{display:none}[data-sek-tmpl-dialog-mode=save] .sek-saved-tmpl-picker{display:none}[data-sek-tmpl-dialog-mode=save] .sek-tmpl-title{display:block}[data-sek-tmpl-dialog-mode=save] .sek-tmpl-description{display:block}[data-sek-tmpl-dialog-mode=save] .sek-do-save-tmpl{display:block;border-color:#ff0;background:#f9f9b6f7;border-radius:3px!important}[data-sek-tmpl-dialog-mode=update] [data-tmpl-mode-switcher=remove]{display:none}[data-sek-tmpl-dialog-mode=update].sek-tmpl-update-selected .sek-tmpl-title{display:block}[data-sek-tmpl-dialog-mode=update].sek-tmpl-update-selected .sek-tmpl-description{display:block}[data-sek-tmpl-dialog-mode=update].sek-tmpl-update-selected .sek-do-update-tmpl{display:block}.sek-save-tmpl-mode-switcher .sek-ui-button[data-tmpl-mode-switcher=edit]{display:none}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=edit]{display:inline-block!important}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=update]{display:none}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=save]{display:none}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=remove]{display:none}[data-sek-tmpl-dialog-mode=edit] .sek-saved-tmpl-picker{display:block}[data-sek-tmpl-dialog-mode=edit] .sek-tmpl-title{display:block}[data-sek-tmpl-dialog-mode=edit] .sek-tmpl-description{display:block}[data-sek-tmpl-dialog-mode=edit] .sek-do-update-tmpl{display:block}[data-sek-tmpl-dialog-mode=remove] [data-tmpl-mode-switcher=update]{display:none}[data-sek-tmpl-dialog-mode=remove] [data-tmpl-mode-switcher=save]{display:none}[data-sek-tmpl-dialog-mode=remove].sek-tmpl-remove-selected .sek-open-remove-confirmation{display:block}[data-sek-tmpl-dialog-mode=remove].sek-removal-confirmation-opened .sek-open-remove-confirmation{display:none!important}[data-sek-tmpl-dialog-mode=remove].sek-removal-confirmation-opened .sek-tmpl-remove-dialog{display:block}[data-sek-section-dialog-mode=save] [data-section-mode-switcher=remove]{display:none}[data-sek-section-dialog-mode=save] .sek-saved-section-picker{display:none}[data-sek-section-dialog-mode=save] .sek-section-title{display:block}[data-sek-section-dialog-mode=save] .sek-section-description{display:block}[data-sek-section-dialog-mode=save] .sek-do-save-section{display:block;border-color:#ff0;background:#f9f9b6f7;border-radius:3px!important}[data-sek-section-dialog-mode=update] [data-section-mode-switcher=remove]{display:none}[data-sek-section-dialog-mode=update].sek-section-update-selected .sek-section-title{display:block}[data-sek-section-dialog-mode=update].sek-section-update-selected .sek-section-description{display:block}[data-sek-section-dialog-mode=update].sek-section-update-selected .sek-do-update-section{display:block}.sek-save-section-mode-switcher .sek-ui-button[data-section-mode-switcher=edit]{display:none}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=edit]{display:inline-block!important}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=update]{display:none}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=save]{display:none}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=remove]{display:none}[data-sek-section-dialog-mode=edit] .sek-saved-section-picker{display:block}[data-sek-section-dialog-mode=edit] .sek-section-title{display:block}[data-sek-section-dialog-mode=edit] .sek-section-description{display:block}[data-sek-section-dialog-mode=edit] .sek-do-update-section{display:block}[data-sek-section-dialog-mode=remove].sek-section-remove-selected .sek-open-remove-confirmation{display:block}[data-sek-section-dialog-mode=remove].sek-removal-confirmation-opened .sek-open-remove-confirmation{display:none!important}[data-sek-section-dialog-mode=remove].sek-removal-confirmation-opened .sek-section-remove-dialog{display:block}[data-sek-section-dialog-mode=remove].sek-is-removal-only [data-section-mode-switcher=save],[data-sek-section-dialog-mode=remove].sek-is-removal-only [data-section-mode-switcher=update]{display:none}#nimble-top-section-save-ui .spinner,#nimble-top-tmpl-save-ui .spinner{display:none}#nimble-top-section-save-ui.nimble-section-processing-ajax .spinner,#nimble-top-tmpl-save-ui.nimble-tmpl-processing-ajax .spinner{display:block;visibility:visible}#nimble-tmpl-gallery,#nimble-tmpl-gallery .sek-tmpl-gal-inject-dialog{-webkit-transition:top .3s ease-in-out;-moz-transition:top,.3s ease-in-out;-ms-transition:top,.3s ease-in-out;-o-transition:top,.3s ease-in-out;transition:top .3s ease-in-out}#nimble-tmpl-gallery{background:rgba(240,240,240,.89)!important;border-bottom:1px solid #aaa!important;color:#222!important;font-size:12px!important;position:absolute;top:-100vh;right:0;left:0;height:calc(100vh - 36px);overflow:auto;padding:15px;z-index:1000}.sek-template-gallery-expanded #nimble-tmpl-gallery{top:36px}#nimble-tmpl-gallery .sek-tmpl-gal-inject-dialog{background:rgba(240,240,240,.89)!important;border-bottom:1px solid #aaa!important;color:#222!important;font-size:12px!important;position:absolute;top:-100vh;right:0;left:0;height:calc(100vh - 36px);overflow:auto;padding:15px;z-index:1001}.sek-tmpl-dialog-expanded #nimble-tmpl-gallery .sek-tmpl-gal-inject-dialog{top:0}#nimble-tmpl-gallery .sek-tmpl-gallery-inner{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%;margin-right:-10px;margin-left:-10px}#nimble-tmpl-gallery .sek-tmpl-gallery-inner *,#nimble-tmpl-gallery .sek-tmpl-gallery-inner :after,#nimble-tmpl-gallery .sek-tmpl-gallery-inner :before{box-sizing:border-box}.sek-tmpl-gallery-inner .sek-tmpl-item{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%;padding:5px 10px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}@media (max-width:1300px){.sek-tmpl-gallery-inner .sek-tmpl-item{-ms-flex:0 0 33.333%;flex:0 0 33.333%;max-width:33.333%}}@media (max-width:1000px){.sek-tmpl-gallery-inner .sek-tmpl-item{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}.sek-tmpl-info{position:absolute;top:0;bottom:0;width:calc(100% - 20px);max-height:calc(100% - 20px);padding:10px;overflow:hidden}.sek-tmpl-info>h3,.sek-tmpl-info>p{color:#fff;overflow:hidden}.sek-tmpl-info>h3{font-size:15px;margin:.5em 0}.sek-tmpl-info>p{font-size:13px;margin:.5em 0}.sek-tmpl-info>.use-tmpl{cursor:pointer;font-size:25px;width:50px;height:50px;color:#535353;background:rgba(255,255,255,.7);border-radius:30px;opacity:0;-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);-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;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.sek-tmpl-info:hover>.use-tmpl{opacity:.7}.sek-tmpl-info>.use-tmpl:hover{opacity:.95}.sek-tmpl-info>.edit-tmpl,.sek-tmpl-info>.remove-tmpl{cursor:pointer;font-size:16px;width:30px;height:30px;color:#535353;background:rgba(255,255,255,.7);border-radius:30px;opacity:.4;-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);-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;position:absolute}.sek-tmpl-info>.remove-tmpl{bottom:10px;right:10px}.sek-tmpl-info>.edit-tmpl{bottom:10px;left:10px}.sek-tmpl-info:hover>.edit-tmpl,.sek-tmpl-info:hover>.remove-tmpl{opacity:.7}.sek-tmpl-info>.remove-tmpl:hover{opacity:.95;color:red}.sek-tmpl-info>.edit-tmpl:hover{opacity:.95;color:#000}.sek-tmpl-gallery-inner .sek-tmpl-thumb{cursor:pointer;position:relative;height:380px;width:100%;background-size:cover;background-repeat:no-repeat;background-position:center}.sek-tmpl-thumb img{max-width:100%}.sek-tmpl-gallery-inner .sek-tmpl-thumb::after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:.45;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.sek-tmpl-gallery-inner .sek-tmpl-item:hover .sek-tmpl-thumb::after{opacity:.65}#sek-gal-top-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.sek-close-button{position:absolute;top:10px;right:20px}.sek-tmpl-filter-wrapper{display:none;width:100%}input.sek-filter-tmpl{width:60%}#sek-gal-top-bar .sek-ui-button-group{width:37%;text-align:right}.search-active .sek-tmpl-item{display:none}.search-active .sek-tmpl-item.search-match{display:-webkit-box;display:-ms-flexbox;display:flex}#sek-tmpl-source-switcher{display:none;width:100%;padding:10px 0}#sek-tmpl-source-switcher .sek-ui-button-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%}#nimble-level-tree{-webkit-transition:top .3s ease-in-out;-moz-transition:top,.3s ease-in-out;-ms-transition:top,.3s ease-in-out;-o-transition:top,.3s ease-in-out;transition:top .3s ease-in-out}.sek-level-tree-expanded #customize-preview iframe{top:366px;height:calc(100vh - 366px)}.sek-level-tree-expanded #nimble-top-bar .sek-level-tree button{color:#44b9e2}#nimble-level-tree{background:#f0f0f0!important;border-bottom:1px solid #aaa!important;color:#222!important;font-size:12px!important;position:absolute;top:36px;right:0;left:0;height:299px;overflow:auto;padding:15px;z-index:0}#nimble-level-tree ul li{padding-left:30px;cursor:pointer;margin-bottom:8px}#nimble-level-tree ul li .sek-remove-level{font-size:16px;opacity:.6}#nimble-level-tree ul li .sek-remove-level:hover{opacity:1}#nimble-level-tree ul li .sek-level-infos{line-height:30px;height:30px;padding-left:33px;position:relative;width:calc(100% - 25px)}.sek-level-infos .sek-inner-level-infos{background:inherit;width:inherit;height:inherit;line-height:inherit;padding-left:4px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:background .2s ease;transition:background .2s ease;-o-transition:background .2s ease}.sek-inner-level-infos:hover{color:#000;background:#fff}.sek-close-level-tree{position:fixed;top:44px;right:25px}img.sek-svg-mod-icon{max-width:45px}.sek-level-infos::before{position:absolute;left:-31px;background:#a2aab2;width:63px;height:2px;content:"";top:calc(50% - 1px)}#nimble-level-tree ul>li:first-child::before{position:absolute;content:"";background:#a2aab2;top:-15px;height:16px;bottom:0;left:-2px;width:2px}#nimble-level-tree ul>li:last-child::after{position:absolute;content:"";background:#f0f0f0;top:16px;bottom:0;left:-2px;width:2px}#nimble-level-tree ul{border-left:2px solid #a2aab2;position:relative}#nimble-level-tree ul>li:last-child{position:relative}
|
1 |
+
@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'}#customize-preview iframe,#nimble-level-tree{-webkit-transition:top .3s ease-in-out;-moz-transition:top,.3s ease-in-out;-ms-transition:top,.3s ease-in-out;-o-transition:top,.3s ease-in-out;transition:top .3s ease-in-out}#customize-preview iframe{z-index:1}ul[id*=sub-accordion-section-__nimble__]{background:#f2f2f2!important}#customize-theme-controls .customize-pane-child[id*="__nimble__"]{-webkit-transition:unset;-o-transition:unset;transition:unset}li[id*="__nimble__"].customize-control{margin:8px 0;padding:2px;width:calc(100% - 4px);border:1px solid rgba(221,221,221,.43);box-shadow:1px 1px 2px 0 rgba(75,75,85,.2);-webkit-box-shadow:1px 1px 2px 0 rgba(75,75,85,.2);background-color:#fff}li[id*="__nimble__"].customize-control span.customize-control-title:first-child{margin-left:21px}#customize-theme-controls ul[id*=sub-accordion-section-__nimble__].open{top:0!important}.sek-float-right{float:right}.sek-float-left{float:left}.sek-flex-vertical-center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}li[id^=accordion-section-__nimble__]{margin-top:16px}li[id^=accordion-section-__nimble__]>h3{border-top:1px solid #ddd}[data-sek-content-type]{float:left;padding:0;margin:1.8%;text-align:center;cursor:move;-webkit-transition:-webkit-box-shadow .2s ease;transition:-webkit-box-shadow .2s ease;-o-transition:box-shadow .2s ease;transition:box-shadow .2s ease;transition:box-shadow .2s ease,-webkit-box-shadow .2s ease;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.25);box-shadow:0 2px 5px rgba(0,0,0,.25);border-radius:4px}[data-sek-content-type=module]{width:29%;height:130px;position:relative}.sek-is-pro{position:absolute;top:5px;z-index:10;right:5px;height:20px;width:28px}[data-sek-content-type=preset_section]:hover .sek-is-pro img,[data-sek-tmpl-item-id]:hover .sek-is-pro img{opacity:.5}li[id*=sek_draggable_modules] [data-sek-content-type=preset_section]{width:29%;height:130px}.sek-content-type-wrapper [data-sek-content-type=preset_section]{width:95%;height:165px;position:relative;overflow:hidden}.sek-demo-link{position:absolute;bottom:-22px;z-index:20;height:18px;width:100%;padding:2px 0;background:#000;background-color:rgba(0,0,0,.5);color:#fff;font-size:13px;cursor:pointer;-webkit-transition:bottom .2s ease-in-out;-moz-transition:bottom,.2s ease-in-out;-ms-transition:bottom,.2s ease-in-out;-o-transition:bottom,.2s ease-in-out;transition:bottom .2s ease-in-out}.sek-demo-link a,.sek-demo-link a:focus,.sek-demo-link a:visited,.sek-demo-link i{color:#fff}.sek-demo-link a{text-decoration:none;text-transform:uppercase;font-size:12px}.sek-demo-link a:hover{color:#fff;text-decoration:underline}[data-sek-content-type=preset_section]:hover .sek-demo-link{bottom:0}[data-sek-content-type=preset_section] .sek-overlay{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:0;-webkit-transition:opacity .35s ease;transition:opacity .35s ease;-o-transition:opacity .35s ease}[data-sek-content-type=preset_section]:hover .sek-overlay{opacity:.15}[data-sek-content-type][draggable=true]:hover{-webkit-box-shadow:0 12px 20px rgba(0,0,0,.2);box-shadow:0 12px 20px rgba(0,0,0,.2)}[data-sek-content-type][draggable=false]{background:#eee;opacity:.8}.sek-user-section-wrapper{margin-bottom:15px;float:left;width:100%}.sek-user-section-wrapper [data-sek-content-type=preset_section] .sek-overlay{opacity:.4}.sek-user-section-wrapper [data-sek-content-type=preset_section]:hover .sek-overlay{opacity:.5}.sek-user-section-wrapper [data-sek-is-user-section=true]{height:165px;margin:0;width:97%}.sek-user-section-wrapper .sek-sec-thumb{position:absolute;opacity:.5;z-index:0;top:0;bottom:0;height:100%;width:100%}.sek-user-section-wrapper .sek-sec-info{position:relative;color:#fff;padding:2%;overflow:hidden;height:100%;max-height:138px;padding:10px}.sek-sec-info .sec-title{color:#fff;margin:0;line-height:20px;max-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sek-sec-info .sec-date,.sek-sec-info .sec-desc{margin:0;margin-top:5px;font-size:12px}.sek-sec-info .sec-date{font-size:italic}.sek-sec-info>.edit-user-sec,.sek-sec-info>.remove-user-sec{cursor:pointer;font-size:16px;width:30px;height:30px;color:#535353;background:rgba(255,255,255,.7);border-radius:30px;opacity:.3;-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);-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;position:absolute}.sek-sec-info>.remove-user-sec{bottom:0;right:5px}.sek-sec-info>.edit-user-sec{bottom:0;left:5px}.sek-sec-info:hover>.remove-user-sec{opacity:.7}.sek-sec-info:hover>.edit-user-sec{opacity:.7}.sek-sec-info>.remove-user-sec:hover{opacity:.95;color:red}.sek-sec-info>.edit-user-sec:hover{opacity:.95;color:#000}.sek-dragging [data-sek-content-type]{-webkit-box-shadow:0 2px 5px rgba(0,0,0,.25)!important;box-shadow:0 2px 5px rgba(0,0,0,.25)!important}.sek-dragged{background:#33b3db3d;background:rgba(51,179,219,.24)}[data-sek-content-type] .sek-module-icon{display:block;padding:0}[data-sek-content-type] .sek-module-icon .nimble-module-icons{font-size:3rem;max-width:100%;color:#878787;max-height:86px}[data-sek-content-type] .sek-module-icon.is-font-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%;min-height:70%}[data-sek-content-type] .sek-module-icon.is-font-icon i{font-size:35px}[data-sek-content-type] .sek-module-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 6px 0;font-size:.75rem;height:45px;justify-content:center;position:relative;top:-18px}.sek-centered-module-title{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.sek-new-label{background:#ff0;border:1px solid #ff0;padding:3px 4px;line-height:12px;border-radius:8px;font-size:12px}.sek-accord-title{color:#4b4a4a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:120px;height:23px;line-height:22px;font-size:13px;float:left;padding-left:10px}.sek-pad-marg-inner{font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:10px auto 10px auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:0;background-color:#e6e6e6;border:1px solid #c5c5c5;height:192px;width:232px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-transition:background-color .2s ease;-o-transition:background-color .2s ease;transition:background-color .2s ease}.sek-pm-top-bottom-wrap{height:46px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-flex-center-stretch{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.sek-pm-input{width:35px;height:15px;padding:0;text-align:center;font-family:Source Sans Pro;padding:5px;border-radius:3px;text-align:left;font-size:13px;outline:0;-webkit-box-shadow:inset 1px 1px 3px rgba(0,0,0,.15);box-shadow:inset 1px 1px 3px rgba(0,0,0,.15);border:1px solid #ced6d9}.sek-pm-input-parent .sek-pm-input{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;display:block;margin:auto 3px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:1px 3px;font-size:12px;font-weight:300;min-width:34px;min-height:20px;color:#313131}.sek-pm-middle-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;height:100px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.sek-pm-margin-left,.sek-pm-margin-right{width:46px}.sek-pm-padding-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background-color:#fff;border:1px solid #ced6d9;height:100px;width:140px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:5px;-webkit-transition:background-color .2s ease;-o-transition:background-color .2s ease;transition:background-color .2s ease;-webkit-box-sizing:border-box;box-sizing:border-box;margin:auto}.sek-flex-justify-center{min-height:0;min-width:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-flex-space-between{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.sek-pm-input-parent{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex}.sek-pm-input-parent .sek-pm-input{min-height:25px;min-width:40px;background-color:#fff}.sek-pm-input-parent .sek-pm-input{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;display:block;margin:auto 3px!important;-webkit-box-sizing:border-box;box-sizing:border-box;padding:1px 3px;font-size:12px;font-weight:300;min-width:34px;min-height:20px;color:#313131;width:40px!important;text-align:center}.sek-pm-padding-wrapper label{margin:0}.sek-pad-marg-inner label{-webkit-box-flex:0;-ms-flex:0;flex:0}.reset-spacing-wrap{padding:10px 0 0;font-size:.8em;text-decoration:underline;cursor:pointer;text-align:center}.reset-spacing-wrap:hover{color:#006799}.sek-bg-pos-wrapper{padding:10px;text-align:center;display:inline-block;width:90px;height:90px}.sek-bg-pos-wrapper{display:inline-block;width:90px;height:90px}.sek-bg-pos-wrapper .sek-bg-pos{cursor:pointer;width:24px;height:24px;margin:3px;float:left}.sek-bg-pos-wrapper input[type=radio]{display:none}.sek-bg-pos-wrapper .sek-bg-pos span{display:inline-block;width:100%;height:100%;border-radius:6px;background:#e6e6e6 no-repeat center;-webkit-transition:background-color .2s ease;-o-transition:background-color .2s ease;transition:background-color .2s ease}.sek-bg-pos-wrapper .sek-bg-pos span:hover{background-color:#33b3db}.sek-bg-pos-wrapper .sek-bg-pos span:hover svg{visibility:visible}.sek-bg-pos-wrapper .sek-bg-pos input[type=radio]:checked+span{background-color:#33b3db}.sek-bg-pos-wrapper .sek-bg-pos input[type=radio]:checked+span svg{visibility:visible}.sek-bg-pos-wrapper .sek-bg-pos span svg{visibility:hidden;shape-rendering:crispEdges}.sek-bg-pos-wrapper .sek-svg-bg-pos{fill:#fff}div[data-sek-align]{margin:0 5px;padding:4px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;position:relative;text-align:center;width:23px;height:24px;top:-4px;border-radius:4px;cursor:pointer}div[data-input-type=horizTextAlignmentWithDeviceSwitcher] .czr-input{text-align:center}div[data-input-type=horizTextAlignmentWithDeviceSwitcher] .sek-h-align-wrapper{display:inline-block}div[data-input-type=horizAlignmentWithDeviceSwitcher] .czr-input{text-align:center}div[data-input-type=horizAlignmentWithDeviceSwitcher] .sek-h-align-wrapper{display:inline-block}.sek-h-align-wrapper .sek-align-icons{float:right}div[data-sek-align]:hover{-webkit-box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff;box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff}div[data-sek-align].selected{outline:0;color:#fff;-webkit-box-shadow:none;box-shadow:none;background:#555d66}div[data-sek-grid-layout]{margin:0 5px;padding:1px 3px 1px 1px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;position:relative;text-align:center;border-radius:4px;cursor:pointer}div[data-sek-grid-layout] i{font-size:50px}div[data-input-type=grid_layout] .czr-input{text-align:center}div[data-input-type=grid_layout] .sek-grid-layout-wrapper{display:inline-block}.sek-grid-layout-wrapper .sek-grid-icons{float:right}div[data-sek-grid-layout]:hover{-webkit-box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff;box-shadow:inset 0 0 0 1px #555d66,inset 0 0 0 2px #fff}div[data-sek-grid-layout].selected{outline:0;color:#fff;-webkit-box-shadow:none;box-shadow:none;background:#33b3db}.customize-control select[data-czrtype=categories]{height:28px}.sek-input-device-switcher .sek-switcher:before,.sek-mobile-device-icons .sek-switcher:before{display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/30px dashicons;vertical-align:top;color:#656a6f;position:relative;top:-5px}.sek-input-device-switcher .sek-switcher{cursor:pointer}.sek-input-device-switcher .sek-switcher,.sek-mobile-device-icons .sek-switcher{background:0 0;border:none;padding:0 1px;margin:0 0 0 -2px;box-shadow:none;border-top:1px solid transparent;border-bottom:4px solid transparent;-webkit-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;-o-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out}.sek-input-device-switcher .sek-switcher:focus,.sek-input-device-switcher .sek-switcher:hover{background-color:#fff}.sek-input-device-switcher .sek-switcher.active:before{color:#191e23}.sek-input-device-switcher .sek-switcher:focus:before,.sek-input-device-switcher .sek-switcher:hover:before{color:#0073aa}.sek-input-device-switcher .preview-desktop:before,.sek-mobile-device-icons .preview-desktop:before{content:"\f472"}.sek-input-device-switcher .preview-tablet:before,.sek-mobile-device-icons .preview-tablet:before{content:"\f471"}.sek-input-device-switcher .preview-mobile:before,.sek-mobile-device-icons .preview-mobile:before{content:"\f470"}.sek-borders{width:100%;float:left;margin-bottom:8px}.sek-borders>div{float:left;width:100%}.sek-borders .sek-range-unit-wrapper>div{float:left}.sek-borders .sek-border-type-wrapper{margin-bottom:5px}.sek-borders .sek-range-unit-wrapper{margin-bottom:5px}.sek-borders .sek-range-unit-wrapper .sek-unit-wrapper{float:right}.sek-borders .sek-color-wrapper{width:100%}.sek-borders .sek-color-wrapper .sek-color-picker{width:50%;float:left}.sek-borders .sek-color-wrapper .sek-reset-button{width:50%;float:right}[data-sek-radius-type=top_right]>i.material-icons{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}[data-sek-radius-type=bottom_right]>i.material-icons{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}[data-sek-radius-type=bottom_left]>i.material-icons{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sek-range-with-unit-picker-wrapper{width:100%;float:left;margin-bottom:8px}.sek-range-with-unit-picker-wrapper .sek-unit-wrapper{float:right}.sek-range-with-unit-picker-wrapper>div{float:left}.sek-range-wrapper{width:44%;margin-right:4px}.sek-no-unit-picker .sek-range-wrapper{width:70%}.sek-number-wrapper,.sek-simple-number-wrapper{width:60px;margin-right:5px}.sek-simple-number-wrapper{text-align:right}.sek-range-input{flex:1;width:100%;padding:0;-webkit-appearance:none;background:0 0;height:26px}.sek-range-input::-webkit-slider-thumb{-webkit-appearance:none;height:20px;width:20px;border-radius:50%;cursor:pointer;background:#555d66;border:4px solid transparent;background-clip:padding-box;box-sizing:border-box;margin-top:-8px}.sek-range-input::-moz-range-thumb{height:20px;width:20px;border-radius:50%;cursor:pointer;background:#555d66;border:4px solid transparent;background-clip:padding-box;box-sizing:border-box;margin-top:-7px}.sek-range-input::-ms-thumb{height:20px;width:20px;border-radius:50%;cursor:pointer;background:#555d66;border:4px solid transparent;background-clip:padding-box;box-sizing:border-box;margin-top:-8px}.sek-range-input:focus{outline:0}.sek-range-input::-webkit-slider-runnable-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px;margin-top:-4px}.sek-range-input::-moz-range-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.sek-range-input::-ms-track{margin-top:-4px;background:0 0;border-color:transparent;color:transparent;height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.sek-import-btn-wrap{padding:20px 0}.sek-import-btn-wrap input.sek-import-file{margin-bottom:10px}.sek-export-btn-wrap{padding-bottom:20px;border-bottom:1px solid #ddd}.sek-import-file{background:#eee;width:100%;margin:10px 0;padding:10px;font-size:12px}.sek-uploading{background:#eee;display:none;margin:10px 0;padding:10px;font-size:12px}.czr-import-dialog{display:none;padding:11px}.czr-import-message{padding-bottom:10px}.sek-import-btn-wrap .czr-import-dialog .czr-import-message{font-size:12px!important}.sek-import-btn-wrap .czr-import-dialog .button{margin:4px 0;font-size:12px!important}.sek-slide-thumb{width:32px;height:32px;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;float:left}.sek-slide-title{color:#4b4a4a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:120px;height:32px;line-height:32px;font-size:13px;float:left;padding-left:10px}.sek-pro-notice{position:relative;padding-left:36px;font-size:13px}.sek-pro-notice a,.sek-pro-notice a:focus,.sek-pro-notice a:hover{color:#f07829;font-weight:700;text-decoration:none}.sek-pro-notice a:hover{text-decoration:underline}.sek-pro-icon{position:absolute;width:32px;left:0;top:-2px}.sek-pro-notice .sek-pro-notice-icon-bef-text{display:inline-block;width:23px;height:15px;position:relative}.sek-pro-notice .sek-pro-notice-icon-bef-text img{position:absolute;top:0}.sek-unit-wrapper{text-align:center}.sek-ui-button-group{display:inline-block}.sek-ui-button-group .sek-ui-button:first-child{border-radius:3px 0 0 3px}.sek-ui-button-group .sek-ui-button+.sek-ui-button{margin-left:-1px}.sek-ui-button-group .sek-ui-button:last-child{border-radius:0 3px 3px 0}.sek-ui-button{height:28px;padding:0 10px 2px;border-radius:3px;white-space:nowrap;border-width:1px;border-style:solid;display:inline-flex;text-decoration:none;font-size:12px;line-height:25px;font-weight:400;margin:0;cursor:pointer;-webkit-appearance:none;background:0 0;color:#555;border-color:#ccc;background:#f7f7f7;box-shadow:inset 0 -1px 0 #ccc;vertical-align:top;-webkit-transition:opacity .2s ease-in-out;-moz-transition:opacity .2s ease-in-out;-ms-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.sek-ui-button:hover{background:#fafafa;border-color:#999;box-shadow:inset 0 -1px 0 #999;color:#23282d;opacity:1!important}.sek-ui-button:active:not(:disabled){background:#eee;border-color:#999;box-shadow:inset 0 1px 0 #999}.sek-ui-button:focus:not(:disabled){background:#fafafa;color:#23282d;border-color:#999;box-shadow:inset 0 -1px 0 #999,0 0 0 2px #fbfbfb;outline:0}.sek-ui-button[aria-pressed=true]{background:#555d66;border-color:#555d66;box-shadow:inset 0 -1px 0 #555d66;color:#fff;text-decoration:none}.sek-ui-button[aria-pressed=true]:focus:not(:disabled),.sek-ui-button[aria-pressed=true]:hover{background:#555d66;border-color:#4f4f4f;color:#fff}.sek-ui-button[aria-pressed=true]:focus:not(:disabled){box-shadow:inset 0 -1px 0 #4f4f4f}.sek-ui-button[aria-pressed=true]:focus:not(:disabled){outline:0}.sek-content-type-wrapper,.sek-save-section-action,.sek-save-section-mode-switcher,.sek-save-tmpl-action,.sek-save-tmpl-mode-switcher{margin-bottom:8px;width:100%;float:left}#nimble-tmpl-gallery .sek-ui-button-group,.sek-content-type-wrapper .sek-ui-button-group,.sek-save-section-action .sek-ui-button-group,.sek-save-section-mode-switcher .sek-ui-button-group,.sek-save-tmpl-action .sek-ui-button-group,.sek-save-tmpl-mode-switcher .sek-ui-button-group{display:block}#nimble-tmpl-gallery .sek-ui-button,.sek-content-type-wrapper .sek-ui-button,.sek-save-section-action .sek-ui-button,.sek-save-section-mode-switcher .sek-ui-button,.sek-save-tmpl-action .sek-ui-button,.sek-save-tmpl-mode-switcher .sek-ui-button{text-align:center;display:inline-block;padding:3px 10px;height:auto;text-transform:uppercase}.sek-content-type-wrapper .sek-ui-button{width:49%}.sek-save-section-mode-switcher .sek-ui-button,.sek-save-tmpl-mode-switcher .sek-ui-button{width:32%}.sek-content-type-wrapper [data-sek-content-type=template]{width:98%;margin-top:5px}[data-input-type=module_option_switcher] .sek-content-type-wrapper{margin-bottom:0}[data-input-type=module_option_switcher] [aria-pressed=false]{opacity:.7}[data-input-type=module_option_switcher] [data-sek-option-type]{position:relative}.sek-wrap-opt-switch-btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-input-type=module_option_switcher] [data-sek-option-type] .sek-wrap-opt-switch-btn>i{font-size:21px;line-height:24px}[data-input-type=module_option_switcher] [data-sek-option-type] .sek-wrap-opt-switch-btn>span{position:relative;padding-left:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.wp-core-ui .button.sek-reset-button{font-size:11px;padding:0 5px 1px;line-height:18px;height:25px;min-height:25px;color:#555;border-color:#ccc}.sek-animated-arrow{position:absolute;left:-20px;margin-left:6px;top:3px;font-size:10px;color:#617379;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);-webkit-transition:-webkit-transform .2s ease-in-out;transition:-webkit-transform .2s ease-in-out;-o-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-sek-expanded=true] label>.customize-control-title .sek-animated-arrow{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}[data-sek-expanded=true] label>.customize-control-title .sek-ctrl-accordion-title,[data-sek-expanded] label>.customize-control-title .sek-ctrl-accordion-title:hover{text-decoration:underline;text-underline-position:under}.customize-control-title .sek-ctrl-accordion-title>i{font-size:1.2em;position:relative;top:4px;padding-right:4px}.sek-level-option-icon{padding-right:5px;min-width:22px;text-align:center}.sek-input-title-icon{position:relative;top:6px}.sek-pro-icon-next-title{padding:5px;min-width:22px}[data-sek-expanded=false]>.czr-open-pre-add-new{display:none}[data-sek-expanded=false]>.czr-items-wrapper{display:none}.sek-side-nimble-logo-wrapper{padding:4px 25px 0 2px!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%}.sek-side-nimble-logo-wrapper .sek-nimble-logo{height:45px}.sek-side-nimble-logo-wrapper .sek-pro-pastil{height:30px}[data-input-type=code_editor] .czr-input{width:100%;float:left}#customize-preview iframe{top:36px}#nimble-top-bar{max-height:36px;position:absolute;text-align:center;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;opacity:.3;top:0;background:rgba(0,0,0,.5);padding:2px;z-index:99999;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%}.outer-section-open #nimble-top-bar,.themes-panel-expanded #nimble-top-bar{display:none}body.nimble-top-bar-visible #nimble-top-bar{opacity:1}#nimble-top-bar:hover{background:rgba(0,0,0,.7)}#nimble-top-bar .nimble-top-bar-content{display:inline-block;line-height:20px;width:80%}#nimble-top-bar .sek-do-undo .icon:before{display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/30px dashicons;vertical-align:top;color:#fff}#nimble-top-bar .sek-settings,#nimble-top-bar .sek-tmpl-saving{font-size:18px;padding:0 5px}#nimble-top-bar button{background:0 0;border:none;color:#fff;cursor:pointer}#nimble-top-bar button[data-nimble-state=disabled]{cursor:inherit;opacity:.4!important;cursor:not-allowed}#nimble-top-bar .sek-do-undo button:hover{opacity:1}#nimble-top-bar .sek-do-undo button:focus{outline:0}#nimble-top-bar .sek-do-undo .icon:before{position:relative}#nimble-top-bar .sek-do-undo .icon.undo:before{content:"\f171";-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#nimble-top-bar .sek-do-undo .icon.do:before{content:"\f172";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#nimble-top-bar .sek-add-content button{padding-top:3px}#nimble-top-bar .sek-nimble-doc{position:absolute;right:10px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%;font-size:12px}#nimble-top-bar .sek-nimble-doc .sek-pointer{text-decoration:underline}.rtl #nimble-top-bar .sek-nimble-doc{left:10px;right:auto}#nimble-top-bar .sek-nimble-doc img{width:30px;height:30px;position:relative;top:2px;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-filter:gray;filter:gray}#nimble-top-bar .sek-nimble-doc:hover img{-webkit-filter:none;filter:none}#nimble-top-bar .sek-notifications{max-width:410px;overflow:hidden;padding:0 10px;font-size:12px;text-decoration:underline;cursor:pointer}#nimble-top-bar .sek-notifications .debug-mode-notif{color:red;line-height:1.5em;padding:3px;background:#fff;display:inline-block;overflow:hidden}#nimble-top-section-save-ui,#nimble-top-tmpl-save-ui{height:auto;min-height:300px;padding:20px;position:absolute;top:-300px;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;opacity:.3;background:rgba(0,0,0,.7);z-index:99999;max-width:100%;font-size:16px;line-height:1.5em}#nimble-top-section-save-ui .nb-section-save-inner,#nimble-top-tmpl-save-ui .nb-tmpl-save-inner{max-width:800px;margin:auto}body.sek-save-section-ui-visible #nimble-top-section-save-ui,body.sek-save-tmpl-ui-visible #nimble-top-tmpl-save-ui{opacity:1;top:36px}#nimble-top-section-save-ui .sek-close-dialog,#nimble-top-tmpl-save-ui .sek-close-dialog{position:absolute;bottom:10px;right:10px;border-radius:3px!important}#nimble-top-section-save-ui #sek-saved-section-title.error,#nimble-top-tmpl-save-ui #sek-saved-tmpl-title.error{border:1px solid red}.sek-section-description,.sek-section-title,.sek-tmpl-description,.sek-tmpl-title,select.sek-saved-section-picker,select.sek-saved-tmpl-picker{margin-top:10px;float:left;clear:both;width:100%}.sek-section-description textarea,.sek-tmpl-description textarea,input#sek-saved-section-title,input#sek-saved-tmpl-title,select.sek-saved-section-picker,select.sek-saved-tmpl-picker{width:97%;max-width:none;margin-bottom:10px}.sek-section-description textarea,.sek-tmpl-description textarea{min-height:100px}.sek-save-section-action .sek-do-save-section,.sek-save-section-action .sek-do-update-section,.sek-save-section-action .sek-open-remove-confirmation,.sek-save-tmpl-action .sek-do-save-tmpl,.sek-save-tmpl-action .sek-do-update-tmpl,.sek-save-tmpl-action .sek-open-remove-confirmation,.sek-saved-section-picker,.sek-saved-tmpl-picker,.sek-section-description,.sek-section-title,.sek-tmpl-description,.sek-tmpl-title{display:none}.section-collection-populated .sek-saved-section-picker,.tmpl-collection-populated .sek-saved-tmpl-picker{display:block}.sek-section-remove-dialog,.sek-tmpl-remove-dialog{display:none;color:red;background:#fff;padding:5px;text-transform:uppercase;float:left;width:96%}.sek-section-remove-dialog .sek-do-remove-section,.sek-tmpl-remove-dialog .sek-do-remove-tmpl{color:red}[data-sek-tmpl-dialog-mode=save] [data-tmpl-mode-switcher=remove]{display:none}[data-sek-tmpl-dialog-mode=save] .sek-saved-tmpl-picker{display:none}[data-sek-tmpl-dialog-mode=save] .sek-tmpl-title{display:block}[data-sek-tmpl-dialog-mode=save] .sek-tmpl-description{display:block}[data-sek-tmpl-dialog-mode=save] .sek-do-save-tmpl{display:block;border-color:#ff0;background:#f9f9b6f7;border-radius:3px!important}[data-sek-tmpl-dialog-mode=update] [data-tmpl-mode-switcher=remove]{display:none}[data-sek-tmpl-dialog-mode=update].sek-tmpl-update-selected .sek-tmpl-title{display:block}[data-sek-tmpl-dialog-mode=update].sek-tmpl-update-selected .sek-tmpl-description{display:block}[data-sek-tmpl-dialog-mode=update].sek-tmpl-update-selected .sek-do-update-tmpl{display:block}.sek-save-tmpl-mode-switcher .sek-ui-button[data-tmpl-mode-switcher=edit]{display:none}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=edit]{display:inline-block!important}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=update]{display:none}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=save]{display:none}[data-sek-tmpl-dialog-mode=edit] [data-tmpl-mode-switcher=remove]{display:none}[data-sek-tmpl-dialog-mode=edit] .sek-saved-tmpl-picker{display:block}[data-sek-tmpl-dialog-mode=edit] .sek-tmpl-title{display:block}[data-sek-tmpl-dialog-mode=edit] .sek-tmpl-description{display:block}[data-sek-tmpl-dialog-mode=edit] .sek-do-update-tmpl{display:block}[data-sek-tmpl-dialog-mode=remove] [data-tmpl-mode-switcher=update]{display:none}[data-sek-tmpl-dialog-mode=remove] [data-tmpl-mode-switcher=save]{display:none}[data-sek-tmpl-dialog-mode=remove].sek-tmpl-remove-selected .sek-open-remove-confirmation{display:block}[data-sek-tmpl-dialog-mode=remove].sek-removal-confirmation-opened .sek-open-remove-confirmation{display:none!important}[data-sek-tmpl-dialog-mode=remove].sek-removal-confirmation-opened .sek-tmpl-remove-dialog{display:block}[data-sek-section-dialog-mode=save] [data-section-mode-switcher=remove]{display:none}[data-sek-section-dialog-mode=save] .sek-saved-section-picker{display:none}[data-sek-section-dialog-mode=save] .sek-section-title{display:block}[data-sek-section-dialog-mode=save] .sek-section-description{display:block}[data-sek-section-dialog-mode=save] .sek-do-save-section{display:block;border-color:#ff0;background:#f9f9b6f7;border-radius:3px!important}[data-sek-section-dialog-mode=update] [data-section-mode-switcher=remove]{display:none}[data-sek-section-dialog-mode=update].sek-section-update-selected .sek-section-title{display:block}[data-sek-section-dialog-mode=update].sek-section-update-selected .sek-section-description{display:block}[data-sek-section-dialog-mode=update].sek-section-update-selected .sek-do-update-section{display:block}.sek-save-section-mode-switcher .sek-ui-button[data-section-mode-switcher=edit]{display:none}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=edit]{display:inline-block!important}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=update]{display:none}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=save]{display:none}[data-sek-section-dialog-mode=edit] [data-section-mode-switcher=remove]{display:none}[data-sek-section-dialog-mode=edit] .sek-saved-section-picker{display:block}[data-sek-section-dialog-mode=edit] .sek-section-title{display:block}[data-sek-section-dialog-mode=edit] .sek-section-description{display:block}[data-sek-section-dialog-mode=edit] .sek-do-update-section{display:block}[data-sek-section-dialog-mode=remove].sek-section-remove-selected .sek-open-remove-confirmation{display:block}[data-sek-section-dialog-mode=remove].sek-removal-confirmation-opened .sek-open-remove-confirmation{display:none!important}[data-sek-section-dialog-mode=remove].sek-removal-confirmation-opened .sek-section-remove-dialog{display:block}[data-sek-section-dialog-mode=remove].sek-is-removal-only [data-section-mode-switcher=save],[data-sek-section-dialog-mode=remove].sek-is-removal-only [data-section-mode-switcher=update]{display:none}#nimble-top-section-save-ui .spinner,#nimble-top-tmpl-save-ui .spinner{display:none}#nimble-top-section-save-ui.nimble-section-processing-ajax .spinner,#nimble-top-tmpl-save-ui.nimble-tmpl-processing-ajax .spinner{display:block;visibility:visible}#nimble-tmpl-gallery,#nimble-tmpl-gallery .sek-tmpl-gal-inject-dialog{-webkit-transition:top .3s ease-in-out;-moz-transition:top,.3s ease-in-out;-ms-transition:top,.3s ease-in-out;-o-transition:top,.3s ease-in-out;transition:top .3s ease-in-out}#nimble-tmpl-gallery{background:rgba(240,240,240,.89)!important;border-bottom:1px solid #aaa!important;color:#222!important;font-size:12px!important;position:absolute;top:-100vh;right:0;left:0;height:calc(100vh - 36px);overflow:auto;padding:15px;z-index:1000}.sek-template-gallery-expanded #nimble-tmpl-gallery{top:36px}#nimble-tmpl-gallery .sek-tmpl-gal-inject-dialog{background:rgba(240,240,240,.89)!important;border-bottom:1px solid #aaa!important;color:#222!important;font-size:12px!important;position:absolute;top:-100vh;right:0;left:0;height:calc(100vh - 36px);overflow:auto;padding:15px;z-index:1001}.sek-tmpl-dialog-expanded #nimble-tmpl-gallery .sek-tmpl-gal-inject-dialog{top:0}#nimble-tmpl-gallery .sek-tmpl-gallery-inner{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%;margin-right:-10px;margin-left:-10px}#nimble-tmpl-gallery .sek-tmpl-gallery-inner *,#nimble-tmpl-gallery .sek-tmpl-gallery-inner :after,#nimble-tmpl-gallery .sek-tmpl-gallery-inner :before{box-sizing:border-box}.sek-tmpl-gallery-inner .sek-tmpl-item{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%;padding:5px 10px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}@media (max-width:1300px){.sek-tmpl-gallery-inner .sek-tmpl-item{-ms-flex:0 0 33.333%;flex:0 0 33.333%;max-width:33.333%}}@media (max-width:1000px){.sek-tmpl-gallery-inner .sek-tmpl-item{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}.sek-tmpl-info{position:absolute;top:0;bottom:0;width:calc(100% - 20px);max-height:calc(100% - 20px);padding:10px;overflow:hidden}.sek-tmpl-info>h3,.sek-tmpl-info>p{color:#fff;overflow:hidden}.sek-tmpl-info>h3{font-size:15px;margin:.5em 0}.sek-tmpl-info>p{font-size:13px;margin:.5em 0}.sek-tmpl-info>.use-tmpl{cursor:pointer;font-size:25px;width:50px;height:50px;color:#535353;background:rgba(255,255,255,.7);border-radius:30px;opacity:0;-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);-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;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.sek-tmpl-info:hover>.use-tmpl{opacity:.7}.sek-tmpl-info>.use-tmpl:hover{opacity:.95}.sek-tmpl-info>.edit-tmpl,.sek-tmpl-info>.remove-tmpl{cursor:pointer;font-size:16px;width:30px;height:30px;color:#535353;background:rgba(255,255,255,.7);border-radius:30px;opacity:.4;-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);-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;position:absolute}.sek-tmpl-info>.remove-tmpl{bottom:10px;right:10px}.sek-tmpl-info>.edit-tmpl{bottom:10px;left:10px}.sek-tmpl-info:hover>.edit-tmpl,.sek-tmpl-info:hover>.remove-tmpl{opacity:.7}.sek-tmpl-info>.remove-tmpl:hover{opacity:.95;color:red}.sek-tmpl-info>.edit-tmpl:hover{opacity:.95;color:#000}.sek-tmpl-gallery-inner .sek-tmpl-thumb{cursor:pointer;position:relative;height:380px;width:100%;background-size:cover;background-repeat:no-repeat;background-position:center}.sek-tmpl-thumb img{max-width:100%}.sek-tmpl-gallery-inner .sek-tmpl-thumb::after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:.45;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.sek-tmpl-gallery-inner .sek-tmpl-item:hover .sek-tmpl-thumb::after{opacity:.65}#sek-gal-top-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.sek-close-button{position:absolute;top:10px;right:20px}.sek-tmpl-filter-wrapper{display:none;width:100%}input.sek-filter-tmpl{width:60%}#sek-gal-top-bar .sek-ui-button-group{width:37%;text-align:right}.search-active .sek-tmpl-item{display:none}.search-active .sek-tmpl-item.search-match{display:-webkit-box;display:-ms-flexbox;display:flex}#sek-tmpl-source-switcher{display:none;width:100%;padding:10px 0}#sek-tmpl-source-switcher .sek-ui-button-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%}#nimble-level-tree{-webkit-transition:top .3s ease-in-out;-moz-transition:top,.3s ease-in-out;-ms-transition:top,.3s ease-in-out;-o-transition:top,.3s ease-in-out;transition:top .3s ease-in-out}.sek-level-tree-expanded #customize-preview iframe{top:366px;height:calc(100vh - 366px)}.sek-level-tree-expanded #nimble-top-bar .sek-level-tree button{color:#44b9e2}#nimble-level-tree{background:#f0f0f0!important;border-bottom:1px solid #aaa!important;color:#222!important;font-size:12px!important;position:absolute;top:36px;right:0;left:0;height:299px;overflow:auto;padding:15px;z-index:0}#nimble-level-tree ul li{padding-left:30px;cursor:pointer;margin-bottom:8px}#nimble-level-tree ul li .sek-remove-level{font-size:16px;opacity:.6}#nimble-level-tree ul li .sek-remove-level:hover{opacity:1}#nimble-level-tree ul li .sek-level-infos{line-height:30px;height:30px;padding-left:33px;position:relative;width:calc(100% - 25px)}.sek-level-infos .sek-inner-level-infos{background:inherit;width:inherit;height:inherit;line-height:inherit;padding-left:4px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:background .2s ease;transition:background .2s ease;-o-transition:background .2s ease}.sek-inner-level-infos:hover{color:#000;background:#fff}.sek-close-level-tree{position:fixed;top:44px;right:25px}img.sek-svg-mod-icon{max-width:45px}.sek-level-infos::before{position:absolute;left:-31px;background:#a2aab2;width:63px;height:2px;content:"";top:calc(50% - 1px)}#nimble-level-tree ul>li:first-child::before{position:absolute;content:"";background:#a2aab2;top:-15px;height:16px;bottom:0;left:-2px;width:2px}#nimble-level-tree ul>li:last-child::after{position:absolute;content:"";background:#f0f0f0;top:16px;bottom:0;left:-2px;width:2px}#nimble-level-tree ul{border-left:2px solid #a2aab2;position:relative}#nimble-level-tree ul>li:last-child{position:relative}
|
assets/czr/sek/js/ccat-sek-control.js
CHANGED
@@ -482,7 +482,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
482 |
|
483 |
// Always set the previewed device back to desktop on ui change
|
484 |
// event 'sek-ui-removed' id triggered when cleaning the registered ui controls
|
485 |
-
// @see ::
|
486 |
// July 2020 commented to fix https://github.com/presscustomizr/nimble-builder/issues/728
|
487 |
// self.bind( 'sek-ui-removed', function() {
|
488 |
// api.previewedDevice( 'desktop' );
|
@@ -514,7 +514,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
514 |
|
515 |
|
516 |
// CLEAN UI BEFORE REMOVAL
|
517 |
-
// 'sek-ui-pre-removal' is triggered in ::
|
518 |
// @params { what : control, id : '' }
|
519 |
self.bind( 'sek-ui-pre-removal', function( params ) {
|
520 |
// CLEAN DRAG N DROP
|
@@ -1153,9 +1153,11 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
1153 |
// });
|
1154 |
});
|
1155 |
|
1156 |
-
$('.sek-nimble-doc', self.topBarId).on( 'click', function(evt) {
|
1157 |
evt.preventDefault();
|
1158 |
-
|
|
|
|
|
1159 |
});
|
1160 |
|
1161 |
$('.sek-tmpl-saving', self.topBarId ).on( 'click', function(evt) {
|
@@ -1175,10 +1177,12 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
1175 |
if ( $(self.topBarId).length < 1 || sektionsLocalizedData.isDebugMode )
|
1176 |
return;
|
1177 |
if ( _.isObject( templateSettingValue ) && templateSettingValue.local_template && 'default' !== templateSettingValue.local_template ) {
|
1178 |
-
$(self.topBarId).find('.sek-notifications')
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
|
|
|
|
1182 |
} else {
|
1183 |
$(self.topBarId).find('.sek-notifications').html('');
|
1184 |
}
|
@@ -1403,7 +1407,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
1403 |
api.previewer.trigger( 'sek-pick-content', {});
|
1404 |
|
1405 |
// Clean registered control
|
1406 |
-
self.
|
1407 |
// Clean even the level settings
|
1408 |
// => otherwise the level settings won't be synchronized when regenerating their ui.
|
1409 |
self.cleanRegisteredLevelSettingsAfterHistoryNavigation();// setting cleaning
|
@@ -3738,9 +3742,12 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
3738 |
};
|
3739 |
_checkWalker_();
|
3740 |
|
|
|
|
|
|
|
3741 |
//api.infoLog('in ::validateSettingValue', valCandidate );
|
3742 |
// if null is returned, the setting value is not set @see customize-base.js
|
3743 |
-
return
|
3744 |
},//validateSettingValue
|
3745 |
|
3746 |
|
@@ -4724,7 +4731,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
4724 |
// REGISTER SETTING AND CONTROL
|
4725 |
switch ( params.action ) {
|
4726 |
// FRONT AND LEVEL MODULES UI
|
4727 |
-
// The registered elements are cleaned (self.
|
4728 |
// because we want to check if the requested UI is not the one already rendered, and fire a button-see-me animation if yes.
|
4729 |
case 'sek-generate-module-ui' :
|
4730 |
try{ dfd = self.generateUIforFrontModules( params, dfd ); } catch( er ) {
|
@@ -4745,7 +4752,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
4745 |
// 2) preset_section
|
4746 |
case 'sek-generate-draggable-candidates-picker-ui' :
|
4747 |
// Clean previously generated UI elements
|
4748 |
-
self.
|
4749 |
try{ dfd = self.generateUIforDraggableContent( params, dfd ); } catch( er ) {
|
4750 |
api.errare( '::generateUI() => error', er );
|
4751 |
dfd = $.Deferred();
|
@@ -4757,7 +4764,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
4757 |
// Fired in ::initialize()
|
4758 |
case 'sek-generate-local-skope-options-ui' :
|
4759 |
// Clean previously generated UI elements
|
4760 |
-
self.
|
4761 |
try{ dfd = self.generateUIforLocalSkopeOptions( params, dfd ); } catch( er ) {
|
4762 |
api.errare( '::generateUI() => error', er );
|
4763 |
dfd = $.Deferred();
|
@@ -4767,7 +4774,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
4767 |
// Fired in ::initialize()
|
4768 |
case 'sek-generate-site-tmpl-options-ui' :
|
4769 |
// Clean previously generated UI elements
|
4770 |
-
self.
|
4771 |
try{ dfd = self.generateUIforSiteTmplOptions( params, dfd ); } catch( er ) {
|
4772 |
api.errare( '::generateUI() => error', er );
|
4773 |
dfd = $.Deferred();
|
@@ -4777,7 +4784,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
4777 |
// Fired in ::initialize()
|
4778 |
case 'sek-generate-global-options-ui' :
|
4779 |
// Clean previously generated UI elements
|
4780 |
-
self.
|
4781 |
try{ dfd = self.generateUIforGlobalOptions( params, dfd ); } catch( er ) {
|
4782 |
api.errare( '::generateUI() => error', er );
|
4783 |
dfd = $.Deferred();
|
@@ -5712,7 +5719,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
5712 |
}//if
|
5713 |
|
5714 |
// Clean previously generated UI elements
|
5715 |
-
self.
|
5716 |
|
5717 |
_do_register_ = function() {
|
5718 |
_.each( modulesRegistrationParams, function( optionData, optionType ){
|
@@ -6082,7 +6089,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
6082 |
}//if
|
6083 |
|
6084 |
// Clean previously generated UI elements
|
6085 |
-
self.
|
6086 |
|
6087 |
|
6088 |
// @return void()
|
@@ -9218,7 +9225,9 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
9218 |
//
|
9219 |
// preserve the settings => because this is where the customizer changeset of values is persisted before publishing
|
9220 |
// typically fired before updating the ui. @see ::generateUI()
|
9221 |
-
|
|
|
|
|
9222 |
var self = this,
|
9223 |
registered = $.extend( true, [], self.registered() || [] );
|
9224 |
|
@@ -9247,6 +9256,28 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
9247 |
return _reg_.what === 'setting';
|
9248 |
});
|
9249 |
self.registered( registered );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9250 |
},
|
9251 |
|
9252 |
// This action can be fired after an import, to update the local settings with the imported values
|
@@ -11474,7 +11505,11 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
11474 |
|
11475 |
// REACT TO EDITOR VISIBILITY
|
11476 |
api.sekEditorExpanded.bind( function ( expanded, from, params ) {
|
11477 |
-
mayBeAwakeTinyMceEditor();
|
|
|
|
|
|
|
|
|
11478 |
//api.infoLog('in api.sekEditorExpanded', expanded );
|
11479 |
if ( expanded && api.sekTinyMceEditor ) {
|
11480 |
api.sekTinyMceEditor.focus();
|
@@ -12357,11 +12392,10 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
12357 |
$('#nimble-tmpl-gallery').find('.sek-tmpl-gallery-inner').html('');
|
12358 |
|
12359 |
var _doPrintTmplGalleryHtml = function(params) {
|
12360 |
-
self.getTemplateGalleryHtml( params ).done( function( html ) {
|
12361 |
$tmplGalWrapper = $('#nimble-tmpl-gallery');
|
12362 |
$tmplGalWrapper.find('.sek-tmpl-gallery-inner').html( html );
|
12363 |
});
|
12364 |
-
return self.getTemplateGalleryHtml( params );
|
12365 |
};
|
12366 |
// Wait for the gallery to be fetched and rendered
|
12367 |
_doPrintTmplGalleryHtml( params ).done( function( html ) {
|
@@ -13301,7 +13335,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13301 |
// FONT PICKER
|
13302 |
font_picker : function( input_options ) {
|
13303 |
var input = this,
|
13304 |
-
item = input.input_parent
|
|
|
13305 |
|
13306 |
var _getFontCollections = function() {
|
13307 |
var dfd = $.Deferred();
|
@@ -13387,8 +13422,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13387 |
return fontCollections.gfonts;
|
13388 |
}
|
13389 |
|
13390 |
-
}
|
13391 |
-
$fontSelectElement = $( 'select[data-czrtype="' + input.id + '"]', input.container );
|
13392 |
|
13393 |
// generates the options
|
13394 |
// @param type = cfont or gfont
|
@@ -13572,13 +13606,36 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13572 |
return _.isString( split[0] ) ? split[0].replace(/[+|:]/g, ' ') : '';//replaces special characters ( + ) by space
|
13573 |
};
|
13574 |
|
13575 |
-
|
13576 |
-
|
13577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13578 |
});
|
13579 |
-
|
13580 |
-
api.errare( 'font_picker => fail response =>', _r_ );
|
13581 |
-
});
|
13582 |
}//font_picker()
|
13583 |
});//$.extend( api.czrInputMap, {})
|
13584 |
|
@@ -13595,7 +13652,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13595 |
// FONT AWESOME ICON PICKER
|
13596 |
fa_icon_picker : function() {
|
13597 |
var input = this,
|
13598 |
-
_selected_found = false
|
|
|
13599 |
|
13600 |
//generates the options
|
13601 |
var _generateOptions = function( iconCollection ) {
|
@@ -13610,7 +13668,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13610 |
$.extend( _attributes, { selected : "selected" } );
|
13611 |
_selected_found = true;
|
13612 |
}
|
13613 |
-
$
|
13614 |
});
|
13615 |
|
13616 |
|
@@ -13632,7 +13690,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13632 |
$_placeholder = $('<option>', { selected: 'selected' } );
|
13633 |
}
|
13634 |
//Initialize czrSelect2
|
13635 |
-
$
|
13636 |
.prepend( $_placeholder )
|
13637 |
.czrSelect2({
|
13638 |
templateResult: addIcon,
|
@@ -13670,16 +13728,13 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13670 |
};//_getIconsCollections
|
13671 |
|
13672 |
// do
|
13673 |
-
var _do_ = function(
|
13674 |
if ( true === input.iconCollectionSet )
|
13675 |
return;
|
13676 |
$.when( _getIconsCollections() ).done( function( iconCollection ) {
|
13677 |
_generateOptions( iconCollection );
|
13678 |
-
if (
|
13679 |
-
|
13680 |
-
_.delay( function() {
|
13681 |
-
try{ $( 'select[data-czrtype]', input.container ).czrSelect2('open'); }catch(er) {}
|
13682 |
-
}, 100 );
|
13683 |
}
|
13684 |
}).fail( function( _r_ ) {
|
13685 |
api.errare( 'fa_icon_picker => fail response =>', _r_ );
|
@@ -13688,12 +13743,10 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
13688 |
};
|
13689 |
|
13690 |
// Generate options and open select2
|
13691 |
-
input.container.on('click',
|
13692 |
-
_do_();
|
13693 |
-
});
|
13694 |
|
13695 |
// schedule the iconCollectionSet after a delay
|
13696 |
-
_.delay( function() { _do_( { open_on_init : false } );}, 1000 );
|
13697 |
|
13698 |
}
|
13699 |
});//$.extend( api.czrInputMap, {})
|
@@ -15161,6 +15214,9 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
15161 |
if ( _.isNull( _id ) ) {
|
15162 |
throw new Error( 'api.czrInputMap.nimble_tinymce_editor => missing textarea for module :' + input.module.id );
|
15163 |
}
|
|
|
|
|
|
|
15164 |
if ( tinyMCE.get( _id ) ) {
|
15165 |
throw new Error( 'api.czrInputMap.nimble_tinymce_editor => duplicate editor id.');
|
15166 |
}
|
@@ -15240,14 +15296,13 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
15240 |
wp.editor.initialize( _id, init_settings );
|
15241 |
// Note that an easy way to instantiate a basic editor would be to use :
|
15242 |
// wp.editor.initialize( _id, { tinymce : { forced_root_block : "", wpautop: false }, quicktags : true });
|
15243 |
-
|
15244 |
var _editor = tinyMCE.get( _id );
|
15245 |
if ( ! _editor ) {
|
15246 |
throw new Error( 'setupTinyMceEditor => missing editor instance for module :' + input.module.id );
|
15247 |
}
|
15248 |
|
15249 |
// Store the id of each instantiated tinyMceEditor
|
15250 |
-
// used in api.czrSektion::
|
15251 |
api.czrActiveWPEditors = api.czrActiveWPEditors || [];
|
15252 |
var currentEditors = $.extend( true, [], api.czrActiveWPEditors );
|
15253 |
currentEditors.push(_id);
|
@@ -15399,9 +15454,15 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
15399 |
init_settings.toolbar1 = sektionsLocalizedData.defaultToolbarBtns;
|
15400 |
init_settings.toolbar2 = "";
|
15401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15402 |
|
15403 |
-
window.tinymce.init( init_settings );
|
15404 |
-
window.QTags.getInstance( _id );
|
15405 |
// wp.editor.initialize( _id, {
|
15406 |
// //tinymce : true,
|
15407 |
// tinymce: nimbleTinyMCEPreInit.mceInit[_id],
|
@@ -15409,9 +15470,14 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
15409 |
// mediaButtons: true
|
15410 |
// });
|
15411 |
|
15412 |
-
var _editor
|
15413 |
-
if (
|
15414 |
-
|
|
|
|
|
|
|
|
|
|
|
15415 |
}
|
15416 |
|
15417 |
// Let's set the input() value when the editor is ready
|
@@ -15439,17 +15505,21 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
15439 |
// trigger a resize to adjust height on init https://github.com/presscustomizr/nimble-builder/issues/409
|
15440 |
$(window).trigger('resize');
|
15441 |
};
|
15442 |
-
if ( _editor.initialized ) {
|
15443 |
-
_doOnInit();
|
15444 |
-
} else {
|
15445 |
-
_editor.on( 'init', _doOnInit );
|
15446 |
-
}
|
15447 |
|
15448 |
-
//
|
15449 |
-
|
15450 |
-
|
15451 |
-
|
15452 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15453 |
|
15454 |
// store the current input now, so we'll always get the right one when textarea changes
|
15455 |
api.sekCurrentDetachedTinyMceInput = input;
|
@@ -15504,7 +15574,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
|
|
15504 |
// we're after setting id like
|
15505 |
// - nimble___[skp__post_post_1] <= local skope setting
|
15506 |
// - __nimble__4234ae1dc0fa__font_settings <= level setting
|
15507 |
-
// -
|
15508 |
// - __nimble__skp__post_post_1__localSkopeOptions__template <= local option setting
|
15509 |
hasNimbleDirties = -1 !== _setId.indexOf('nimble');
|
15510 |
});
|
482 |
|
483 |
// Always set the previewed device back to desktop on ui change
|
484 |
// event 'sek-ui-removed' id triggered when cleaning the registered ui controls
|
485 |
+
// @see ::cleanRegisteredAndLargeSelectInput()
|
486 |
// July 2020 commented to fix https://github.com/presscustomizr/nimble-builder/issues/728
|
487 |
// self.bind( 'sek-ui-removed', function() {
|
488 |
// api.previewedDevice( 'desktop' );
|
514 |
|
515 |
|
516 |
// CLEAN UI BEFORE REMOVAL
|
517 |
+
// 'sek-ui-pre-removal' is triggered in ::cleanRegisteredAndLargeSelectInput
|
518 |
// @params { what : control, id : '' }
|
519 |
self.bind( 'sek-ui-pre-removal', function( params ) {
|
520 |
// CLEAN DRAG N DROP
|
1153 |
// });
|
1154 |
});
|
1155 |
|
1156 |
+
$('.sek-nimble-doc, .sek-notifications', self.topBarId).on( 'click', function(evt) {
|
1157 |
evt.preventDefault();
|
1158 |
+
if ( $(this).data('doc-href') ) {
|
1159 |
+
window.open($(this).data('doc-href'), '_blank');
|
1160 |
+
}
|
1161 |
});
|
1162 |
|
1163 |
$('.sek-tmpl-saving', self.topBarId ).on( 'click', function(evt) {
|
1177 |
if ( $(self.topBarId).length < 1 || sektionsLocalizedData.isDebugMode )
|
1178 |
return;
|
1179 |
if ( _.isObject( templateSettingValue ) && templateSettingValue.local_template && 'default' !== templateSettingValue.local_template ) {
|
1180 |
+
$(self.topBarId).find('.sek-notifications')
|
1181 |
+
.html([
|
1182 |
+
'<span class="fas fa-info-circle"></span>',
|
1183 |
+
sektionsLocalizedData.i18n['This page uses Nimble Builder template.']
|
1184 |
+
].join(' '))
|
1185 |
+
.attr('data-doc-href', 'https://docs.presscustomizr.com/article/339-changing-the-page-template');
|
1186 |
} else {
|
1187 |
$(self.topBarId).find('.sek-notifications').html('');
|
1188 |
}
|
1407 |
api.previewer.trigger( 'sek-pick-content', {});
|
1408 |
|
1409 |
// Clean registered control
|
1410 |
+
self.cleanRegisteredAndLargeSelectInput();//<= normal cleaning
|
1411 |
// Clean even the level settings
|
1412 |
// => otherwise the level settings won't be synchronized when regenerating their ui.
|
1413 |
self.cleanRegisteredLevelSettingsAfterHistoryNavigation();// setting cleaning
|
3742 |
};
|
3743 |
_checkWalker_();
|
3744 |
|
3745 |
+
if ( errorDetected ) {
|
3746 |
+
api.infoLog('error in ::validateSettingValue', valCandidate );
|
3747 |
+
}
|
3748 |
//api.infoLog('in ::validateSettingValue', valCandidate );
|
3749 |
// if null is returned, the setting value is not set @see customize-base.js
|
3750 |
+
return valCandidate;
|
3751 |
},//validateSettingValue
|
3752 |
|
3753 |
|
4731 |
// REGISTER SETTING AND CONTROL
|
4732 |
switch ( params.action ) {
|
4733 |
// FRONT AND LEVEL MODULES UI
|
4734 |
+
// The registered elements are cleaned (self.cleanRegisteredAndLargeSelectInput()) in the callbacks,
|
4735 |
// because we want to check if the requested UI is not the one already rendered, and fire a button-see-me animation if yes.
|
4736 |
case 'sek-generate-module-ui' :
|
4737 |
try{ dfd = self.generateUIforFrontModules( params, dfd ); } catch( er ) {
|
4752 |
// 2) preset_section
|
4753 |
case 'sek-generate-draggable-candidates-picker-ui' :
|
4754 |
// Clean previously generated UI elements
|
4755 |
+
self.cleanRegisteredAndLargeSelectInput();
|
4756 |
try{ dfd = self.generateUIforDraggableContent( params, dfd ); } catch( er ) {
|
4757 |
api.errare( '::generateUI() => error', er );
|
4758 |
dfd = $.Deferred();
|
4764 |
// Fired in ::initialize()
|
4765 |
case 'sek-generate-local-skope-options-ui' :
|
4766 |
// Clean previously generated UI elements
|
4767 |
+
self.cleanRegisteredAndLargeSelectInput();
|
4768 |
try{ dfd = self.generateUIforLocalSkopeOptions( params, dfd ); } catch( er ) {
|
4769 |
api.errare( '::generateUI() => error', er );
|
4770 |
dfd = $.Deferred();
|
4774 |
// Fired in ::initialize()
|
4775 |
case 'sek-generate-site-tmpl-options-ui' :
|
4776 |
// Clean previously generated UI elements
|
4777 |
+
self.cleanRegisteredAndLargeSelectInput();
|
4778 |
try{ dfd = self.generateUIforSiteTmplOptions( params, dfd ); } catch( er ) {
|
4779 |
api.errare( '::generateUI() => error', er );
|
4780 |
dfd = $.Deferred();
|
4784 |
// Fired in ::initialize()
|
4785 |
case 'sek-generate-global-options-ui' :
|
4786 |
// Clean previously generated UI elements
|
4787 |
+
self.cleanRegisteredAndLargeSelectInput();
|
4788 |
try{ dfd = self.generateUIforGlobalOptions( params, dfd ); } catch( er ) {
|
4789 |
api.errare( '::generateUI() => error', er );
|
4790 |
dfd = $.Deferred();
|
5719 |
}//if
|
5720 |
|
5721 |
// Clean previously generated UI elements
|
5722 |
+
self.cleanRegisteredAndLargeSelectInput();
|
5723 |
|
5724 |
_do_register_ = function() {
|
5725 |
_.each( modulesRegistrationParams, function( optionData, optionType ){
|
6089 |
}//if
|
6090 |
|
6091 |
// Clean previously generated UI elements
|
6092 |
+
self.cleanRegisteredAndLargeSelectInput();
|
6093 |
|
6094 |
|
6095 |
// @return void()
|
9225 |
//
|
9226 |
// preserve the settings => because this is where the customizer changeset of values is persisted before publishing
|
9227 |
// typically fired before updating the ui. @see ::generateUI()
|
9228 |
+
//
|
9229 |
+
// March 2021 => also clean large select options like fontPicker which generates thousands of lines and slow down the UI dramatically if kept
|
9230 |
+
cleanRegisteredAndLargeSelectInput : function( _id_ ) {
|
9231 |
var self = this,
|
9232 |
registered = $.extend( true, [], self.registered() || [] );
|
9233 |
|
9256 |
return _reg_.what === 'setting';
|
9257 |
});
|
9258 |
self.registered( registered );
|
9259 |
+
|
9260 |
+
// March 2021
|
9261 |
+
// clean font picker markup, which generates thousands of select options lines and slow down the entire UI when kept
|
9262 |
+
// This concerns the global options and local options for which controls are not cleaned like the one of the levels UI
|
9263 |
+
self.cachedElements.$body.find('[data-input-type="font_picker"]').each( function() {
|
9264 |
+
var currentInputVal = $(this).find('select[data-czrtype]').val();
|
9265 |
+
// clean select 2 instance + all select options
|
9266 |
+
if ( !_.isUndefined( $(this).find('select[data-czrtype]').data('czrSelect2') ) ) {
|
9267 |
+
$(this).find('select[data-czrtype]').czrSelect2('destroy');
|
9268 |
+
}
|
9269 |
+
$(this).find('select[data-czrtype]').html('');
|
9270 |
+
|
9271 |
+
// append the current input val
|
9272 |
+
$(this).find('select[data-czrtype]').html('').append( $('<option>', {
|
9273 |
+
value : currentInputVal,
|
9274 |
+
html: currentInputVal,
|
9275 |
+
selected : "selected"
|
9276 |
+
}));
|
9277 |
+
|
9278 |
+
$(this).find('select[data-czrtype]').data('selectOptionsSet', false );
|
9279 |
+
});
|
9280 |
+
|
9281 |
},
|
9282 |
|
9283 |
// This action can be fired after an import, to update the local settings with the imported values
|
11505 |
|
11506 |
// REACT TO EDITOR VISIBILITY
|
11507 |
api.sekEditorExpanded.bind( function ( expanded, from, params ) {
|
11508 |
+
try{ mayBeAwakeTinyMceEditor(); } catch(er) {
|
11509 |
+
if ( window.console ) {
|
11510 |
+
console.log('Error in mayBeAwakeTinyMceEditor ', er );
|
11511 |
+
}
|
11512 |
+
}
|
11513 |
//api.infoLog('in api.sekEditorExpanded', expanded );
|
11514 |
if ( expanded && api.sekTinyMceEditor ) {
|
11515 |
api.sekTinyMceEditor.focus();
|
12392 |
$('#nimble-tmpl-gallery').find('.sek-tmpl-gallery-inner').html('');
|
12393 |
|
12394 |
var _doPrintTmplGalleryHtml = function(params) {
|
12395 |
+
return self.getTemplateGalleryHtml( params ).done( function( html ) {
|
12396 |
$tmplGalWrapper = $('#nimble-tmpl-gallery');
|
12397 |
$tmplGalWrapper.find('.sek-tmpl-gallery-inner').html( html );
|
12398 |
});
|
|
|
12399 |
};
|
12400 |
// Wait for the gallery to be fetched and rendered
|
12401 |
_doPrintTmplGalleryHtml( params ).done( function( html ) {
|
13335 |
// FONT PICKER
|
13336 |
font_picker : function( input_options ) {
|
13337 |
var input = this,
|
13338 |
+
item = input.input_parent,
|
13339 |
+
$fontSelectElement = $( 'select[data-czrtype="' + input.id + '"]', input.container );
|
13340 |
|
13341 |
var _getFontCollections = function() {
|
13342 |
var dfd = $.Deferred();
|
13422 |
return fontCollections.gfonts;
|
13423 |
}
|
13424 |
|
13425 |
+
};
|
|
|
13426 |
|
13427 |
// generates the options
|
13428 |
// @param type = cfont or gfont
|
13606 |
return _.isString( split[0] ) ? split[0].replace(/[+|:]/g, ' ') : '';//replaces special characters ( + ) by space
|
13607 |
};
|
13608 |
|
13609 |
+
// On load, simply print the current input value
|
13610 |
+
// the full list of font ( several thousands !! ) will be rendered on click
|
13611 |
+
// March 2021 => to avoid slowing down the UI, the font picker select options are cleaned in cleanRegisteredAndLargeSelectInput()
|
13612 |
+
var inputVal = input();
|
13613 |
+
$fontSelectElement.append( $('<option>', {
|
13614 |
+
value : inputVal,
|
13615 |
+
html: inputVal,
|
13616 |
+
selected : "selected"
|
13617 |
+
}));
|
13618 |
+
|
13619 |
+
// Generate options and open select2
|
13620 |
+
input.container.on('click', function() {
|
13621 |
+
if ( true === $fontSelectElement.data('selectOptionsSet') )
|
13622 |
+
return;
|
13623 |
+
|
13624 |
+
$fontSelectElement.data('selectOptionsSet', true );
|
13625 |
+
// reset previous default html
|
13626 |
+
$fontSelectElement.html('');
|
13627 |
+
|
13628 |
+
$.when( _getFontCollections() ).done( function( fontCollections ) {
|
13629 |
+
_preprocessSelect2ForFontFamily().done( function( customResultsAdapter ) {
|
13630 |
+
_setupSelectForFontFamilySelector( customResultsAdapter, fontCollections );
|
13631 |
+
if ( !_.isUndefined( input.container.find('select[data-czrtype]').data('czrSelect2') ) ) {
|
13632 |
+
input.container.find('select[data-czrtype]').czrSelect2('open');
|
13633 |
+
}
|
13634 |
+
});
|
13635 |
+
}).fail( function( _r_ ) {
|
13636 |
+
api.errare( 'font_picker => fail response =>', _r_ );
|
13637 |
});
|
13638 |
+
});
|
|
|
|
|
13639 |
}//font_picker()
|
13640 |
});//$.extend( api.czrInputMap, {})
|
13641 |
|
13652 |
// FONT AWESOME ICON PICKER
|
13653 |
fa_icon_picker : function() {
|
13654 |
var input = this,
|
13655 |
+
_selected_found = false,
|
13656 |
+
$selectElement = $( 'select[data-czrtype="' + input.id + '"]', input.container );
|
13657 |
|
13658 |
//generates the options
|
13659 |
var _generateOptions = function( iconCollection ) {
|
13668 |
$.extend( _attributes, { selected : "selected" } );
|
13669 |
_selected_found = true;
|
13670 |
}
|
13671 |
+
$selectElement.append( $('<option>', _attributes) );
|
13672 |
});
|
13673 |
|
13674 |
|
13690 |
$_placeholder = $('<option>', { selected: 'selected' } );
|
13691 |
}
|
13692 |
//Initialize czrSelect2
|
13693 |
+
$selectElement
|
13694 |
.prepend( $_placeholder )
|
13695 |
.czrSelect2({
|
13696 |
templateResult: addIcon,
|
13728 |
};//_getIconsCollections
|
13729 |
|
13730 |
// do
|
13731 |
+
var _do_ = function() {
|
13732 |
if ( true === input.iconCollectionSet )
|
13733 |
return;
|
13734 |
$.when( _getIconsCollections() ).done( function( iconCollection ) {
|
13735 |
_generateOptions( iconCollection );
|
13736 |
+
if ( !_.isUndefined( input.container.find('select[data-czrtype]').data('czrSelect2') ) ) {
|
13737 |
+
input.container.find('select[data-czrtype]').czrSelect2('open');
|
|
|
|
|
|
|
13738 |
}
|
13739 |
}).fail( function( _r_ ) {
|
13740 |
api.errare( 'fa_icon_picker => fail response =>', _r_ );
|
13743 |
};
|
13744 |
|
13745 |
// Generate options and open select2
|
13746 |
+
input.container.on('click', _do_ );
|
|
|
|
|
13747 |
|
13748 |
// schedule the iconCollectionSet after a delay
|
13749 |
+
//_.delay( function() { _do_( { open_on_init : false } );}, 1000 );
|
13750 |
|
13751 |
}
|
13752 |
});//$.extend( api.czrInputMap, {})
|
15214 |
if ( _.isNull( _id ) ) {
|
15215 |
throw new Error( 'api.czrInputMap.nimble_tinymce_editor => missing textarea for module :' + input.module.id );
|
15216 |
}
|
15217 |
+
if ( !window.tinyMCE ) {
|
15218 |
+
throw new Error( 'api.czrInputMap.nimble_tinymce_editor => tinyMCE not defined.');
|
15219 |
+
}
|
15220 |
if ( tinyMCE.get( _id ) ) {
|
15221 |
throw new Error( 'api.czrInputMap.nimble_tinymce_editor => duplicate editor id.');
|
15222 |
}
|
15296 |
wp.editor.initialize( _id, init_settings );
|
15297 |
// Note that an easy way to instantiate a basic editor would be to use :
|
15298 |
// wp.editor.initialize( _id, { tinymce : { forced_root_block : "", wpautop: false }, quicktags : true });
|
|
|
15299 |
var _editor = tinyMCE.get( _id );
|
15300 |
if ( ! _editor ) {
|
15301 |
throw new Error( 'setupTinyMceEditor => missing editor instance for module :' + input.module.id );
|
15302 |
}
|
15303 |
|
15304 |
// Store the id of each instantiated tinyMceEditor
|
15305 |
+
// used in api.czrSektion::cleanRegisteredAndLargeSelectInput
|
15306 |
api.czrActiveWPEditors = api.czrActiveWPEditors || [];
|
15307 |
var currentEditors = $.extend( true, [], api.czrActiveWPEditors );
|
15308 |
currentEditors.push(_id);
|
15454 |
init_settings.toolbar1 = sektionsLocalizedData.defaultToolbarBtns;
|
15455 |
init_settings.toolbar2 = "";
|
15456 |
|
15457 |
+
if ( window.tinymce ) {
|
15458 |
+
window.tinymce.init( init_settings );
|
15459 |
+
window.QTags.getInstance( _id );
|
15460 |
+
} else {
|
15461 |
+
if ( window.console ) {
|
15462 |
+
console.log('Error in ::detached_tinymce_editor => window.tinymce not defined ');
|
15463 |
+
}
|
15464 |
+
}
|
15465 |
|
|
|
|
|
15466 |
// wp.editor.initialize( _id, {
|
15467 |
// //tinymce : true,
|
15468 |
// tinymce: nimbleTinyMCEPreInit.mceInit[_id],
|
15470 |
// mediaButtons: true
|
15471 |
// });
|
15472 |
|
15473 |
+
var _editor;
|
15474 |
+
if ( window.tinyMCE ) {
|
15475 |
+
_editor = tinyMCE.get( _id );
|
15476 |
+
//throw new Error( 'api.czrInputMap.detached_tinymce_editor => tinyMCE not defined.');
|
15477 |
+
} else {
|
15478 |
+
if ( window.console ) {
|
15479 |
+
console.log('Error in ::detached_tinymce_editor => window.tinyMCE not defined ');
|
15480 |
+
}
|
15481 |
}
|
15482 |
|
15483 |
// Let's set the input() value when the editor is ready
|
15505 |
// trigger a resize to adjust height on init https://github.com/presscustomizr/nimble-builder/issues/409
|
15506 |
$(window).trigger('resize');
|
15507 |
};
|
|
|
|
|
|
|
|
|
|
|
15508 |
|
15509 |
+
// if we have an editor, let's go
|
15510 |
+
if ( _editor ) {
|
15511 |
+
if ( _editor.initialized ) {
|
15512 |
+
_doOnInit();
|
15513 |
+
} else {
|
15514 |
+
_editor.on( 'init', _doOnInit );
|
15515 |
+
}
|
15516 |
+
|
15517 |
+
// bind events
|
15518 |
+
_editor.on( 'input change keyup keydown click SetContent BeforeSetContent', function( evt ) {
|
15519 |
+
//$textarea.trigger( 'change', {current_input : input} );
|
15520 |
+
input( isAutoPEnabled() ? _editor.getContent() : wp.editor.removep( _editor.getContent() ) );
|
15521 |
+
});
|
15522 |
+
}
|
15523 |
|
15524 |
// store the current input now, so we'll always get the right one when textarea changes
|
15525 |
api.sekCurrentDetachedTinyMceInput = input;
|
15574 |
// we're after setting id like
|
15575 |
// - nimble___[skp__post_post_1] <= local skope setting
|
15576 |
// - __nimble__4234ae1dc0fa__font_settings <= level setting
|
15577 |
+
// - nimble_global_opts <= global options
|
15578 |
// - __nimble__skp__post_post_1__localSkopeOptions__template <= local option setting
|
15579 |
hasNimbleDirties = -1 !== _setId.indexOf('nimble');
|
15580 |
});
|
assets/czr/sek/js/ccat-sek-control.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(u,m){u.CZR_Helpers.getInputSubTemplate=function(e){return 0<m("#tmpl-nimble-subtemplate___"+e).length?wp.template("nimble-subtemplate___"+e):(u.errare("problem in api.czr_sektions.getInputSubTemplate(), missing js template in the DOM for template_name : "+e),null)};var f=u.CZR_Helpers.getModuleTmpl;u.CZR_Helpers.getModuleTmpl=function(n){if(-1===(n=_.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:u.settings.nonce.save},n)).module_id.indexOf("__nimble__"))return f(n);var o=m.Deferred();if((_.isEmpty(n.tmpl)||_.isEmpty(n.module_type))&&o.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),!u.czr_sektions.isModuleRegistered(n.module_type))return o.reject("api.CZR_Helpers.getModuleTmpl => module type not registered"),o.resolve(),f(n);if(_.contains([],n.module_type))return o.resolve(),f(n);var e=u.czr_sektions.getRegisteredModuleProperty(n.module_type,"tmpl"),t=_.isObject(e)&&e[n.tmpl]?e[n.tmpl]:{};!_.isEmpty(t)&&_.isObject(t)||(u.errare("getModuleTmpl => Error empty or invalid input map for module : ",n.module_type),o.reject("getModuleTmpl => Error empty or invalid input map for module : ",n.module_type));var r=n.item_model,i=m.extend(!0,{},u.czr_sektions.getDefaultItemModelFromRegisteredModuleData(n.module_type)),s=m.extend(!0,{},i);r=m.extend(s,r),_.isEmpty(r)&&(u.errare("getModuleTmpl => Error invalid item model for module : ",n.module_type),o.reject("getModuleTmpl => Error invalid item model for module : ",n.module_type));var a,l="",c=function(e){var i="";return _.each(e,function(e,t){a=e.input_type;try{i+=wp.template("nimble-input-wrapper")({input_type:a,input_data:e,input_id:t,item_model:r,input_tmpl:function(e){var t=e;switch(e){case"czr_layouts":case"select":case"simpleselect":case"fa_icon_picker":case"font_picker":case"animation_picker":t="simpleselect";break;case"simpleselectWithDeviceSwitcher":t="simpleselect_deviceswitcher";break;case"multiselect":case"category_picker":t="multiselect";break;case"h_alignment":case"horizAlignmentWithDeviceSwitcher":t="h_alignment";break;case"h_text_alignment":case"horizTextAlignmentWithDeviceSwitcher":t="h_text_alignment";break;case"range_simple":case"range_simple_device_switcher":t="range_simple";break;case"number_simple":t="number_simple";break;case"font_size":case"line_height":case"range_with_unit_picker":case"range_with_unit_picker_device_switcher":t="range_with_unit_picker";break;case"spacing":case"spacingWithDeviceSwitcher":t="spacing";break;case"upload":case"upload_url":t="upload";break;case"bg_position":case"bgPositionWithDeviceSwitcher":t="bg_position";break;case"verticalAlignWithDeviceSwitcher":t="v_alignment"}return 0<m("#tmpl-nimble-input___"+t).length?wp.template("nimble-input___"+t):(u.errare("problem in getInputTemplate(), missing js template in the DOM for input_type : "+e),null)}(a),control_id:n.control_id})}catch(e){return u.errare("getModuleTmpl => Error when parsing the nimble-input-wrapper template",e),o.reject("getModuleTmpl => Error when parsing the nimble-input-wrapper template"),!1}}),i};if(t.tabs){var d="",p="";_.each(t.tabs,function(e,t){var i=m.extend(!0,{},e);i=m.extend({inputs:{},title:""},i);var n=_.isEmpty(i.attributes)?"":i.attributes;d+='<li data-tab-id="section-topline-'+(+t+1)+'" '+n+'><a href="#" title="'+i.title+'"><span>'+i.title+"</span></a></li>";var o=c(i.inputs);p+='<section id="section-topline-'+(+t+1)+'">'+o+"</section>"}),l+=['<div class="tabs tabs-style-topline">',"<nav>","<ul>",d,"</ul>","</nav>",'<div class="content-wrap">',p,"</div>","</div>"].join("")}else l=c(t);return o.resolve(l).promise()}}(wp.customize,jQuery);var CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{cachedElements:{$body:s("body"),$window:s(window)},initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(r.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");e.SECTION_ID_FOR_GLOBAL_OPTIONS="__globalOptionsSectionId",e.SECTION_ID_FOR_LOCAL_OPTIONS="__localOptionsSection",e.SECTION_ID_FOR_CONTENT_PICKER="__content_picker__",e.SECTION_ID_FOR_SITE_TMPL="__siteTmplSection",e.MAX_NUMBER_OF_COLUMNS=12,e.SETTING_UPDATE_BUFFER=100,e.TINYMCE_EDITOR_HEIGHT=100,e.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new r.Value({}),e.registered=new r.Value([]),wp.customize.apiIsReady?e.doSektionThinksOnApiReady():r.bind("ready",function(){e.doSektionThinksOnApiReady()}),r.bind("save-request-params",function(e){s.extend(e,{local_skope_id:r.czr_skopeBase.getSkopeProperty("skope_id"),group_skope_id:r.czr_skopeBase.getSkopeProperty("skope_id","group"),active_locations:r.czr_sektions.activeLocations()})});var t=function(){_.isArray(r.czrActiveWPEditors)&&(_.each(r.czrActiveWPEditors,function(e){wp.editor.remove(e)}),r.czrActiveWPEditors=[])};r.bind("sek-before-clean-registered",t),r.bind("czr-all-items-closed",t)},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){r.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),r.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),r.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.deferred.embedded.done(function(){!0!==e.boundForLocalOptionGeneration&&(e.boundForLocalOptionGeneration=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-local-skope-options-ui"})}))})}),sektionsLocalizedData.isSiteTemplateEnabled&&r.section(o.SECTION_ID_FOR_SITE_TMPL,function(e){e.deferred.embedded.done(function(){!0!==e.siteTmplOptionsGenerated&&(e.siteTmplOptionsGenerated=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-site-tmpl-options-ui"})}))})}),r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),o.nb_is_ready=!0,r.trigger("nimble-ready-for-current-skope")};_.isEmpty(r.czr_activeSkopes().local)||i(),r.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),r.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){r.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){s(this).trigger("click")})})})}),s("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){r.previewer.trigger("sek-reset-collection",{scope:"local"})}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&r.control(e.id,function(e){e.container.find("[draggable]").each(function(){s(this).off("dragstart dragend")})}),"control"==e.what&&r.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(s(this).data("czrSelect2"))||s(this).czrSelect2("destroy")})})}),r.bind("czr-new-registered",function(e){if(_.isUndefined(e.origin))throw new Error("czr-new-registered event => missing params.origin");if("nimble"===e.origin&&!1!==e.track){var t=o.registered(),i=s.extend(!0,[],t),n=_.findWhere(i,{id:e.id});if(!_.isEmpty(n)&&_.isEqual(n,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);i.push(e),o.registered(i)}}),o.activeLocations=new r.Value([]),o.activeLocationsInfo=new r.Value([]),r.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[]),o.activeLocationsInfo(_.isObject(e)&&_.isArray(e.active_locs_info)?e.active_locs_info:[])}),o.setupTopBar(),o.setupSaveSectionUI(),o.setupSaveTmplUI(),o.lastClickedTargetInPreview=new r.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?r.previewer.send("sek-set-double-click-target",e):r.previewer.send("sek-reset-double-click-target"),clearTimeout(o.cachedElements.$window.data("_preview_target_timer_")),o.cachedElements.$window.data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),r.previewer.send("sek-reset-double-click-target")},2e4))}),r.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),s(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){r.previewer.trigger("sek-notify",{notif_id:"has-active-cache-plugin",type:"info",duration:2e4,message:['<span style="color:#0075a2">',sektionsLocalizedData.i18n["You seem to be using a cache plugin."],!_.isString(sektionsLocalizedData.hasActiveCachePlugin)||sektionsLocalizedData.hasActiveCachePlugin.length<2?"":"<strong> ("+sektionsLocalizedData.hasActiveCachePlugin+")</strong><br/>"," <strong>",sektionsLocalizedData.i18n["It is recommended to disable your cache plugin when customizing your website."],"</strong>","</span>"].join("")})},2e3),r.previewer.bind("multi-items-module-refreshed",function(t){_.isUndefined(t.apiParams.control_id)||r.control(t.apiParams.control_id,function(e){_.isUndefined(e.params.sek_registration_params)||r.control(e.id).params.sek_registration_params.module_id===t.apiParams.id&&e.czr_Module.each(function(e){e.czr_Item.each(function(e){"expanded"===e.viewState()&&e.trigger("sek-request-item-focus-in-preview")})})})}),o.setupTemplateGallery()},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=r.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});r.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.first().find("h3.accordion-section-title"),t=(n.container.first().find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(sektionsLocalizedData.isPro&&(t+=['<img class="sek-nimble-logo sek-pro-pastil" src="',sektionsLocalizedData.baseUrl,"/assets/czr/sek/img/pro_white.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join("")),0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}})}),r.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"postMessage",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForSiteTmplOptions,dirty:!1,value:sektionsLocalizedData.siteTmplOptionDBValues,transport:"postMessage",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=r.czr_initialSkopeCollectionPopulated.state()?r.czr_initialSkopeCollectionPopulated.done(function(){r.previewer.trigger("sek-pick-content",{focus:!1})}):r.previewer.trigger("sek-pick-content",{focus:!1})})}),sektionsLocalizedData.isSiteTemplateEnabled&&r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_SITE_TMPL,title:sektionsLocalizedData.i18n["Site templates"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_SITE_TMPL,function(t){var e=t.container.find(".accordion-section-title"),i=t.container.find(".customize-section-title h3");0<e.length&&e.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(t,{expand_first_control:!0});var n=function(){setTimeout(function(){t.expanded(!0);var e=_.first(t.controls());e&&e.id&&r.control(e.id).container.find(".customize-control-title").trigger("click")},500),r.czr_currentSkopesCollection.unbind(n)};t.container.find(".accordion-section-title").first().on("click",function(){r.czr_currentSkopesCollection.bind(n),r.previewer.previewUrl(r.settings.url.home)})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&r.previewer.trigger("sek-pick-content"),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&(sektionsLocalizedData.isSiteTemplateEnabled&&r.infoLog("TO DO SITE TEMPLATES => 1) PHP create a site template mapping : skope => site_template option that applies, 2) Include this mapping in the localized customizer params 3) use it on local reset to set the new value"),r.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData)),_.isEmpty(sektionsData)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(t.cachedElements.$window.data("_scroll_move_timer_")),t.cachedElements.$window.data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};t.cachedElements.$window.on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){s(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){i.cachedElements.$body.addClass("nimble-top-bar-visible")},200)}):(t=s.Deferred(),i.cachedElements.$body.removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){var t,i=this;if(0<s(i.topBarId).length)return s(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}s("#customize-preview").after(s(t)),s(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),s(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),s("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(s(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),s(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(s(this).data("doc-href"),"_blank")}),s(".sek-tmpl-saving",i.topBarId).on("click",function(e){e.preventDefault(),i.tmplDialogVisible(!i.tmplDialogVisible())});var n=function(e){s(i.topBarId).length<1||sektionsLocalizedData.isDebugMode||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?s(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):s(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),s(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new c.Value([{status:"current",value:{local:c(this.localSectionsSettingId())(),global:c(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw c.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],s=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(s,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){_.isEmpty(r.local)||(c(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),c.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||c(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});c.previewer.refresh(),c.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var l=_.findKey(s,{status:"current"});l=Number(l),_.isNumber(l)?(_.each(s,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<l&&(t===l-1?newLog.status="current":t===l&&(newLog.status="future"));break;case"redo":s.length>l+1&&(t===l?newLog.status="previous":t===l+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):c.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,I){I.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(i.cachedElements.$body.toggleClass("sek-level-tree-expanded",e),e){if(i.templateGalleryExpanded(!1),i.tmplDialogVisible(!1),i.saveSectionDialogVisible&&i.saveSectionDialogVisible(!1),i.setLevelTreeValue(),_.isEmpty(i.levelTree()))return b.previewer.trigger("sek-notify",{type:"info",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["No sections to navigate"]+"</strong>","</span>"].join("")}),void i.levelTreeExpanded(!1);I("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<I("#nimble-level-tree").length&&_.delay(function(){I("#nimble-level-tree").remove(),I("#customize-preview iframe").css("z-index","")},300)}),i.activeLocations.bind(function(){_.isEmpty(i.levelTree())||i.renderOrRefreshTree()}),b.previewer.bind("ready",function(){i.localSectionsSettingId.callbacks.add(function(){i.levelTreeExpanded(!1),_.each([i.getGlobalSectionsSettingId(),i.localSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){b(e)._isBoundForNimbleLevelTree||(b(e).bind(function(e){i.setLevelTreeValue()}),b(e)._isBoundForNimbleLevelTree=!0)})})}),i.cachedElements.$body.on("click","#nimble-level-tree [data-nimb-level]",function(e){e.preventDefault(),e.stopPropagation();var i=I(e.target).closest("[data-nimb-level]");b.previewer.send("sek-animate-to-level",{id:i.data("nimb-id")}),b.previewer.send("sek-clean-level-uis"),_.delay(function(){b.previewer.send("sek-display-level-ui",{id:i.data("nimb-id")});var e=i.data("nimb-id"),t=i.data("nimb-level");"column"===t||"section"===t?b.previewer.trigger("sek-edit-options",{id:e,level:t}):"module"===t&&b.previewer.trigger("sek-edit-module",{id:e,level:t})},100)}),i.cachedElements.$body.on("click","#nimble-level-tree .sek-remove-level",function(e){e.preventDefault(),e.stopPropagation();var t=I(e.target).closest("[data-nimb-level]");b.previewer.trigger("sek-remove",{level:t.data("nimb-level"),id:t.data("nimb-id"),location:t.closest('[data-nimb-level="location"]').data("nimb-id"),in_sektion:t.closest('[data-nimb-level="section"]').data("nimb-id"),in_column:t.closest('[data-nimb-level="column"]').data("nimb-id")}),t.fadeOut("slow"),i.renderOrRefreshTree()}),i.cachedElements.$body.on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),s=this.localSectionsSettingId(),a=sektionsLocalizedData.optNameForGlobalOptions,l=!1;if(_.each([r,s,a],function(e){b.has(e)||(l=e)}),!1===l){e=b(r)(),i=_.isObject(e)?I.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(s)(),t=_.isObject(t)?t:{},n=I.extend(!0,{},t),n=_.isEmpty(n.collection)?[]:n.collection,n=_.isArray(n)?n:[];var c,d=_.union(i,n),p=!1,u=!1;o=b(a)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(p="nimble_local"===(c=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!p&&"theme"!==c&&(u="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===c);var m,f,g=I.extend(!0,[],d);g=_.filter(g,function(e,t){return!_.contains(["nimble_global_header","nimble_global_footer","nimble_local_header","nimble_local_footer"],e.id)});var h=function(e){m=_.findWhere(d,{id:"nimble_"+e+"_header"}),f=_.findWhere(d,{id:"nimble_"+e+"_footer"}),g.unshift(m),g.push(f)};p?h("local"):u&&h("global");var v,k=this.activeLocations(),y=[];_.isEmpty(k)?y=g:_.each(k,function(e){v=_.findWhere(g,{id:e}),_.isUndefined(v)||y.push(v)}),this.levelTree(y)}else b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(I("#nimble-level-tree").length<1){try{e=wp.template("nimble-level-tree")({})}catch(e){return b.errare("Error when parsing the nimble-level-tree template",e),!1}I("#customize-preview").after(I(e))}I("#nimble-level-tree").find(".sek-tree-wrap").html(this.getLevelTreeHtml())},getLevelTreeHtml:function(e,t){var i=this;e=e||i.levelTree();var n,o,r,s=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var a='<i class="material-icons sek-remove-level" title="'+sektionsLocalizedData.i18n["Remove this element"]+'">delete_forever</i>';return r="<ul>",_.each(e,function(e){_.isUndefined(e.level)?b.errare("::buildLevelTree => missing level property",e):_.isUndefined(e.id)?b.errare("::buildLevelTree => missing id property",e):(n=e.level,"location"===(o=n)&&(s=!_.contains(i.activeLocations(),e.id)),s||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),a="location"!==n?a:"",r+='<li data-nimb-level="'+n+'" data-nimb-id="'+e.id+'">',r+='<div class="sek-level-infos"><div class="sek-inner-level-infos">',"module"===n&&(r+=[i.getTreeModuleIcon(e.module_type),i.getTreeModuleTitle(e.module_type)].join(" ")),r+=[" ",o,"( id :",e.id,")",a].join(" "),r+="</div></div>",_.isArray(e.collection)&&!_.isEmpty(e.collection)&&(r+=i.getLevelTreeHtml(e.collection,t)),r+="</li>"))}),r+="</ul>"},getTreeModuleIcon:function(t){var i,n={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(n)&&t===e["content-id"]&&(_.isEmpty(e.icon)||(i="http"===e.icon.substring(0,4)?e.icon:sektionsLocalizedData.moduleIconPath+e.icon,n={svg:e.icon?i:"",font:e.font_icon?e.font_icon:""}))}),_.isEmpty(n.svg)?_.isEmpty(n.font)?void 0:n.font:'<img class="sek-svg-mod-icon" src="'+n.svg+'"/>'},getTreeModuleTitle:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i=e.title)}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{setupSaveSectionUI:function(){var r=this;r.saveSectionDialogVisible=new c.Value(!1),r.saveSectionDialogVisible.bind(function(e){e&&(r.templateGalleryExpanded(!1),r.levelTreeExpanded(!1),r.tmplDialogVisible&&r.tmplDialogVisible(!1)),r.toggleSaveSectionUI(e)}),r.allSavedSections=new c.Value("_not_populated_"),r.allSavedSections.bind(function(e){_.isObject(e)?(e=_.isEmpty(e)?{}:e,r.refreshSectionPickerHtml(e)):c.errare("error setupSaveSectionUI => section collection should be an object")}),r.saveSectionDialogMode=new c.Value("hidden"),r.saveSectionDialogMode.bind(function(e){_.contains(["hidden","save","update","remove","edit"],e)||(c.errare("error setupSaveSectionUI => unknown section dialog mode",e),e="save");var t,i=d("#nimble-top-section-save-ui"),n=i.find("#sek-saved-section-title"),o=i.find("#sek-saved-section-description");switch(i.find("[data-section-mode-switcher]").attr("aria-pressed",!1),i.find('[data-section-mode-switcher="'+e+'"]').attr("aria-pressed",!0),d("#nimble-top-section-save-ui").attr("data-sek-section-dialog-mode",e),i.removeClass("sek-removal-confirmation-opened"),e){case"save":n.val(""),o.val("");break;case"update":case"edit":(t=i.find(".sek-saved-section-picker")).val("none").trigger("change"),r.setSavedSectionCollection().done(function(e){r.refreshSectionPickerHtml(),t.val(r.userSectionToEdit||"none").trigger("change"),r.userSectionToEdit=null});break;case"remove":console.log("sOOO ?",r.userSectionToRemove),(t=i.find(".sek-saved-section-picker")).val("none").trigger("change"),r.setSavedSectionCollection().done(function(e){r.refreshSectionPickerHtml(),t.val(r.userSectionToRemove||"none").trigger("change"),r.userSectionToRemove=null})}"remove"===e&&_.isEmpty(r.idOfSectionToSave)?i.addClass("sek-is-removal-only"):i.removeClass("sek-is-removal-only")})},refreshSectionPickerHtml:function(e){e=e||this.allSavedSections();var t=d("#nimble-top-section-save-ui"),i=t.find(".sek-saved-section-picker");i.val("none").trigger("change"),i.find("option").each(function(){"none"!==d(this).attr("value")&&d(this).remove()});var n,o,r="";_.each(e,function(e,t){_.isObject(e)&&(o=e.last_modified_date?e.last_modified_date:"",n=e.title?e.title:"section title not set",r+='<option value="'+t+'">'+[n,sektionsLocalizedData.i18n["Last modified"]+" : "+o].join(" | ")+"</option>")}),i.append(r),t.addClass("section-collection-populated")},renderSectionSaveUI:function(e){if(0<d("#nimble-top-section-save-ui").length)return d("#nimble-top-section-save-ui");try{_tmpl=wp.template("nimble-top-section-save-ui")({})}catch(e){return c.errare("Error when parsing nimble-top-section-save-ui template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("#nimble-top-section-save-ui")},maybeScheduleSectionSaveDOMEvents:function(){var i=this,n=d("#nimble-top-section-save-ui");n.data("nimble-sec-save-dom-events-scheduled")||(n.on("click","[data-section-mode-switcher]",function(e){e.preventDefault(),i.saveSectionDialogMode(d(this).data("section-mode-switcher"))}).on("change",".sek-saved-section-picker",function(e){i.reactOnSectionSelection(e,d(this))}).on("click",".sek-do-save-section",function(e){n.addClass("nimble-section-processing-ajax"),i.saveOrUpdateSavedSection(e).done(function(e){n.removeClass("nimble-section-processing-ajax"),e.success&&(i.saveSectionDialogVisible(!1),i.setSavedSectionCollection({refresh:!0}))})}).on("click",".sek-do-update-section",function(e){var t=n.find(".sek-saved-section-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-section-processing-ajax"),i.saveOrUpdateSavedSection(e,t).done(function(e){n.removeClass("nimble-section-processing-ajax"),e.success&&(i.saveSectionDialogVisible(!1),i.setSavedSectionCollection({refresh:!0}).done(function(e){i.refreshSectionPickerHtml()}))}))}).on("click",".sek-open-remove-confirmation",function(e){n.addClass("sek-removal-confirmation-opened")}).on("click",".sek-do-remove-section",function(e){var t=n.find(".sek-saved-section-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-section-processing-ajax"),i.removeSavedSection(e,t).done(function(e){n.removeClass("nimble-section-processing-ajax"),n.removeClass("sek-removal-confirmation-opened"),e.success&&i.setSavedSectionCollection({refresh:!0})}))}).on("click",".sek-cancel-remove-section",function(e){n.removeClass("sek-removal-confirmation-opened")}),d(".sek-close-dialog",n).on("click",function(e){e.preventDefault(),i.saveSectionDialogVisible(!1)}),n.data("nimble-sec-save-dom-events-scheduled",!0))},reactOnSectionSelection:function(e,t){var i=d("#nimble-top-section-save-ui"),n=t.val(),o=i.find("#sek-saved-section-title"),r=i.find("#sek-saved-section-description"),s="update"===this.saveSectionDialogMode()?"sek-section-update-selected":"sek-section-remove-selected";if("none"===n)o.val(""),r.val(""),i.removeClass(s);else{var a=this.allSavedSections();(a=_.isObject(a)&&!_.isArray(a)?a:{})[n]=d.extend({title:"",description:"",last_modified_date:""},a[n]||{}),o.val(a[n].title),r.val(a[n].description),i.addClass(s)}},saveOrUpdateSavedSection:function(e,t){var i=this,n=d.Deferred(),o="edit"===i.saveSectionDialogMode();if(!o&&(!i.idOfSectionToSave||_.isEmpty(i.idOfSectionToSave)))return c.errare("saveOrUpdateSavedSection => error => missing section id"),n.resolve({success:!1});e.preventDefault();var r,s=d("#sek-saved-section-title"),a=s.val(),l=d("#sek-saved-section-description").val();if(!o){if("no_match"==(r=d.extend(!0,{},i.getLevelModel(i.idOfSectionToSave))))return c.errare("saveOrUpdateSavedSection => error => no section model with id "+i.idOfSectionToSave),n.resolve({success:!1});if(r=i.preProcessSection(r),!_.isObject(r))return c.errare("::saveOrUpdateSavedSection => error => invalid sectionModel"),n.resolve({success:!1})}return _.isEmpty(a)?(s.addClass("error"),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["A title is required"]+"</strong>","</span>"].join("")}),n.resolve({success:!1})):(d("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_user_section",{nonce:c.settings.nonce.save,section_data:o?"":JSON.stringify(r),section_title:a,section_description:l,section_post_name:t||"",skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),edit_metas_only:o?"yes":"no"}).done(function(e){n.resolve({success:!0}),c.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template saved"]+"</strong>","</span>"].join("")})}).fail(function(e){n.resolve({success:!1}),c.errorLog("ajax sek_save_section => error",e),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing template"]+"</strong>","</span>"].join("")})}).always(function(){i.idOfSectionToSave=null}),n)},preProcessSection:function(e){if(!_.isObject(e))return null;var t=d.extend({},!0,e);return _.has(t,"is_nested")&&(t=_.omit(t,"is_nested")),t},removeSavedSection:function(e,t){var i=this,n=d.Deferred();return e.preventDefault(),wp.ajax.post("sek_remove_user_section",{nonce:c.settings.nonce.save,section_post_name:t}).done(function(e){n.resolve({success:!0}),c.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template removed"]+"</strong>","</span>"].join("")})}).fail(function(e){n.resolve({success:!1}),c.errorLog("ajax sek_remove_section => error",e),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")})}).always(function(){i.idOfSectionToSave=null}),n},toggleSaveSectionUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?d.when(i.renderSectionSaveUI({})).done(function(e){i.maybeScheduleSectionSaveDOMEvents(),i.saveUIContainer=e,_.delay(function(){i.saveSectionDialogMode("save"),i.cachedElements.$body.addClass("sek-save-section-ui-visible")},200)}):(t=d.Deferred(),i.cachedElements.$body.removeClass("sek-save-section-ui-visible"),0<d("#nimble-top-section-save-ui").length?_.delay(function(){i.saveSectionDialogMode=i.saveSectionDialogMode?i.saveSectionDialogMode:new c.Value,i.saveSectionDialogMode("hidden"),i.saveUIContainer.remove(),i.idOfSectionToSave=null,t.resolve()},250):t.resolve(),t.promise()).done(function(){i.saveSectionDialogVisible(!1)})},setSavedSectionCollection:function(e){var t=this,i=d.Deferred();return(e=e||{refresh:!1}).refresh||"_not_populated_"===t.allSavedSections()?((t.sectionCollectionPromise&&"pending"===t.sectionCollectionPromise.state()?t.sectionCollectionPromise:t.getSavedSectionCollection(e)).done(function(e){t.allSavedSections(e),i.resolve(e)}),i.promise()):i.resolve(t.allSavedSections())},getSavedSectionCollection:function(e){var t=this;return e=e||{refresh:!1},t.sectionCollectionPromise=d.Deferred(),e.refresh||"_not_populated_"===t.allSavedSections()?wp.ajax.post("sek_get_all_saved_sections",{nonce:c.settings.nonce.save}).done(function(e){_.isObject(e)&&!_.isArray(e)?t.sectionCollectionPromise.resolve(e):(t.sectionCollectionPromise.resolve({}),_.isEmpty(e)||c.errorLog("control::getSavedSectionCollection => collection is empty or invalid"))}).fail(function(e){c.errorLog("ajax sek_get_all_saved_section => error",e),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")}),t.sectionCollectionPromise.resolve({})}):t.sectionCollectionPromise.resolve(t.allSavedSections()),t.sectionCollectionPromise}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{setupSaveTmplUI:function(){var r=this;r.tmplDialogVisible=new c.Value(!1),sektionsLocalizedData.isTemplateSaveEnabled&&(r.tmplDialogVisible.bind(function(e){e&&(r.templateGalleryExpanded(!1),r.levelTreeExpanded(!1),r.saveSectionDialogVisible&&r.saveSectionDialogVisible(!1)),r.toggleSaveTmplUI(e)}),r.allSavedTemplates=new c.Value("_not_populated_"),r.allSavedTemplates.bind(function(e){_.isObject(e)?(e=_.isEmpty(e)?{}:e,r.refreshTmplPickerHtml(e)):c.errare("error setupSaveTmplUI => tmpl collection should be an object")}),r.allApiTemplates=new c.Value("_not_populated_"),r.tmplDialogMode=new c.Value("hidden"),r.tmplDialogMode.bind(function(e){_.contains(["hidden","save","update","remove","edit"],e)||(c.errare("::setupSaveTmplUI => unknown tmpl dialog mode",e),e="save");var t,i=d("#nimble-top-tmpl-save-ui"),n=i.find("#sek-saved-tmpl-title"),o=i.find("#sek-saved-tmpl-description");switch(i.find("[data-tmpl-mode-switcher]").attr("aria-pressed",!1),i.find('[data-tmpl-mode-switcher="'+e+'"]').attr("aria-pressed",!0),d("#nimble-top-tmpl-save-ui").attr("data-sek-tmpl-dialog-mode",e),i.removeClass("sek-removal-confirmation-opened"),e){case"save":n.val(""),o.val("");break;case"update":case"remove":(t=i.find(".sek-saved-tmpl-picker")).val("none").trigger("change"),r.setSavedTmplCollection().done(function(e){r.refreshTmplPickerHtml(),t.val(r.tmplToRemove||"none").trigger("change"),r.tmplToRemove=null});break;case"edit":(t=i.find(".sek-saved-tmpl-picker")).val("none").trigger("change"),r.setSavedTmplCollection().done(function(e){r.refreshTmplPickerHtml(),t.val(r.tmplToEdit||"none").trigger("change"),r.tmplToEdit=null})}}))},refreshTmplPickerHtml:function(e){e=e||this.allSavedTemplates();var t=d("#nimble-top-tmpl-save-ui"),i=t.find(".sek-saved-tmpl-picker");i.val("none").trigger("change"),i.find("option").each(function(){"none"!==d(this).attr("value")&&d(this).remove()});var n,o,r="";_.each(e,function(e,t){_.isObject(e)&&(o=e.last_modified_date?e.last_modified_date:"",n=e.title?e.title:"template title not set",r+='<option value="'+t+'">'+[n,sektionsLocalizedData.i18n["Last modified"]+" : "+o].join(" | ")+"</option>")}),i.append(r),t.addClass("tmpl-collection-populated")},renderTmplUI:function(e){if(0<d("#nimble-top-tmpl-save-ui").length)return d("#nimble-top-tmpl-save-ui");try{_tmpl=wp.template("nimble-top-tmpl-save-ui")({})}catch(e){return c.errare("Error when parsing nimble-top-tmpl-save-ui template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("#nimble-top-tmpl-save-ui")},scheduleTmplSaveDOMEvents:function(){var i=this,n=d("#nimble-top-tmpl-save-ui");n.data("nimble-tmpl-dom-events-scheduled")||(n.on("click","[data-tmpl-mode-switcher]",function(e){e.preventDefault(),i.tmplDialogMode(d(this).data("tmpl-mode-switcher"))}),n.on("change",".sek-saved-tmpl-picker",function(e){i.reactOnTemplateSelection(e,d(this))}),n.on("click",".sek-do-save-tmpl",function(e){n.addClass("nimble-tmpl-processing-ajax"),i.saveOrUpdateTemplate(e).done(function(e){n.removeClass("nimble-tmpl-processing-ajax"),e.success&&(i.tmplDialogVisible(!1),i.setSavedTmplCollection({refresh:!0}))})}),n.on("click",".sek-do-update-tmpl",function(e){var t=n.find(".sek-saved-tmpl-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-tmpl-processing-ajax"),i.saveOrUpdateTemplate(e,t).done(function(e){n.removeClass("nimble-tmpl-processing-ajax"),e.success&&(i.tmplDialogVisible(!1),i.setSavedTmplCollection({refresh:!0}).done(function(e){i.refreshTmplPickerHtml()}))}))}),n.on("click",".sek-open-remove-confirmation",function(e){n.addClass("sek-removal-confirmation-opened")}),n.on("click",".sek-do-remove-tmpl",function(e){var t=n.find(".sek-saved-tmpl-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-tmpl-processing-ajax"),i.removeTemplate(e,t).done(function(e){n.removeClass("nimble-tmpl-processing-ajax"),n.removeClass("sek-removal-confirmation-opened"),e.success&&i.setSavedTmplCollection({refresh:!0})}))}),n.on("click",".sek-cancel-remove-tmpl",function(e){n.removeClass("sek-removal-confirmation-opened")}),d(".sek-close-dialog",n).on("click",function(e){e.preventDefault(),i.tmplDialogVisible(!1)}),n.data("nimble-tmpl-dom-events-scheduled",!0))},reactOnTemplateSelection:function(e,t){var i=d("#nimble-top-tmpl-save-ui"),n=t.val(),o=i.find("#sek-saved-tmpl-title"),r=i.find("#sek-saved-tmpl-description"),s="update"===this.tmplDialogMode()?"sek-tmpl-update-selected":"sek-tmpl-remove-selected";if("none"===n)o.val(""),r.val(""),i.removeClass(s);else{var a=this.allSavedTemplates();(a=_.isObject(a)&&!_.isArray(a)?a:{})[n]=d.extend({title:"",description:"",last_modified_date:""},a[n]||{}),o.val(a[n].title),r.val(a[n].description),i.addClass(s)}},saveOrUpdateTemplate:function(e,t){var i=this,n=d.Deferred();e.preventDefault();var o,r=d("#sek-saved-tmpl-title"),s=r.val(),a=d("#sek-saved-tmpl-description").val(),l=i.localSectionsSettingId();try{o=i.preProcessTmpl(c(l)())}catch(e){c.errorLog("error in ::saveOrUpdateTemplate",e),n.resolve({success:!1})}return _.isEmpty(s)?(r.addClass("error"),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["A title is required"]+"</strong>","</span>"].join("")}),n.resolve({success:!1})):(d("#sek-saved-tmpl-title").removeClass("error"),wp.ajax.post("sek_save_user_template",{nonce:c.settings.nonce.save,tmpl_data:"edit"===i.tmplDialogMode()?"":JSON.stringify(o),tmpl_title:s,tmpl_description:a,tmpl_post_name:t||"",edit_metas_only:"edit"===i.tmplDialogMode()?"yes":"no",skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),tmpl_locations:i.getActiveLocationsForTmpl(o),tmpl_header_location:i.getHeaderOrFooterLocationIdForTmpl("header",o),tmpl_footer_location:i.getHeaderOrFooterLocationIdForTmpl("footer",o)}).done(function(e){n.resolve({success:!0}),c.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template saved"]+"</strong>","</span>"].join("")})}).fail(function(e){n.resolve({success:!1}),c.errorLog("ajax sek_save_template => error",e),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing template"]+"</strong>","</span>"].join("")})}),n)},getActiveLocationsForTmpl:function(e){if(!_.isObject(e))throw new Error("preProcess Tmpl => error : tmpl_data must be an object");var t=[];return _.each(e.collection,function(e){_.isObject(e)&&e.id&&e.level&&"location"===e.level&&t.push(e.id)}),t},getHeaderOrFooterLocationIdForTmpl:function(t,e){var i=this;if(!_.isObject(e))throw new Error("preProcess Tmpl => error : tmpl_data must be an object");var n="";return _.each(e.collection,function(e){_.isObject(e)&&e.id&&e.level&&("header"===t&&i.isHeaderLocation(e.id)||"footer"===t&&i.isFooterLocation(e.id))&&(n=e.id)}),n},preProcessTmpl:function(e){var t,i;if(!_.isObject(e))throw new Error("preProcess Tmpl => error : tmpl_data must be an object");return(t=d.extend(!0,{},e)).collection=[],i=this.activeLocations(),_.each(e.collection,function(e){_.isObject(e)&&e.id&&e.collection&&_.contains(i,e.id)&&!_.isEmpty(e.collection)&&t.collection.push(e)}),t},removeTemplate:function(e,t){var i=d.Deferred();return e.preventDefault(),wp.ajax.post("sek_remove_user_template",{nonce:c.settings.nonce.save,tmpl_post_name:t}).done(function(e){i.resolve({success:!0}),c.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template removed"]+"</strong>","</span>"].join("")})}).fail(function(e){i.resolve({success:!1}),c.errorLog("ajax sek_remove_template => error",e),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")})}),i},toggleSaveTmplUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?d.when(i.renderTmplUI({})).done(function(e){i.scheduleTmplSaveDOMEvents(),i.saveUIContainer=e,_.delay(function(){i.tmplDialogMode("save"),i.cachedElements.$body.addClass("sek-save-tmpl-ui-visible")},200)}):(t=d.Deferred(),i.cachedElements.$body.removeClass("sek-save-tmpl-ui-visible"),0<d("#nimble-top-tmpl-save-ui").length?_.delay(function(){i.tmplDialogMode=i.tmplDialogMode?i.tmplDialogMode:new c.Value,i.tmplDialogMode("hidden"),i.saveUIContainer.remove(),t.resolve()},250):t.resolve(),t.promise()).done(function(){i.tmplDialogVisible(!1)})},setSavedTmplCollection:function(e){var t=this,i=d.Deferred();return(e=e||{refresh:!1}).refresh||"_not_populated_"===t.allSavedTemplates()?((t.templateCollectionPromise&&"pending"===t.templateCollectionPromise.state()?t.templateCollectionPromise:t.getSavedTmplCollection()).done(function(e){t.allSavedTemplates(e),i.resolve(e)}),i.promise()):i.resolve(t.allSavedTemplates())},getSavedTmplCollection:function(){var t=this;return t.templateCollectionPromise=d.Deferred(),wp.ajax.post("sek_get_all_saved_tmpl",{nonce:c.settings.nonce.save}).done(function(e){_.isObject(e)&&!_.isArray(e)?t.templateCollectionPromise.resolve(e):(t.templateCollectionPromise.resolve({}),_.isEmpty(e)||c.errare("control::getSavedTmplCollection => error => tmpl collection is invalid",e))}).fail(function(e){c.errorLog("ajax sek_get_all_saved_tmpl => error",e),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")}),t.templateCollectionPromise.resolve({})}),t.templateCollectionPromise},getApiTmplCollection:function(){var t=this,i=d.Deferred(),n={};return"_not_populated_"!==t.allApiTemplates()?i.resolve(t.allApiTemplates()):sektionsLocalizedData.useAPItemplates?wp.ajax.post("sek_get_all_api_tmpl",{nonce:c.settings.nonce.save}).done(function(e){_.isObject(e)&&!_.isArray(e)?n=e:c.errare("control::getApiTmplCollection => error => tmpl collection is invalid",e),t.allApiTemplates(n),i.resolve(n)}).fail(function(e){c.errorLog("ajax sek_get_all_api_tmpl => error",e),c.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")}),i.resolve({})}):(t.allApiTemplates([]),i.resolve([])),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(o,r){r.extend(CZRSeksPrototype,{getTmplJsonFromUserTmpl:function(e){var t=r.Deferred();return wp.ajax.post("sek_get_user_tmpl_json",{nonce:o.settings.nonce.save,tmpl_post_name:e}).done(function(e){t.resolve({success:!0,tmpl_json:e})}).fail(function(e){t.resolve({success:!1}),o.errorLog("ajax getTmplJsonFromUserTmpl => error",e),o.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>error when fetching the template</strong>","</span>"].join("")})}),t},getTmplJsonFromApi:function(e){var t=r.Deferred();return wp.ajax.post("sek_get_api_tmpl_json",{nonce:o.settings.nonce.save,api_tmpl_name:e}).done(function(e){t.resolve({success:!0,tmpl_json:e})}).fail(function(e){t.resolve({success:!1}),o.errorLog("ajax getTmplJsonFromApiTmpl => error",e),o.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>error when fetching the template</strong>","</span>"].join("")})}),t},get_gallery_tmpl_json_and_inject:function(t){var e,i=this,n=(t=r.extend({tmpl_name:"",tmpl_source:"user",tmpl_inject_mode:"replace"},t||{})).tmpl_name;!_.isEmpty(n)&&_.isString(n)||o.errare("::tmpl inject => error => invalid template name"),(e="api_tmpl"===t.tmpl_source?i.getTmplJsonFromApi(n):i.getTmplJsonFromUserTmpl(n)).done(function(e){e.success&&i.inject_tmpl_from_gallery({tmpl_name:n,template_data:e.tmpl_json,tmpl_inject_mode:t.tmpl_inject_mode})}),_.delay(function(){"pending"===e.state()&&o.previewer.trigger("sek-notify",{notif_id:"import-too-long",type:"error",duration:2e4,message:["<span>","<strong>","Template import failed","</strong>","</span>"].join("")})},3e4)},inject_tmpl_from_gallery:function(e){e=e||{};if(!(e=r.extend({tmpl_inject_mode:"replace"},e)).template_data)throw new Error("::inject_tmpl => missing remote template data");o.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),o.czr_sektions.isImportedContentEligibleForAPI({success:!0,data:e.template_data},e)?(e.template_data.data.collection=this.setIdsForImportedTmpl(e.template_data.data.collection),o.czr_sektions.doUpdateApiSettingAfter_TmplGalleryImport({success:!0,data:e.template_data},e)):o.infoLog("::inject_tmpl problem => !api.czr_sektions.isImportedContentEligibleForAPI",e)},doUpdateApiSettingAfter_TmplGalleryImport:function(e,t){if(t=t||{},o.czr_sektions.isImportedContentEligibleForAPI(e,t)){o.czr_sektions.updateAPISetting({action:"sek-inject-tmpl-from-gallery",scope:"local",injected_content:e.data,tmpl_inject_mode:t.tmpl_inject_mode}).done(function(){o.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),o.previewer.refresh(),o.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Template successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){o.errare("::doUpdateApiSettingAfter_TmplGalleryImport => error when firing ::updateAPISetting",e),o.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),o.previewer.refresh()}else o.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,c){c.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=l.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!l.has(e.collectionSettingId)){l.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});l(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){l.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return l.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],s=function(e){l.errare(e,i),sektionsLocalizedData.isDevMode&&l.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of 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("")}),r=!0},a=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=c.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void s("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void s('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void s("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void s("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,a(e)})}}else{if(_.isUndefined(t)||!_.isObject(t))return void s("validation error => a level is invalid");if(_.isEmpty(t.id)||!_.isString(t.id))return void s("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void s("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void s("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void s('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void s("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void s("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&l.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void s("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void s("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void s("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void s("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void s("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=c.extend(!0,{},t),_.isUndefined(e)?s("validation error => undefined level "):a(e)})}};return a(),r?null:i}l.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);if(sektionsLocalizedData.isSiteTmplEnabled){var t=l(sektionsLocalizedData.optNameForSiteTmplOptions)(),i=l.czr_skopeBase.getSkopeProperty("skope_id","group"),n=l.czr_skopeBase.getSkopeProperty("group_sektions","group");console.log("ALORS ?",t,i,n),_.isObject(t)&&t.site_templates&&_.isObject(t.site_templates)&&t.site_templates.pages&&"skp__all_page"===i&&n&&n.db_values&&(console.log("SET GROUP SKOPE SEKTION ?"),this.validateSettingValue(_.isObject(n.db_value)?n.db_value:this.getDefaultSektionSettingValue("local"),"local"))}return c.extend(!0,{},this.getDefaultSektionSettingValue(e))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return l.previewedDevice("desktop"),a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},r={action:"sek-add-section",id:sektionsLocalizedData.prefixForSettingsNotSaved+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&&l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),l.previewer.trigger("sek-pick-content",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),l.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&l.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module_or_nested_section:e.before_module_or_nested_section,after_module_or_nested_section:e.after_module_or_nested_section},o.updateAPISetting(r)},complete:function(e){l.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",is_global_location:o.isGlobalLocation(e.apiParams)}),l.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:l.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(a=!0,s={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){l.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};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};break;default:l.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(l.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(a=!0,s={},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":l.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":l.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":l.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-move-section-up":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-up",moved_level_id:e.apiParams.id}),e.apiParams.new_location&&l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.new_location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id})}},"sek-move-section-down":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id}),e.apiParams.new_location&&l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.new_location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id})}},"sek-duplicate":{callback:function(e){switch(a=!0,s={},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){var t;switch(e.apiParams.action){case"sek-duplicate-section":l.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),t=e.apiParams.location,e.apiParams.is_nested&&l.previewer.refresh(),l.previewer.send("sek-animate-to-level",{id:e.apiParams.id});break;case"sek-duplicate-column":l.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_sektion;break;case"sek-duplicate-module":l.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_column}l.previewer.trigger("sek-refresh-stylesheet",{id:t,location_skope_id:l.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.prefixForSettingsNotSaved+o.guid();break;case"preset_section":l.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),l.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":l.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId});break;case"preset_section":l.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:l.czr_skopeBase.getSkopeProperty("skope_id")),l.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),e.apiParams.is_first_section&&l.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&l.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return a=!1,s={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",l.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),l.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,location_skope_id:l.czr_skopeBase.getSkopeProperty("skope_id")}),l.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},l.czr_sektions.currentContentPickerType=l.czr_sektions.currentContentPickerType||new l.Value,_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),a=!0,r={},s={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={action:"sek-generate-level-options-ui",location:e.location,level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s))},"sek-edit-module":function(e){return a=!0,r={},s={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(s)},"sek-notify":function(t){a=!1;var i=t.notif_id||"sek-notify";return o.lastNimbleNotificationId&&l.notifications.remove(o.lastNimbleNotificationId),n.Deferred(function(){l.panel(sektionsLocalizedData.sektionsPanelId,function(e){l.notifications.add(new l.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),o.lastNimbleNotificationId=i,_.delay(function(){l.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id,original_action:t.original_action,moved_level_id:t.moved_level_id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return a=!1,o.idOfSectionToSave=t.id,o.saveSectionDialogVisible(!0),n.Deferred(function(e){r={},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-reset-collection":{callback:function(e){return a=!1,s={},(r=e).action="sek-reset-collection",r.scope=e.scope,o.updateAPISetting(r)},complete:function(e){l.previewer.refresh(),l.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}}};_.each(e,function(i,n){l.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void l.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}"sek-notify"!==n&&(o.templateGalleryExpanded(!1),o.tmplDialogVisible(!1));try{e(t).done(function(e){e=e||{},a?l.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:l.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:l.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:s,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId,all_params:t}):l.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){l.errare("reactToPreviewMsg => problem or error when running action "+n,e),!_.isEmpty(e)&&sektionsLocalizedData.isDevMode&&l.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 Nimble Builder, you can try resetting the sections of 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("")})})}catch(e){l.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){l.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){l.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this;l.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(k,y){y.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=y.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}k.czr_sektions.currentContentPickerType(e.content_type||"module");break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-site-tmpl-options-ui":t.cleanRegistered();try{i=t.generateUIforSiteTmplOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(a){if(!_.isEmpty(a.settingParams)&&_.has(a.settingParams,"to")){var l,c=this,e=a.settingParams.to,t=null,d=!1;if(!_.isEmpty(a.settingParams.args)&&_.has(a.settingParams.args,"moduleRegistrationParams")){var p=a.settingParams.args.moduleRegistrationParams.control,i=a.settingParams.args.moduleRegistrationParams.id,n=p.czr_Module(i);if(_.isEmpty(n)?k.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",a):(t=n.module_type,d=n.isMultiItem()),!d&&_.isObject(e)?l=c.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!1}):(l=[],_.each(e,function(e){l.push(c.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!0}))})),_.isEmpty(a.defaultPreviewAction))k.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",a);else{var u,m="refresh_stylesheet"===a.defaultPreviewAction,f="refresh_markup"===a.defaultPreviewAction,g="refresh_fonts"===a.defaultPreviewAction,h="refresh_preview"===a.defaultPreviewAction,o=a.settingParams.args.input_changed,v=function(){return u&&_.isString(u.refresh_markup)&&"true"!==u.refresh_markup&&"false"!==u.refresh_markup};_.isUndefined(o)||(u=c.getInputRegistrationParams(o,t),_.isUndefined(u.refresh_stylesheet)||(m=Boolean(u.refresh_stylesheet)),_.isUndefined(u.refresh_markup)||(f=v()?u.refresh_markup:Boolean(u.refresh_markup)),_.isUndefined(u.refresh_fonts)||(g=Boolean(u.refresh_fonts)),_.isUndefined(u.refresh_preview)||(h=Boolean(u.refresh_preview)));var r=function(){if(!0===a.isGlobalOptions){if(_.isEmpty(a.options_type))return void k.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");var e=k(sektionsLocalizedData.optNameForGlobalOptions)(),t=y.extend(!0,{},_.isObject(e)?e:{}),i={};if(_.each(l||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[a.options_type]=i,k(sektionsLocalizedData.optNameForGlobalOptions)(t),!1!==h&&k.previewer.refresh(),!0===g){var n=a.settingParams.args.input_value;if(!_.isString(n))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",n);c.updateGlobalGFonts(n)}!0===m&&k.previewer.send("sek-refresh-stylesheet",{local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),location_skope_id:sektionsLocalizedData.globalSkopeId})}else{if(!0!==a.isSiteTemplateOptions)return c.updateAPISetting({action:a.uiParams.action,id:a.uiParams.id,value:l,in_column:a.uiParams.in_column,in_sektion:a.uiParams.in_sektion,options_type:a.options_type,settingParams:a.settingParams}).done(function(e){var t;!0===m&&k.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:a.uiParams.id,level:a.uiParams.level}}),d&&a.settingParams.args.inputRegistrationParams&&_.isFunction(a.settingParams.args.inputRegistrationParams.input_parent)&&(t=a.settingParams.args.inputRegistrationParams.input_parent.id);var i=function(){k.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:a.uiParams.id,level:a.uiParams.level,changed_item_id:t,control_id:p.id,is_multi_items:d},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===f&&i(),v()){var n=a.settingParams.args.input_value;if(!_.isString(n))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");c.htmlIncludesElementsThatNeedAnAjaxRefresh(n)?i():k.previewer.send("sek-update-html-in-selector",{selector:u.refresh_markup,changed_item_id:t,is_multi_items:d,html:n,id:a.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:a.uiParams.id,level:a.uiParams.level},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")})}!0===h&&k.previewer.refresh()}).fail(function(e){k.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated",e),k.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ",a)});if(_.isEmpty(a.options_type))return void k.errare("updateAPISettingAndExecutePreviewActions => error when updating the site template options => missing options_type");var o=k(sektionsLocalizedData.optNameForSiteTmplOptions)(),r=y.extend(!0,{},_.isObject(o)?o:{}),s={};_.each(l||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(s[t]=e)}),r[a.options_type]=s,k(sektionsLocalizedData.optNameForSiteTmplOptions)(r),!1!==h&&k.previewer.refresh()}};if(!0===g){var s=a.settingParams.args.input_value;if(!_.isString(s))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",s);!0===a.isGlobalOptions?r():c.updateAPISetting({action:"sek-update-fonts",font_family:s,is_global_location:c.isGlobalLocation(a.uiParams)}).always(function(){r().then(function(){c.updateAPISetting({action:"sek-update-fonts",is_global_location:c.isGlobalLocation(a.uiParams)})})})}else r()}}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",a)}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",a)},updateGlobalGFonts:function(e){var t=k(sektionsLocalizedData.optNameForGlobalOptions)(),i=y.extend(!0,{},_.isObject(t)?t:{}),n=this.sniffGlobalGFonts(i);!_.isEmpty(e)&&_.isString(e)&&-1<e.indexOf("gfont")&&!_.contains(n,e)&&n.push(e),i.fonts=n,k(sektionsLocalizedData.optNameForGlobalOptions)(i)},sniffGlobalGFonts:function(e){var i=[],n=function(e){_.each(e,function(e,t){"fonts"!==t&&(_.isString(t)&&-1<t.indexOf("font_family")&&-1<e.indexOf("gfont")&&!_.contains(i,e)&&i.push(e),(_.isArray(e)||_.isObject(e))&&n(e))})};return(_.isArray(e)||_.isObject(e))&&n(e),i},normalizeAndSanitizeSingleItemInputValues:function(o){var i,r={},n={},s=null,a=this;return _.each(o.item_value,function(e,t){var i,n;"title"!==t&&((o.is_multi_items||"id"!==t)&&(null!==o.parent_module_type&&"id"!==t&&"no_default_value_specified"===(s=a.getInputDefaultValue(t,o.parent_module_type))&&k.infoLog("::normalizeAndSanitizeSingleItemInputValues => missing default value for input "+t+" in module "+o.parent_module_type),i=e,n=s,(_.isBoolean(i)||_.isBoolean(n)?Boolean(i)===Boolean(n):_.isNumber(i)||_.isNumber(n)?Number(i)===Number(n):_.isString(i)||_.isString(n)?i+""==n+"":_.isObject(i)&&_.isObject(n)?_.isEqual(i,n):_.isArray(i)&&_.isArray(n)?JSON.stringify(i.sort())===JSON.stringify(n.sort()):i===n)||(_.isString(e)||_.isObject(e))&&_.isEmpty(e)||(r[t]=e)))}),_.each(r,function(e,t){switch(a.getInputType(t,o.parent_module_type)){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"detached_tinymce_editor":case"nimble_tinymce_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:i=e}n[t]=i}),n},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=k.control.has(t):(i=!0,1<e.length&&k.errare("isUIControlAlreadyRegistered => why is this control registered more than once ? => "+t)),i},htmlIncludesElementsThatNeedAnAjaxRefresh:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=e.match(/<script[\s\S]*?>[\s\S]*?<\/script>/gi),o=[],r=[];if(t)for(var s=0;s<t.length;s++){var a=t[s].replace(/^\[+/g,"");-1===o.indexOf(a)&&o.push(a)}if(i)for(var l=0;l<i.length;l++){var c=i[l].replace(/^\[+/g,"");-1===r.indexOf(c)&&r.push(c)}return!_.isEmpty(o)||!_.isEmpty(r)||!_.isEmpty(n)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(r,e){var n=this,i={};a.extend(i,{sek_content_type_switcher_module:{settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:n.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),priority:10,settingValue:{content_type:r.content_type}},sek_module_picker_module:{settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:n.getRegisteredModuleProperty("sek_module_picker_module","name"),content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+n.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:n.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>',is_new:!0}}),_.each(["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_about_sec_picker_module","sek_contact_sec_picker_module","sek_team_sec_picker_module","sek_column_layouts_sec_picker_module","sek_header_sec_picker_module","sek_footer_sec_picker_module"],function(e,t){i[e]={settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+n.guid()+"_sek_draggable_sections_ui",module_type:e,controlLabel:n.getRegisteredModuleProperty(e,"name"),content_type:"section",expandAndFocusOnInit:0===t,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var t=_.keys(i)[0],o=i[t].settingControlId;return n.isUIControlAlreadyRegistered(o)?s.control(o,function(t){t.focus({completeCallback:function(){var e=t.container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}})}):(_do_register_=function(){_.each(i,function(o,e){s.has(o.settingControlId)||(s(o.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:o.settingControlId,dirty:!1,value:o.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",id:o.settingControlId,label:o.controlLabel,type:"czr_module",module_type:o.module_type,section:n.SECTION_ID_FOR_CONTENT_PICKER,priority:o.priority||10,settings:{default:o.settingControlId},track:!1}).done(function(){s.control(o.settingControlId,function(e){e.content_type=o.content_type,!0===r.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title"),i=t.html();if(t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),o.is_new){var n=t.html();t.html(n+' <span class="sek-new-label">New!</span>')}_.isUndefined(o.icon)||t.addClass("sek-flex-vertical-center").prepend(o.icon),"section"===e.content_type?(e.container.attr("data-sek-expanded","false"),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===o.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&e.container.addClass("sek-expand-on-init")):e.container.attr("data-sek-accordion","no")})})}),s.trigger("nimble-modules-and-sections-controls-registered")},s.section(n.SECTION_ID_FOR_CONTENT_PICKER,function(e){_do_register_();var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.prepend('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),0<i.length&&i.find(".sek-level-option-icon").length<1&&i.find(".customize-action").after('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),n.scheduleModuleAccordion.call(e,{expand_first_control:!1}),e.container.find(".customize-control.sek-expand-on-init").find("label > .customize-control-title").trigger("click")})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,p){p.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var s=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=s.getLevelProperty({property:"value",id:r.id}),t=s.getLevelProperty({property:"module_type",id:r.id}),n=s.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===s.getRegisteredModuleProperty(t,"is_father")){var a=s.getRegisteredModuleProperty(t,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(a,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:s.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var l=_.keys(o)[0],c=o[l].settingControlId;return s.isUIControlAlreadyRegistered(c)?d.control(c).focus({completeCallback:function(){var e=d.control(c).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=p.extend(!0,{},i);"__no_option_group_to_be_updated_by_children_modules__"!==o&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[o])?e[o]:{}),d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",module_id:r.id,id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.id,priority:20,settings:{default:n.settingControlId}}).done(function(){}),d.control(n.settingControlId,function(e){d.control(n.settingControlId).focus({completeCallback:function(){}}),e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=p("<div/>").html(t.html()).text();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})},d.section(r.id,function(e){d.section(r.id).focus(),s.generateModuleOptionSwitcherUI(r.id,r.action),_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){})),e},generateModuleOptionSwitcherUI:function(e,t){var i=e+"__option_switcher";d.has(i)||(d(i,function(e){e.bind(function(e,t){d.errare("generateUIforDraggableContent => the setting() should not changed")})}),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"setting",id:i,dirty:!1,value:"",transport:"postMessage",type:"_nimble_ui_"})),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"control",module_id:e,id:i,label:"",type:"czr_module",module_type:"sek_mod_option_switcher_module",section:e,priority:10,settings:{default:i},has_accordion:!1,ui_action:t}).done(function(){d.control(i,function(e){e.deferred.embedded.done(function(){e.container.find(".customize-control-title").hide(),e.container.attr("data-sek-accordion","no")})})})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(s,e){var a=this,l=a.getLevelProperty({property:"options",id:s.id});l=_.isObject(l)?l:{};var t={};c.trigger("nb_setup_level_ui_registration_params",{params:s,modulesRegistrationParams:t}),d.extend(t,{bg:{settingControlId:s.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'}}),"section"===s.level&&d.extend(t,{level_text:{settingControlId:s.id+"__text_options",module_type:"sek_level_text_module",controlLabel:sektionsLocalizedData.i18n["Text settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">text_format</i>'}}),d.extend(t,{border:{settingControlId:s.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:s.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:s.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:s.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:s.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height, vertical alignment, z-index for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),(sektionsLocalizedData.isUpsellEnabled||sektionsLocalizedData.isPro)&&d.extend(t,{animation:{settingControlId:s.id+"__animate_options",module_type:"sek_level_animation_module",controlLabel:sektionsLocalizedData.i18n["Animation settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">movie_filter</i>',isPro:!0}}),"section"===s.level&&(d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:s.id+"__breakpoint_options",module_type:"sek_level_breakpoint_module",controlLabel:sektionsLocalizedData.i18n["Responsive settings : breakpoint, column direction"],icon:'<i class="material-icons sek-level-option-icon">devices</i>'}}),(sektionsLocalizedData.isUpsellEnabled||sektionsLocalizedData.isPro)&&d.extend(t,{sec_custom_css:{settingControlId:s.id+"__sec_custom_css",module_type:"sek_level_cust_css_section",controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>',isPro:!0}})),"column"===s.level&&d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_column",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),"module"===s.level&&d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width and horizontal alignment for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return a.isUIControlAlreadyRegistered(n)?c.control(n).focus({completeCallback:function(){var e=c.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(a.cleanRegistered(),_do_register_=function(){_.each(t,function(n,o){if(a.isUIControlAlreadyRegistered(n.settingControlId))c.section(c.control(n.settingControlId).section()).expanded(!0);else{if(!c.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};c(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=l[o]||{},i=a.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:s.level,level_id:s.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.id,priority:20,settings:{default:n.settingControlId}}).done(function(){}),c.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),n.isPro&&!sektionsLocalizedData.isPro&&t.append(['<img class="sek-pro-icon-next-title" src="',sektionsLocalizedData.baseUrl,"/assets/czr/sek/img/pro_orange.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join("")),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})}})},c.section(s.id,function(e){_do_register_(),"module"===s.level&&a.generateModuleOptionSwitcherUI(s.id,s.action),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!1})}),c.CZR_Helpers.register({origin:"nimble",what:"section",id:s.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+s.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=c.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(c.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.prefixForSettingsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(s,e){var a=this,i=a.getLocalSkopeOptionId();if(a.isUIControlAlreadyRegistered(i))return e;if(a.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return c.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===s.clean_settings&&a.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":a.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"widths":a.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":a.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="material-icons sek-level-option-icon">network_check</i>'};break;case"local_reset":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:c.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=c(a.localSectionsSettingId())(),l=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(a.localOptionsRegistrationParams,function(n,o){var e=a.getModuleStartingValue(n.module_type),t=_.isObject(l[o])?l[o]:{};if(!c.has(n.settingControlId)){var i=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(c(n.settingControlId,function(e){e.bind(_.debounce(i,a.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){c.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(s,e){var a=this,i=sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(a.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return c.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_text":n[t]={settingControlId:i+"__global_text",module_type:e,controlLabel:sektionsLocalizedData.i18n["Global text options for Nimble sections"],icon:'<i class="material-icons sek-level-option-icon">text_format</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"global_header_footer":n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="material-icons sek-level-option-icon">network_check</i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_imp_exp":n[t]={settingControlId:i+"__global_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import global sections"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:c.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var l=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!c.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};c(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=a.getModuleStartingValue(n.module_type),i=_.isObject(l)&&!_.isEmpty(l[o])?l[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){c.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{generateUIforSiteTmplOptions:function(s,e){var a=this,i=sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForSiteTmplOptions;if(a.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.siteTmplOptionsMap)||!_.isObject(sektionsLocalizedData.siteTmplOptionsMap))return c.errare("::generateUIforSiteTmplOptions => missing or invalid siteTmplOptionsMap"),e;_.each(sektionsLocalizedData.siteTmplOptionsMap,function(e,t){switch(t){case"site_templates":n[t]={settingControlId:i+"__site_templates",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site templates"],icon:""};break;default:c.errare("::generateUIforSiteTmplOptions => an option group could not be registered => "+e,t)}});var l=sektionsLocalizedData.siteTmplOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!c.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isSiteTemplateOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){c.errare("::generateUIforSiteTmplOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};c(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=a.getModuleStartingValue(n.module_type),i=_.isObject(l)&&!_.isEmpty(l[o])?l[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}c.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_SITE_TMPL,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){c.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(f,g){g.extend(CZRSeksPrototype,{updateAPISetting:function(d){var p=this;(d=d||{}).is_global_location="global"===d.scope||p.isGlobalLocation(d);var u=d.is_global_location?p.getGlobalSectionsSettingId():p.localSectionsSettingId(),m=f(u)();p.updAPISetParams={params:d,promise:g.Deferred(),newSetValue:_.isObject(m)?g.extend(!0,{},m):p.getDefaultSektionSettingValue(d.is_global_location?"global":"local"),cloneId:"",sectionInjectPromise:"_not_injection_scenario_"};return f(u,function(e){!function(){switch(p.updAPISetParams.newSetValue.collection=_.isArray(p.updAPISetParams.newSetValue.collection)?p.updAPISetParams.newSetValue.collection:p.getDefaultSektionSettingValue(d.is_global_location?"global":"local").collection,d.action){case"sek-maybe-add-missing-locations":var t,i,e=p.activeLocations();g.extend(!0,[],p.updAPISetParams.newSetValue.collection),_.each(e,function(e){t=_.findWhere(p.updAPISetParams.newSetValue.collection,{id:e}),_.isUndefined(t)&&((i=g.extend(!0,{},sektionsLocalizedData.defaultLocationModel)).id=e,f.infoLog("=> need to add missing location to api setting value",i),p.updAPISetParams.newSetValue.collection.push(i))});break;case"sek-add-section":p._updAPISet_sek_add_sektion();break;case"sek-duplicate-section":p._updAPISet_sek_duplicate_sektion();break;case"sek-remove-section":p._updAPISet_sek_remove_sektion();break;case"sek-move-section":p._updAPISet_sek_move_sektion();break;case"sek-move-section-up-down":p._updAPISet_sek_move_sektion_up_down();break;case"sek-add-column":p._updAPISet_sek_add_column();break;case"sek-remove-column":p._updAPISet_sek_remove_column();break;case"sek-duplicate-column":p._updAPISet_sek_duplicate_column();break;case"sek-resize-columns":p._updAPISet_sek_resize_column();break;case"sek-move-column":p._updAPISet_sek_move_column();break;case"sek-add-module":p._updAPISet_sek_add_module();break;case"sek-duplicate-module":p._updAPISet_sek_duplicate_module();break;case"sek-remove-module":p._updAPISet_sek_remove_module();break;case"sek-move-module":p._updAPISet_sek_move_module();break;case"sek-set-module-value":p._updAPISet_sek_set_module_value();break;case"sek-add-content-in-new-sektion":p._updAPISet_sek_add_content_in_new_sektion();break;case"sek-add-preset-section-in-new-nested-sektion":p._updAPISet_sek_add_preset_sektion_in_new_nested_sektion();break;case"sek-import-from-file":p._updAPISet_sek_import_from_file();break;case"sek-inject-tmpl-from-gallery":p._updAPISet_sek_inject_tmpl_from_gallery();break;case"sek-generate-level-options-ui":var n=p.getLevelModel(d.id,p.updAPISetParams.newSetValue.collection),o={};if("no_match"===n){f.errare("updateAPISetting => "+d.action+" => no parent sektion matched"),p.updAPISetParams.promise.reject("updateAPISetting => "+d.action+" => no parent sektion matched");break}var r=g.extend(!0,{},n.options||{});_.each(d.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(d.options_type)&&f.errare("updateAPISetting => "+d.action+" => missing options_type"),r[d.options_type]=o,n.options=r;break;case"sek-generate-local-skope-options-ui":o={};var s=g.extend(!0,{},_.isObject(p.updAPISetParams.newSetValue.local_options)?p.updAPISetParams.newSetValue.local_options:{});if(_.each(d.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(d.options_type)||!_.isString(d.options_type))f.errare("updateAPISetting => "+d.action+" => missing options_type");else{var a={};a[d.options_type]=o,p.updAPISetParams.newSetValue.local_options=g.extend(s,a)}break;case"sek-update-fonts":var l=p.sniffGFonts({is_global_location:d&&!0===d.is_global_location});!_.isEmpty(d.font_family)&&_.isString(d.font_family)&&-1<d.font_family.indexOf("gfont")&&!_.contains(l,d.font_family)&&l.push(d.font_family),p.updAPISetParams.newSetValue.fonts=l;break;case"sek-restore-revision":p.updAPISetParams.newSetValue=d.revision_value;break;case"sek-reset-collection":try{p.updAPISetParams.newSetValue=f.czr_sektions.resetCollectionSetting(d.scope)}catch(e){f.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==p.updAPISetParams.promise.state()){var c=function(){var e=d.settingParams&&d.settingParams.from&&d.settingParams.to;e&&_.isEqual(d.settingParams.from,d.settingParams.to)?p.updAPISetParams.promise.reject("updateAPISetting => main sektion setting change => the new setting value is unchanged when firing action : "+d.action):!e&&_.isEqual(m,p.updAPISetParams.newSetValue)?p.updAPISetParams.promise.reject("updateAPISetting => the new setting value is unchanged when firing action : "+d.action):null!==p.validateSettingValue(p.updAPISetParams.newSetValue,d.is_global_location?"global":"local")?(f(u)(p.updAPISetParams.newSetValue,d),d.cloneId=p.updAPISetParams.cloneId,p.updAPISetParams.promise.resolve(d)):p.updAPISetParams.promise.reject("Validation problem for action "+d.action)};"_not_injection_scenario_"===p.updAPISetParams.sectionInjectPromise?(c(),"pending"===p.updAPISetParams.promise.state()&&f.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")):p.updAPISetParams.sectionInjectPromise.done(function(){c(),"pending"===p.updAPISetParams.promise.state()&&f.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")}).fail(function(e){f.errare("updateAPISetting => self.updAPISetParams.sectionInjectPromise failed",e)})}}()}),p.updAPISetParams.promise.promise()},resetColumnsWidthInSection:function(e){_.each(e.collection,function(e){e.options&&e.options.width&&e.options.width["custom-width"]&&(e.options.width=_.omit(e.options.width,"custom-width")),e.width=""})},_maybeFetchSectionsFromServer:function(){var e,t=g.Deferred();return _.isEmpty(f.sek_presetSections)?(_.isUndefined(f.sek_fetchingPresetSections)||"pending"!=f.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:f.settings.nonce.save}),f.sek_fetchingPresetSections=e):e=f.sek_fetchingPresetSections,e.done(function(e){f.sek_presetSections=e,t.resolve(f.sek_presetSections)}).fail(function(e){t.reject(e)})):t.resolve(f.sek_presetSections),t.promise()},getPresetSectionCollection:function(n){var o=this,r=g.Deferred();return n.is_user_section?wp.ajax.post("sek_get_user_section_json",{nonce:f.settings.nonce.save,section_post_name:n.presetSectionId}).done(function(e){if(!_.isObject(e)||_.isEmpty(e)||_.isUndefined(e.data))throw f.errare("getPresetSectionCollection => preset section type not found or empty : "+n.presetSectionId,e),new Error("getPresetSectionCollection => preset section type not found or empty");var t=g.extend({},!0,e.data);t.id=sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),t.collection=o.setPresetOrUserSectionIds(t.collection),t.ver_ini=sektionsLocalizedData.nimbleVersion,t.collection=o.setPresetSectionVersion(t.collection),r.resolve(t)}).fail(function(e){r.reject(e)}):o._maybeFetchSectionsFromServer().fail(function(e){r.reject(e)}).done(function(e){var t=g.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[n.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+n.presetSectionId+'" has not been found in the collection');var i=t[n.presetSectionId];i.collection=o.setPresetOrUserSectionIds(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o.setPresetSectionVersion(i.collection),r.resolve(i)}),r.promise()},setPresetOrUserSectionIds:function(e){var t=this;return _.isArray(e)&&_.each(e,function(e){e.id=sektionsLocalizedData.prefixForSettingsNotSaved+t.guid(),_.isArray(e.collection)&&t.setPresetOrUserSectionIds(e.collection)}),e},setPresetSectionVersion:function(e){var t=this;return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&t.setPresetSectionVersion(e.collection)}),e},preparePresetSectionForInjection:function(o){var i=this,n={},r=g.Deferred();i.maybeGenerateNewItemIdsForCrudModules(o);var s=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?s(e):_.isString(e)&&-1!=e.indexOf("__img_url__")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("__img_url__",""))))}),n},a=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?a(e,n):_.isString(e)&&-1!=e.indexOf("__img_url__")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(s(o)).done(function(e){var t=a(o,e);r.resolve(t)}).fail(function(e){r.reject(e)}),r.promise()}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(y,b){b.extend(CZRSeksPrototype,{_updAPISet_sek_add_sektion:function(){var i,e,t,n,o=this;if(i=o.updAPISetParams.params,_.isEmpty(i.id))throw new Error("updateAPISetting => "+i.action+" => missing id");if(_.isEmpty(i.location))throw new Error("updateAPISetting => "+i.action+" => missing location");if(!0===i.is_nested)e=o.getLevelModel(i.in_column,o.updAPISetParams.newSetValue.collection),"no_match"==(t=o.getLevelModel(i.in_sektion,o.updAPISetParams.newSetValue.collection))?o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no grand parent sektion found"):!0===t.is_nested?(o.updAPISetParams.promise.reject(""),y.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]+"</strong>","</span>"].join("")})):"no_match"==e?(y.errare("updateAPISetting => "+i.action+" => no parent column matched"),o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no parent column matched")):(e.collection=_.isArray(e.collection)?e.collection:[],e.collection.push({id:i.id,level:"section",collection:[{id:sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}));else if("no_match"==(n=o.getLevelModel(i.location,o.updAPISetParams.newSetValue.collection)))y.errare("updateAPISetting => "+i.action+" => no location matched"),o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no location matched");else{var r=0;n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){i.before_section===e.id&&(r=t),i.after_section===e.id&&(r=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(r,0,{id:i.id,level:"section",collection:[{id:sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}},_updAPISet_sek_duplicate_sektion:function(){var t,e,i,n,o=this;if(t=o.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");if(_.isEmpty(t.location))throw new Error("updateAPISetting => "+t.action+" => missing location");try{n=o.cloneLevel(t.id)}catch(e){return void y.errare("updateAPISetting => "+t.action,e)}o.maybeGenerateNewItemIdsForCrudModules(n);var r=o.getLevelPositionInCollection(t.id,o.updAPISetParams.newSetValue.collection);if(!0===t.is_nested){if("no_match"==(e=o.getLevelModel(t.in_column,o.updAPISetParams.newSetValue.collection)))return y.errare("updateAPISetting => "+t.action+" => no parent column matched"),void o.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no parent column matched");e.collection=_.isArray(e.collection)?e.collection:[],e.collection.splice(parseInt(r+1,10),0,n)}else{if("no_match"==(i=o.getLevelModel(t.location,o.updAPISetParams.newSetValue.collection)))return y.errare("updateAPISetting => "+t.action+" => no location matched"),void o.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no location matched");i.collection=_.isArray(i.collection)?i.collection:[],i.collection.splice(parseInt(r+1,10),0,n)}o.updAPISetParams.cloneId=n.id},_updAPISet_sek_remove_sektion:function(){var t,e,i,n=this;if(!0===(t=n.updAPISetParams.params).is_nested)"no_match"!=(e=n.getLevelModel(t.in_column,n.updAPISetParams.newSetValue.collection))?(e.collection=_.isArray(e.collection)?e.collection:[],e.collection=_.filter(e.collection,function(e){return e.id!=t.id})):y.errare("updateAPISetting => "+t.action+" => no parent column matched");else{if("no_match"==(i=n.getLevelModel(t.location,n.updAPISetParams.newSetValue.collection)))return y.errare("updateAPISetting => "+t.action+" => no location matched"),void n.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no location matched");i.collection=_.filter(i.collection,function(e){return e.id!=t.id})}},_updAPISet_sek_move_sektion:function(){var t,i,n,o=this;t=o.updAPISetParams.params;var e,r,s=o.getLevelModel(t.to_location,o.updAPISetParams.newSetValue.collection);if(_.isEmpty(s)||"no_match"==s)throw new Error("updateAPISetting => "+t.action+" => missing target location");if(t.from_location!=t.to_location){var a=o.getLevelModel(t.from_location,o.updAPISetParams.newSetValue.collection);if(_.isEmpty(a)||"no_match"==a)throw new Error("updateAPISetting => "+t.action+" => missing source location");a.collection=_.isArray(a.collection)?a.collection:[],e=o.getLevelModel(t.id,a.collection),r=b.extend(!0,{},e),a.collection=_.filter(a.collection,function(e){return e.id!=t.id})}s.collection=_.isArray(s.collection)?s.collection:[],i=b.extend(!0,[],s.collection),n=[],_.each(t.newOrder,function(e){if(t.from_location!=t.to_location&&e==r.id)n.push(r);else{if(sektionCandidate=o.getLevelModel(e,i),_.isEmpty(sektionCandidate)||"no_match"==sektionCandidate)throw new Error("updateAPISetting => "+t.action+" => missing section candidate");n.push(sektionCandidate)}}),s.collection=n},_updAPISet_sek_move_sektion_up_down:function(){var t,e,i,n,o=this;if(t=o.updAPISetParams.params,e=o.getLevelModel(t.is_nested?t.in_column:t.location,o.updAPISetParams.newSetValue.collection),_.isEmpty(e)||"no_match"==e)throw new Error("updateAPISetting => "+t.action+" => missing target location");e.collection=_.isArray(e.collection)?e.collection:[],i=b.extend(!0,[],e.collection),n=b.extend(!0,[],e.collection);var r=_.findIndex(i,function(e){return e.id===t.id});if(-1===r)throw new Error("updateAPISetting => "+t.action+" => invalid index");var s,a,l=t.direction||"up",c=i.length===r+1,d=0===r,p=o.activeLocationsInfo(),u=_.isArray(p)?_.findWhere(p,{id:t.location}):{};s=_.isObject(u)&&u.is_global,a=_.isObject(u)&&u.is_header_footer;var m=[];_.isArray(p)&&_.each(o.activeLocationsInfo(),function(e){e.is_global||e.is_header_footer||m.push(e.id)});var f,g=_.findIndex(m,function(e){return e===t.location}),h=!t.is_nested&&!s&&!a,v=0===g,k=m.length===g+1;h&&c&&"up"!==l&&!k?(f=m[g+1],o.getLevelModel(f,o.updAPISetParams.newSetValue.collection).collection.unshift(i[r]),e.collection.pop(),t.new_location=f):h&&d&&"up"===l&&!v?(f=m[g-1],o.getLevelModel(f,o.updAPISetParams.newSetValue.collection).collection.push(i[r]),e.collection.shift(),t.new_location=f):"up"!==l&&i.length===r+1?y.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["The section cannot be moved lower."]+"</strong>","</span>"].join("")}):"up"===l&&0===r?y.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["The section cannot be moved higher."]+"</strong>","</span>"].join("")}):(n[r]=i["up"===l?r-1:r+1],n["up"===l?r-1:r+1]=i[r],e.collection=n)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,t){t.extend(CZRSeksPrototype,{_updAPISet_sek_add_content_in_new_sektion:function(){var r,s,a,l=this;r=l.updAPISetParams.params;var e,i=0;if("no_match"==(a=l.getLevelModel(r.location,l.updAPISetParams.newSetValue.collection)))return c.errare("updateAPISetting => "+r.action+" => no location matched"),void l.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => no location matched");switch(a.collection=_.isArray(a.collection)?a.collection:[],_.each(a.collection,function(e,t){r.before_section===e.id&&(i=t),r.after_section===e.id&&(i=t+1)}),r.content_type){case"module":e=l.getModuleStartingValue(r.content_id),a.collection.splice(i,0,{id:r.id,level:"section",collection:[{id:sektionsLocalizedData.prefixForSettingsNotSaved+l.guid(),level:"column",collection:[{id:r.droppedModuleId,level:"module",module_type:r.content_id,value:"no_starting_value"!==e?e:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":l.updAPISetParams.sectionInjectPromise=t.Deferred();var n=function(e,i){var t=!1;if(!_.isEmpty(r.sektion_to_replace)){var n=l.getLevelModel(r.sektion_to_replace,l.updAPISetParams.newSetValue.collection);"no_match"===n&&(c.errare("updateAPISetting => "+r.action+" => no sektionToReplace matched"),l.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => no sektionToReplace matched")),t=!0===n.is_nested}var o=sektionsLocalizedData.prefixForSettingsNotSaved+l.guid();r.collection_of_preset_section_id=r.collection_of_preset_section_id||[],r.collection_of_preset_section_id.push(o),t?("no_match"===(s=l.getLevelModel(r.in_column,l.updAPISetParams.newSetValue.collection))&&(c.errare("updateAPISetting => "+r.action+" => no parent column matched"),l.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => no parent column matched")),s.collection=_.isArray(s.collection)?s.collection:[],_.each(s.collection,function(e,t){r.before_section===e.id&&(i=t),r.after_section===e.id&&(i=t+1)}),s.collection.splice(i,0,{id:o,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):a.collection.splice(i,0,{id:o,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})};l.getPresetSectionCollection({is_user_section:r.is_user_section,presetSectionId:r.content_id}).fail(function(e){c.errare("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollection()",e),l.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){var t;_.isObject(e)&&!_.isEmpty(e)||(c.errare("updateAPISetting => "+r.action+" => preset section type not found or empty : "+r.content_id,e),l.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => preset section type not found or empty")),t=e,l.preparePresetSectionForInjection(t).fail(function(e){l.updAPISetParams.promise.reject("updateAPISetting => error when preparePresetSectionForInjection => "+r.action+" => "+e),l.updAPISetParams.sectionInjectPromise.reject(e)}).done(function(e){"section"===e.collection[0].level?_.each(e.collection,function(e){n(e,i),i++}):n(e,i),l.updAPISetParams.sectionInjectPromise.resolve()})})}},_updAPISet_sek_add_preset_sektion_in_new_nested_sektion:function(){var n,o,e,r=this;if(n=r.updAPISetParams.params,"no_match"===(o=r.getLevelModel(n.in_column,r.updAPISetParams.newSetValue.collection)))return c.errare("updateAPISetting => "+n.action+" => no parent column matched"),void r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => no parent column matched");var i=0;if(o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){n.before_module_or_nested_section===e.id&&(i=t),n.after_module_or_nested_section===e.id&&(i=t+1)}),"no_match"!=(e=r.getLevelModel(n.in_sektion,r.updAPISetParams.newSetValue.collection))){if(!0===e.is_nested)return r.updAPISetParams.promise.reject(""),void c.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]+"</strong>","</span>"].join("")});r.updAPISetParams.sectionInjectPromise=t.Deferred();r.getPresetSectionCollection({is_user_section:n.is_user_section,presetSectionId:n.content_id}).fail(function(){c.errare("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollection()",_er_),r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){var t;_.isObject(e)&&!_.isEmpty(e)||(c.errare("updateAPISetting => "+n.action+" => preset section type not found or empty : "+n.content_id,e),r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => preset section type not found or empty")),t=e,r.preparePresetSectionForInjection(t).fail(function(e){r.updAPISetParams.promise.reject("updateAPISetting => error when preparePresetSectionForInjection => "+n.action+" => "+e),r.updAPISetParams.sectionInjectPromise.reject(e)}).done(function(e){var t=function(e,t){t=t||0;var i=sektionsLocalizedData.prefixForSettingsNotSaved+r.guid();n.collection_of_preset_section_id=n.collection_of_preset_section_id||[],n.collection_of_preset_section_id.push(i),o.collection.splice(t,0,{id:i,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})};"section"===e.collection[0].level?_.each(e.collection,function(e){t(e,i),i++}):t(e,i),r.updAPISetParams.sectionInjectPromise.resolve()})})}else r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => no grand parent sektion found")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{_updAPISet_sek_add_column:function(){var e,t,i=this;if(e=i.updAPISetParams.params,_.isEmpty(e.id))throw new Error("updateAPISetting => "+e.action+" => missing id");if("no_match"==(t=i.getLevelModel(e.in_sektion,i.updAPISetParams.newSetValue.collection)))return c.errare("updateAPISetting => "+e.action+" => no parent sektion matched"),void i.updAPISetParams.promise.reject("updateAPISetting => "+e.action+" => no parent sektion matched");t.collection=_.isArray(t.collection)?t.collection:[],i.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)?i.updAPISetParams.promise.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]):(i.resetColumnsWidthInSection(t),t.collection.push({id:e.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}))},_updAPISet_sek_remove_column:function(){var t,e,i=this;if(t=i.updAPISetParams.params,"no_match"!=(e=i.getLevelModel(t.in_sektion,i.updAPISetParams.newSetValue.collection))){if(1===_.size(e.collection))return void i.updAPISetParams.promise.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);e.collection=_.isArray(e.collection)?e.collection:[],e.collection=_.filter(e.collection,function(e){return e.id!=t.id}),i.resetColumnsWidthInSection(e)}else c.errare("updateAPISetting => "+t.action+" => no parent sektion matched")},_updAPISet_sek_duplicate_column:function(){var t,e,i=this;if(t=i.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");if("no_match"==(e=i.getLevelModel(t.in_sektion,i.updAPISetParams.newSetValue.collection)))return c.errare("updateAPISetting => "+t.action+" => no parent sektion matched"),void i.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no parent sektion matched");if(e.collection=_.isArray(e.collection)?e.collection:[],i.MAX_NUMBER_OF_COLUMNS-1<_.size(e.collection))i.updAPISetParams.promise.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);else{var n;try{n=i.cloneLevel(t.id)}catch(e){return void c.errare("updateAPISetting => "+t.action,e)}i.maybeGenerateNewItemIdsForCrudModules(n);var o=i.getLevelPositionInCollection(t.id,i.updAPISetParams.newSetValue.collection);i.updAPISetParams.cloneId=n.id,e.collection.splice(parseInt(o+1,10),0,n),i.resetColumnsWidthInSection(e)}},_updAPISet_sek_resize_column:function(){var o,n=this;if(!((o=n.updAPISetParams.params).col_number<2)){var t=n.getLevelModel(o.resized_column,n.updAPISetParams.newSetValue.collection),i=n.getLevelModel(o.sister_column,n.updAPISetParams.newSetValue.collection);if("no_match"==t)return c.errare("updateAPISetting => "+o.action+" => no resized column matched"),void n.updAPISetParams.promise.reject("updateAPISetting => "+o.action+" => no resized column matched");var r=function(e,t){var i=d.extend(!0,{},e.options||{});return i.width=_.isObject(i.width)&&i.width["custom-width"]?i.width:{},i.width["custom-width"]=t,e.options=i,n.cachedElements.$body.find('[data-sek-width-range-column-id="'+e.id+'"]').val(t).trigger("input",{is_resize_column_trigger:!0}),t},e=r(t,parseFloat(o.resizedColumnWidthInPercent));e=parseFloat(e);var s=n.getLevelModel(o.in_sektion,n.updAPISetParams.newSetValue.collection),a=_.filter(s.collection,function(e){return e.id!=t.id&&e.id!=i.id}),l=parseFloat(e.toFixed(3));_.isEmpty(a)||_.each(a,function(e){var t,i,n;currentColWidth=(t=e,i="_not_set_",n=_.isObject(t.options)?t.options:{},!_.isEmpty(n)&&n.width&&n.width["custom-width"]&&(i=parseFloat(1*n.width["custom-width"])),i),("_not_set_"===currentColWidth||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(currentColWidth=r(e,parseFloat((100/o.col_number).toFixed(3)))),l=parseFloat((l+currentColWidth).toFixed(3))}),r(i,parseFloat((100-l).toFixed(3)))}},_updAPISet_sek_move_column:function(){var t,i=this;t=i.updAPISetParams.params;var e,n,o=i.getLevelModel(t.to_sektion,i.updAPISetParams.newSetValue.collection);if(_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => "+t.action+" => missing target sektion");if(t.from_sektion!=t.to_sektion){var r=i.getLevelModel(t.from_sektion,i.updAPISetParams.newSetValue.collection);if(_.isEmpty(r)||"no_match"==r)throw new Error("updateAPISetting => "+t.action+" => missing source column");r.collection=_.isArray(r.collection)?r.collection:[],e=i.getLevelModel(t.id,r.collection),n=d.extend(!0,{},e),r.collection=_.filter(r.collection,function(e){return e.id!=t.id}),i.resetColumnsWidthInSection(r)}o.collection=_.isArray(o.collection)?o.collection:[],originalCollection=d.extend(!0,[],o.collection),reorderedCollection=[],_.each(t.newOrder,function(e){if(t.from_sektion!=t.to_sektion&&e==n.id)reorderedCollection.push(n);else{if(columnCandidate=i.getLevelModel(e,originalCollection),_.isEmpty(columnCandidate)||"no_match"==columnCandidate)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");reorderedCollection.push(columnCandidate)}}),o.collection=reorderedCollection,i.resetColumnsWidthInSection(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,c){c.extend(CZRSeksPrototype,{_updAPISet_sek_add_module:function(){var i,e,t,n,o=this;if(i=o.updAPISetParams.params,_.isEmpty(i.id))throw new Error("updateAPISetting => "+i.action+" => missing id");if(_.isEmpty(i.module_type))throw new Error("updateAPISetting => "+i.action+" => missing module_type");if("no_match"===(e=o.getLevelModel(i.in_column,o.updAPISetParams.newSetValue.collection)))return l.errare("updateAPISetting => "+i.action+" => no parent column matched"),void o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no parent column matched");n=0,e.collection=_.isArray(e.collection)?e.collection:[],_.each(e.collection,function(e,t){i.before_module_or_nested_section===e.id&&(n=t),i.after_module_or_nested_section===e.id&&(n=t+1)});var r={id:i.id,level:"module",module_type:i.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(t=o.getModuleStartingValue(i.module_type))&&(r.value=t),e.collection.splice(n,0,r)},_updAPISet_sek_duplicate_module:function(){var t,e,i,n=this;if(t=n.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");if("no_match"==(e=n.getLevelModel(t.in_column,n.updAPISetParams.newSetValue.collection)))return l.errare("updateAPISetting => "+t.action+" => no parent column matched"),void n.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no parent column matched");e.collection=_.isArray(e.collection)?e.collection:[];try{i=n.cloneLevel(t.id)}catch(e){return l.errare("updateAPISetting => "+t.action,e),void n.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => error when cloning the level")}n.maybeGenerateNewItemIdsForCrudModules(i);var o=n.getLevelPositionInCollection(t.id,n.updAPISetParams.newSetValue.collection);n.updAPISetParams.cloneId=i.id,e.collection.splice(parseInt(o+1,10),0,i)},_updAPISet_sek_remove_module:function(){var t,e;if(t=this.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");"no_match"!=(e=this.getLevelModel(t.in_column,this.updAPISetParams.newSetValue.collection))?(e.collection=_.isArray(e.collection)?e.collection:[],e.collection=_.filter(e.collection,function(e){return e.id!=t.id})):l.errare("updateAPISetting => "+t.action+" => no parent column matched")},_updAPISet_sek_move_module:function(){var t,e,i,n,o=this;if(t=o.updAPISetParams.params,e=o.getLevelModel(t.to_column,o.updAPISetParams.newSetValue.collection),_.isEmpty(e)||"no_match"==e)throw new Error("updateAPISetting => "+t.action+" => missing target column");if(t.from_column!=t.to_column){var r;if(r=o.getLevelModel(t.from_column,o.updAPISetParams.newSetValue.collection),_.isEmpty(r)||"no_match"==r)throw new Error("updateAPISetting => "+t.action+" => missing source column");r.collection=_.isArray(r.collection)?r.collection:[],i=o.getLevelModel(t.id,o.updAPISetParams.newSetValue.collection),n=c.extend(!0,{},i),r.collection=_.filter(r.collection,function(e){return e.id!=t.id})}e.collection=_.isArray(e.collection)?e.collection:[],originalCollection=c.extend(!0,[],e.collection);var s=[];if(_.each(t.newOrder,function(e){if(t.from_column!=t.to_column&&e==n.id)s.push(n);else{if(moduleCandidate=o.getLevelModel(e,o.updAPISetParams.newSetValue.collection),_.isEmpty(moduleCandidate)||"no_match"==moduleCandidate)throw new Error("updateAPISetting => "+t.action+" => missing moduleCandidate");s.push(moduleCandidate)}}),s.length!=_.uniq(s).length)throw new Error("updateAPISetting => "+t.action+" => there are duplicated modules in column : "+e.id);e.collection=s},_updAPISet_sek_set_module_value:function(){var e,t,i=this;e=i.updAPISetParams.params,t=i.getLevelModel(e.id,i.updAPISetParams.newSetValue.collection);var n=e.settingParams.args.moduleRegistrationParams.control,o=e.settingParams.args.moduleRegistrationParams.id,r=n.czr_Module(o);_.isEmpty(r)?l.errare("updateAPISetting => missing parentModuleInstance",e):isMultiItemModule=r.isMultiItem();var s=isMultiItemModule?[]:{};if(_.each(e.value||(isMultiItemModule?[]:{}),function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(s[t]=e)}),"no_match"==t)return l.errare("updateAPISetting => "+e.action+" => no module matched",e),void i.updAPISetParams.promise.reject("updateAPISetting => "+e.action+" => error no module matched");if(_.isEmpty(e.options_type))return l.errare("updateAPISetting => "+e.action+" => missing options_type"),void i.updAPISetParams.promise.reject("updateAPISetting => "+e.action+" => missing options_type");if("__no_option_group_to_be_updated_by_children_modules__"===e.options_type)t.value=s;else{var a=c.extend(!0,{},_.isEmpty(t.value)?{}:t.value);a[e.options_type]=s,t.value=a}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(m,f){f.extend(CZRSeksPrototype,{_updAPISet_sek_import_from_file:function(){var n,o=this;if(n=o.updAPISetParams.params,_.isUndefined(n.imported_content.data)||_.isUndefined(n.imported_content.metas))m.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);else{var i=_.isArray(n.imported_content.data.collection)?f.extend(!0,[],n.imported_content.data.collection):[];if(!0===n.assign_missing_locations){var t,e=n.imported_content.metas.active_locations,r=m.czr_sektions.activeLocations();_.each(r,function(e){o.isHeaderLocation(e)||o.isFooterLocation(e)||t.push(e)});var s=_.first(t);if(!_.isEmpty(s)&&!_.isEmpty(e)&&_.isArray(e)){var a=f(e).not(t).get(),l=o.getLevelModel(s,o.updAPISetParams.newSetValue.collection),c=o.getLevelModel(s,n.imported_content.data.collection),d=[];l.collection=_.isArray(l.collection)?l.collection:[],c.collection=_.isArray(c.collection)?c.collection:[],_.each(e,function(e){var t=o.getLevelModel(e,i);_.isEmpty(t.collection)||(d=_.union(d,t.collection))}),c.collection=d,n.imported_content.data.collection=_.filter(n.imported_content.data.collection,function(e){return!_.contains(a,e.id)})}}if(!0===n.keep_existing_sections){_.each(i,function(e){var t=o.getLevelModel(e.id,o.updAPISetParams.newSetValue.collection);if(!_.isEmpty(t.collection)){var i=o.getLevelModel(e.id,n.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}});var p=o.updAPISetParams.newSetValue.fonts,u=n.imported_content.data.fonts;p&&!_.isEmpty(p)&&_.isArray(p)&&(u=_.isArray(u)?u:[],n.imported_content.data.fonts=_.uniq(_.union(p,u)))}o.updAPISetParams.newSetValue=n.imported_content.data}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(z,w){w.extend(CZRSeksPrototype,{_updAPISet_sek_inject_tmpl_from_gallery:function(){var t,i=this;if(t=i.updAPISetParams.params,z.infoLog("api update params for sek-inject-tmpl-from-gallery",t),_.isUndefined(t.injected_content.data)||_.isUndefined(t.injected_content.metas))z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => invalid imported content",injected_content);else{var n=function(e){return t.injected_content&&t.injected_content.metas&&e===t.injected_content.metas.tmpl_header_location},o=function(e){return t.injected_content&&t.injected_content.metas&&e===t.injected_content.metas.tmpl_footer_location},r=function(){var t=!1;return _.each(e,function(e){t||(n(e)||o(e))&&(t="no_match"!=(t=i.getLevelModel(e,s)))}),t&&!_.isEmpty(c.local_header_footer)},s=_.isArray(t.injected_content.data.collection)?w.extend(!0,[],t.injected_content.data.collection):[],e=t.injected_content.metas.tmpl_locations,a=[],l=i.updAPISetParams.newSetValue.collection;if(_.each(z.czr_sektions.activeLocations(),function(e){i.isGlobalLocationId(e)||a.push(e)}),_.isArray(e)&&!_.isEmpty(e)){var c=t.injected_content.data.local_options;c=w.extend(!0,{},_.isObject(c)?c:{});var d=t.injected_content.data.fonts;d=_.isArray(d)?w.extend(!0,[],d):[];var p,u,m,f,g=w.extend(!0,[],l),h=[],v="__not_set__";switch(_.each(s,function(e){n(e.id)||o(e.id)||_.isEmpty(e.collection)||(h=_.union(h,e.collection))}),t.tmpl_inject_mode){case"replace":if(f=!0,_.each(e,function(e){f&&(f=_.contains(a,e))}),f){var k,y;g=[],_.each(l,function(e){m=_.findWhere(s,{id:e.id})||{},_.isEmpty(m.collection)?i.isHeaderLocation(e.id)||i.isFooterLocation(e.id)?g.push(e):(k={collection:[],options:[]},y=w.extend(!0,{},e),y=w.extend(y,k),g.push(y)):g.push(m)})}else{if(c&&c.template&&"nimble_template"===c.template.local_template?v="loop_start":_.contains(a,"loop_start")?v="loop_start":_.each(a,function(e){i.isHeaderLocation(e)||i.isFooterLocation(e)||(v=e)}),"__not_set__"===v){z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}if("no_match"===(u=i.getLevelModel(v,g))){z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => target location id "+v);break}(u=w.extend(!0,{},u)).collection=h,g=[],r()&&_.each(e,function(e){if(n(e)||o(e)){if("no_match"===(m=i.getLevelModel(e,s)))return void z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id "+e+" not found in template collection");g.push(m)}}),_.each(a,function(e){v===e&&g.push(u),localLocModel=i.getLevelModel(e,l),"no_match"!==localLocModel?r()||(i.isHeaderLocation(e)||i.isFooterLocation(e))&&g.push(localLocModel):z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id "+e+" not found in current setting collection")})}break;case"before":if(_.each(a,function(e){"__not_set__"==v&&("no_match"!==(p=i.getLevelModel(e,g))?i.isHeaderLocation(e)||i.isFooterLocation(e)||_.isEmpty(p.collection)||(v=e,u=p):z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}(u=w.extend(!0,{},u)).collection=_.union(h,u.collection),g=[],_.each(a,function(e){if(v===e)g.push(u);else{if("no_match"===p)return void z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e);g.push(i.getLevelModel(e,l))}});break;case"after":if(_.each(a.reverse(),function(e){"__not_set__"==v&&("no_match"!==(p=i.getLevelModel(e,g))?i.isHeaderLocation(e)||i.isFooterLocation(e)||_.isEmpty(p.collection)||(v=e,u=p):z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}(u=w.extend(!0,{},u)).collection=_.union(u.collection,h),g=[],_.each(a,function(e){if(v===e)g.push(u);else{if("no_match"===(p=i.getLevelModel(e,l)))return void z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => loc id not found"+e);g.push(p)}})}if(i.updAPISetParams.newSetValue.collection=g,!_.isEmpty(c)&&"replace"===t.tmpl_inject_mode){var b=i.updAPISetParams.newSetValue.local_options;b=w.extend(!0,{},_.isObject(b)?b:{}),i.updAPISetParams.newSetValue.local_options=_.extend(b,c)}if(_.isArray(d)&&!_.isEmpty(d))if("replace"!=t.tmpl_inject_mode){var I=i.updAPISetParams.newSetValue.fonts;I=w.extend(!0,[],_.isArray(I)?I:[]),i.updAPISetParams.newSetValue.fonts=_.uniq(_.union(d,I))}else i.updAPISetParams.newSetValue.fonts=d}else z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => invalid imported template locations",t)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(n,o){o.extend(CZRSeksPrototype,{cleanRegistered:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);n.trigger("sek-before-clean-registered"),e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return!_.isEmpty(e.level)&&"setting"===e.what&&n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"===e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(p,u){u.extend(CZRSeksPrototype,{rootPanelFocus:function(){p.section.has(p.czr_activeSectionId())?p.section(p.czr_activeSectionId()).expanded(!1):p.section.each(function(e){e.expanded(!1)}),p.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()},getGlobalSectionsSettingId:function(){return sektionsLocalizedData.settingIdForGlobalSections},getParentSectionFromColumnId:function(i,n){var s=this,a="no_match",l=function(i,e,n,o){if(_.isUndefined(e)){var t=p(n)(),r=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){var t;"no_match"==a&&("section"==e.level&&(t=_.findWhere(e.collection,{id:i})),_.isEmpty(t)?_.isArray(e.collection)&&l(i,e.collection,n,o):a=e)}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&l(i,n,e,t)}):l(i,n),a},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,s=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=p(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?u.extend(!0,{},n):r.getDefaultSektionSettingValue("global");e=_.isArray(o.collection)?o.collection:[]}return _.each(e,function(e){"no_match"==i&&(t===e.id?i=e:_.isArray(e.collection)&&(i=s(t,e.collection)))}),i};return"no_match"!==s(e)},isGlobalLocationId:function(e){var t=this.activeLocationsInfo(),i=_.isArray(t)?_.findWhere(t,{id:e}):{};return _.isObject(i)&&i.is_global},isHeaderLocation:function(e){var t=this.activeLocationsInfo(),i=_.isArray(t)?_.findWhere(t,{id:e}):{};return _.isObject(i)&&i.is_header},isFooterLocation:function(e){var t=this.activeLocationsInfo(),i=_.isArray(t)?_.findWhere(t,{id:e}):{};return _.isObject(i)&&i.is_footer},getLevelModel:function(i,n){var s=this,a="no_match",l=function(t,e,i,n){if(_.isUndefined(e)){var o=p(i)(),r=_.isObject(o)?u.extend(!0,{},o):u.extend(!0,{},s.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==a&&(t===e.id?a=e:_.isArray(e.collection)&&l(t,e.collection,i,n))}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&l(i,n,e,t)}):l(i,n),a},getLevelPositionInCollection:function(i,n){var s=this,a="no_match",l=function(i,e,n,o){if(_.isUndefined(e)){var t=p(n)(),r=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==a&&(i===e.id?a=t:_.isArray(e.collection)&&l(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&l(i,e,t,n)}):l(i,n),a},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))p.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];p.errare("getLevelProperty => invalid model for id : "+e.id,t)}else p.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=u.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.prefixForSettingsNotSaved+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.prefixForSettingsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(sektionsLocalizedData.registeredModules[e].is_father)return p.errare("getDefaultItemModelFromRegisteredModuleData => Father modules should be treated specifically"),{};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])},isMultiItemsModule:function(e){return sektionsLocalizedData.registeredModules[e]&&!0===sektionsLocalizedData.registeredModules[e].is_crud},maybeGenerateNewItemIdsForCrudModules:function(t){var i=this;return(_.isArray(t)||_.isObject(t))&&_.each(t,function(e){_.isArray(t)&&_.isObject(e)&&e.id&&!_.has(e,"level")?-1===e.id.indexOf(sektionsLocalizedData.prefixForSettingsNotSaved)&&(e.id=i.guid()):(_.isArray(e)||_.isObject(e))&&i.maybeGenerateNewItemIdsForCrudModules(e)}),t},sniffGFonts:function(e){var o=this,r=[],s=function(i,n,e){if(_.isUndefined(e)){var t=p(i)();e=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===o.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(r,e)&&r.push(e),(_.isArray(e)||_.isObject(e))&&s(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?s(o.getGlobalSectionsSettingId(),"global"):s(o.localSectionsSettingId(),"local"),r},sniffAllFonts:function(){var o=this,r=[],s=function(i,n,e){if(_.isUndefined(e)){var t=p(i)();e=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&_.isString(e)&&(-1<e.indexOf("[gfont]")||-1<e.indexOf("[cfont]"))&&r.push(e),(_.isArray(e)||_.isObject(e))&&s(i,n,e)})};return _.each([{id:o.localSectionsSettingId(),scope:"local"},{id:o.getGlobalSectionsSettingId(),scope:"global"},{id:sektionsLocalizedData.optNameForGlobalOptions,scope:"global"}],function(e){s(e.id,e.scope)}),r},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))p.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))p.errare("getInputDefaultValue => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.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}p.errare("getInputDefaultValue => Father modules should be treated specifically")}},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))p.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))p.errare("getInputType => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.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}p.errare("getInputType => Father modules should be treated specifically")}},getInputRegistrationParams:function(i,n,e){var o=this;if(o.cachedInputRegistrationParams=o.cachedInputRegistrationParams||{},o.cachedInputRegistrationParams[n]=o.cachedInputRegistrationParams[n]||{},_.has(o.cachedInputRegistrationParams[n],i))return o.cachedInputRegistrationParams[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))p.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))p.errare("getInputRegistrationParams => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r={};return _.each(e,function(e,t){_.isEmpty(r)&&(i!==t||_.isUndefined(e.input_type)||(r=e),_.isEmpty(r)&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputRegistrationParams(i,n,e)),_.isEmpty(r)||(o.cachedInputRegistrationParams[n][i]=r))}),r}p.errare("getInputRegistrationParams => Father modules should be treated specifically")}},inputIsAFontFamilyModifier:function(i,e){var n=this;if(n.cachedFontFamilyModifier=n.cachedFontFamilyModifier||{},_.has(n.cachedFontFamilyModifier,i))return n.cachedFontFamilyModifier[i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules);var o="not_set";return _.each(e,function(e,t){"not_set"===o&&(i!==t||_.isUndefined(e.input_type)||(o=!_.isUndefined(e.refresh_fonts)&&e.refresh_fonts),"not_set"===o&&(_.isArray(e)||_.isObject(e))&&(o=n.inputIsAFontFamilyModifier(i,e)),"not_set"!==o&&(n.cachedFontFamilyModifier[i]=o))}),o}p.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){var a=this;if(!sektionsLocalizedData.registeredModules)return p.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return p.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t,i,n,l=function(e){return readyStartValues=[],_.each(e,function(e){if(_.isObject(e)){var t=u.extend(!0,{},e);t.id=p.czr_sektions.guid(),readyStartValues.push(t)}else p.errare("getModuleStartingValue => multi-item module => items should be objects for module "+mod_type)}),readyStartValues},c={},d=(t=e,sektionsLocalizedData.registeredModules[t]&&sektionsLocalizedData.registeredModules[t].starting_value?sektionsLocalizedData.registeredModules[t].starting_value:{});return n=e,sektionsLocalizedData.registeredModules[n]&&!0===sektionsLocalizedData.registeredModules[n].is_father?_.each((i=e,sektionsLocalizedData.registeredModules[i]&&sektionsLocalizedData.registeredModules[i].children?sektionsLocalizedData.registeredModules[i].children:{}),function(e,t){var i,n,o,r,s=(i=e,r=(o=d)[n=t]?o[n]:{},a.isMultiItemsModule(i)&&_.isArray(r)?l(r):r);_.isEmpty(s)||(c[t]=s)}):c=a.isMultiItemsModule(e)&&_.isArray(d)?l(d):d,_.isEmpty(c)?"no_starting_value":c},selectNextTabbableOrFocusable:function(e){var t=u(e),i=u(":focus"),n=0;if(1===i.length){var o=t.index(i);o+1<t.length&&(n=o+1)}t.eq(n).focus()},selectPrevTabbableOrFocusable:function(e){var t=u(e),i=u(":focus"),n=t.length-1;if(1===i.length){var o=t.index(i);0<o&&(n=o-1)}t.eq(n).focus()},setupSelectInput:function(e){var n=this,t=(n.input_parent,n.module,p.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type)),i={params:e=_.isEmpty(e)?t.choices:e};if(n.module.trigger("nimble-set-select-input-options",i),e=i.params,!_.isEmpty(e)&&_.isObject(e))switch(n.type){case"simpleselect":_.each(e,function(e,t){var i={value:t,html:e};t==n()?u.extend(i,{selected:"selected"}):"px"===t&&u.extend(i,{selected:"selected"}),u("select[data-czrtype]",n.container).append(u("<option>",i))}),u("select[data-czrtype]",n.container).selecter();break;case"multiselect":var o=n();o=_.isString(o)?[o]:o,o=_.isArray(o)?o:[],_.each(e,function(e,t){var i={value:t,html:e};_.contains(o,t)&&u.extend(i,{selected:"selected"}),u("select[data-czrtype]",n.container).append(u("<option>",i))}),u("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),u("select[data-czrtype]",n.container).on("change",function(){0===u(this).find("option:selected").length&&n([])});break;default:p.errare("::setupSelectInput => invalid input type => "+n.type)}else p.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in module "+n.module.module_type)},maybeSetupDeviceSwitcherForInput:function(){var n=this;if(!n.previewedDevice){var e=['<span class="sek-input-device-switcher">','<i data-sek-device="desktop" class="sek-switcher preview-desktop active" title="'+sektionsLocalizedData.i18n["Settings on desktops"]+'"></i>','<i data-sek-device="tablet" class="sek-switcher preview-tablet" title="'+sektionsLocalizedData.i18n["Settings on tablets"]+'"></i>','<i data-sek-device="mobile" class="sek-switcher preview-mobile" title="'+sektionsLocalizedData.i18n["Settings on mobiles"]+'"></i>',"</span>"].join(" ");n.container.find(".customize-control-title").first().prepend(e),n.previewedDevice=new p.Value(p.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),n.container.find("[data-sek-device]").removeClass("active"),u(this).addClass("active");var t,i="desktop";try{i=u(this).data("sek-device")}catch(e){p.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{p.previewedDevice(i)}catch(e){p.errare("maybeSetupDeviceSwitcherForInput => error when setting the previewed device",e)}n.previewedDevice(i),_.isUndefined(e.isTrigger)&&n.module&&n.module.control&&n.module.control.params.section&&(t=n.module.control.params.section,_.delay(function(){p.previewer.send("sek-animate-to-level",{id:t})},600))},n.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=n.container.find('[data-sek-device="'+p.previewedDevice()+'"]');0<t.length&&t.trigger("click")}},scheduleModuleAccordion:function(e){e=e||{expand_first_control:!0};var i=this;if(!0!==i.container.data("sek-module-accordion-has-been-setup")&&(u(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=u(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){u(this).attr("data-sek-accordion")||u(this).attr("data-sek-expanded","false")}),t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),t.trigger("true"==t.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed"),!0===t.data("module_ready_on_custom_control_event_is_setup")?t.trigger("sek-accordion-expanded"):t.one("module_ready_on_custom_control_event_is_setup",function(){t.trigger("sek-accordion-expanded")}))}),i.container.data("sek-module-accordion-has-been-setup",!0),e.expand_first_control)){var t=_.filter(i.controls(),function(e){return!e.params||!e.params.sek_registration_params||!1!==e.params.sek_registration_params.has_accordion}),n=_.first(t);_.isObject(n)&&!_.isEmpty(n.id)&&p.control(n.id,function(e){e.container.one("items-collection-populated",function(){u(this).find("label > .customize-control-title").trigger("click")}),!0===e.container.data("module_ready_on_custom_control_event_is_setup")?e.container.trigger("sek-accordion-expanded"):e.container.one("module_ready_on_custom_control_event_is_setup",function(){e.container.trigger("sek-accordion-expanded")})})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(u.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=u.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(u.Deferred(function(t){(i.isPromise(e)?e:u.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),u.when.apply(this,n).done(function(){var i={},e=Array.prototype.slice.call(arguments);_.each(e,function(e,t){i[o[t]]=e}),t.resolve(i)}).fail(t.reject),t},whenAllPromisesInSerie:function(t,i,n,o){i=i||0,n=n||{},o=o||u.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:u.Deferred(function(e){e.resolve()})).always(function(e){n[i]=e,i+1==t.length?o.resolve(n):i+1<t.length&&r.whenAllPromisesInSerie(t,i+1,n,o)})}return o},importAttachment:function(t){return wp.ajax.post("sek_import_attachment",{img_url:t,nonce:p.settings.nonce.save}).fail(function(e){p.errare("sek_import_attachment ajax action failed for image "+t,e)})},cleanIds:function(e){e.id="";var t=this;return _.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&t.cleanIds(e)}),e},getDefaultSektionSettingValue:function(e){return!_.isUndefined(e)&&_.contains(["local","global"],e)||p.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);if(!n.czr_Input.has(t))throw new Error("::scheduleVisibilityOfInputId => missing input id : "+t);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})},hasCurrentPageNBSectionsNotHeaderFooter:function(){var e,t=this,i=!1,n=this.localSectionsSettingId(),o=p(n)();this.activeLocationsInfo();return o=_.isObject(o)?o:{},e=u.extend(!0,{},o),e=_.isEmpty(e.collection)?[]:e.collection,e=_.isArray(e)?e:[],_.each(e,function(e){i||_.isObject(e)&&"location"==e.level&&e.collection&&(t.isHeaderLocation(e.id)||t.isFooterLocation(e.id)||(i=!_.isEmpty(e.collection)))}),i},isJsonString:function(e){try{JSON.parse(e)}catch(e){return!1}return!0}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&l.panel(sektionsLocalizedData.sektionsPanelId,function(e){l.notifications.add(new l.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(){l.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),l.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){l.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_intro_sec_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var n=this,o=function(){l.notifications.add(new l.Notification("missing-injection-target",{type:"info",message:sektionsLocalizedData.i18n["You first need to click on a target ( with a + icon ) in the preview."],dismissible:!0})),_.delay(function(){l.notifications.remove("missing-injection-target")},3e4)};e.find('[draggable="true"]').each(function(){m(this).on("dragstart",function(e){(function(e){n.lastClickedTargetInPreview({}),e.originalEvent.dataTransfer.setData("sek-content-type",m(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-eligible-for-module-dropzones",m(this).data("sek-eligible-for-module-dropzones")),e.originalEvent.dataTransfer.setData("sek-content-id",m(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",m(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",m(this).data("sek-is-user-section")),n.dndData={content_type:e.originalEvent.dataTransfer.getData("sek-content-type"),eligible_for_module_dropzones:"true"===e.originalEvent.dataTransfer.getData("sek-eligible-for-module-dropzones"),content_id:e.originalEvent.dataTransfer.getData("sek-content-id"),section_type:e.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===e.originalEvent.dataTransfer.getData("sek-is-user-section")};try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){l.panel(sektionsLocalizedData.sektionsPanelId,function(e){l.notifications.add(new l.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(){l.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),n.cachedElements.$body.addClass("sek-dragging"),l.previewer.send("sek-drag-start",{content_type:n.dndData.content_type,eligible_for_module_dropzones:n.dndData.eligible_for_module_dropzones})}).call(m(this),e)}).on("dragend",function(e){(function(e){n.cachedElements.$body.removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),l.previewer.send("sek-drag-stop")}).call(m(this),e)}).on("dblclick",function(e){(function(e){var t,i=n.lastClickedTargetInPreview();!_.isEmpty(i)&&i.id?t=n.dnd_getDropZonesElements().find('[data-sek-id="'+i.id+'"]').find(".sek-module-drop-zone-for-first-module").first():o(),t&&0<t.length?(l.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module_or_nested_section:t.data("drop-zone-before-module-or-nested-section"),after_module_or_nested_section:t.data("drop-zone-after-module-or-nested-section"),before_section:t.data("drop-zone-before-section"),after_section:t.data("drop-zone-after-section"),content_type:m(this).attr("data-sek-content-type"),content_id:m(this).attr("data-sek-content-id"),section_type:m(this).attr("data-sek-section-type"),is_user_section:"true"===m(this).attr("data-sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),l.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(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({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":this.$cachedDropZoneCandidates=null,t.dnd_canDrop({targetEl:m(this),evt:e})&&(e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),l.previewer.send("sek-drag-stop"))}}).data("zone-droppable-setup",!0))})},dnd_isInTarget:function(e,t){var i=t.clientY,n=t.clientX,o=e[0].getBoundingClientRect(),r=n<=o.right&&o.left<=n;return i>=o.top&&o.bottom>=i&&r},dnd_toggleDragApproachClassesToDropZones:function(p){var u=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.distanceTable=[],this.$dropZones.find(".sek-drop-zone").each(function(){var e,t,i=p.clientY,n=p.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),s=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),a=(o.right,o.left,r<50),l=s<50,c=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;u.distanceTable.push({el:m(this),dist:d&&c?0:(e=s,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(a||d)&&(l||c)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(u.distanceTable,"dist"));u.$dropTargetCandidate=null,_.each(u.distanceTable,function(e){_.isNull(u.$dropTargetCandidate)&&t===e.dist&&(u.$dropTargetCandidate=e.el)}),u.$dropTargetCandidate&&0<u.$dropTargetCandidate.length&&u.dnd_isInTarget(u.$dropTargetCandidate,p)&&u.$dropTargetCandidate.addClass("sek-drag-is-in"),u.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=m(e.currentTarget);switch(this.dndData.content_type){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:l.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(l.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;if(i.closest('[data-sek-level="location"]').length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),s=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),a="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,l=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return!!i.hasClass("sek-drop-zone")&&(!t.dndData.is_user_section&&(r||s)&&a?(l(r?sektionsLocalizedData.i18n["Header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["Footer location only accepts modules and pre-built footer sections"]),!1):s&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(l(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(l(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):"preset_section"===t.dndData.content_type&&!0===t.dndData.eligible_for_module_dropzones&&!n||("preset_section"===t.dndData.content_type&&n||"module"===t.dndData.content_type&&!n||"preset_section"===t.dndData.content_type&&o))},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){l.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"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(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"),e.removeClass("sek-feed-me-seymore"),e.find(".sek-no-drop-possible-message").remove())},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");m.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),e.addClass("sek-feed-me-seymore"),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,s=i.right,a=i.top,l=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=l-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();l.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module_or_nested_section:e.data("drop-zone-before-module-or-nested-section"),after_module_or_nested_section: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"),eligible_for_module_dropzones:"true"===t.originalEvent.dataTransfer.getData("sek-eligible-for-module-dropzones"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),section_type:t.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===t.originalEvent.dataTransfer.getData("sek-is-user-section")})},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,i=e.drop_target_element,n="content-in-column";switch(i.data("sek-location")){case"between-sections":n="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,n="content-in-empty-location";break;case"between-columns":n="content-in-new-column"}"preset_section"===e.content_type&&(i.hasClass("sek-module-drop-zone-for-first-module")?1<(t=i.closest('div[data-sek-level="section"]')).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(n="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=i.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=t.data("sek-id")):(e.sektion_to_replace=t.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),n="content-in-a-section-to-replace"):("between-sections"===i.data("sek-location")&&(n="content-in-a-section-to-create"),"between-modules-and-nested-sections"===i.data("sek-location")&&e.eligible_for_module_dropzones&&(n="preset-section-eligible-for-module-dropzones-in-new-nested-sektion",e.is_nested=!0,e.in_column=i.closest('[data-sek-level="column"]').data("sek-id"),t=i.closest('div[data-sek-level="section"]'),e.in_sektion=t.data("sek-id"))));switch(n){case"content-in-column":var o=i.closest("div[data-sek-level]");if(o.length<1)throw new Error("No valid level dom element found");var r=o.data("sek-level"),s=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(s))throw new Error("No valid level id found");l.previewer.trigger("sek-add-module",{level:r,id:s,in_column:i.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:i.closest('div[data-sek-level="section"]').data("sek-id"),before_module_or_nested_section:e.before_module_or_nested_section,after_module_or_nested_section:e.after_module_or_nested_section,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":case"content-in-empty-location":l.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":l.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"preset-section-eligible-for-module-dropzones-in-new-nested-sektion":var a=m.extend(!0,{},e);a=m.extend(a,{before_module_or_nested_section:e.before_module_or_nested_section,after_module_or_nested_section:e.after_module_or_nested_section}),l.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",a);break;default:l.errare("sek control panel => ::reactToDrop => invalid drop case : "+n)}}(e)}catch(e){l.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;c.sekEditorExpanded=new c.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?c.errare("toggle-tinymce-editor => missing input or control id"):c.sekEditorExpanded(!0)}),c.sekEditorExpanded.bind(function(e,t,i){!function(){c.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};c.sekTinyMceEditor&&(c.sekTinyMceEditor.initialized?e():c.sekTinyMceEditor.on("init",function(){e()}))}(),e&&c.sekTinyMceEditor&&c.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),n.cachedElements.$window[e?"on":"off"]("resize",function(){c.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){n.cachedElements.$window.trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){c.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&c.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&c.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(c.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&c.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-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?c.previewer.bind(e,function(){c.sekEditorExpanded(!1)}):c.previewer.bind(e,function(e){c.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&c.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),s=d("#wp-czr-customize-content_editor-tools"),a=i.$editorPane.find(".mce-toolbar-grp"),l=i.$editorPane.find(".mce-statusbar");c.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=s.outerHeight()+a.outerHeight()+l.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),r.css("height",o.height-o.components))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,a){a.extend(CZRSeksPrototype,{export_template:function(e){e=e||{},e=a.extend({scope:"local"},e);var i=[],t={sek_export_nonce:d.settings.nonce.save,skope_id:"local"===e.scope?d.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:d.czr_sektions.activeLocations()};_.each(t,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:d.settings.nonce.save,sek_export_nonce:d.settings.nonce.save,skope_id:"local"===e.scope?d.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:d.czr_sektions.activeLocations()}).done(function(){a(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),a(window).on("beforeunload")}).fail(function(e){d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Export failed"],encodeURIComponent(e)].join(" "),"</strong>","</span>"].join("")})})},import_template_from_file:function(i){i=i||{};var e,t,n=(i=a.extend({is_file_import:!0,pre_import_check:!1,assign_missing_locations:!1,input:"",file_input:""},i)).input;if(_.isEmpty(n))throw new Error("::import_template => missing file_input param");if(_.isEmpty(i.file_input))throw new Error("::import_template => missing file_input param");if(i.file_input.length<1||_.isUndefined(i.file_input[0])||!i.file_input[0].files||_.isEmpty(i.file_input.val()))d.previewer.trigger("sek-notify",{notif_id:"missing-import-file",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Missing file"],"</strong>","</span>"].join("")});else{t=d.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type).scope,n.container.find(".sek-uploading").show(),d.notifications.remove("missing-import-file"),d.notifications.remove("import-success"),d.notifications.remove("import-failed"),d.notifications.remove("img-import-errors");var o=new FormData;if(o.append("file_candidate",i.file_input[0].files[0]),o.append("action","sek_get_manually_imported_file_content"),o.append("nonce",d.settings.nonce.save),_.contains(["local","global"],t)){if(o.append("skope",t),i.pre_import_check&&o.append("pre_import_check",i.pre_import_check),o.append("import_img",n.input_parent.czr_Input("import_img")()),n.container.find(".sek-uploading").show(),e=a.ajax({url:wp.ajax.settings.url,data:o,processData:!1,contentType:!1,type:"POST"}),i.pre_import_check)return a.Deferred(function(){var t=this;e.done(function(e){e.success||t.reject(e),d.czr_sektions.isImportedContentEligibleForAPI(e,i)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)})});d.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),_.delay(function(){"pending"===e.state()&&d.previewer.trigger("sek-notify",{notif_id:"import-too-long",type:"error",duration:2e4,message:["<span>","<strong>",sektionsLocalizedData.i18n['Import exceeds server response time, try to uncheck "import images" option.'],"</strong>","</span>"].join("")})},3e4),e.done(function(e){d.czr_sektions.isImportedContentEligibleForAPI(e,i)?(e.data.data.collection=d.czr_sektions.setIdsForImportedTmpl(e.data.data.collection),d.czr_sektions.doUpdateApiSettingAfter_FileImport(e,i)):d.infoLog("::import_template problem => !api.czr_sektions.isImportedContentEligibleForAPI",e,i)}).fail(function(e){d.errare("::import_template => ajax error",e),d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Import failed, file problem"],"</strong>","</span>"].join("")})}).always(function(){d.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate(i)})}else d.errare("::import_template => invalid scope provided",t)}},pre_checks_from_file_import:function(e,t){if(t=t||{},(t=a.extend({is_file_import:!0,pre_import_check:!1,assign_missing_locations:!1,input:"",file_input:""},t)).is_file_import&&_.isEmpty(t.input))throw new Error("::pre_checks_from_file_import => missing file_input param");var i=d.czr_sektions.activeLocations(),n=a.extend(!0,[],_.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]),o=t.input,r=d.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type);if(n=_.filter(n,function(e){return!_.contains(["nimble_local_header","nimble_local_footer"],e)}),_.isArray(n)&&_.isArray(i)){var s=a(n).not(i).get();_.isEmpty(s)?d.czr_sektions.import_template_from_file(t):(t.is_file_import&&(o.container.find('button[data-czr-action="sek-pre-import"]').hide(),"local"===r.scope?o.container.find(".czr-import-dialog.czr-local-import").slideToggle():o.container.find(".czr-import-dialog.czr-global-import").slideToggle()),d.infoLog("sek-pre-import => imported locations missing in current page.",s))}else d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Import failed"],"</strong>","</span>"].join("")}),t.is_file_import&&d.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate(t)},setIdsForImportedTmpl:function(i){var n=this;return(_.isObject(i)||_.isArray(i))&&_.each(i,function(e,t){(_.isObject(e)||_.isArray(e))&&(i[t]=n.setIdsForImportedTmpl(e)),"id"!==t||!_.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.prefixForSettingsNotSaved+d.czr_sektions.guid())}),i},isImportedContentEligibleForAPI:function(e,t){var i=!0,n=e.data,o=null;e.success||(o=[sektionsLocalizedData.i18n["Import failed"],n].join(" : ")),_.isNull(o)&&!_.isObject(n)&&(o=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var r=n.data,s=n.metas,a=n.img_errors;_.isNull(o)&&!_.isObject(r)&&(o=sektionsLocalizedData.i18n["Import failed, invalid file content"]),_.isNull(o)&&!_.isObject(s)&&(o=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var l=d.czr_sektions.localSectionsSettingId();if(t.is_file_import){var c=t.input;l="local"===d.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type).scope?l:d.czr_sektions.getGlobalSectionsSettingId()}return _.isNull(o)&&_.isEqual(d(l)(),r)&&(d.infoLog("::isImportedContentEligibleForAPI => Setting unchanged"),i=!1),_.isNull(o)||(d.errare("::isImportedContentEligibleForAPI => invalid data sent from server",n),d.errare("::isImportedContentEligibleForAPI => importErrorMsg",o),d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",o,"</strong>","</span>"].join("")}),i=!1),_.isEmpty(a)||d.previewer.trigger("sek-notify",{notif_id:"img-import-errors",type:"info",duration:6e4,message:['<span style="color:#0075a2">',["<strong>"+sektionsLocalizedData.i18n["Some image(s) could not be imported"]+"</strong><br/>",'<span style="font-size:11px">'+a+"</span>"].join(" : "),"</span>"].join("")}),i},doUpdateApiSettingAfter_FileImport:function(e,t){if(t=t||{},d.czr_sektions.isImportedContentEligibleForAPI(e,t)||!t.is_file_import){var i="local",n=!1;if(t.is_file_import){var o=t.input,r=d.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type);i=r.scope,n="local"===r.scope&&o.input_parent.czr_Input("keep_existing_sections")()}d.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:i,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:n}).done(function(){"local"===i&&d.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),d.previewer.refresh(),d.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["File successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){d.errare("::doUpdateApiSettingAfter_FileImport => error when firing ::updateAPISetting",e),d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),d.previewer.refresh()}else d.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate(t)},doAlwaysAfterFileImportAndApiSettingUpdate:function(e){if(d.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),e=e||{},(e=a.extend({is_file_import:!0,pre_import_check:!1,assign_missing_locations:!1,input:"",file_input:""},e)).is_file_import){var t=e.input;t.container.find(".sek-uploading").hide(),e.file_input.val("").trigger("change"),t.container.find(".czr-import-dialog").hide(),t.container.find('button[data-czr-action="sek-pre-import"]').show()}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(o,d){d.extend(CZRSeksPrototype,{setupTemplateGallery:function(){var i=this;i.templateGalleryExpanded=new o.Value(!1),i.tmplInjectDialogVisible=new o.Value(!1),sektionsLocalizedData.isTemplateGalleryEnabled&&(i.tmplSearchFieldVisible=new o.Value(!1),i.tmplSearchFieldVisible.bind(function(e){var t=i.cachedElements.$body.find(".sek-tmpl-filter-wrapper");e?t.fadeIn("fast"):t.fadeOut("fast")}),i.templateGalleryExpanded.bind(function(e){i.cachedElements.$body.toggleClass("sek-template-gallery-expanded",e),e?(i.tmplDialogVisible(!1),i.levelTreeExpanded(!1),i.tmplInjectDialogVisible(!1),d("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTempGallery({tmpl_source:"api_tmpl"})):(d("#customize-preview iframe").css("z-index",""),o.trigger("nb-template-gallery-closed"))}),i.tmplInjectDialogVisible.bind(function(e){i.cachedElements.$body.toggleClass("sek-tmpl-dialog-expanded",e),e&&(i.tmplDialogVisible(!1),i.levelTreeExpanded(!1),d("#customize-preview iframe").css("z-index",1))}),o.previewer.bind("ready",function(){i.templateGalleryExpanded(!1)}))},renderTmplGalleryUI:function(){if(0<d("#nimble-tmpl-gallery").length)return d("#nimble-tmpl-gallery");try{_tmpl=wp.template("nimble-top-tmpl-gallery")({})}catch(e){return o.errare("Error when parsing nimble-top-tmpl-gallery template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("#nimble-tmpl-gallery")},renderOrRefreshTempGallery:function(t){t=d.extend({tmpl_source:"api_tmpl"},t||{});var i,n=this;d("#nimble-tmpl-gallery").length<1&&d.when(n.renderTmplGalleryUI({})).done(function(){n.setupTmplGalleryDOMEvents()}),d("#nimble-tmpl-gallery").find(".sek-tmpl-gallery-inner").html("");var o=function(e){return n.getTemplateGalleryHtml(e).done(function(e){(i=d("#nimble-tmpl-gallery")).find(".sek-tmpl-gallery-inner").html(e)}),n.getTemplateGalleryHtml(e)};o(t).done(function(e){_.isEmpty(e)&&"api_tmpl"===t.tmpl_source?("function"==typeof window.console.log&&console.log("Nimble Builder API problem => could not fetch templates"),o({tmpl_source:"user_tmpl"})):((i=d("#nimble-tmpl-gallery")).find("#sek-tmpl-source-switcher").show(),i.find("#sek-tmpl-source-switcher button").attr("aria-pressed","false").removeClass("is-selected"),i.find('[data-sek-tmpl-source="'+t.tmpl_source+'"]').attr("aria-pressed","true").addClass("is-selected"))})},getTemplateGalleryHtml:function(n){var o,r,t=this,s="",a=[sektionsLocalizedData.baseUrl,"/assets/admin/img/wire_frame.png","?ver=",sektionsLocalizedData.nimbleVersion].join(""),l=d.Deferred(),c=d("#nimble-tmpl-gallery").find(".czr-css-loader");c.show();return("user_tmpl"===n.tmpl_source?t.setSavedTmplCollection:t.getApiTmplCollection).call(t).done(function(e){setTimeout(function(){!function(e){if(_.isEmpty(e)&&"user_tmpl"===n.tmpl_source){var t=[sektionsLocalizedData.baseUrl,"/assets/admin/img/empty_tmpl_collection_notice.jpg","?ver=",sektionsLocalizedData.nimbleVersion].join(""),i="https://docs.presscustomizr.com/article/426-how-to-save-and-reuse-templates-with-nimble-builder";s+='<div class="sek-tmpl-empty-collection">',s+="<p>"+sektionsLocalizedData.i18n["You did not save any template yet."]+"</p>",s+='<img src="'+t+'" />',s+='<br/><a href="'+i+'" target="_blank" rel="noreferrer nofollow">'+i+"</a>",s+="</div>"}else _.each(e,function(e,t){o=_.isEmpty(e.description)?[e.title,e.last_modified_date].join(" | "):[e.title,e.last_modified_date,e.description].join(" | "),r=_.isEmpty(e.thumb_url)?a:e.thumb_url,s+='<div class="sek-tmpl-item" data-sek-tmpl-item-id="'+t+'" data-sek-tmpl-item-source="'+n.tmpl_source+'">',s+='<div class="sek-tmpl-thumb" style="background-image:url('+r+')"></div>',s+='<div class="sek-tmpl-info" title="'+o+'">',s+='<h3 class="tmpl-title">'+e.title+"</h3>",s+='<p class="tmpl-date"><i>'+[sektionsLocalizedData.i18n["Last modified"]," : ",e.last_modified_date].join(" ")+"</i></p>",s+='<p class="tmpl-desc">'+e.description+"</p>",s+='<i class="material-icons use-tmpl" title="'+sektionsLocalizedData.i18n["Use this template"]+'">add_circle_outline</i>',"user_tmpl"===n.tmpl_source&&(s+='<i class="material-icons edit-tmpl" title="'+sektionsLocalizedData.i18n["Edit this template"]+'">edit</i>',s+='<i class="material-icons remove-tmpl" title="'+sektionsLocalizedData.i18n["Remove this template"]+'">delete_forever</i>'),"true"==e.is_pro_tmpl&&(s+='<div class="sek-is-pro"><img src="'+sektionsLocalizedData.czrAssetsPath+'sek/img/pro_orange.svg" alt="Pro feature"/></div>'),s+="</div>",s+="</div>"});0<c.length?c.hide({duration:100,complete:function(){l.resolve(s)}}):l.resolve(s)}(e),t.tmplSearchFieldVisible(!_.isEmpty(e))},0)}).fail(function(){console.log("tmpl collection promise failed",n),l.resolve("")}),l.promise()},setupTmplGalleryDOMEvents:function(){var c=d("#nimble-tmpl-gallery"),n=this;c.on("click",".sek-tmpl-item .use-tmpl",function(e){e.preventDefault(),e.stopPropagation();var t=d(this).closest(".sek-tmpl-item").data("sek-tmpl-item-id"),i=d(this).closest(".sek-tmpl-item").data("sek-tmpl-item-source");_.isEmpty(t)?o.errare("::setupTmplGalleryDOMEvents => error => invalid template id"):n.hasCurrentPageNBSectionsNotHeaderFooter()?(n._tmplNameWhileImportDialog=t,n._tmplSourceWhileImportDialog=i,n.tmplInjectDialogVisible(!0)):(o.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:t,tmpl_source:i}),n.templateGalleryExpanded(!1))}).on("click",".sek-tmpl-gal-inject-dialog .sek-ui-button",function(e){e.preventDefault(),e.stopPropagation();var t=d(this).data("sek-tmpl-inject-mode");"cancel"!==t?_.contains(["replace","before","after"],t)?(o.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:n._tmplNameWhileImportDialog,tmpl_source:n._tmplSourceWhileImportDialog,tmpl_inject_mode:t}),n.templateGalleryExpanded(!1)):o.errare("::setupTmplGalleryDOMEvents => error => invalid import mode"):n.tmplInjectDialogVisible(!1)}).on("propertychange change click keyup input paste",".sek-filter-tmpl",_.debounce(function(e){e.preventDefault();var t,i,n,o,r,s,a=d(this).val(),l=function(){c.removeClass("search-active"),c.find(".sek-tmpl-item").each(function(){d(this).removeClass("search-match")})};_.isString(a)?(a=a.trim().toLowerCase(),_.isEmpty(a.replace(/\s/g,""))?l():(c.addClass("search-active"),c.find(".sek-tmpl-item").each(function(){t=(d(this).find(".tmpl-title").html()+"").toLowerCase(),i=(d(this).find(".tmpl-desc").html()+"").toLowerCase(),n=(d(this).find(".tmpl-date").html()+"").toLowerCase(),o=-1!=t.indexOf(a),r=-1!=i.indexOf(a),s=-1!=n.indexOf(a),d(this).toggleClass("search-match",o||r||s)}))):l()},100)).on("click",".sek-tmpl-info .edit-tmpl",function(e){e.preventDefault();var t=function(e){n.tmplDialogMode("edit"),n.tmplDialogMode.unbind(t)};n.tmplToEdit=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),n.tmplDialogMode.bind(t),n.tmplDialogVisible(!0)}).on("click",".sek-tmpl-info .remove-tmpl",function(e){e.preventDefault();var t=function(e){n.tmplDialogMode("remove"),n.tmplDialogMode.unbind(t)};n.tmplToRemove=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),n.tmplDialogMode.bind(t),n.tmplDialogVisible(!0)}).on("click",".sek-close-dialog",function(e){e.preventDefault(),n.templateGalleryExpanded(!1)}).on("click","#sek-tmpl-source-switcher button",function(e){e.preventDefault(),d("#sek-tmpl-source-switcher button").removeClass("is-selected").attr("aria-pressed","false"),d(this).addClass("is-selected").attr("aria-pressed","true"),n.renderOrRefreshTempGallery({tmpl_source:d(this).data("sek-tmpl-source")})})}})}(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(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{content_type_switcher:function(e){var i,n=this,o=r.czr_sektions;if(!r.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=r.section(n.module.control.section());var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),a.each(i.controls(),function(e){a.isUndefined(e.content_type)||e.active(t===e.content_type)})};r.czr_sektions.currentContentPickerType=r.czr_sektions.currentContentPickerType||new r.Value,r.bind("nimble-modules-and-sections-controls-registered",function(){t(r.czr_sektions.currentContentPickerType())}),r.czr_sektions.currentContentPickerType.bind(function(e){t(e)}),r.czr_sektions.currentContentPickerType(n()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault();var t=s(this).data("sek-content-type");if(n.container.find("[data-sek-content-type]").attr("aria-pressed",!1),o.levelTreeExpanded(!1),o.tmplDialogVisible&&o.tmplDialogVisible(!1),o.saveSectionDialogVisible&&o.saveSectionDialogVisible(!1),"template"===t){var i=r.czr_sektions.templateGalleryExpanded();s(this).attr("aria-pressed",!i),r.czr_sektions.templateGalleryExpanded(!i)}else r.czr_sektions.templateGalleryExpanded(!1),s(this).attr("aria-pressed",!0),r.czr_sektions.currentContentPickerType(t)}),r.bind("nb-template-gallery-closed",function(){n.container.find('[data-sek-content-type="template"]').attr("aria-pressed",!1)}),t(r.czr_sektions.currentContentPickerType())}})}(wp.customize,jQuery,_),function(t,e,i){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})},section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(s,a,l){s.czrInputMap=s.czrInputMap||{},a.extend(s.czrInputMap,{module_option_switcher:function(e){var t=this;if(!s.section.has(t.module.control.section()))throw new Error(t.input_type+" => section not registered");s.section(t.module.control.section());var i,n="",o=t.module.control.params.sek_registration_params;if(l.isUndefined(o))throw new Error(t.input_type+" => missing registration params");if(o&&o.module_id&&(n=o.module_id,i=o.ui_action),l.isEmpty(n))throw new Error(t.input_type+" => missing module id");t.container.on("click","[data-sek-option-type]",function(e){e.preventDefault(),t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0),s.previewer.trigger("settings"===a(this).data("sek-option-type")?"sek-edit-options":"sek-edit-module",{id:n,level:"module"})});var r="sek-generate-level-options-ui"===i?"settings":"content";t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),t.container.find('[data-sek-option-type="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(c,d,p){c.czrInputMap=c.czrInputMap||{};var u=function(e){return p.contains(["px","em","%"],e)||(c.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(c.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=p.isEmpty(t)||p.isEmpty(t.default)?[]:t.default;if(i.on("input",'input[type="number"]',function(e){var t=d(this).closest("[data-sek-spacing]").data("sek-spacing"),i=d.extend(!0,{},p.isObject(o())?o():{}),n=d(this).val();p.isString(n)&&!p.isEmpty(n)||p.isNumber(n)?i[t]=n:i=p.omit(i,t),o(i)}),m.call(o,i,n),p.isObject(o())){p.each(o(),function(e,t){d('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)});var r="px";d(".sek-unit-wrapper .sek-ui-button",o.container).each(function(){var e=d(this).data("sek-unit");p.isEmpty(o())||p.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+u.call(o,r)+'"]').trigger("click")}var s=o();o.initial_unit="px",p.isEmpty(s)||(o.initial_unit=p.isEmpty(s.unit)?"px":s.unit),o.css_unit=new c.Value(u.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=p.isEmpty(e)?"px":e,(t=d.extend(!0,{},p.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(c.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,s=d(".sek-spacing-wrapper",r.container),t=c.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=p.isEmpty(t)||p.isEmpty(t.default)?{}:t.default,l=function(e,t){var i=["mobile","tablet","desktop"];if(p.has(e,t))return e[t];var n=p.findIndex(i,function(e){return t===e});return!p.isEmpty(t)&&n<i.length?l(e,i[n+1]):{}},i=function(e){var t=d.extend(!0,{},p.isObject(r())?r():{}),i=d.extend(!0,{},a);t=p.isObject(t)?d.extend(i,t):i;var n=l(t,e);d("[data-sek-spacing]",s).each(function(){var e=d(this).data("sek-spacing"),t="";p.isEmpty(n)||p.isEmpty(n[e])||(t=n[e]),d(this).find('input[type="number"]').val(t)});var o="px";d(".sek-unit-wrapper .sek-ui-button",r.container).each(function(){var e=d(this).data("sek-unit");p.isEmpty(n)||p.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+u.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",p.isEmpty(n)||p.isEmpty(n[r.previewedDevice()])||(r.initial_unit=p.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new c.Value(u.call(r,r.initial_unit)),s.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=c.previewedDevice()||"desktop";(t=d.extend(!0,{},p.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),p.isString(n)&&!p.isEmpty(n)||p.isNumber(n)?t[o][i]=n:t[o]=p.omit(t[o],i),t[o].unit&&r.css_unit()==t[o].unit||(t[o].unit=r.css_unit()),r(t)}),m.call(r,s,a),r.previewedDevice.bind(function(e){try{i(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!p.isObject(i)||!0!==i.previewed_device_switched){e=p.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},p.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,s);try{i(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,a,l){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(this).val())}),l.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=l.isEmpty(t)||l.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(l.has(e,t))return e[t];var n=l.findIndex(i,function(e){return t===e});return!l.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},l.isObject(o())?o():{}),i=a.extend(!0,{},r);t=l.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.extend(!0,{},l.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(l,c,d){l.czrInputMap=l.czrInputMap||{};var e=function(e){var o=this,t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",s=c(i,o.container);l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},n=function(e){var t=c.extend(!0,{},d.isObject(o())?o():{}),i=c.extend(!0,{},r);t=d.isObject(t)?c.extend(i,t):i;var n=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=c.extend(!0,{},d.isObject(o())?o():{}))[l.previewedDevice()||"desktop"]=c(this).data("sek-align"),s.find(".selected").removeClass("selected"),c.when(c(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};c.extend(l.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(f,g,h){f.czrInputMap=f.czrInputMap||{},g.extend(f.czrInputMap,{font_picker:function(e){var u=this,_=u.input_parent,n=function(e,t){_();var n=g('select[data-czrtype="'+u.id+'"]',u.container);h.isNull(u())||h.isEmpty(u())?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>");var i=[{title:sektionsLocalizedData.i18n["Web safe fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google fonts"],type:"gfont",list:t.gfonts}],o=f.czr_sektions.sniffAllFonts(),r=sektionsLocalizedData.alreadyUsedFonts,s=[],a=[];if(!h.isEmpty(r)&&h.isObject(r)&&h.each(r,function(e){a.push(e)}),h.isArray(o)&&h.each(o,function(e){a.push(e)}),!h.isEmpty(a)){var l={},c=[];a.forEach(function(e){l[e]=(l[e]||0)+1});var d=h.sortBy(l,function(e){return e});h.each(d,function(i){h.each(l,function(e,t){i!==e||h.contains(c,t)||c.unshift(t)})}),h.each(c,function(e){s.push({name:e})}),i.unshift({title:sektionsLocalizedData.i18n["Already used fonts"],type:null,list:s})}h.each(i,function(e){var t,r,s,i=g("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",h.each(t,function(e){var t,i,n=h.isString(e.name)?e.name:"Undefined Font Family",o=n.replace(/[+|:]/g," ");t=n,i=r,n=h.isEmpty(i)?t:h.isString(t)?["[",i,"]",t].join(""):"",o=o.replace("[cfont]","").replace("[gfont]",""),n==u()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});n.append(i)});var p={escapeMarkup:function(e){return e}};e&&g.extend(p,{resultsAdapter:e,closeOnSelect:!1}),n.czrSelect2(p),g(".czrSelect2-selection__rendered",u.container).css(m(u()))},m=function(e){if(!h.isString(e)||h.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=r(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=h.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"}},r=function(e){if(!h.isString(e)||h.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return h.isString(t[0])?t[0].replace(/[+|:]/g," "):""};g.when(function(){var e,t=g.Deferred();h.isEmpty(f.sek_fontCollections)?(h.isUndefined(f.sek_fetchingFontCollection)||"pending"!=f.sek_fetchingFontCollection.state()?(e=f.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:u.module.id}),f.sek_fetchingFontCollection=e):e=f.sek_fetchingFontCollection,e.done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");f.sek_fontCollections=JSON.parse(e),t.resolve(f.sek_fontCollections)}).fail(function(e){t.reject(e)})):t.resolve(f.sek_fontCollections);return t.promise()}()).done(function(t){var i;(i=g.Deferred(),void 0!==g.fn.czrSelect2&&void 0!==g.fn.czrSelect2.amd&&"function"==typeof g.fn.czrSelect2.amd.require?g.fn.czrSelect2.amd.require(["czrSelect2/results","czrSelect2/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){f.errare("font_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(s.when(s.Deferred(function(t){a.isEmpty(n.sek_faIconCollection)?r.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection)})).done(function(e){!function(e){a.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(s.extend(t,{selected:"selected"}),o=!0),s("select[data-czrtype]",n.container).append(s("<option>",t))});var t,i=function(e){return e.id?s('<span class="'+e.element.value+'"></span><span class="social-name"> '+e.text+"</span>"):e.text};t=o?s("<option>"):s("<option>",{selected:"selected"}),s("select[data-czrtype]",n.container).prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),t&&!0===t.open_on_init&&a.delay(function(){try{s("select[data-czrtype]",n.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){r.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)};n.container.on("click",function(){e()}),a.delay(function(){e({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(u,_,m){u.czrInputMap=u.czrInputMap||{},_.extend(u.czrInputMap,{code_editor:function(e){var n,r=this,i=this.module.control,o=(r.input_parent(),!1),s=r.container.find("textarea"),a=r.container.find(".customize-control-title"),l=function(){return _.Deferred(function(t){var i=m.isEmpty(s.data("editor-code-type"))?"text/html":s.data("editor-code-type");u.czr_sektions.code_editor_params&&u.czr_sektions.code_editor_params[i]?t.resolve(u.czr_sektions.code_editor_params[i]):wp.ajax.post("sek_get_code_editor_params",{nonce:u.settings.nonce.save,code_type:i}).done(function(e){m.isObject(e)||u.errare(r.id+" => error => invalid code editor params sent by server",e),u.czr_sektions.code_editor_params={},u.czr_sektions.code_editor_params[i]=e,t.resolve(u.czr_sektions.code_editor_params[i])}).fail(function(e){t.reject(e)})})};r.isReady.done(function(){var t=function(e){m.isEmpty(this.editor)&&(m.isEmpty(this.module.control.container.attr("data-sek-expanded"))||"false"==this.module.control.container.attr("data-sek-expanded")||setTimeout(function(){if(o)try{c(o)}catch(e){u.errare("error in sek_control => code_editor() input",e),d()}else d();a.trigger("click")},10))};n=r(),u.czr_sektions.isJsonString(n)&&(n=JSON.parse(n)),s.html(n),_.when(l()).done(function(e){wp.codeEditor&&(m.isUndefined(e)||!1!==e)&&(o=e),t.call(r),r.module.control.container.first().one("sek-accordion-expanded",function(){t.call(r)})}).fail(function(e){u.errare(r.id+" => error when getting the editor params from server")})});var c=function(e){var t,i=!1;t=m.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:p}),r.editor=wp.codeEditor.initialize(s,t),_(r.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":a.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),a.on("click",function(e){e.stopPropagation(),r.editor.codemirror.focus()}),r.editor.codemirror.on("change",function(e){i=!0,s.val(e.getValue()).trigger("change"),i=!1}),n=r(),u.czr_sektions.isJsonString(n)&&(n=JSON.parse(n)),r.editor.codemirror.setValue(n),r.bind(r.id+":changed",function(e){i||r.editor.codemirror.setValue(e)}),r.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},d=function(){var o=s[0];r.editor=o,s.on("blur",function(){s.data("next-tab-blurs",!1)}),s.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||s.data("next-tab-blurs")||(t=o.selectionStart,i=o.selectionEnd,n=o.value,0<=t&&(o.value=n.substring(0,t).concat("\t",n.substring(i)),s.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):s.data("next-tab-blurs")||(s.data("next-tab-blurs",!0),e.stopPropagation())})},p=function(e){var t;i.setting.notifications.remove(r.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",a.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",a.html()),i.setting.notifications.add(r.id,new u.Notification(r.id,{message:t,type:"warning"})))}}})}(wp.customize,jQuery,_),function(e,r,t){e.czrInputMap=e.czrInputMap||{},r.extend(e.czrInputMap,{range_simple:function(e){var t=this,i=r(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]');o.on("input",function(e){n.val(r(this).val()).trigger("input")}),n.on("input",function(e){t(r(this).val()),o.val(r(this).val())}),o.val(n.val()||0)},number_simple:function(e){var t=this;t.container.find('input[type="number"]').on("input",function(e){t(r(this).val())})}})}(wp.customize,jQuery,_),function(d,p,u){d.czrInputMap=d.czrInputMap||{},p.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var s=this,t=p(".sek-range-with-unit-picker-wrapper",s.container),a=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),l=u.isEmpty(i)||u.isEmpty(i.default)?{}:i.default,c=function(e,t){var i=["mobile","tablet","desktop"];if(u.has(e,t))return e[t];var n=u.findIndex(i,function(e){return t===e});return!u.isEmpty(t)&&n<i.length?c(e,i[n+1]):p.extend(!0,{desktop:""},l).desktop},n=function(e){var t=s(),i={};i=p.extend(!0,{},l),u.isObject(t)?i=p.extend(!0,{},t):u.isString(t)&&!u.isEmpty(t)&&(i={desktop:t});var n,o=c(i,e),r=(n=o,u.isEmpty(n)||!u.isString(n)?"16":n.replace(/px|em|%/g,""));a.val(r).trigger("input",{previewed_device_switched:!0})};d.czr_sektions.maybeSetupDeviceSwitcherForInput.call(s),r.on("input",function(e){a.val(p(this).val()).trigger("input")}),a.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=p(this).val();(i=p.extend(!0,{},u.isObject(s())?s():{}))[n]=p.extend(!0,{},i[n]||{}),u.isString(o)&&!u.isEmpty(o)&&(i[n]=o),(u.isEmpty(t)||u.isObject(t)&&!0!==t.previewed_device_switched)&&s(i),r.val(p(this).val())}),s.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}),r.val(a.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}})}(wp.customize,jQuery,_),function(a,l,c){a.czrInputMap=a.czrInputMap||{},l.extend(a.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=l(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),s=function(e){return c.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(c.isEmpty(r)?"px":s(r)),t.css_unit.bind(function(e){e=c.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(l(this).val()).trigger("input")}),n.on("input",function(e){t(l(this).val()+s(t.css_unit())),o.val(l(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),l(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",l(this).data("sek-unit")),t.css_unit(l(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var l=this,c=_(".sek-range-with-unit-picker-wrapper",l.container),d=c.find('input[type="number"]'),r=c.find('input[type="range"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+l.id,e),e="px"),e},t=a.czr_sektions.getInputRegistrationParams(l.id,l.module.module_type),p=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return c.find("input[data-czrtype]").data("sek-unit")||"px"},u=function(e,t){var i=["mobile","tablet","desktop"];if(m.has(e,t))return e[t];var n=m.findIndex(i,function(e){return t===e});return!m.isEmpty(t)&&n<i.length?u(e,i[n+1]):_.extend(!0,{desktop:""},p).desktop},n=function(e){var t=l(),i={};i=_.extend(!0,{},p),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=u(i,e),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",c).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(l),l.css_unit=new a.Value(m.isEmpty(i())?"px":s(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";l.container.find(".customize-control-title").append(o),l.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=a.previewedDevice()||"desktop",o=_(this).val()+s(l.css_unit());(i=_.extend(!0,{},m.isObject(l())?l():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&l(i),r.val(_(this).val())}),c.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),c.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),l.css_unit(_(this).data("sek-unit"),t)}),l.previewedDevice.bind(function(e){try{n(e)}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+l.id,e)}}),l.container.on("click",".sek-reset-button",function(e){var t=a.previewedDevice(),i=_.extend(!0,{},m.isObject(l())?l():{});m.isEmpty(i[t])||(i=m.omit(i,t),l(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+l.id,e)}}})}(wp.customize,jQuery,_),function(g,h,v){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var a=this,l=h(".sek-borders",a.container),c=l.find('input[type="number"]'),d=l.find('input[type="range"]'),p=l.find(".sek-alpha-color-input"),u=function(e){return v.contains(["px","em","%"],e)||(g.errare("borders => error : invalid unit for input "+a.id,e),e="px"),e},_=function(e){return v.isEmpty(e)||!v.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return v.isEmpty(e)||!v.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=g.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),f=v.isEmpty(t)||v.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),t="px";return v.isObject(e)&&v.has(e,"_all_")&&v.isObject(e._all_)&&!v.isEmpty(e._all_.wght)&&(t=u(m(e._all_.wght))),t},r=function(){var e=a(),t="#000000";return v.isObject(e)&&v.has(e,"_all_")&&v.isObject(e._all_)&&!v.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!v.contains(v.union(a.cssBorderTypes,["_all_"]),e))throw new Error("Error in syncWithBorderType : the border type must be one of those values '_all_', 'top', 'left', 'right', 'bottom'");var t=a(),i={},n=h.extend(!0,{},f);v.isObject(t)?i=h.extend(!0,{},t):v.isString(t)&&(i={_all_:{wght:t}});var o,r,s=function(e,t){var i,n=h.extend(!0,{},f);if(!v.has(n,"_all_"))throw new Error("Error when firing getCurrentBorderTypeOrAllValue : the default value of the borders input must be php registered as an array formed : array( 'wght' => '1px', 'col' => '#000000' )");return i=v.isObject(e)&&v.has(e,"_all_")?v.extend(n._all_,e._all_):n._all_,v.has(e,t)&&v.isObject(e[t])?v.extend(i,e[t]):n._all_}(i=h.extend(n,i),e);if(v.isEmpty(s)||!v.isObject(s)||v.isEmpty(s.wght)||v.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.wght),h(".sek-unit-wrapper",l).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),c.val(r).trigger("input",{border_type_switched:!0}),p.data("border_type_switched",!0),p.val(s.col).trigger("change"),p.data("border_type_switched",!1)};a.borderColor=new g.Value(v.isEmpty(r())?"#000000":r()),a.css_unit=new g.Value(v.isEmpty(o())?"px":u(o())),a.borderType=new g.Value("_all_"),c.val((i=a(),n=1,v.isObject(i)&&v.has(i,"_all_")&&v.isObject(i._all_)&&!v.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!v.isNumber(n)||n<0)&&(g.errare("Error in borders input type for module : "+a.module.module_type+" the initial border width is invalid : "+n),n=1),n)),p.val(a.borderColor()),p.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),a.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),a.borderColor("")}}),a.css_unit.bind(function(e,t,i){(!v.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&c.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!v.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&c.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}}),d.on("input",function(e){c.val(h(this).val()).trigger("input")}),c.on("input",function(e,t){var i,n=a.borderType()||"_all_",o=a.borderColor(),r=h(this).val()+u(a.css_unit()),s=h.extend(!0,{},f);(i=h.extend(!0,{},v.isObject(a())?a():s))[n]=h.extend(!0,{},i[n]||s[n]),v.isString(r)&&!v.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(v.isEmpty(t)||v.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&v.each(a.cssBorderTypes,function(e){i=v.omit(i,e)}),a(i)),d.val(h(this).val())}),l.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),l.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),a.css_unit(h(this).data("sek-unit"),t)}),l.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),l.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=h.extend(!0,{},v.isObject(a())?a():{});v.isEmpty(i[t])||(i=v.omit(i,t),a(i),s(t))}),d.val(c.val()||0);try{s(a.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}h('[data-sek-unit="'+a.css_unit()+'"]',l).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var a=this,l=f(".sek-borders",a.container),c=l.find('input[type="number"]'),s=l.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.id,e),e="px"),e},p=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},u=function(e){return g.isEmpty(e)||!g.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;a.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=a(),t="px";return g.isObject(e)&&g.has(e,"_all_")&&(t=d(u(e._all_))),t},r=function(e){if(!g.contains(["_all_","top_left","top_right","bottom_right","bottom_left"],e))throw new Error("Error in syncWithRadiusType : the radius type must be one of those values '_all_', 'top_left', 'top_right', 'bottom_right', 'bottom_left', => radius type => "+e);var t=a(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,s=function(e,t){var i,n=f.extend(!0,{},_);if(!g.has(n,"_all_"))throw new Error("Error when firing getCurrentRadiusTypeOrAllValue : the default value of the border_radius input must be php registered as an array");return i=g.isObject(e)&&g.has(e,"_all_")?e._all_:n._all_,g.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(g.isEmpty(s)||!g.isString(s))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=u(s),r=p(s),f(".sek-unit-wrapper",l).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),c.val(r).trigger("input",{radius_type_switched:!0})};a.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),c.val((i=a(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=p(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&c.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){c.val(f(this).val()).trigger("input")}),c.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(a())?a():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(a.cssRadiusTypes,function(e){i=g.omit(i,e)}),a(i)),s.val(f(this).val())}),l.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),l.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),a.css_unit(f(this).data("sek-unit"),t)}),l.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),l.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(a())?a():{});g.isEmpty(i[t])||(i=g.omit(i,t),a(i),r(t))}),s.val(c.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',l).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).done(function(e){n.previewer.refresh(),n.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"<br/>","<i>"+e+"</i>","</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,s){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){s.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!s.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(s.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];s.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),s.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&s.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),s.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=_.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(f.isNull(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => duplicate editor id.");var r,s,a=function(){return n&&n.editor_params&&!0===n.editor_params.autop},l={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&f.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=f.filter(e,function(e){return!f.contains(t,e)})}if(n.editor_params&&f.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;f.isEmpty(i)||!f.isArray(sektionsLocalizedData[i])?_.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=f.filter(e,function(e){return f.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),s=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(s=f.union(r.tinymce.content_css.split(","),s)),s.join(",")),min_height:40,height:n.editor_params&&f.isNumber(n.editor_params.height)?n.editor_params.height:_.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};l.tinymce.wpautop=a(),a()||(l.tinymce.forced_root_block=""),wp.editor.initialize(i,l);var c=tinyMCE.get(i);if(!c)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);_.czrActiveWPEditors=_.czrActiveWPEditors||[];var d=m.extend(!0,[],_.czrActiveWPEditors);d.push(i),_.czrActiveWPEditors=d;var p,u=function(){p=t(),_.czr_sektions.isJsonString(p)&&(p=JSON.parse(p)),e.html(p),c.setContent(p)};c.initialized?u():c.on("init",u),c.on("input change keyup",function(e){t(c.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=m("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=_.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type);if(!(0<i.length))throw new Error("api.czrInputMap::detached_tinymce_editor => missing textarea element");if(e=i.attr("id"),window.tinymce&&(mceInstance=window.tinymce.get(e),mceInstance&&mceInstance.remove()),!window.nimbleTinyMCEPreInit||!window.nimbleTinyMCEPreInit.mceInit||!window.nimbleTinyMCEPreInit.mceInit[e])throw new Error("setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var");var o,r,s=nimbleTinyMCEPreInit.mceInit[e];s.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=f.union(o.tinymce.content_css.split(","),r)),r.join(","));var a=t.input_parent,l=function(){var e=a();return f.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};s.wpautop=l(),l()||(s.forced_root_block=""),s.toolbar1=sektionsLocalizedData.defaultToolbarBtns,s.toolbar2="",window.tinymce.init(s),window.QTags.getInstance(e);var c=tinyMCE.get(e);if(!c)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d,p=function(){d=t(),_.czr_sektions.isJsonString(d)&&(d=JSON.parse(d)),c.setContent(d),_.sekEditorExpanded(!0),m(window).trigger("resize")};c.initialized?p():c.on("init",p),c.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(l()?c.getContent():wp.editor.removep(c.getContent()))}),_.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){_.sekCurrentDetachedTinyMceInput(m(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(c,d,p){c.czrInputMap=c.czrInputMap||{},d.extend(c.czrInputMap,{import_export:function(){var r=this,t=r.container.find('button[data-czr-action="sek-pre-import"]'),s=r.container.find("input[name=sek-import-file]"),e=c.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=e.scope,l="local"===e.scope?c.czr_sektions.localSectionsSettingId():c.czr_sektions.getGlobalSectionsSettingId();p.contains(["local","global"],a)||c.errare("api.czrInputMap.import_export => invalid currentScope",a),s.on("change",function(e){t.toggleClass("disabled",p.isEmpty(d(this).val()))});r.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),d(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),p.isEmpty(t)||p.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=c(l)(),o=!0;if(p.each(n.collection,function(e){o&&(p.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}c.czr_sektions.export_template({scope:a});break;case"sek-pre-import":if(p.isEmpty(c.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}c.czr_sektions.import_template_from_file({pre_import_check:!0,input:r,file_input:s}).done(function(e){c.czr_sektions.pre_checks_from_file_import(e,{pre_import_check:!1,input:r,file_input:s})}).fail(function(e){c.errare("import_export_ input => pre_checks_from_file_import failed",e),c.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate({input:r,file_input:s}),c.czr_sektions.import_template_from_file({input:r,file_input:s})});break;case"sek-import-as-is":c.czr_sektions.import_template_from_file({input:r,file_input:s});break;case"sek-import-assign":c.czr_sektions.import_template_from_file({assign_missing_locations:!0,input:r,file_input:s});break;case"sek-cancel-import":c.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate({input:r,file_input:s})}})}})}(wp.customize,jQuery,_),function(l,c,d){l.czrInputMap=l.czrInputMap||{},c.extend(l.czrInputMap,{simpleselect:function(e){l.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){l.czr_sektions.setupSelectInput.call(this,e)},simpleselectWithDeviceSwitcher:function(e){var r=this,t=(r.input_parent,r.module,l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type)),o=c("select",r.container),s=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i={params:e=d.isEmpty(e)?t.choices:e};if(r.module.trigger("nimble-set-select-input-options",i),e=i.params,!d.isEmpty(e)&&d.isObject(e)){d.each(e,function(e,t){var i={value:t,html:e};t==r()?c.extend(i,{selected:"selected"}):"px"===t&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))});var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):c.extend(!0,{desktop:""},s).desktop};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r),o.on("change",function(e,t){var i,n=l.previewedDevice()||"desktop",o=c(this).val();(i=c.extend(!0,{},d.isObject(r())?r():{}))[n]=c.extend(!0,{},i[n]||{}),d.isString(o)&&!d.isEmpty(o)&&(i[n]=o),(d.isEmpty(t)||d.isObject(t)&&!0!==t.previewed_device_switched)&&r(i)}),r.previewedDevice.bind(function(e){try{!function(e){var t=r(),i={};i=c.extend(!0,{},s),d.isObject(t)?i=c.extend(!0,{},t):d.isString(t)&&!d.isEmpty(t)&&(i={desktop:t});var n=a(i,e);o.val(n).trigger("change",{previewed_device_switched:!0})}(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type "+r.type+" for input id "+r.id,e)}})}else l.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+r.id+" in module "+r.module.module_type)}})}(wp.customize,jQuery,_),function(a,l,c){a.czrInputMap=a.czrInputMap||{},l.extend(a.czrInputMap,{category_picker:function(e){var n=this,o=l("select[data-czrtype]",n.container),r=function(){var e=n();return e=c.isString(e)?[e]:e,c.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(l.when(l.Deferred(function(i){c.isEmpty(a.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:a.settings.nonce.save}).done(function(e){c.isArray(e)||a.errare(n.id+" => error => invalid category collection sent by server");var t={};c.each(e,function(e){c.isEmpty(e.slug)||c.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),a.czr_sektions.post_categories=t,i.resolve(a.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(a.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&c.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){a.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){c.each(e,function(e,t){var i={value:t,html:e};c.contains(r(),t)&&l.extend(i,{selected:"selected"}),o.append(l("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===l(this).find("option:selected").length&&n([])})},s={};c.each(r(),function(e){s[e]=(e+"").replace(/-/g," ")}),i(s),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),l.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,s,e){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=s(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),s(this).addClass("selected").attr("aria-pressed",!0);try{i=s(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),s('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(i,e,t){i.czrInputMap=i.czrInputMap||{},e.extend(i.czrInputMap,{refresh_preview_button:function(e){this.container.on("click",".sek-refresh-button",function(e,t){e.stopPropagation(),i.previewer.refresh()})}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_module_picker_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{};var n=sektionsLocalizedData.presetSectionsModules;i.isArray(n)&&!i.isEmpty(n)?i.each(n,function(e){t.czrModuleMap[e]={crud:!1,name:t.czr_sektions.getRegisteredModuleProperty(e,"name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}}):t.errare("api.czrModuleMap => error when adding section modules")}(wp.customize,jQuery,_),function(a,n,l){var e={initialize:function(e,t){this.inputConstructor=a.CZRInput.extend({initialize:function(e,t){var i=this;a.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),i.attachDomEvents()})},getUserSavedSections:function(){var t=n.Deferred();return l.isEmpty(a.czr_sektions.userSavedSections)?a.czr_sektions.getSavedSectionCollection().done(function(e){t.resolve(e)}):t.resolve(a.czr_sektions.userSavedSections),t.promise()},renderUserSavedSections:function(){var o=this,r="",s=o.container.find(".sek-content-type-wrapper"),t=function(e){if(s.find(".sek-user-section-wrapper").remove(),l.isEmpty(e)){var t=[sektionsLocalizedData.baseUrl,"/assets/admin/img/save_section_notice.png","?ver=",sektionsLocalizedData.nimbleVersion].join(""),i="https://docs.presscustomizr.com/article/417-how-to-save-and-reuse-sections-with-nimble-builder";r=['<div class="sek-user-section-wrapper">','<img src="'+t+'" />','<br/><a href="'+i+'" target="_blank" rel="noreferrer nofollow">'+i+"</a>","</div>"].join(""),s.append(r),o.module.container.find(".czr-item-content .customize-control-title").html(sektionsLocalizedData.i18n["You did not save any section yet."])}else{var n="background: url("+[sektionsLocalizedData.baseUrl,"/assets/admin/img/nb_sec_pholder.png","?ver=",sektionsLocalizedData.nimbleVersion].join("")+") 50% 50% / cover no-repeat;";l.each(e,function(e,t){l.isEmpty(e.description)?_titleAttr=[e.title,e.last_modified_date].join(" | "):_titleAttr=[e.title,e.last_modified_date,e.description].join(" | "),r=['<div class="sek-user-section-wrapper">','<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="content" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-sec-thumb" style="'+n+'"></div>','<div class="sek-overlay"></div>','<div class="sek-sec-info" title="'+_titleAttr+'">','<h3 class="sec-title">'+e.title+"</h3>",'<p class="sec-date"><i>'+[sektionsLocalizedData.i18n["Last modified"]," : ",e.last_modified_date].join(" ")+"</i></p>",'<p class="sec-desc">'+e.description+"</p>",'<i class="material-icons edit-user-sec" title="'+sektionsLocalizedData.i18n["Edit this template"]+'">edit</i>','<i class="material-icons remove-user-sec" title="'+sektionsLocalizedData.i18n["Remove this template"]+'">delete_forever</i>',"</div>","</div>","</div>"].join(""),s.append(r)})}s.find(".czr-css-loader").remove(),a.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:o.container})};s.append('<div class="czr-css-loader czr-mr-loader" style="display:block"><div></div><div></div><div></div></div>'),o.getUserSavedSections().done(function(e){t(e)}),a.czr_sektions.allSavedSections.bind(function(e){t(e)})},attachDomEvents:function(){this.container.on("click",".sek-sec-info .remove-user-sec",function(e){e.preventDefault();var t=a.czr_sektions;t.saveSectionDialogVisible(!1);var i=function(e){t.saveSectionDialogMode("remove"),t.saveSectionDialogMode.unbind(i)};t.userSectionToRemove=n(this).closest("[data-sek-content-id]").data("sek-content-id"),t.saveSectionDialogMode.bind(i),t.saveSectionDialogVisible(!0)}).on("click",".sek-sec-info .edit-user-sec",function(e){e.preventDefault();var t=a.czr_sektions;t.saveSectionDialogVisible(!1);var i=function(e){t.saveSectionDialogMode("edit"),t.saveSectionDialogMode.unbind(i)};t.userSectionToEdit=n(this).closest("[data-sek-content-id]").data("sek-content-id"),t.saveSectionDialogMode.bind(i),t.saveSectionDialogVisible(!0)})}}),a.CZRDynModule.prototype.initialize.call(this,e,t)}};a.czrModuleMap=a.czrModuleMap||{},n.extend(a.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:e,crud:!1,name:a.czr_sektions.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:a.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_my_sections_sec_picker_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_mod_option_switcher_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_mod_option_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_mod_option_switcher_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_anchor_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_anchor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var t=this,n=t.module;t.czr_Input.each(function(i){switch(i.id){case"bg-apply-overlay":r.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return o.CZR_Helpers.isChecked(i())})}catch(e){o.errare(n.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":r.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=o.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!o.CZR_Helpers.isChecked(i())}return e})}catch(e){o.errare(n.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){o.CZR_Helpers.isChecked(i())&&o.CZR_Helpers.isChecked(t.czr_Input("bg-attachment")())&&t.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){o.CZR_Helpers.isChecked(i())&&o.CZR_Helpers.isChecked(t.czr_Input("bg-parallax")())&&t.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")});break;case"bg-use-video":r.each(["bg-video","bg-video-loop","bg-video-delay-start","bg-video-on-mobile","bg-video-start-time","bg-video-end-time"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return o.CZR_Helpers.isChecked(i())})}catch(e){o.errare(n.id+" => error in setInputVisibilityDeps",e)}})}}),n.control&&n.control.params&&n.control.params.sek_registration_params&&(r.contains(["section","column"],n.control.params.sek_registration_params.level)||r.each(["bg-use-video","bg-video","bg-video-loop","bg-video-on-mobile","bg-video-start-time","bg-video-end-time"],function(e){t.czr_Input(e).visible(!1)}))}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_text_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_text_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_text_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_border_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use-custom-breakpoint":o.each(["custom-breakpoint","apply-to-all"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(i.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_breakpoint_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height","overflow_hidden"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_height_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_visibility_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_visibility_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"width-type":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(d,p,u){var e={initialize:function(e,t){var i=this;i.inputConstructor=d.CZRInput.extend(i.CZRInputConstructor||{}),i.itemConstructor=d.CZRItem.extend(i.CZRItemConstructor||{}),d.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputConstructor:{range_simple:function(e){var t,i=this,n=p(".sek-range-with-unit-picker-wrapper",i.container),o=n.find('input[type="number"]'),r=n.find('input[type="range"]');try{t=i.module.control.params.sek_registration_params}catch(e){return void d.errare("Error when getting the module registration params",e)}if(u.isUndefined(t.level_id))d.errare("Error : missing column id",er);else if(i.columnId=t.level_id,i.columnModel=p.extend(!0,{},d.czr_sektions.getLevelModel(i.columnId)),i.parentSectionModel=d.czr_sektions.getParentSectionFromColumnId(i.columnId),"no_match"!=i.columnModel)if("no_match"!=i.parentSectionModel){i.colNb=u.size(i.parentSectionModel.collection),o.attr("data-sek-width-range-column-id",i.columnId),1===i.colNb?i.container.html(["<p>",sektionsLocalizedData.i18n["This is a single-column section with a width of 100%. You can act on the internal width of the parent section, or adjust padding and margin."]].join("")):i.container.show();var s,a=d.czr_sektions.getLevelModel(i.columnId),l="_not_set_";if("no_match"!=a){var c=a.options&&a.options.width&&a.options.width["custom-width"]&&u.isNumber(+a.options.width["custom-width"]);c?l=a.options.width["custom-width"]:!c&&a.width&&u.isNumber(+a.width)&&(l=a.width),s="_not_set_"!==l?l:"_not_set_"===i()?Math.floor(100/i.colNb):i(),s=1*+parseFloat(s).toFixed(3),(!u.isNumber(s)||100<s||s<0)&&(d.errare("Error => invalid column width",s),s=50),r.on("input",function(e,t){o.val(p(this).val()).trigger("input",t)}),o.on("input",u.debounce(function(e,t){r.val(p(this).val()),t&&t.is_init||i(+parseFloat(p(this).val()).toFixed(3))},300)),o.on("input",u.debounce(function(e,t){t&&(t.is_init||t.is_resize_column_trigger)||i.sayItToApi(p(this).val())},300)),r.val(s).trigger("input",{is_init:!0})}else d.errare("sek_level_width_column module => invalid column model")}else d.errare("sek_level_width_column module => invalid parent section model");else d.errare("sek_level_width_column module => invalid column model")},sayItToApi:function(e,t){var i=this,n=u.findIndex(i.parentSectionModel.collection,{id:i.columnId}),o=n+1==i.colNb?n-1:n+1,r=u.find(i.parentSectionModel.collection,function(e,t){return o===t});"no_match"===r&&d.errare("sek_level_width_column module => invalid sister column model"),d.previewer.trigger("sek-resize-columns",{action:"sek-resize-columns",level:"column",in_sektion:i.parentSectionModel.id,id:i.columnId,resized_column:i.columnId,sister_column:r.id,resizedColumnWidthInPercent:e,col_number:i.colNb})}}};d.czrModuleMap=d.czrModuleMap||{},p.extend(d.czrModuleMap,{sek_level_width_column:{mthds:e,crud:!1,name:d.czr_sektions.getRegisteredModuleProperty("sek_level_width_column","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:u.extend({id:"",title:""},d.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_column"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_section"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_spacing_module:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_cust_css_section:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_cust_css_section","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_cust_css_section"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this.module;i.trigger("nb_setup_visibility_deps_for_animation_module",{item:this,module:e})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_animation_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_animation_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_animation_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_template:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_custom_css:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_custom_css","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_custom_css"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_header_footer"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_imp_exp"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"links_underline":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"links_underline_hover",function(){return!e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_text:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_text","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_text"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use-custom-breakpoint":o.each(["global-custom-breakpoint","apply-to-all"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(i.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_breakpoint"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"enable":s.each(["public_key","private_key","badge","show_failure_message","failure_message","score"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"failure_message":e=i()&&n.czr_Input("show_failure_message")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_failure_message":s.each(["failure_message"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("enable")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_global_recaptcha:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_global_recaptcha","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:s.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_recaptcha"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_imp_exp"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_beta_features:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_beta_features","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_beta_features"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_site_tmpl_pickers:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_site_tmpl_pickers","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_site_tmpl_pickers"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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;case"link-pick-url":e="url"===i();break;case"link-target":e=!r.contains(["no-link","img-lightbox"],i())}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":r.each(["borders"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"none"!==i()})}catch(e){o.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":r.each(["custom_width"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_height":r.each(["custom_height"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_title_attr":r.each(["heading_title"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}})}}),o.trigger("nb_setup_visibility_deps_for_img_module",{item:n,module:t})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_borders_corners_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){this.inputConstructor=n.CZRInput.extend(this.CZRTextEditorInputMths||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;"detached_tinymce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")}),n.CZRInput.prototype.initialize.call(i,e,t)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_tinymce_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_tinymce_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tinymce_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_html_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_html_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(i){switch(i.id){case"img-type":o.each(["img-id","img-size"],function(t){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":o.each(["content-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"custom"===i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":o.each(["btn-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),this.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}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":s.each(["link-pick-url","link-custom-url","link-target"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.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){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"use_custom_color_on_hover":s.each(["color_hover"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.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(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e=i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":case"link-target":e=i()}return e})}catch(e){o.errare("Heading module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&!0===n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_heading_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_heading_spacing_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_divider_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_divider_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_spacer_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_spacer_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_spacer_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_map_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_map_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRButtonItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"quote_design":n.each(["border_width_css","border_color_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"border-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}}),n.each(["icon_color_css","icon_size_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_quote_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_cite_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),this.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}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.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(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"icon-side",function(){return!r.isEmpty(i())})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_btn_content_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_btn_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"width-type":n.czr_sektions.scheduleVisibilityOfInputId.call(t,"custom-width",function(){return"custom"===t()}),o.each(["custom-width","h_inner_align_css"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"height-type":n.czr_sektions.scheduleVisibilityOfInputId.call(t,"custom-height",function(){return"custom"===t()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"display_pagination":r.each(["posts_per_page","post_number"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"posts_per_page"===e?i():!i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":s.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":s.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_privacy_field":n.each(["privacy_field_label","privacy_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,"link-custom-url",function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_submission_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_submission_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_font_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_),function(s,a,l){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=s.CZRItem.extend(i.CZRItemConstructor||{}),s.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return s.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&a.fn.sortable){var i=this;a("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){l.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!l.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},_buildTitle:function(e,t,i){var n=this.module;return e=e||("string"==typeof t?s.CZR_Helpers.capitalize(t.replace("fa-","")):""),e=s.CZR_Helpers.truncate(e,20),'<div><span class="'+t+'" style="color:'+(i=i||n.defaultSocialColor)+'"></span> '+e+"</div>"},writeItemViewTitle:function(e){var t=this.module,i=e||this(),n=(i.icon?i.icon:"").replace("fa-","").replace("envelope","email").replace("far","").replace("fab","").replace("fas","");a("."+t.control.css_attr.item_title,this.container).html(this._buildTitle(n,i.icon,i.color_css))},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_color_on_hover":l.each(["social_color_hover"],function(e){try{s.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){s.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=l.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=l.without(n,l.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=a.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=s(i.control.id).transport||!l.has(e,"dom_event")||l.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){s.previewer.unbind("ready",r),i.trigger("item-removed",o)};s.previewer.bind("ready",r)}}}};s.czrModuleMap=s.czrModuleMap||{},a.extend(s.czrModuleMap,{czr_social_icons_settings_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_social_icons_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_settings_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_social_icons_style_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_social_icons_style_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_style_child")}})}(wp.customize,jQuery,_),function(g,h,v){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=g.CZRItem.extend(i.CZRItemConstructor||{}),g.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return g.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&h.fn.sortable){var i=this;h("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){v.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},getPreItem:function(){var e=g.czr_sektions.getRegisteredModuleProperty("czr_img_slider_collection_child","starting_value"),t=h.extend(!0,{},this.preItem());if(v.isObject(e)){var i=h.extend(!0,{},e);return h.extend(t,i)}return this.preItem()},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!v.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){g.errorLog("item.setInputVisibilityDeps() : "+e)}}),g.CZRItem.prototype.ready.call(t);var i=function(){g.previewer.send("sek-item-focus",{control_id:t.module.control.id,item_id:t.id,item_value:t()})};t.viewState.callbacks.add(function(e,t){"expanded"===e&&i()}),t.callbacks.add(i),t.bind("sek-request-item-focus-in-preview",i)},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="",s="",a="not_set",l=!v.isUndefined(t)&&v.isObject(t);if(!l||!t.input_changed||v.contains(["img","text_content"],t.input_changed)){if(v.isEmpty(o.title)){var c=v.findIndex(n.itemCollection(),function(e){return e.id===i.id});c=v.isUndefined(c)?1:c+1}else r=o.title;r=g.CZR_Helpers.truncate(r,15),o.img&&(s=o.img,v.isString(o.img)&&(s=-1!==o.img.indexOf("http")?o.img:parseInt(o.img,10)));var d=function(){return h.Deferred(function(){var e=this;v.isUndefined(s)||v.isEmpty(""+s)?e.resolve(""):v.isString(s)&&-1!==s.indexOf("http")?e.resolve(s):wp.media.attachment(s).fetch().always(function(){if(v.isObject(this)&&v.has(this,"attributes")&&v.has(this.attributes,"sizes")){var i=this.get("sizes");i&&v.isObject(i)&&v.each(["thumbnail","medium","large","full"],function(e,t){"not_set"===a&&i[e]&&v.isObject(i[e])&&i[e].url&&(a=i[e].url)}),e.resolve(a)}})}).promise()},p=h("."+n.control.css_attr.item_title,i.container).find(".sek-slide-title"),u=h("."+n.control.css_attr.item_title,i.container).find(".sek-slide-thumb"),_=o.text_content?o.text_content:"";_=(_=h("<div>").html(_).text()).substring(0,60),p.length<1?(h("."+n.control.css_attr.item_title,i.container).html(""),h("."+n.control.css_attr.item_title,i.container).append(h("<div/>",{class:"sek-slide-title",html:_}))):p.html(_);var m=l&&t.input_changed&&"img"===t.input_changed,f=function(e){return v.isEmpty(""+e)||"not_set"===e?"":'<img src="'+e+'" width="32" alt="'+r+'" />'};h("."+n.control.css_attr.item_title,i.container).css("padding","0 4px"),u.length<1?d().done(function(e){h("."+n.control.css_attr.item_title,i.container).prepend(h("<div/>",{class:"sek-slide-thumb",html:f(e)}))}):!m&&l||d().done(function(e){u.html(f(e))})}},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":v.each(["link-pick-url","link-custom-url","link-target"],function(t){try{g.czr_sektions.scheduleVisibilityOfInputId.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;case"link-pick-url":e="url"===i();break;case"link-target":e=!v.contains(["no-link"],i())}return e})}catch(e){g.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":g.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"apply-overlay":v.each(["color-overlay","opacity-overlay"],function(e){try{g.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return g.CZR_Helpers.isChecked(i())})}catch(e){g.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"enable_text":v.each(["text_content","font_family_css","font_size_css","line_height_css","color_css","h_alignment_css","v_alignment","spacing_css"],function(e){try{g.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return g.CZR_Helpers.isChecked(i())})}catch(e){g.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"apply_overlay":v.each(["color-overlay","opacity-overlay"],function(e){try{g.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return g.CZR_Helpers.isChecked(i())})}catch(e){g.errare(t.id+" => error in setInputVisibilityDeps",e)}})}})},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=v.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=v.without(n,v.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=h.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=g(i.control.id).transport||!v.has(e,"dom_event")||v.has(e.dom_event,"isTrigger")||g.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){g.previewer.unbind("ready",r),i.trigger("item-removed",o)};g.previewer.bind("ready",r)}}}};g.czrModuleMap=g.czrModuleMap||{},h.extend(g.czrModuleMap,{czr_img_slider_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:g.czr_sektions.getRegisteredModuleProperty("czr_img_slider_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:g.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_img_slider_collection_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"autoplay":o.each(["autoplay_delay","pause_on_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return n.CZR_Helpers.isChecked(t())})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_img_slider_opts_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_img_slider_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_img_slider_opts_child")}})}(wp.customize,jQuery,_),function(d,p,u){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=d.CZRItem.extend(i.CZRItemConstructor||{}),d.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return d.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&p.fn.sortable){var i=this;p("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){u.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},getPreItem:function(){var e=d.czr_sektions.getRegisteredModuleProperty("czr_accordion_collection_child","starting_value"),t=p.extend(!0,{},this.preItem());if(u.isObject(e)){var i=p.extend(!0,{},e);return p.extend(t,i)}return this.preItem()},CZRItemConstructor:{ready:function(){var e=this;d.CZRItem.prototype.ready.call(e);var i=function(){d.previewer.send("sek-item-focus",{control_id:e.module.control.id,item_id:e.id,item_value:e()})};e.viewState.callbacks.add(function(e,t){"expanded"===e&&i()}),e.callbacks.add(i),e.bind("sek-request-item-focus-in-preview",i),e.module.bind("item-collection-sorted",function(){e.writeItemViewTitle(e(),{input_changed:"title_text"})})},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="";if(!(!u.isUndefined(t)&&u.isObject(t))||!t.input_changed||u.contains(["title_text"],t.input_changed)){if(u.isEmpty(o.title)){var s=u.findIndex(n.itemCollection(),function(e){return e.id===i.id});s=u.isUndefined(s)?1:s+1}else r=o.title;r=d.CZR_Helpers.truncate(r,25);var a=p("."+n.control.css_attr.item_title,i.container).find(".sek-accord-title"),l=o.title_text?o.title_text:"";l=p("<div>").html(l).text();var c=i.module.container.find(".czr-items-wrapper > li").index(i.container);l=(l=u.isEmpty(l)?sektionsLocalizedData.i18n["Accordion title"]+" #"+(+c+1):l).substring(0,60),a.length<1?(p("."+n.control.css_attr.item_title,i.container).html(""),p("."+n.control.css_attr.item_title,i.container).append(p("<div/>",{class:"sek-accord-title",html:l}))):a.html(l)}},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=u.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=u.without(n,u.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=p.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=d(i.control.id).transport||!u.has(e,"dom_event")||u.has(e.dom_event,"isTrigger")||d.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){d.previewer.unbind("ready",r),i.trigger("item-removed",o)};d.previewer.bind("ready",r)}}}};d.czrModuleMap=d.czrModuleMap||{},p.extend(d.czrModuleMap,{czr_accordion_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:d.czr_sektions.getRegisteredModuleProperty("czr_accordion_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:d.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_collection_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){n.CZRItem.prototype.ready.call(this)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_accordion_opts_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_accordion_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_opts_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRButtonItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_flex":o.each(["h_alignment_css"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_shortcode_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_shortcode_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_shortcode_module")}})}(wp.customize,jQuery,_);
|
1 |
+
!function(u,m){u.CZR_Helpers.getInputSubTemplate=function(e){return 0<m("#tmpl-nimble-subtemplate___"+e).length?wp.template("nimble-subtemplate___"+e):(u.errare("problem in api.czr_sektions.getInputSubTemplate(), missing js template in the DOM for template_name : "+e),null)};var f=u.CZR_Helpers.getModuleTmpl;u.CZR_Helpers.getModuleTmpl=function(n){if(-1===(n=_.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:u.settings.nonce.save},n)).module_id.indexOf("__nimble__"))return f(n);var o=m.Deferred();if((_.isEmpty(n.tmpl)||_.isEmpty(n.module_type))&&o.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),!u.czr_sektions.isModuleRegistered(n.module_type))return o.reject("api.CZR_Helpers.getModuleTmpl => module type not registered"),o.resolve(),f(n);if(_.contains([],n.module_type))return o.resolve(),f(n);var e=u.czr_sektions.getRegisteredModuleProperty(n.module_type,"tmpl"),t=_.isObject(e)&&e[n.tmpl]?e[n.tmpl]:{};!_.isEmpty(t)&&_.isObject(t)||(u.errare("getModuleTmpl => Error empty or invalid input map for module : ",n.module_type),o.reject("getModuleTmpl => Error empty or invalid input map for module : ",n.module_type));var r=n.item_model,i=m.extend(!0,{},u.czr_sektions.getDefaultItemModelFromRegisteredModuleData(n.module_type)),s=m.extend(!0,{},i);r=m.extend(s,r),_.isEmpty(r)&&(u.errare("getModuleTmpl => Error invalid item model for module : ",n.module_type),o.reject("getModuleTmpl => Error invalid item model for module : ",n.module_type));var a,c="",l=function(e){var i="";return _.each(e,function(e,t){a=e.input_type;try{i+=wp.template("nimble-input-wrapper")({input_type:a,input_data:e,input_id:t,item_model:r,input_tmpl:function(e){var t=e;switch(e){case"czr_layouts":case"select":case"simpleselect":case"fa_icon_picker":case"font_picker":case"animation_picker":t="simpleselect";break;case"simpleselectWithDeviceSwitcher":t="simpleselect_deviceswitcher";break;case"multiselect":case"category_picker":t="multiselect";break;case"h_alignment":case"horizAlignmentWithDeviceSwitcher":t="h_alignment";break;case"h_text_alignment":case"horizTextAlignmentWithDeviceSwitcher":t="h_text_alignment";break;case"range_simple":case"range_simple_device_switcher":t="range_simple";break;case"number_simple":t="number_simple";break;case"font_size":case"line_height":case"range_with_unit_picker":case"range_with_unit_picker_device_switcher":t="range_with_unit_picker";break;case"spacing":case"spacingWithDeviceSwitcher":t="spacing";break;case"upload":case"upload_url":t="upload";break;case"bg_position":case"bgPositionWithDeviceSwitcher":t="bg_position";break;case"verticalAlignWithDeviceSwitcher":t="v_alignment"}return 0<m("#tmpl-nimble-input___"+t).length?wp.template("nimble-input___"+t):(u.errare("problem in getInputTemplate(), missing js template in the DOM for input_type : "+e),null)}(a),control_id:n.control_id})}catch(e){return u.errare("getModuleTmpl => Error when parsing the nimble-input-wrapper template",e),o.reject("getModuleTmpl => Error when parsing the nimble-input-wrapper template"),!1}}),i};if(t.tabs){var d="",p="";_.each(t.tabs,function(e,t){var i=m.extend(!0,{},e);i=m.extend({inputs:{},title:""},i);var n=_.isEmpty(i.attributes)?"":i.attributes;d+='<li data-tab-id="section-topline-'+(+t+1)+'" '+n+'><a href="#" title="'+i.title+'"><span>'+i.title+"</span></a></li>";var o=l(i.inputs);p+='<section id="section-topline-'+(+t+1)+'">'+o+"</section>"}),c+=['<div class="tabs tabs-style-topline">',"<nav>","<ul>",d,"</ul>","</nav>",'<div class="content-wrap">',p,"</div>","</div>"].join("")}else c=l(t);return o.resolve(c).promise()}}(wp.customize,jQuery);var CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{cachedElements:{$body:s("body"),$window:s(window)},initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(r.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");e.SECTION_ID_FOR_GLOBAL_OPTIONS="__globalOptionsSectionId",e.SECTION_ID_FOR_LOCAL_OPTIONS="__localOptionsSection",e.SECTION_ID_FOR_CONTENT_PICKER="__content_picker__",e.SECTION_ID_FOR_SITE_TMPL="__siteTmplSection",e.MAX_NUMBER_OF_COLUMNS=12,e.SETTING_UPDATE_BUFFER=100,e.TINYMCE_EDITOR_HEIGHT=100,e.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new r.Value({}),e.registered=new r.Value([]),wp.customize.apiIsReady?e.doSektionThinksOnApiReady():r.bind("ready",function(){e.doSektionThinksOnApiReady()}),r.bind("save-request-params",function(e){s.extend(e,{local_skope_id:r.czr_skopeBase.getSkopeProperty("skope_id"),group_skope_id:r.czr_skopeBase.getSkopeProperty("skope_id","group"),active_locations:r.czr_sektions.activeLocations()})});var t=function(){_.isArray(r.czrActiveWPEditors)&&(_.each(r.czrActiveWPEditors,function(e){wp.editor.remove(e)}),r.czrActiveWPEditors=[])};r.bind("sek-before-clean-registered",t),r.bind("czr-all-items-closed",t)},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){r.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),r.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),r.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.deferred.embedded.done(function(){!0!==e.boundForLocalOptionGeneration&&(e.boundForLocalOptionGeneration=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-local-skope-options-ui"})}))})}),sektionsLocalizedData.isSiteTemplateEnabled&&r.section(o.SECTION_ID_FOR_SITE_TMPL,function(e){e.deferred.embedded.done(function(){!0!==e.siteTmplOptionsGenerated&&(e.siteTmplOptionsGenerated=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-site-tmpl-options-ui"})}))})}),r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),o.nb_is_ready=!0,r.trigger("nimble-ready-for-current-skope")};_.isEmpty(r.czr_activeSkopes().local)||i(),r.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),r.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){r.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){s(this).trigger("click")})})})}),s("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){r.previewer.trigger("sek-reset-collection",{scope:"local"})}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&r.control(e.id,function(e){e.container.find("[draggable]").each(function(){s(this).off("dragstart dragend")})}),"control"==e.what&&r.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(s(this).data("czrSelect2"))||s(this).czrSelect2("destroy")})})}),r.bind("czr-new-registered",function(e){if(_.isUndefined(e.origin))throw new Error("czr-new-registered event => missing params.origin");if("nimble"===e.origin&&!1!==e.track){var t=o.registered(),i=s.extend(!0,[],t),n=_.findWhere(i,{id:e.id});if(!_.isEmpty(n)&&_.isEqual(n,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);i.push(e),o.registered(i)}}),o.activeLocations=new r.Value([]),o.activeLocationsInfo=new r.Value([]),r.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[]),o.activeLocationsInfo(_.isObject(e)&&_.isArray(e.active_locs_info)?e.active_locs_info:[])}),o.setupTopBar(),o.setupSaveSectionUI(),o.setupSaveTmplUI(),o.lastClickedTargetInPreview=new r.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?r.previewer.send("sek-set-double-click-target",e):r.previewer.send("sek-reset-double-click-target"),clearTimeout(o.cachedElements.$window.data("_preview_target_timer_")),o.cachedElements.$window.data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),r.previewer.send("sek-reset-double-click-target")},2e4))}),r.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),s(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){r.previewer.trigger("sek-notify",{notif_id:"has-active-cache-plugin",type:"info",duration:2e4,message:['<span style="color:#0075a2">',sektionsLocalizedData.i18n["You seem to be using a cache plugin."],!_.isString(sektionsLocalizedData.hasActiveCachePlugin)||sektionsLocalizedData.hasActiveCachePlugin.length<2?"":"<strong> ("+sektionsLocalizedData.hasActiveCachePlugin+")</strong><br/>"," <strong>",sektionsLocalizedData.i18n["It is recommended to disable your cache plugin when customizing your website."],"</strong>","</span>"].join("")})},2e3),r.previewer.bind("multi-items-module-refreshed",function(t){_.isUndefined(t.apiParams.control_id)||r.control(t.apiParams.control_id,function(e){_.isUndefined(e.params.sek_registration_params)||r.control(e.id).params.sek_registration_params.module_id===t.apiParams.id&&e.czr_Module.each(function(e){e.czr_Item.each(function(e){"expanded"===e.viewState()&&e.trigger("sek-request-item-focus-in-preview")})})})}),o.setupTemplateGallery()},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=r.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});r.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.first().find("h3.accordion-section-title"),t=(n.container.first().find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(sektionsLocalizedData.isPro&&(t+=['<img class="sek-nimble-logo sek-pro-pastil" src="',sektionsLocalizedData.baseUrl,"/assets/czr/sek/img/pro_white.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join("")),0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}})}),r.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"postMessage",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForSiteTmplOptions,dirty:!1,value:sektionsLocalizedData.siteTmplOptionDBValues,transport:"postMessage",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=r.czr_initialSkopeCollectionPopulated.state()?r.czr_initialSkopeCollectionPopulated.done(function(){r.previewer.trigger("sek-pick-content",{focus:!1})}):r.previewer.trigger("sek-pick-content",{focus:!1})})}),sektionsLocalizedData.isSiteTemplateEnabled&&r.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_SITE_TMPL,title:sektionsLocalizedData.i18n["Site templates"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(o.SECTION_ID_FOR_SITE_TMPL,function(t){var e=t.container.find(".accordion-section-title"),i=t.container.find(".customize-section-title h3");0<e.length&&e.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(t,{expand_first_control:!0});var n=function(){setTimeout(function(){t.expanded(!0);var e=_.first(t.controls());e&&e.id&&r.control(e.id).container.find(".customize-control-title").trigger("click")},500),r.czr_currentSkopesCollection.unbind(n)};t.container.find(".accordion-section-title").first().on("click",function(){r.czr_currentSkopesCollection.bind(n),r.previewer.previewUrl(r.settings.url.home)})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&r.previewer.trigger("sek-pick-content"),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&(sektionsLocalizedData.isSiteTemplateEnabled&&r.infoLog("TO DO SITE TEMPLATES => 1) PHP create a site template mapping : skope => site_template option that applies, 2) Include this mapping in the localized customizer params 3) use it on local reset to set the new value"),r.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData)),_.isEmpty(sektionsData)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(t.cachedElements.$window.data("_scroll_move_timer_")),t.cachedElements.$window.data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};t.cachedElements.$window.on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){s(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){i.cachedElements.$body.addClass("nimble-top-bar-visible")},200)}):(t=s.Deferred(),i.cachedElements.$body.removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){var t,i=this;if(0<s(i.topBarId).length)return s(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}s("#customize-preview").after(s(t)),s(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),s(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),s("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(s(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),s(".sek-nimble-doc, .sek-notifications",i.topBarId).on("click",function(e){e.preventDefault(),s(this).data("doc-href")&&window.open(s(this).data("doc-href"),"_blank")}),s(".sek-tmpl-saving",i.topBarId).on("click",function(e){e.preventDefault(),i.tmplDialogVisible(!i.tmplDialogVisible())});var n=function(e){s(i.topBarId).length<1||sektionsLocalizedData.isDebugMode||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?s(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses Nimble Builder template."]].join(" ")).attr("data-doc-href","https://docs.presscustomizr.com/article/339-changing-the-page-template"):s(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),s(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new l.Value([{status:"current",value:{local:l(this.localSectionsSettingId())(),global:l(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw l.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],s=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(s,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){_.isEmpty(r.local)||(l(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),l.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegisteredAndLargeSelectInput(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(s,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(s,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<c&&(t===c-1?newLog.status="current":t===c&&(newLog.status="future"));break;case"redo":s.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,I){I.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(i.cachedElements.$body.toggleClass("sek-level-tree-expanded",e),e){if(i.templateGalleryExpanded(!1),i.tmplDialogVisible(!1),i.saveSectionDialogVisible&&i.saveSectionDialogVisible(!1),i.setLevelTreeValue(),_.isEmpty(i.levelTree()))return b.previewer.trigger("sek-notify",{type:"info",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["No sections to navigate"]+"</strong>","</span>"].join("")}),void i.levelTreeExpanded(!1);I("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<I("#nimble-level-tree").length&&_.delay(function(){I("#nimble-level-tree").remove(),I("#customize-preview iframe").css("z-index","")},300)}),i.activeLocations.bind(function(){_.isEmpty(i.levelTree())||i.renderOrRefreshTree()}),b.previewer.bind("ready",function(){i.localSectionsSettingId.callbacks.add(function(){i.levelTreeExpanded(!1),_.each([i.getGlobalSectionsSettingId(),i.localSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){b(e)._isBoundForNimbleLevelTree||(b(e).bind(function(e){i.setLevelTreeValue()}),b(e)._isBoundForNimbleLevelTree=!0)})})}),i.cachedElements.$body.on("click","#nimble-level-tree [data-nimb-level]",function(e){e.preventDefault(),e.stopPropagation();var i=I(e.target).closest("[data-nimb-level]");b.previewer.send("sek-animate-to-level",{id:i.data("nimb-id")}),b.previewer.send("sek-clean-level-uis"),_.delay(function(){b.previewer.send("sek-display-level-ui",{id:i.data("nimb-id")});var e=i.data("nimb-id"),t=i.data("nimb-level");"column"===t||"section"===t?b.previewer.trigger("sek-edit-options",{id:e,level:t}):"module"===t&&b.previewer.trigger("sek-edit-module",{id:e,level:t})},100)}),i.cachedElements.$body.on("click","#nimble-level-tree .sek-remove-level",function(e){e.preventDefault(),e.stopPropagation();var t=I(e.target).closest("[data-nimb-level]");b.previewer.trigger("sek-remove",{level:t.data("nimb-level"),id:t.data("nimb-id"),location:t.closest('[data-nimb-level="location"]').data("nimb-id"),in_sektion:t.closest('[data-nimb-level="section"]').data("nimb-id"),in_column:t.closest('[data-nimb-level="column"]').data("nimb-id")}),t.fadeOut("slow"),i.renderOrRefreshTree()}),i.cachedElements.$body.on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),s=this.localSectionsSettingId(),a=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,s,a],function(e){b.has(e)||(c=e)}),!1===c){e=b(r)(),i=_.isObject(e)?I.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(s)(),t=_.isObject(t)?t:{},n=I.extend(!0,{},t),n=_.isEmpty(n.collection)?[]:n.collection,n=_.isArray(n)?n:[];var l,d=_.union(i,n),p=!1,u=!1;o=b(a)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(p="nimble_local"===(l=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!p&&"theme"!==l&&(u="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===l);var m,f,g=I.extend(!0,[],d);g=_.filter(g,function(e,t){return!_.contains(["nimble_global_header","nimble_global_footer","nimble_local_header","nimble_local_footer"],e.id)});var h=function(e){m=_.findWhere(d,{id:"nimble_"+e+"_header"}),f=_.findWhere(d,{id:"nimble_"+e+"_footer"}),g.unshift(m),g.push(f)};p?h("local"):u&&h("global");var v,k=this.activeLocations(),y=[];_.isEmpty(k)?y=g:_.each(k,function(e){v=_.findWhere(g,{id:e}),_.isUndefined(v)||y.push(v)}),this.levelTree(y)}else b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(I("#nimble-level-tree").length<1){try{e=wp.template("nimble-level-tree")({})}catch(e){return b.errare("Error when parsing the nimble-level-tree template",e),!1}I("#customize-preview").after(I(e))}I("#nimble-level-tree").find(".sek-tree-wrap").html(this.getLevelTreeHtml())},getLevelTreeHtml:function(e,t){var i=this;e=e||i.levelTree();var n,o,r,s=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var a='<i class="material-icons sek-remove-level" title="'+sektionsLocalizedData.i18n["Remove this element"]+'">delete_forever</i>';return r="<ul>",_.each(e,function(e){_.isUndefined(e.level)?b.errare("::buildLevelTree => missing level property",e):_.isUndefined(e.id)?b.errare("::buildLevelTree => missing id property",e):(n=e.level,"location"===(o=n)&&(s=!_.contains(i.activeLocations(),e.id)),s||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),a="location"!==n?a:"",r+='<li data-nimb-level="'+n+'" data-nimb-id="'+e.id+'">',r+='<div class="sek-level-infos"><div class="sek-inner-level-infos">',"module"===n&&(r+=[i.getTreeModuleIcon(e.module_type),i.getTreeModuleTitle(e.module_type)].join(" ")),r+=[" ",o,"( id :",e.id,")",a].join(" "),r+="</div></div>",_.isArray(e.collection)&&!_.isEmpty(e.collection)&&(r+=i.getLevelTreeHtml(e.collection,t)),r+="</li>"))}),r+="</ul>"},getTreeModuleIcon:function(t){var i,n={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(n)&&t===e["content-id"]&&(_.isEmpty(e.icon)||(i="http"===e.icon.substring(0,4)?e.icon:sektionsLocalizedData.moduleIconPath+e.icon,n={svg:e.icon?i:"",font:e.font_icon?e.font_icon:""}))}),_.isEmpty(n.svg)?_.isEmpty(n.font)?void 0:n.font:'<img class="sek-svg-mod-icon" src="'+n.svg+'"/>'},getTreeModuleTitle:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i=e.title)}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupSaveSectionUI:function(){var r=this;r.saveSectionDialogVisible=new l.Value(!1),r.saveSectionDialogVisible.bind(function(e){e&&(r.templateGalleryExpanded(!1),r.levelTreeExpanded(!1),r.tmplDialogVisible&&r.tmplDialogVisible(!1)),r.toggleSaveSectionUI(e)}),r.allSavedSections=new l.Value("_not_populated_"),r.allSavedSections.bind(function(e){_.isObject(e)?(e=_.isEmpty(e)?{}:e,r.refreshSectionPickerHtml(e)):l.errare("error setupSaveSectionUI => section collection should be an object")}),r.saveSectionDialogMode=new l.Value("hidden"),r.saveSectionDialogMode.bind(function(e){_.contains(["hidden","save","update","remove","edit"],e)||(l.errare("error setupSaveSectionUI => unknown section dialog mode",e),e="save");var t,i=d("#nimble-top-section-save-ui"),n=i.find("#sek-saved-section-title"),o=i.find("#sek-saved-section-description");switch(i.find("[data-section-mode-switcher]").attr("aria-pressed",!1),i.find('[data-section-mode-switcher="'+e+'"]').attr("aria-pressed",!0),d("#nimble-top-section-save-ui").attr("data-sek-section-dialog-mode",e),i.removeClass("sek-removal-confirmation-opened"),e){case"save":n.val(""),o.val("");break;case"update":case"edit":(t=i.find(".sek-saved-section-picker")).val("none").trigger("change"),r.setSavedSectionCollection().done(function(e){r.refreshSectionPickerHtml(),t.val(r.userSectionToEdit||"none").trigger("change"),r.userSectionToEdit=null});break;case"remove":console.log("sOOO ?",r.userSectionToRemove),(t=i.find(".sek-saved-section-picker")).val("none").trigger("change"),r.setSavedSectionCollection().done(function(e){r.refreshSectionPickerHtml(),t.val(r.userSectionToRemove||"none").trigger("change"),r.userSectionToRemove=null})}"remove"===e&&_.isEmpty(r.idOfSectionToSave)?i.addClass("sek-is-removal-only"):i.removeClass("sek-is-removal-only")})},refreshSectionPickerHtml:function(e){e=e||this.allSavedSections();var t=d("#nimble-top-section-save-ui"),i=t.find(".sek-saved-section-picker");i.val("none").trigger("change"),i.find("option").each(function(){"none"!==d(this).attr("value")&&d(this).remove()});var n,o,r="";_.each(e,function(e,t){_.isObject(e)&&(o=e.last_modified_date?e.last_modified_date:"",n=e.title?e.title:"section title not set",r+='<option value="'+t+'">'+[n,sektionsLocalizedData.i18n["Last modified"]+" : "+o].join(" | ")+"</option>")}),i.append(r),t.addClass("section-collection-populated")},renderSectionSaveUI:function(e){if(0<d("#nimble-top-section-save-ui").length)return d("#nimble-top-section-save-ui");try{_tmpl=wp.template("nimble-top-section-save-ui")({})}catch(e){return l.errare("Error when parsing nimble-top-section-save-ui template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("#nimble-top-section-save-ui")},maybeScheduleSectionSaveDOMEvents:function(){var i=this,n=d("#nimble-top-section-save-ui");n.data("nimble-sec-save-dom-events-scheduled")||(n.on("click","[data-section-mode-switcher]",function(e){e.preventDefault(),i.saveSectionDialogMode(d(this).data("section-mode-switcher"))}).on("change",".sek-saved-section-picker",function(e){i.reactOnSectionSelection(e,d(this))}).on("click",".sek-do-save-section",function(e){n.addClass("nimble-section-processing-ajax"),i.saveOrUpdateSavedSection(e).done(function(e){n.removeClass("nimble-section-processing-ajax"),e.success&&(i.saveSectionDialogVisible(!1),i.setSavedSectionCollection({refresh:!0}))})}).on("click",".sek-do-update-section",function(e){var t=n.find(".sek-saved-section-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-section-processing-ajax"),i.saveOrUpdateSavedSection(e,t).done(function(e){n.removeClass("nimble-section-processing-ajax"),e.success&&(i.saveSectionDialogVisible(!1),i.setSavedSectionCollection({refresh:!0}).done(function(e){i.refreshSectionPickerHtml()}))}))}).on("click",".sek-open-remove-confirmation",function(e){n.addClass("sek-removal-confirmation-opened")}).on("click",".sek-do-remove-section",function(e){var t=n.find(".sek-saved-section-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-section-processing-ajax"),i.removeSavedSection(e,t).done(function(e){n.removeClass("nimble-section-processing-ajax"),n.removeClass("sek-removal-confirmation-opened"),e.success&&i.setSavedSectionCollection({refresh:!0})}))}).on("click",".sek-cancel-remove-section",function(e){n.removeClass("sek-removal-confirmation-opened")}),d(".sek-close-dialog",n).on("click",function(e){e.preventDefault(),i.saveSectionDialogVisible(!1)}),n.data("nimble-sec-save-dom-events-scheduled",!0))},reactOnSectionSelection:function(e,t){var i=d("#nimble-top-section-save-ui"),n=t.val(),o=i.find("#sek-saved-section-title"),r=i.find("#sek-saved-section-description"),s="update"===this.saveSectionDialogMode()?"sek-section-update-selected":"sek-section-remove-selected";if("none"===n)o.val(""),r.val(""),i.removeClass(s);else{var a=this.allSavedSections();(a=_.isObject(a)&&!_.isArray(a)?a:{})[n]=d.extend({title:"",description:"",last_modified_date:""},a[n]||{}),o.val(a[n].title),r.val(a[n].description),i.addClass(s)}},saveOrUpdateSavedSection:function(e,t){var i=this,n=d.Deferred(),o="edit"===i.saveSectionDialogMode();if(!o&&(!i.idOfSectionToSave||_.isEmpty(i.idOfSectionToSave)))return l.errare("saveOrUpdateSavedSection => error => missing section id"),n.resolve({success:!1});e.preventDefault();var r,s=d("#sek-saved-section-title"),a=s.val(),c=d("#sek-saved-section-description").val();if(!o){if("no_match"==(r=d.extend(!0,{},i.getLevelModel(i.idOfSectionToSave))))return l.errare("saveOrUpdateSavedSection => error => no section model with id "+i.idOfSectionToSave),n.resolve({success:!1});if(r=i.preProcessSection(r),!_.isObject(r))return l.errare("::saveOrUpdateSavedSection => error => invalid sectionModel"),n.resolve({success:!1})}return _.isEmpty(a)?(s.addClass("error"),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["A title is required"]+"</strong>","</span>"].join("")}),n.resolve({success:!1})):(d("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_user_section",{nonce:l.settings.nonce.save,section_data:o?"":JSON.stringify(r),section_title:a,section_description:c,section_post_name:t||"",skope_id:l.czr_skopeBase.getSkopeProperty("skope_id"),edit_metas_only:o?"yes":"no"}).done(function(e){n.resolve({success:!0}),l.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template saved"]+"</strong>","</span>"].join("")})}).fail(function(e){n.resolve({success:!1}),l.errorLog("ajax sek_save_section => error",e),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing template"]+"</strong>","</span>"].join("")})}).always(function(){i.idOfSectionToSave=null}),n)},preProcessSection:function(e){if(!_.isObject(e))return null;var t=d.extend({},!0,e);return _.has(t,"is_nested")&&(t=_.omit(t,"is_nested")),t},removeSavedSection:function(e,t){var i=this,n=d.Deferred();return e.preventDefault(),wp.ajax.post("sek_remove_user_section",{nonce:l.settings.nonce.save,section_post_name:t}).done(function(e){n.resolve({success:!0}),l.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template removed"]+"</strong>","</span>"].join("")})}).fail(function(e){n.resolve({success:!1}),l.errorLog("ajax sek_remove_section => error",e),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")})}).always(function(){i.idOfSectionToSave=null}),n},toggleSaveSectionUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?d.when(i.renderSectionSaveUI({})).done(function(e){i.maybeScheduleSectionSaveDOMEvents(),i.saveUIContainer=e,_.delay(function(){i.saveSectionDialogMode("save"),i.cachedElements.$body.addClass("sek-save-section-ui-visible")},200)}):(t=d.Deferred(),i.cachedElements.$body.removeClass("sek-save-section-ui-visible"),0<d("#nimble-top-section-save-ui").length?_.delay(function(){i.saveSectionDialogMode=i.saveSectionDialogMode?i.saveSectionDialogMode:new l.Value,i.saveSectionDialogMode("hidden"),i.saveUIContainer.remove(),i.idOfSectionToSave=null,t.resolve()},250):t.resolve(),t.promise()).done(function(){i.saveSectionDialogVisible(!1)})},setSavedSectionCollection:function(e){var t=this,i=d.Deferred();return(e=e||{refresh:!1}).refresh||"_not_populated_"===t.allSavedSections()?((t.sectionCollectionPromise&&"pending"===t.sectionCollectionPromise.state()?t.sectionCollectionPromise:t.getSavedSectionCollection(e)).done(function(e){t.allSavedSections(e),i.resolve(e)}),i.promise()):i.resolve(t.allSavedSections())},getSavedSectionCollection:function(e){var t=this;return e=e||{refresh:!1},t.sectionCollectionPromise=d.Deferred(),e.refresh||"_not_populated_"===t.allSavedSections()?wp.ajax.post("sek_get_all_saved_sections",{nonce:l.settings.nonce.save}).done(function(e){_.isObject(e)&&!_.isArray(e)?t.sectionCollectionPromise.resolve(e):(t.sectionCollectionPromise.resolve({}),_.isEmpty(e)||l.errorLog("control::getSavedSectionCollection => collection is empty or invalid"))}).fail(function(e){l.errorLog("ajax sek_get_all_saved_section => error",e),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")}),t.sectionCollectionPromise.resolve({})}):t.sectionCollectionPromise.resolve(t.allSavedSections()),t.sectionCollectionPromise}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupSaveTmplUI:function(){var r=this;r.tmplDialogVisible=new l.Value(!1),sektionsLocalizedData.isTemplateSaveEnabled&&(r.tmplDialogVisible.bind(function(e){e&&(r.templateGalleryExpanded(!1),r.levelTreeExpanded(!1),r.saveSectionDialogVisible&&r.saveSectionDialogVisible(!1)),r.toggleSaveTmplUI(e)}),r.allSavedTemplates=new l.Value("_not_populated_"),r.allSavedTemplates.bind(function(e){_.isObject(e)?(e=_.isEmpty(e)?{}:e,r.refreshTmplPickerHtml(e)):l.errare("error setupSaveTmplUI => tmpl collection should be an object")}),r.allApiTemplates=new l.Value("_not_populated_"),r.tmplDialogMode=new l.Value("hidden"),r.tmplDialogMode.bind(function(e){_.contains(["hidden","save","update","remove","edit"],e)||(l.errare("::setupSaveTmplUI => unknown tmpl dialog mode",e),e="save");var t,i=d("#nimble-top-tmpl-save-ui"),n=i.find("#sek-saved-tmpl-title"),o=i.find("#sek-saved-tmpl-description");switch(i.find("[data-tmpl-mode-switcher]").attr("aria-pressed",!1),i.find('[data-tmpl-mode-switcher="'+e+'"]').attr("aria-pressed",!0),d("#nimble-top-tmpl-save-ui").attr("data-sek-tmpl-dialog-mode",e),i.removeClass("sek-removal-confirmation-opened"),e){case"save":n.val(""),o.val("");break;case"update":case"remove":(t=i.find(".sek-saved-tmpl-picker")).val("none").trigger("change"),r.setSavedTmplCollection().done(function(e){r.refreshTmplPickerHtml(),t.val(r.tmplToRemove||"none").trigger("change"),r.tmplToRemove=null});break;case"edit":(t=i.find(".sek-saved-tmpl-picker")).val("none").trigger("change"),r.setSavedTmplCollection().done(function(e){r.refreshTmplPickerHtml(),t.val(r.tmplToEdit||"none").trigger("change"),r.tmplToEdit=null})}}))},refreshTmplPickerHtml:function(e){e=e||this.allSavedTemplates();var t=d("#nimble-top-tmpl-save-ui"),i=t.find(".sek-saved-tmpl-picker");i.val("none").trigger("change"),i.find("option").each(function(){"none"!==d(this).attr("value")&&d(this).remove()});var n,o,r="";_.each(e,function(e,t){_.isObject(e)&&(o=e.last_modified_date?e.last_modified_date:"",n=e.title?e.title:"template title not set",r+='<option value="'+t+'">'+[n,sektionsLocalizedData.i18n["Last modified"]+" : "+o].join(" | ")+"</option>")}),i.append(r),t.addClass("tmpl-collection-populated")},renderTmplUI:function(e){if(0<d("#nimble-top-tmpl-save-ui").length)return d("#nimble-top-tmpl-save-ui");try{_tmpl=wp.template("nimble-top-tmpl-save-ui")({})}catch(e){return l.errare("Error when parsing nimble-top-tmpl-save-ui template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("#nimble-top-tmpl-save-ui")},scheduleTmplSaveDOMEvents:function(){var i=this,n=d("#nimble-top-tmpl-save-ui");n.data("nimble-tmpl-dom-events-scheduled")||(n.on("click","[data-tmpl-mode-switcher]",function(e){e.preventDefault(),i.tmplDialogMode(d(this).data("tmpl-mode-switcher"))}),n.on("change",".sek-saved-tmpl-picker",function(e){i.reactOnTemplateSelection(e,d(this))}),n.on("click",".sek-do-save-tmpl",function(e){n.addClass("nimble-tmpl-processing-ajax"),i.saveOrUpdateTemplate(e).done(function(e){n.removeClass("nimble-tmpl-processing-ajax"),e.success&&(i.tmplDialogVisible(!1),i.setSavedTmplCollection({refresh:!0}))})}),n.on("click",".sek-do-update-tmpl",function(e){var t=n.find(".sek-saved-tmpl-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-tmpl-processing-ajax"),i.saveOrUpdateTemplate(e,t).done(function(e){n.removeClass("nimble-tmpl-processing-ajax"),e.success&&(i.tmplDialogVisible(!1),i.setSavedTmplCollection({refresh:!0}).done(function(e){i.refreshTmplPickerHtml()}))}))}),n.on("click",".sek-open-remove-confirmation",function(e){n.addClass("sek-removal-confirmation-opened")}),n.on("click",".sek-do-remove-tmpl",function(e){var t=n.find(".sek-saved-tmpl-picker").val();"none"===t||_.isEmpty(t)||(n.addClass("nimble-tmpl-processing-ajax"),i.removeTemplate(e,t).done(function(e){n.removeClass("nimble-tmpl-processing-ajax"),n.removeClass("sek-removal-confirmation-opened"),e.success&&i.setSavedTmplCollection({refresh:!0})}))}),n.on("click",".sek-cancel-remove-tmpl",function(e){n.removeClass("sek-removal-confirmation-opened")}),d(".sek-close-dialog",n).on("click",function(e){e.preventDefault(),i.tmplDialogVisible(!1)}),n.data("nimble-tmpl-dom-events-scheduled",!0))},reactOnTemplateSelection:function(e,t){var i=d("#nimble-top-tmpl-save-ui"),n=t.val(),o=i.find("#sek-saved-tmpl-title"),r=i.find("#sek-saved-tmpl-description"),s="update"===this.tmplDialogMode()?"sek-tmpl-update-selected":"sek-tmpl-remove-selected";if("none"===n)o.val(""),r.val(""),i.removeClass(s);else{var a=this.allSavedTemplates();(a=_.isObject(a)&&!_.isArray(a)?a:{})[n]=d.extend({title:"",description:"",last_modified_date:""},a[n]||{}),o.val(a[n].title),r.val(a[n].description),i.addClass(s)}},saveOrUpdateTemplate:function(e,t){var i=this,n=d.Deferred();e.preventDefault();var o,r=d("#sek-saved-tmpl-title"),s=r.val(),a=d("#sek-saved-tmpl-description").val(),c=i.localSectionsSettingId();try{o=i.preProcessTmpl(l(c)())}catch(e){l.errorLog("error in ::saveOrUpdateTemplate",e),n.resolve({success:!1})}return _.isEmpty(s)?(r.addClass("error"),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["A title is required"]+"</strong>","</span>"].join("")}),n.resolve({success:!1})):(d("#sek-saved-tmpl-title").removeClass("error"),wp.ajax.post("sek_save_user_template",{nonce:l.settings.nonce.save,tmpl_data:"edit"===i.tmplDialogMode()?"":JSON.stringify(o),tmpl_title:s,tmpl_description:a,tmpl_post_name:t||"",edit_metas_only:"edit"===i.tmplDialogMode()?"yes":"no",skope_id:l.czr_skopeBase.getSkopeProperty("skope_id"),tmpl_locations:i.getActiveLocationsForTmpl(o),tmpl_header_location:i.getHeaderOrFooterLocationIdForTmpl("header",o),tmpl_footer_location:i.getHeaderOrFooterLocationIdForTmpl("footer",o)}).done(function(e){n.resolve({success:!0}),l.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template saved"]+"</strong>","</span>"].join("")})}).fail(function(e){n.resolve({success:!1}),l.errorLog("ajax sek_save_template => error",e),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing template"]+"</strong>","</span>"].join("")})}),n)},getActiveLocationsForTmpl:function(e){if(!_.isObject(e))throw new Error("preProcess Tmpl => error : tmpl_data must be an object");var t=[];return _.each(e.collection,function(e){_.isObject(e)&&e.id&&e.level&&"location"===e.level&&t.push(e.id)}),t},getHeaderOrFooterLocationIdForTmpl:function(t,e){var i=this;if(!_.isObject(e))throw new Error("preProcess Tmpl => error : tmpl_data must be an object");var n="";return _.each(e.collection,function(e){_.isObject(e)&&e.id&&e.level&&("header"===t&&i.isHeaderLocation(e.id)||"footer"===t&&i.isFooterLocation(e.id))&&(n=e.id)}),n},preProcessTmpl:function(e){var t,i;if(!_.isObject(e))throw new Error("preProcess Tmpl => error : tmpl_data must be an object");return(t=d.extend(!0,{},e)).collection=[],i=this.activeLocations(),_.each(e.collection,function(e){_.isObject(e)&&e.id&&e.collection&&_.contains(i,e.id)&&!_.isEmpty(e.collection)&&t.collection.push(e)}),t},removeTemplate:function(e,t){var i=d.Deferred();return e.preventDefault(),wp.ajax.post("sek_remove_user_template",{nonce:l.settings.nonce.save,tmpl_post_name:t}).done(function(e){i.resolve({success:!0}),l.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Template removed"]+"</strong>","</span>"].join("")})}).fail(function(e){i.resolve({success:!1}),l.errorLog("ajax sek_remove_template => error",e),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")})}),i},toggleSaveTmplUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?d.when(i.renderTmplUI({})).done(function(e){i.scheduleTmplSaveDOMEvents(),i.saveUIContainer=e,_.delay(function(){i.tmplDialogMode("save"),i.cachedElements.$body.addClass("sek-save-tmpl-ui-visible")},200)}):(t=d.Deferred(),i.cachedElements.$body.removeClass("sek-save-tmpl-ui-visible"),0<d("#nimble-top-tmpl-save-ui").length?_.delay(function(){i.tmplDialogMode=i.tmplDialogMode?i.tmplDialogMode:new l.Value,i.tmplDialogMode("hidden"),i.saveUIContainer.remove(),t.resolve()},250):t.resolve(),t.promise()).done(function(){i.tmplDialogVisible(!1)})},setSavedTmplCollection:function(e){var t=this,i=d.Deferred();return(e=e||{refresh:!1}).refresh||"_not_populated_"===t.allSavedTemplates()?((t.templateCollectionPromise&&"pending"===t.templateCollectionPromise.state()?t.templateCollectionPromise:t.getSavedTmplCollection()).done(function(e){t.allSavedTemplates(e),i.resolve(e)}),i.promise()):i.resolve(t.allSavedTemplates())},getSavedTmplCollection:function(){var t=this;return t.templateCollectionPromise=d.Deferred(),wp.ajax.post("sek_get_all_saved_tmpl",{nonce:l.settings.nonce.save}).done(function(e){_.isObject(e)&&!_.isArray(e)?t.templateCollectionPromise.resolve(e):(t.templateCollectionPromise.resolve({}),_.isEmpty(e)||l.errare("control::getSavedTmplCollection => error => tmpl collection is invalid",e))}).fail(function(e){l.errorLog("ajax sek_get_all_saved_tmpl => error",e),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")}),t.templateCollectionPromise.resolve({})}),t.templateCollectionPromise},getApiTmplCollection:function(){var t=this,i=d.Deferred(),n={};return"_not_populated_"!==t.allApiTemplates()?i.resolve(t.allApiTemplates()):sektionsLocalizedData.useAPItemplates?wp.ajax.post("sek_get_all_api_tmpl",{nonce:l.settings.nonce.save}).done(function(e){_.isObject(e)&&!_.isArray(e)?n=e:l.errare("control::getApiTmplCollection => error => tmpl collection is invalid",e),t.allApiTemplates(n),i.resolve(n)}).fail(function(e){l.errorLog("ajax sek_get_all_api_tmpl => error",e),l.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Error when processing templates"]+"</strong>","</span>"].join("")}),i.resolve({})}):(t.allApiTemplates([]),i.resolve([])),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(o,r){r.extend(CZRSeksPrototype,{getTmplJsonFromUserTmpl:function(e){var t=r.Deferred();return wp.ajax.post("sek_get_user_tmpl_json",{nonce:o.settings.nonce.save,tmpl_post_name:e}).done(function(e){t.resolve({success:!0,tmpl_json:e})}).fail(function(e){t.resolve({success:!1}),o.errorLog("ajax getTmplJsonFromUserTmpl => error",e),o.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>error when fetching the template</strong>","</span>"].join("")})}),t},getTmplJsonFromApi:function(e){var t=r.Deferred();return wp.ajax.post("sek_get_api_tmpl_json",{nonce:o.settings.nonce.save,api_tmpl_name:e}).done(function(e){t.resolve({success:!0,tmpl_json:e})}).fail(function(e){t.resolve({success:!1}),o.errorLog("ajax getTmplJsonFromApiTmpl => error",e),o.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>error when fetching the template</strong>","</span>"].join("")})}),t},get_gallery_tmpl_json_and_inject:function(t){var e,i=this,n=(t=r.extend({tmpl_name:"",tmpl_source:"user",tmpl_inject_mode:"replace"},t||{})).tmpl_name;!_.isEmpty(n)&&_.isString(n)||o.errare("::tmpl inject => error => invalid template name"),(e="api_tmpl"===t.tmpl_source?i.getTmplJsonFromApi(n):i.getTmplJsonFromUserTmpl(n)).done(function(e){e.success&&i.inject_tmpl_from_gallery({tmpl_name:n,template_data:e.tmpl_json,tmpl_inject_mode:t.tmpl_inject_mode})}),_.delay(function(){"pending"===e.state()&&o.previewer.trigger("sek-notify",{notif_id:"import-too-long",type:"error",duration:2e4,message:["<span>","<strong>","Template import failed","</strong>","</span>"].join("")})},3e4)},inject_tmpl_from_gallery:function(e){e=e||{};if(!(e=r.extend({tmpl_inject_mode:"replace"},e)).template_data)throw new Error("::inject_tmpl => missing remote template data");o.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),o.czr_sektions.isImportedContentEligibleForAPI({success:!0,data:e.template_data},e)?(e.template_data.data.collection=this.setIdsForImportedTmpl(e.template_data.data.collection),o.czr_sektions.doUpdateApiSettingAfter_TmplGalleryImport({success:!0,data:e.template_data},e)):o.infoLog("::inject_tmpl problem => !api.czr_sektions.isImportedContentEligibleForAPI",e)},doUpdateApiSettingAfter_TmplGalleryImport:function(e,t){if(t=t||{},o.czr_sektions.isImportedContentEligibleForAPI(e,t)){o.czr_sektions.updateAPISetting({action:"sek-inject-tmpl-from-gallery",scope:"local",injected_content:e.data,tmpl_inject_mode:t.tmpl_inject_mode}).done(function(){o.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),o.previewer.refresh(),o.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Template successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){o.errare("::doUpdateApiSettingAfter_TmplGalleryImport => error when firing ::updateAPISetting",e),o.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),o.previewer.refresh()}else o.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=c.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return c.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],s=function(e){c.errare(e,i),sektionsLocalizedData.isDevMode&&c.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of 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("")}),r=!0},a=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=l.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void s("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void s('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void s("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void s("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,a(e)})}}else{if(_.isUndefined(t)||!_.isObject(t))return void s("validation error => a level is invalid");if(_.isEmpty(t.id)||!_.isString(t.id))return void s("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void s("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void s("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void s('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void s("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void s("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&c.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void s("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void s("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void s("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void s("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void s("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=l.extend(!0,{},t),_.isUndefined(e)?s("validation error => undefined level "):a(e)})}};return a(),r&&c.infoLog("error in ::validateSettingValue",i),i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);if(sektionsLocalizedData.isSiteTmplEnabled){var t=c(sektionsLocalizedData.optNameForSiteTmplOptions)(),i=c.czr_skopeBase.getSkopeProperty("skope_id","group"),n=c.czr_skopeBase.getSkopeProperty("group_sektions","group");console.log("ALORS ?",t,i,n),_.isObject(t)&&t.site_templates&&_.isObject(t.site_templates)&&t.site_templates.pages&&"skp__all_page"===i&&n&&n.db_values&&(console.log("SET GROUP SKOPE SEKTION ?"),this.validateSettingValue(_.isObject(n.db_value)?n.db_value:this.getDefaultSektionSettingValue("local"),"local"))}return l.extend(!0,{},this.getDefaultSektionSettingValue(e))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return c.previewedDevice("desktop"),a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},r={action:"sek-add-section",id:sektionsLocalizedData.prefixForSettingsNotSaved+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-content",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.prefixForSettingsNotSaved+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-content",{})}},"sek-add-module":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module_or_nested_section:e.before_module_or_nested_section,after_module_or_nested_section:e.after_module_or_nested_section},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",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(a=!0,s={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};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};break;default:c.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),"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(a=!0,s={},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-move-section-up":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-up",moved_level_id:e.apiParams.id}),e.apiParams.new_location&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.new_location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id})}},"sek-move-section-down":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id}),e.apiParams.new_location&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.new_location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id})}},"sek-duplicate":{callback:function(e){switch(a=!0,s={},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){var t;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}),t=e.apiParams.location,e.apiParams.is_nested&&c.previewer.refresh(),c.previewer.send("sek-animate-to-level",{id: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}),t=e.apiParams.in_sektion;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}),t=e.apiParams.in_column}c.previewer.trigger("sek-refresh-stylesheet",{id:t,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.prefixForSettingsNotSaved+o.guid();break;case"preset_section":c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),c.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}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});break;case"preset_section":c.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id")),c.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&c.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return a=!1,s={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},c.czr_sektions.currentContentPickerType=c.czr_sektions.currentContentPickerType||new c.Value,_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),a=!0,r={},s={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={action:"sek-generate-level-options-ui",location:e.location,level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s))},"sek-edit-module":function(e){return a=!0,r={},s={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(s)},"sek-notify":function(t){a=!1;var i=t.notif_id||"sek-notify";return o.lastNimbleNotificationId&&c.notifications.remove(o.lastNimbleNotificationId),n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),o.lastNimbleNotificationId=i,_.delay(function(){c.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id,original_action:t.original_action,moved_level_id:t.moved_level_id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return a=!1,o.idOfSectionToSave=t.id,o.saveSectionDialogVisible(!0),n.Deferred(function(e){r={},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-reset-collection":{callback:function(e){return a=!1,s={},(r=e).action="sek-reset-collection",r.scope=e.scope,o.updateAPISetting(r)},complete:function(e){c.previewer.refresh(),c.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}}};_.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}"sek-notify"!==n&&(o.templateGalleryExpanded(!1),o.tmplDialogVisible(!1));try{e(t).done(function(e){e=e||{},a?c.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:s,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId,all_params:t}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){c.errare("reactToPreviewMsg => problem or error when running action "+n,e),!_.isEmpty(e)&&sektionsLocalizedData.isDevMode&&c.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 Nimble Builder, you can try resetting the sections of 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("")})})}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;c.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(k,y){y.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=y.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforDraggableContent(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}k.czr_sektions.currentContentPickerType(e.content_type||"module");break;case"sek-generate-local-skope-options-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-site-tmpl-options-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforSiteTmplOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(a){if(!_.isEmpty(a.settingParams)&&_.has(a.settingParams,"to")){var c,l=this,e=a.settingParams.to,t=null,d=!1;if(!_.isEmpty(a.settingParams.args)&&_.has(a.settingParams.args,"moduleRegistrationParams")){var p=a.settingParams.args.moduleRegistrationParams.control,i=a.settingParams.args.moduleRegistrationParams.id,n=p.czr_Module(i);if(_.isEmpty(n)?k.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",a):(t=n.module_type,d=n.isMultiItem()),!d&&_.isObject(e)?c=l.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!1}):(c=[],_.each(e,function(e){c.push(l.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!0}))})),_.isEmpty(a.defaultPreviewAction))k.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",a);else{var u,m="refresh_stylesheet"===a.defaultPreviewAction,f="refresh_markup"===a.defaultPreviewAction,g="refresh_fonts"===a.defaultPreviewAction,h="refresh_preview"===a.defaultPreviewAction,o=a.settingParams.args.input_changed,v=function(){return u&&_.isString(u.refresh_markup)&&"true"!==u.refresh_markup&&"false"!==u.refresh_markup};_.isUndefined(o)||(u=l.getInputRegistrationParams(o,t),_.isUndefined(u.refresh_stylesheet)||(m=Boolean(u.refresh_stylesheet)),_.isUndefined(u.refresh_markup)||(f=v()?u.refresh_markup:Boolean(u.refresh_markup)),_.isUndefined(u.refresh_fonts)||(g=Boolean(u.refresh_fonts)),_.isUndefined(u.refresh_preview)||(h=Boolean(u.refresh_preview)));var r=function(){if(!0===a.isGlobalOptions){if(_.isEmpty(a.options_type))return void k.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");var e=k(sektionsLocalizedData.optNameForGlobalOptions)(),t=y.extend(!0,{},_.isObject(e)?e:{}),i={};if(_.each(c||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[a.options_type]=i,k(sektionsLocalizedData.optNameForGlobalOptions)(t),!1!==h&&k.previewer.refresh(),!0===g){var n=a.settingParams.args.input_value;if(!_.isString(n))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",n);l.updateGlobalGFonts(n)}!0===m&&k.previewer.send("sek-refresh-stylesheet",{local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),location_skope_id:sektionsLocalizedData.globalSkopeId})}else{if(!0!==a.isSiteTemplateOptions)return l.updateAPISetting({action:a.uiParams.action,id:a.uiParams.id,value:c,in_column:a.uiParams.in_column,in_sektion:a.uiParams.in_sektion,options_type:a.options_type,settingParams:a.settingParams}).done(function(e){var t;!0===m&&k.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:a.uiParams.id,level:a.uiParams.level}}),d&&a.settingParams.args.inputRegistrationParams&&_.isFunction(a.settingParams.args.inputRegistrationParams.input_parent)&&(t=a.settingParams.args.inputRegistrationParams.input_parent.id);var i=function(){k.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:a.uiParams.id,level:a.uiParams.level,changed_item_id:t,control_id:p.id,is_multi_items:d},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===f&&i(),v()){var n=a.settingParams.args.input_value;if(!_.isString(n))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");l.htmlIncludesElementsThatNeedAnAjaxRefresh(n)?i():k.previewer.send("sek-update-html-in-selector",{selector:u.refresh_markup,changed_item_id:t,is_multi_items:d,html:n,id:a.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:a.uiParams.id,level:a.uiParams.level},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")})}!0===h&&k.previewer.refresh()}).fail(function(e){k.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated",e),k.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ",a)});if(_.isEmpty(a.options_type))return void k.errare("updateAPISettingAndExecutePreviewActions => error when updating the site template options => missing options_type");var o=k(sektionsLocalizedData.optNameForSiteTmplOptions)(),r=y.extend(!0,{},_.isObject(o)?o:{}),s={};_.each(c||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(s[t]=e)}),r[a.options_type]=s,k(sektionsLocalizedData.optNameForSiteTmplOptions)(r),!1!==h&&k.previewer.refresh()}};if(!0===g){var s=a.settingParams.args.input_value;if(!_.isString(s))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",s);!0===a.isGlobalOptions?r():l.updateAPISetting({action:"sek-update-fonts",font_family:s,is_global_location:l.isGlobalLocation(a.uiParams)}).always(function(){r().then(function(){l.updateAPISetting({action:"sek-update-fonts",is_global_location:l.isGlobalLocation(a.uiParams)})})})}else r()}}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",a)}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",a)},updateGlobalGFonts:function(e){var t=k(sektionsLocalizedData.optNameForGlobalOptions)(),i=y.extend(!0,{},_.isObject(t)?t:{}),n=this.sniffGlobalGFonts(i);!_.isEmpty(e)&&_.isString(e)&&-1<e.indexOf("gfont")&&!_.contains(n,e)&&n.push(e),i.fonts=n,k(sektionsLocalizedData.optNameForGlobalOptions)(i)},sniffGlobalGFonts:function(e){var i=[],n=function(e){_.each(e,function(e,t){"fonts"!==t&&(_.isString(t)&&-1<t.indexOf("font_family")&&-1<e.indexOf("gfont")&&!_.contains(i,e)&&i.push(e),(_.isArray(e)||_.isObject(e))&&n(e))})};return(_.isArray(e)||_.isObject(e))&&n(e),i},normalizeAndSanitizeSingleItemInputValues:function(o){var i,r={},n={},s=null,a=this;return _.each(o.item_value,function(e,t){var i,n;"title"!==t&&((o.is_multi_items||"id"!==t)&&(null!==o.parent_module_type&&"id"!==t&&"no_default_value_specified"===(s=a.getInputDefaultValue(t,o.parent_module_type))&&k.infoLog("::normalizeAndSanitizeSingleItemInputValues => missing default value for input "+t+" in module "+o.parent_module_type),i=e,n=s,(_.isBoolean(i)||_.isBoolean(n)?Boolean(i)===Boolean(n):_.isNumber(i)||_.isNumber(n)?Number(i)===Number(n):_.isString(i)||_.isString(n)?i+""==n+"":_.isObject(i)&&_.isObject(n)?_.isEqual(i,n):_.isArray(i)&&_.isArray(n)?JSON.stringify(i.sort())===JSON.stringify(n.sort()):i===n)||(_.isString(e)||_.isObject(e))&&_.isEmpty(e)||(r[t]=e)))}),_.each(r,function(e,t){switch(a.getInputType(t,o.parent_module_type)){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"detached_tinymce_editor":case"nimble_tinymce_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:i=e}n[t]=i}),n},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=k.control.has(t):(i=!0,1<e.length&&k.errare("isUIControlAlreadyRegistered => why is this control registered more than once ? => "+t)),i},htmlIncludesElementsThatNeedAnAjaxRefresh:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=e.match(/<script[\s\S]*?>[\s\S]*?<\/script>/gi),o=[],r=[];if(t)for(var s=0;s<t.length;s++){var a=t[s].replace(/^\[+/g,"");-1===o.indexOf(a)&&o.push(a)}if(i)for(var c=0;c<i.length;c++){var l=i[c].replace(/^\[+/g,"");-1===r.indexOf(l)&&r.push(l)}return!_.isEmpty(o)||!_.isEmpty(r)||!_.isEmpty(n)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(r,e){var n=this,i={};a.extend(i,{sek_content_type_switcher_module:{settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:n.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),priority:10,settingValue:{content_type:r.content_type}},sek_module_picker_module:{settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:n.getRegisteredModuleProperty("sek_module_picker_module","name"),content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+n.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:n.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>',is_new:!0}}),_.each(["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_about_sec_picker_module","sek_contact_sec_picker_module","sek_team_sec_picker_module","sek_column_layouts_sec_picker_module","sek_header_sec_picker_module","sek_footer_sec_picker_module"],function(e,t){i[e]={settingControlId:sektionsLocalizedData.prefixForSettingsNotSaved+n.guid()+"_sek_draggable_sections_ui",module_type:e,controlLabel:n.getRegisteredModuleProperty(e,"name"),content_type:"section",expandAndFocusOnInit:0===t,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var t=_.keys(i)[0],o=i[t].settingControlId;return n.isUIControlAlreadyRegistered(o)?s.control(o,function(t){t.focus({completeCallback:function(){var e=t.container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}})}):(_do_register_=function(){_.each(i,function(o,e){s.has(o.settingControlId)||(s(o.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:o.settingControlId,dirty:!1,value:o.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",id:o.settingControlId,label:o.controlLabel,type:"czr_module",module_type:o.module_type,section:n.SECTION_ID_FOR_CONTENT_PICKER,priority:o.priority||10,settings:{default:o.settingControlId},track:!1}).done(function(){s.control(o.settingControlId,function(e){e.content_type=o.content_type,!0===r.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title"),i=t.html();if(t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),o.is_new){var n=t.html();t.html(n+' <span class="sek-new-label">New!</span>')}_.isUndefined(o.icon)||t.addClass("sek-flex-vertical-center").prepend(o.icon),"section"===e.content_type?(e.container.attr("data-sek-expanded","false"),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===o.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&e.container.addClass("sek-expand-on-init")):e.container.attr("data-sek-accordion","no")})})}),s.trigger("nimble-modules-and-sections-controls-registered")},s.section(n.SECTION_ID_FOR_CONTENT_PICKER,function(e){_do_register_();var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.prepend('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),0<i.length&&i.find(".sek-level-option-icon").length<1&&i.find(".customize-action").after('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),n.scheduleModuleAccordion.call(e,{expand_first_control:!1}),e.container.find(".customize-control.sek-expand-on-init").find("label > .customize-control-title").trigger("click")})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,p){p.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var s=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=s.getLevelProperty({property:"value",id:r.id}),t=s.getLevelProperty({property:"module_type",id:r.id}),n=s.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===s.getRegisteredModuleProperty(t,"is_father")){var a=s.getRegisteredModuleProperty(t,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(a,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:s.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var c=_.keys(o)[0],l=o[c].settingControlId;return s.isUIControlAlreadyRegistered(l)?d.control(l).focus({completeCallback:function(){var e=d.control(l).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegisteredAndLargeSelectInput(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=p.extend(!0,{},i);"__no_option_group_to_be_updated_by_children_modules__"!==o&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[o])?e[o]:{}),d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",module_id:r.id,id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.id,priority:20,settings:{default:n.settingControlId}}).done(function(){}),d.control(n.settingControlId,function(e){d.control(n.settingControlId).focus({completeCallback:function(){}}),e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=p("<div/>").html(t.html()).text();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})},d.section(r.id,function(e){d.section(r.id).focus(),s.generateModuleOptionSwitcherUI(r.id,r.action),_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){})),e},generateModuleOptionSwitcherUI:function(e,t){var i=e+"__option_switcher";d.has(i)||(d(i,function(e){e.bind(function(e,t){d.errare("generateUIforDraggableContent => the setting() should not changed")})}),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"setting",id:i,dirty:!1,value:"",transport:"postMessage",type:"_nimble_ui_"})),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"control",module_id:e,id:i,label:"",type:"czr_module",module_type:"sek_mod_option_switcher_module",section:e,priority:10,settings:{default:i},has_accordion:!1,ui_action:t}).done(function(){d.control(i,function(e){e.deferred.embedded.done(function(){e.container.find(".customize-control-title").hide(),e.container.attr("data-sek-accordion","no")})})})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(s,e){var a=this,c=a.getLevelProperty({property:"options",id:s.id});c=_.isObject(c)?c:{};var t={};l.trigger("nb_setup_level_ui_registration_params",{params:s,modulesRegistrationParams:t}),d.extend(t,{bg:{settingControlId:s.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'}}),"section"===s.level&&d.extend(t,{level_text:{settingControlId:s.id+"__text_options",module_type:"sek_level_text_module",controlLabel:sektionsLocalizedData.i18n["Text settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">text_format</i>'}}),d.extend(t,{border:{settingControlId:s.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:s.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:s.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:s.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:s.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height, vertical alignment, z-index for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),(sektionsLocalizedData.isUpsellEnabled||sektionsLocalizedData.isPro)&&d.extend(t,{animation:{settingControlId:s.id+"__animate_options",module_type:"sek_level_animation_module",controlLabel:sektionsLocalizedData.i18n["Animation settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">movie_filter</i>',isPro:!0}}),"section"===s.level&&(d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:s.id+"__breakpoint_options",module_type:"sek_level_breakpoint_module",controlLabel:sektionsLocalizedData.i18n["Responsive settings : breakpoint, column direction"],icon:'<i class="material-icons sek-level-option-icon">devices</i>'}}),(sektionsLocalizedData.isUpsellEnabled||sektionsLocalizedData.isPro)&&d.extend(t,{sec_custom_css:{settingControlId:s.id+"__sec_custom_css",module_type:"sek_level_cust_css_section",controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>',isPro:!0}})),"column"===s.level&&d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_column",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),"module"===s.level&&d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width and horizontal alignment for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return a.isUIControlAlreadyRegistered(n)?l.control(n).focus({completeCallback:function(){var e=l.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(a.cleanRegisteredAndLargeSelectInput(),_do_register_=function(){_.each(t,function(n,o){if(a.isUIControlAlreadyRegistered(n.settingControlId))l.section(l.control(n.settingControlId).section()).expanded(!0);else{if(!l.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=a.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,level_id:s.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.id,priority:20,settings:{default:n.settingControlId}}).done(function(){}),l.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),n.isPro&&!sektionsLocalizedData.isPro&&t.append(['<img class="sek-pro-icon-next-title" src="',sektionsLocalizedData.baseUrl,"/assets/czr/sek/img/pro_orange.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join("")),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})}})},l.section(s.id,function(e){_do_register_(),"module"===s.level&&a.generateModuleOptionSwitcherUI(s.id,s.action),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!1})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:s.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+s.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=l.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(l.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.prefixForSettingsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(s,e){var a=this,i=a.getLocalSkopeOptionId();if(a.isUIControlAlreadyRegistered(i))return e;if(a.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===s.clean_settings&&a.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":a.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"widths":a.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":a.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="material-icons sek-level-option-icon">network_check</i>'};break;case"local_reset":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:l.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=l(a.localSectionsSettingId())(),c=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(a.localOptionsRegistrationParams,function(n,o){var e=a.getModuleStartingValue(n.module_type),t=_.isObject(c[o])?c[o]:{};if(!l.has(n.settingControlId)){var i=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(l(n.settingControlId,function(e){e.bind(_.debounce(i,a.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){l.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(s,e){var a=this,i=sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(a.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_text":n[t]={settingControlId:i+"__global_text",module_type:e,controlLabel:sektionsLocalizedData.i18n["Global text options for Nimble sections"],icon:'<i class="material-icons sek-level-option-icon">text_format</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"global_header_footer":n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="material-icons sek-level-option-icon">network_check</i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_imp_exp":n[t]={settingControlId:i+"__global_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import global sections"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:l.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=a.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforSiteTmplOptions:function(s,e){var a=this,i=sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForSiteTmplOptions;if(a.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.siteTmplOptionsMap)||!_.isObject(sektionsLocalizedData.siteTmplOptionsMap))return l.errare("::generateUIforSiteTmplOptions => missing or invalid siteTmplOptionsMap"),e;_.each(sektionsLocalizedData.siteTmplOptionsMap,function(e,t){switch(t){case"site_templates":n[t]={settingControlId:i+"__site_templates",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site templates"],icon:""};break;default:l.errare("::generateUIforSiteTmplOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.siteTmplOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isSiteTemplateOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforSiteTmplOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=a.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_SITE_TMPL,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(f,g){g.extend(CZRSeksPrototype,{updateAPISetting:function(d){var p=this;(d=d||{}).is_global_location="global"===d.scope||p.isGlobalLocation(d);var u=d.is_global_location?p.getGlobalSectionsSettingId():p.localSectionsSettingId(),m=f(u)();p.updAPISetParams={params:d,promise:g.Deferred(),newSetValue:_.isObject(m)?g.extend(!0,{},m):p.getDefaultSektionSettingValue(d.is_global_location?"global":"local"),cloneId:"",sectionInjectPromise:"_not_injection_scenario_"};return f(u,function(e){!function(){switch(p.updAPISetParams.newSetValue.collection=_.isArray(p.updAPISetParams.newSetValue.collection)?p.updAPISetParams.newSetValue.collection:p.getDefaultSektionSettingValue(d.is_global_location?"global":"local").collection,d.action){case"sek-maybe-add-missing-locations":var t,i,e=p.activeLocations();g.extend(!0,[],p.updAPISetParams.newSetValue.collection),_.each(e,function(e){t=_.findWhere(p.updAPISetParams.newSetValue.collection,{id:e}),_.isUndefined(t)&&((i=g.extend(!0,{},sektionsLocalizedData.defaultLocationModel)).id=e,f.infoLog("=> need to add missing location to api setting value",i),p.updAPISetParams.newSetValue.collection.push(i))});break;case"sek-add-section":p._updAPISet_sek_add_sektion();break;case"sek-duplicate-section":p._updAPISet_sek_duplicate_sektion();break;case"sek-remove-section":p._updAPISet_sek_remove_sektion();break;case"sek-move-section":p._updAPISet_sek_move_sektion();break;case"sek-move-section-up-down":p._updAPISet_sek_move_sektion_up_down();break;case"sek-add-column":p._updAPISet_sek_add_column();break;case"sek-remove-column":p._updAPISet_sek_remove_column();break;case"sek-duplicate-column":p._updAPISet_sek_duplicate_column();break;case"sek-resize-columns":p._updAPISet_sek_resize_column();break;case"sek-move-column":p._updAPISet_sek_move_column();break;case"sek-add-module":p._updAPISet_sek_add_module();break;case"sek-duplicate-module":p._updAPISet_sek_duplicate_module();break;case"sek-remove-module":p._updAPISet_sek_remove_module();break;case"sek-move-module":p._updAPISet_sek_move_module();break;case"sek-set-module-value":p._updAPISet_sek_set_module_value();break;case"sek-add-content-in-new-sektion":p._updAPISet_sek_add_content_in_new_sektion();break;case"sek-add-preset-section-in-new-nested-sektion":p._updAPISet_sek_add_preset_sektion_in_new_nested_sektion();break;case"sek-import-from-file":p._updAPISet_sek_import_from_file();break;case"sek-inject-tmpl-from-gallery":p._updAPISet_sek_inject_tmpl_from_gallery();break;case"sek-generate-level-options-ui":var n=p.getLevelModel(d.id,p.updAPISetParams.newSetValue.collection),o={};if("no_match"===n){f.errare("updateAPISetting => "+d.action+" => no parent sektion matched"),p.updAPISetParams.promise.reject("updateAPISetting => "+d.action+" => no parent sektion matched");break}var r=g.extend(!0,{},n.options||{});_.each(d.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(d.options_type)&&f.errare("updateAPISetting => "+d.action+" => missing options_type"),r[d.options_type]=o,n.options=r;break;case"sek-generate-local-skope-options-ui":o={};var s=g.extend(!0,{},_.isObject(p.updAPISetParams.newSetValue.local_options)?p.updAPISetParams.newSetValue.local_options:{});if(_.each(d.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(d.options_type)||!_.isString(d.options_type))f.errare("updateAPISetting => "+d.action+" => missing options_type");else{var a={};a[d.options_type]=o,p.updAPISetParams.newSetValue.local_options=g.extend(s,a)}break;case"sek-update-fonts":var c=p.sniffGFonts({is_global_location:d&&!0===d.is_global_location});!_.isEmpty(d.font_family)&&_.isString(d.font_family)&&-1<d.font_family.indexOf("gfont")&&!_.contains(c,d.font_family)&&c.push(d.font_family),p.updAPISetParams.newSetValue.fonts=c;break;case"sek-restore-revision":p.updAPISetParams.newSetValue=d.revision_value;break;case"sek-reset-collection":try{p.updAPISetParams.newSetValue=f.czr_sektions.resetCollectionSetting(d.scope)}catch(e){f.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==p.updAPISetParams.promise.state()){var l=function(){var e=d.settingParams&&d.settingParams.from&&d.settingParams.to;e&&_.isEqual(d.settingParams.from,d.settingParams.to)?p.updAPISetParams.promise.reject("updateAPISetting => main sektion setting change => the new setting value is unchanged when firing action : "+d.action):!e&&_.isEqual(m,p.updAPISetParams.newSetValue)?p.updAPISetParams.promise.reject("updateAPISetting => the new setting value is unchanged when firing action : "+d.action):null!==p.validateSettingValue(p.updAPISetParams.newSetValue,d.is_global_location?"global":"local")?(f(u)(p.updAPISetParams.newSetValue,d),d.cloneId=p.updAPISetParams.cloneId,p.updAPISetParams.promise.resolve(d)):p.updAPISetParams.promise.reject("Validation problem for action "+d.action)};"_not_injection_scenario_"===p.updAPISetParams.sectionInjectPromise?(l(),"pending"===p.updAPISetParams.promise.state()&&f.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")):p.updAPISetParams.sectionInjectPromise.done(function(){l(),"pending"===p.updAPISetParams.promise.state()&&f.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")}).fail(function(e){f.errare("updateAPISetting => self.updAPISetParams.sectionInjectPromise failed",e)})}}()}),p.updAPISetParams.promise.promise()},resetColumnsWidthInSection:function(e){_.each(e.collection,function(e){e.options&&e.options.width&&e.options.width["custom-width"]&&(e.options.width=_.omit(e.options.width,"custom-width")),e.width=""})},_maybeFetchSectionsFromServer:function(){var e,t=g.Deferred();return _.isEmpty(f.sek_presetSections)?(_.isUndefined(f.sek_fetchingPresetSections)||"pending"!=f.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:f.settings.nonce.save}),f.sek_fetchingPresetSections=e):e=f.sek_fetchingPresetSections,e.done(function(e){f.sek_presetSections=e,t.resolve(f.sek_presetSections)}).fail(function(e){t.reject(e)})):t.resolve(f.sek_presetSections),t.promise()},getPresetSectionCollection:function(n){var o=this,r=g.Deferred();return n.is_user_section?wp.ajax.post("sek_get_user_section_json",{nonce:f.settings.nonce.save,section_post_name:n.presetSectionId}).done(function(e){if(!_.isObject(e)||_.isEmpty(e)||_.isUndefined(e.data))throw f.errare("getPresetSectionCollection => preset section type not found or empty : "+n.presetSectionId,e),new Error("getPresetSectionCollection => preset section type not found or empty");var t=g.extend({},!0,e.data);t.id=sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),t.collection=o.setPresetOrUserSectionIds(t.collection),t.ver_ini=sektionsLocalizedData.nimbleVersion,t.collection=o.setPresetSectionVersion(t.collection),r.resolve(t)}).fail(function(e){r.reject(e)}):o._maybeFetchSectionsFromServer().fail(function(e){r.reject(e)}).done(function(e){var t=g.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[n.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+n.presetSectionId+'" has not been found in the collection');var i=t[n.presetSectionId];i.collection=o.setPresetOrUserSectionIds(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o.setPresetSectionVersion(i.collection),r.resolve(i)}),r.promise()},setPresetOrUserSectionIds:function(e){var t=this;return _.isArray(e)&&_.each(e,function(e){e.id=sektionsLocalizedData.prefixForSettingsNotSaved+t.guid(),_.isArray(e.collection)&&t.setPresetOrUserSectionIds(e.collection)}),e},setPresetSectionVersion:function(e){var t=this;return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&t.setPresetSectionVersion(e.collection)}),e},preparePresetSectionForInjection:function(o){var i=this,n={},r=g.Deferred();i.maybeGenerateNewItemIdsForCrudModules(o);var s=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?s(e):_.isString(e)&&-1!=e.indexOf("__img_url__")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("__img_url__",""))))}),n},a=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?a(e,n):_.isString(e)&&-1!=e.indexOf("__img_url__")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(s(o)).done(function(e){var t=a(o,e);r.resolve(t)}).fail(function(e){r.reject(e)}),r.promise()}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(y,b){b.extend(CZRSeksPrototype,{_updAPISet_sek_add_sektion:function(){var i,e,t,n,o=this;if(i=o.updAPISetParams.params,_.isEmpty(i.id))throw new Error("updateAPISetting => "+i.action+" => missing id");if(_.isEmpty(i.location))throw new Error("updateAPISetting => "+i.action+" => missing location");if(!0===i.is_nested)e=o.getLevelModel(i.in_column,o.updAPISetParams.newSetValue.collection),"no_match"==(t=o.getLevelModel(i.in_sektion,o.updAPISetParams.newSetValue.collection))?o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no grand parent sektion found"):!0===t.is_nested?(o.updAPISetParams.promise.reject(""),y.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]+"</strong>","</span>"].join("")})):"no_match"==e?(y.errare("updateAPISetting => "+i.action+" => no parent column matched"),o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no parent column matched")):(e.collection=_.isArray(e.collection)?e.collection:[],e.collection.push({id:i.id,level:"section",collection:[{id:sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}));else if("no_match"==(n=o.getLevelModel(i.location,o.updAPISetParams.newSetValue.collection)))y.errare("updateAPISetting => "+i.action+" => no location matched"),o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no location matched");else{var r=0;n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){i.before_section===e.id&&(r=t),i.after_section===e.id&&(r=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(r,0,{id:i.id,level:"section",collection:[{id:sektionsLocalizedData.prefixForSettingsNotSaved+o.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}},_updAPISet_sek_duplicate_sektion:function(){var t,e,i,n,o=this;if(t=o.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");if(_.isEmpty(t.location))throw new Error("updateAPISetting => "+t.action+" => missing location");try{n=o.cloneLevel(t.id)}catch(e){return void y.errare("updateAPISetting => "+t.action,e)}o.maybeGenerateNewItemIdsForCrudModules(n);var r=o.getLevelPositionInCollection(t.id,o.updAPISetParams.newSetValue.collection);if(!0===t.is_nested){if("no_match"==(e=o.getLevelModel(t.in_column,o.updAPISetParams.newSetValue.collection)))return y.errare("updateAPISetting => "+t.action+" => no parent column matched"),void o.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no parent column matched");e.collection=_.isArray(e.collection)?e.collection:[],e.collection.splice(parseInt(r+1,10),0,n)}else{if("no_match"==(i=o.getLevelModel(t.location,o.updAPISetParams.newSetValue.collection)))return y.errare("updateAPISetting => "+t.action+" => no location matched"),void o.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no location matched");i.collection=_.isArray(i.collection)?i.collection:[],i.collection.splice(parseInt(r+1,10),0,n)}o.updAPISetParams.cloneId=n.id},_updAPISet_sek_remove_sektion:function(){var t,e,i,n=this;if(!0===(t=n.updAPISetParams.params).is_nested)"no_match"!=(e=n.getLevelModel(t.in_column,n.updAPISetParams.newSetValue.collection))?(e.collection=_.isArray(e.collection)?e.collection:[],e.collection=_.filter(e.collection,function(e){return e.id!=t.id})):y.errare("updateAPISetting => "+t.action+" => no parent column matched");else{if("no_match"==(i=n.getLevelModel(t.location,n.updAPISetParams.newSetValue.collection)))return y.errare("updateAPISetting => "+t.action+" => no location matched"),void n.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no location matched");i.collection=_.filter(i.collection,function(e){return e.id!=t.id})}},_updAPISet_sek_move_sektion:function(){var t,i,n,o=this;t=o.updAPISetParams.params;var e,r,s=o.getLevelModel(t.to_location,o.updAPISetParams.newSetValue.collection);if(_.isEmpty(s)||"no_match"==s)throw new Error("updateAPISetting => "+t.action+" => missing target location");if(t.from_location!=t.to_location){var a=o.getLevelModel(t.from_location,o.updAPISetParams.newSetValue.collection);if(_.isEmpty(a)||"no_match"==a)throw new Error("updateAPISetting => "+t.action+" => missing source location");a.collection=_.isArray(a.collection)?a.collection:[],e=o.getLevelModel(t.id,a.collection),r=b.extend(!0,{},e),a.collection=_.filter(a.collection,function(e){return e.id!=t.id})}s.collection=_.isArray(s.collection)?s.collection:[],i=b.extend(!0,[],s.collection),n=[],_.each(t.newOrder,function(e){if(t.from_location!=t.to_location&&e==r.id)n.push(r);else{if(sektionCandidate=o.getLevelModel(e,i),_.isEmpty(sektionCandidate)||"no_match"==sektionCandidate)throw new Error("updateAPISetting => "+t.action+" => missing section candidate");n.push(sektionCandidate)}}),s.collection=n},_updAPISet_sek_move_sektion_up_down:function(){var t,e,i,n,o=this;if(t=o.updAPISetParams.params,e=o.getLevelModel(t.is_nested?t.in_column:t.location,o.updAPISetParams.newSetValue.collection),_.isEmpty(e)||"no_match"==e)throw new Error("updateAPISetting => "+t.action+" => missing target location");e.collection=_.isArray(e.collection)?e.collection:[],i=b.extend(!0,[],e.collection),n=b.extend(!0,[],e.collection);var r=_.findIndex(i,function(e){return e.id===t.id});if(-1===r)throw new Error("updateAPISetting => "+t.action+" => invalid index");var s,a,c=t.direction||"up",l=i.length===r+1,d=0===r,p=o.activeLocationsInfo(),u=_.isArray(p)?_.findWhere(p,{id:t.location}):{};s=_.isObject(u)&&u.is_global,a=_.isObject(u)&&u.is_header_footer;var m=[];_.isArray(p)&&_.each(o.activeLocationsInfo(),function(e){e.is_global||e.is_header_footer||m.push(e.id)});var f,g=_.findIndex(m,function(e){return e===t.location}),h=!t.is_nested&&!s&&!a,v=0===g,k=m.length===g+1;h&&l&&"up"!==c&&!k?(f=m[g+1],o.getLevelModel(f,o.updAPISetParams.newSetValue.collection).collection.unshift(i[r]),e.collection.pop(),t.new_location=f):h&&d&&"up"===c&&!v?(f=m[g-1],o.getLevelModel(f,o.updAPISetParams.newSetValue.collection).collection.push(i[r]),e.collection.shift(),t.new_location=f):"up"!==c&&i.length===r+1?y.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["The section cannot be moved lower."]+"</strong>","</span>"].join("")}):"up"===c&&0===r?y.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["The section cannot be moved higher."]+"</strong>","</span>"].join("")}):(n[r]=i["up"===c?r-1:r+1],n["up"===c?r-1:r+1]=i[r],e.collection=n)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,t){t.extend(CZRSeksPrototype,{_updAPISet_sek_add_content_in_new_sektion:function(){var r,s,a,c=this;r=c.updAPISetParams.params;var e,i=0;if("no_match"==(a=c.getLevelModel(r.location,c.updAPISetParams.newSetValue.collection)))return l.errare("updateAPISetting => "+r.action+" => no location matched"),void c.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => no location matched");switch(a.collection=_.isArray(a.collection)?a.collection:[],_.each(a.collection,function(e,t){r.before_section===e.id&&(i=t),r.after_section===e.id&&(i=t+1)}),r.content_type){case"module":e=c.getModuleStartingValue(r.content_id),a.collection.splice(i,0,{id:r.id,level:"section",collection:[{id:sektionsLocalizedData.prefixForSettingsNotSaved+c.guid(),level:"column",collection:[{id:r.droppedModuleId,level:"module",module_type:r.content_id,value:"no_starting_value"!==e?e:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":c.updAPISetParams.sectionInjectPromise=t.Deferred();var n=function(e,i){var t=!1;if(!_.isEmpty(r.sektion_to_replace)){var n=c.getLevelModel(r.sektion_to_replace,c.updAPISetParams.newSetValue.collection);"no_match"===n&&(l.errare("updateAPISetting => "+r.action+" => no sektionToReplace matched"),c.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => no sektionToReplace matched")),t=!0===n.is_nested}var o=sektionsLocalizedData.prefixForSettingsNotSaved+c.guid();r.collection_of_preset_section_id=r.collection_of_preset_section_id||[],r.collection_of_preset_section_id.push(o),t?("no_match"===(s=c.getLevelModel(r.in_column,c.updAPISetParams.newSetValue.collection))&&(l.errare("updateAPISetting => "+r.action+" => no parent column matched"),c.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => no parent column matched")),s.collection=_.isArray(s.collection)?s.collection:[],_.each(s.collection,function(e,t){r.before_section===e.id&&(i=t),r.after_section===e.id&&(i=t+1)}),s.collection.splice(i,0,{id:o,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):a.collection.splice(i,0,{id:o,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})};c.getPresetSectionCollection({is_user_section:r.is_user_section,presetSectionId:r.content_id}).fail(function(e){l.errare("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollection()",e),c.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){var t;_.isObject(e)&&!_.isEmpty(e)||(l.errare("updateAPISetting => "+r.action+" => preset section type not found or empty : "+r.content_id,e),c.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => preset section type not found or empty")),t=e,c.preparePresetSectionForInjection(t).fail(function(e){c.updAPISetParams.promise.reject("updateAPISetting => error when preparePresetSectionForInjection => "+r.action+" => "+e),c.updAPISetParams.sectionInjectPromise.reject(e)}).done(function(e){"section"===e.collection[0].level?_.each(e.collection,function(e){n(e,i),i++}):n(e,i),c.updAPISetParams.sectionInjectPromise.resolve()})})}},_updAPISet_sek_add_preset_sektion_in_new_nested_sektion:function(){var n,o,e,r=this;if(n=r.updAPISetParams.params,"no_match"===(o=r.getLevelModel(n.in_column,r.updAPISetParams.newSetValue.collection)))return l.errare("updateAPISetting => "+n.action+" => no parent column matched"),void r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => no parent column matched");var i=0;if(o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){n.before_module_or_nested_section===e.id&&(i=t),n.after_module_or_nested_section===e.id&&(i=t+1)}),"no_match"!=(e=r.getLevelModel(n.in_sektion,r.updAPISetParams.newSetValue.collection))){if(!0===e.is_nested)return r.updAPISetParams.promise.reject(""),void l.previewer.trigger("sek-notify",{type:"info",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]+"</strong>","</span>"].join("")});r.updAPISetParams.sectionInjectPromise=t.Deferred();r.getPresetSectionCollection({is_user_section:n.is_user_section,presetSectionId:n.content_id}).fail(function(){l.errare("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollection()",_er_),r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){var t;_.isObject(e)&&!_.isEmpty(e)||(l.errare("updateAPISetting => "+n.action+" => preset section type not found or empty : "+n.content_id,e),r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => preset section type not found or empty")),t=e,r.preparePresetSectionForInjection(t).fail(function(e){r.updAPISetParams.promise.reject("updateAPISetting => error when preparePresetSectionForInjection => "+n.action+" => "+e),r.updAPISetParams.sectionInjectPromise.reject(e)}).done(function(e){var t=function(e,t){t=t||0;var i=sektionsLocalizedData.prefixForSettingsNotSaved+r.guid();n.collection_of_preset_section_id=n.collection_of_preset_section_id||[],n.collection_of_preset_section_id.push(i),o.collection.splice(t,0,{id:i,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})};"section"===e.collection[0].level?_.each(e.collection,function(e){t(e,i),i++}):t(e,i),r.updAPISetParams.sectionInjectPromise.resolve()})})}else r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => no grand parent sektion found")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{_updAPISet_sek_add_column:function(){var e,t,i=this;if(e=i.updAPISetParams.params,_.isEmpty(e.id))throw new Error("updateAPISetting => "+e.action+" => missing id");if("no_match"==(t=i.getLevelModel(e.in_sektion,i.updAPISetParams.newSetValue.collection)))return l.errare("updateAPISetting => "+e.action+" => no parent sektion matched"),void i.updAPISetParams.promise.reject("updateAPISetting => "+e.action+" => no parent sektion matched");t.collection=_.isArray(t.collection)?t.collection:[],i.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)?i.updAPISetParams.promise.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]):(i.resetColumnsWidthInSection(t),t.collection.push({id:e.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}))},_updAPISet_sek_remove_column:function(){var t,e,i=this;if(t=i.updAPISetParams.params,"no_match"!=(e=i.getLevelModel(t.in_sektion,i.updAPISetParams.newSetValue.collection))){if(1===_.size(e.collection))return void i.updAPISetParams.promise.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);e.collection=_.isArray(e.collection)?e.collection:[],e.collection=_.filter(e.collection,function(e){return e.id!=t.id}),i.resetColumnsWidthInSection(e)}else l.errare("updateAPISetting => "+t.action+" => no parent sektion matched")},_updAPISet_sek_duplicate_column:function(){var t,e,i=this;if(t=i.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");if("no_match"==(e=i.getLevelModel(t.in_sektion,i.updAPISetParams.newSetValue.collection)))return l.errare("updateAPISetting => "+t.action+" => no parent sektion matched"),void i.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no parent sektion matched");if(e.collection=_.isArray(e.collection)?e.collection:[],i.MAX_NUMBER_OF_COLUMNS-1<_.size(e.collection))i.updAPISetParams.promise.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);else{var n;try{n=i.cloneLevel(t.id)}catch(e){return void l.errare("updateAPISetting => "+t.action,e)}i.maybeGenerateNewItemIdsForCrudModules(n);var o=i.getLevelPositionInCollection(t.id,i.updAPISetParams.newSetValue.collection);i.updAPISetParams.cloneId=n.id,e.collection.splice(parseInt(o+1,10),0,n),i.resetColumnsWidthInSection(e)}},_updAPISet_sek_resize_column:function(){var o,n=this;if(!((o=n.updAPISetParams.params).col_number<2)){var t=n.getLevelModel(o.resized_column,n.updAPISetParams.newSetValue.collection),i=n.getLevelModel(o.sister_column,n.updAPISetParams.newSetValue.collection);if("no_match"==t)return l.errare("updateAPISetting => "+o.action+" => no resized column matched"),void n.updAPISetParams.promise.reject("updateAPISetting => "+o.action+" => no resized column matched");var r=function(e,t){var i=d.extend(!0,{},e.options||{});return i.width=_.isObject(i.width)&&i.width["custom-width"]?i.width:{},i.width["custom-width"]=t,e.options=i,n.cachedElements.$body.find('[data-sek-width-range-column-id="'+e.id+'"]').val(t).trigger("input",{is_resize_column_trigger:!0}),t},e=r(t,parseFloat(o.resizedColumnWidthInPercent));e=parseFloat(e);var s=n.getLevelModel(o.in_sektion,n.updAPISetParams.newSetValue.collection),a=_.filter(s.collection,function(e){return e.id!=t.id&&e.id!=i.id}),c=parseFloat(e.toFixed(3));_.isEmpty(a)||_.each(a,function(e){var t,i,n;currentColWidth=(t=e,i="_not_set_",n=_.isObject(t.options)?t.options:{},!_.isEmpty(n)&&n.width&&n.width["custom-width"]&&(i=parseFloat(1*n.width["custom-width"])),i),("_not_set_"===currentColWidth||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(currentColWidth=r(e,parseFloat((100/o.col_number).toFixed(3)))),c=parseFloat((c+currentColWidth).toFixed(3))}),r(i,parseFloat((100-c).toFixed(3)))}},_updAPISet_sek_move_column:function(){var t,i=this;t=i.updAPISetParams.params;var e,n,o=i.getLevelModel(t.to_sektion,i.updAPISetParams.newSetValue.collection);if(_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => "+t.action+" => missing target sektion");if(t.from_sektion!=t.to_sektion){var r=i.getLevelModel(t.from_sektion,i.updAPISetParams.newSetValue.collection);if(_.isEmpty(r)||"no_match"==r)throw new Error("updateAPISetting => "+t.action+" => missing source column");r.collection=_.isArray(r.collection)?r.collection:[],e=i.getLevelModel(t.id,r.collection),n=d.extend(!0,{},e),r.collection=_.filter(r.collection,function(e){return e.id!=t.id}),i.resetColumnsWidthInSection(r)}o.collection=_.isArray(o.collection)?o.collection:[],originalCollection=d.extend(!0,[],o.collection),reorderedCollection=[],_.each(t.newOrder,function(e){if(t.from_sektion!=t.to_sektion&&e==n.id)reorderedCollection.push(n);else{if(columnCandidate=i.getLevelModel(e,originalCollection),_.isEmpty(columnCandidate)||"no_match"==columnCandidate)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");reorderedCollection.push(columnCandidate)}}),o.collection=reorderedCollection,i.resetColumnsWidthInSection(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{_updAPISet_sek_add_module:function(){var i,e,t,n,o=this;if(i=o.updAPISetParams.params,_.isEmpty(i.id))throw new Error("updateAPISetting => "+i.action+" => missing id");if(_.isEmpty(i.module_type))throw new Error("updateAPISetting => "+i.action+" => missing module_type");if("no_match"===(e=o.getLevelModel(i.in_column,o.updAPISetParams.newSetValue.collection)))return c.errare("updateAPISetting => "+i.action+" => no parent column matched"),void o.updAPISetParams.promise.reject("updateAPISetting => "+i.action+" => no parent column matched");n=0,e.collection=_.isArray(e.collection)?e.collection:[],_.each(e.collection,function(e,t){i.before_module_or_nested_section===e.id&&(n=t),i.after_module_or_nested_section===e.id&&(n=t+1)});var r={id:i.id,level:"module",module_type:i.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(t=o.getModuleStartingValue(i.module_type))&&(r.value=t),e.collection.splice(n,0,r)},_updAPISet_sek_duplicate_module:function(){var t,e,i,n=this;if(t=n.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");if("no_match"==(e=n.getLevelModel(t.in_column,n.updAPISetParams.newSetValue.collection)))return c.errare("updateAPISetting => "+t.action+" => no parent column matched"),void n.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => no parent column matched");e.collection=_.isArray(e.collection)?e.collection:[];try{i=n.cloneLevel(t.id)}catch(e){return c.errare("updateAPISetting => "+t.action,e),void n.updAPISetParams.promise.reject("updateAPISetting => "+t.action+" => error when cloning the level")}n.maybeGenerateNewItemIdsForCrudModules(i);var o=n.getLevelPositionInCollection(t.id,n.updAPISetParams.newSetValue.collection);n.updAPISetParams.cloneId=i.id,e.collection.splice(parseInt(o+1,10),0,i)},_updAPISet_sek_remove_module:function(){var t,e;if(t=this.updAPISetParams.params,_.isEmpty(t.id))throw new Error("updateAPISetting => "+t.action+" => missing id");"no_match"!=(e=this.getLevelModel(t.in_column,this.updAPISetParams.newSetValue.collection))?(e.collection=_.isArray(e.collection)?e.collection:[],e.collection=_.filter(e.collection,function(e){return e.id!=t.id})):c.errare("updateAPISetting => "+t.action+" => no parent column matched")},_updAPISet_sek_move_module:function(){var t,e,i,n,o=this;if(t=o.updAPISetParams.params,e=o.getLevelModel(t.to_column,o.updAPISetParams.newSetValue.collection),_.isEmpty(e)||"no_match"==e)throw new Error("updateAPISetting => "+t.action+" => missing target column");if(t.from_column!=t.to_column){var r;if(r=o.getLevelModel(t.from_column,o.updAPISetParams.newSetValue.collection),_.isEmpty(r)||"no_match"==r)throw new Error("updateAPISetting => "+t.action+" => missing source column");r.collection=_.isArray(r.collection)?r.collection:[],i=o.getLevelModel(t.id,o.updAPISetParams.newSetValue.collection),n=l.extend(!0,{},i),r.collection=_.filter(r.collection,function(e){return e.id!=t.id})}e.collection=_.isArray(e.collection)?e.collection:[],originalCollection=l.extend(!0,[],e.collection);var s=[];if(_.each(t.newOrder,function(e){if(t.from_column!=t.to_column&&e==n.id)s.push(n);else{if(moduleCandidate=o.getLevelModel(e,o.updAPISetParams.newSetValue.collection),_.isEmpty(moduleCandidate)||"no_match"==moduleCandidate)throw new Error("updateAPISetting => "+t.action+" => missing moduleCandidate");s.push(moduleCandidate)}}),s.length!=_.uniq(s).length)throw new Error("updateAPISetting => "+t.action+" => there are duplicated modules in column : "+e.id);e.collection=s},_updAPISet_sek_set_module_value:function(){var e,t,i=this;e=i.updAPISetParams.params,t=i.getLevelModel(e.id,i.updAPISetParams.newSetValue.collection);var n=e.settingParams.args.moduleRegistrationParams.control,o=e.settingParams.args.moduleRegistrationParams.id,r=n.czr_Module(o);_.isEmpty(r)?c.errare("updateAPISetting => missing parentModuleInstance",e):isMultiItemModule=r.isMultiItem();var s=isMultiItemModule?[]:{};if(_.each(e.value||(isMultiItemModule?[]:{}),function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(s[t]=e)}),"no_match"==t)return c.errare("updateAPISetting => "+e.action+" => no module matched",e),void i.updAPISetParams.promise.reject("updateAPISetting => "+e.action+" => error no module matched");if(_.isEmpty(e.options_type))return c.errare("updateAPISetting => "+e.action+" => missing options_type"),void i.updAPISetParams.promise.reject("updateAPISetting => "+e.action+" => missing options_type");if("__no_option_group_to_be_updated_by_children_modules__"===e.options_type)t.value=s;else{var a=l.extend(!0,{},_.isEmpty(t.value)?{}:t.value);a[e.options_type]=s,t.value=a}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(m,f){f.extend(CZRSeksPrototype,{_updAPISet_sek_import_from_file:function(){var n,o=this;if(n=o.updAPISetParams.params,_.isUndefined(n.imported_content.data)||_.isUndefined(n.imported_content.metas))m.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);else{var i=_.isArray(n.imported_content.data.collection)?f.extend(!0,[],n.imported_content.data.collection):[];if(!0===n.assign_missing_locations){var t,e=n.imported_content.metas.active_locations,r=m.czr_sektions.activeLocations();_.each(r,function(e){o.isHeaderLocation(e)||o.isFooterLocation(e)||t.push(e)});var s=_.first(t);if(!_.isEmpty(s)&&!_.isEmpty(e)&&_.isArray(e)){var a=f(e).not(t).get(),c=o.getLevelModel(s,o.updAPISetParams.newSetValue.collection),l=o.getLevelModel(s,n.imported_content.data.collection),d=[];c.collection=_.isArray(c.collection)?c.collection:[],l.collection=_.isArray(l.collection)?l.collection:[],_.each(e,function(e){var t=o.getLevelModel(e,i);_.isEmpty(t.collection)||(d=_.union(d,t.collection))}),l.collection=d,n.imported_content.data.collection=_.filter(n.imported_content.data.collection,function(e){return!_.contains(a,e.id)})}}if(!0===n.keep_existing_sections){_.each(i,function(e){var t=o.getLevelModel(e.id,o.updAPISetParams.newSetValue.collection);if(!_.isEmpty(t.collection)){var i=o.getLevelModel(e.id,n.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}});var p=o.updAPISetParams.newSetValue.fonts,u=n.imported_content.data.fonts;p&&!_.isEmpty(p)&&_.isArray(p)&&(u=_.isArray(u)?u:[],n.imported_content.data.fonts=_.uniq(_.union(p,u)))}o.updAPISetParams.newSetValue=n.imported_content.data}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(z,w){w.extend(CZRSeksPrototype,{_updAPISet_sek_inject_tmpl_from_gallery:function(){var t,i=this;if(t=i.updAPISetParams.params,z.infoLog("api update params for sek-inject-tmpl-from-gallery",t),_.isUndefined(t.injected_content.data)||_.isUndefined(t.injected_content.metas))z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => invalid imported content",injected_content);else{var n=function(e){return t.injected_content&&t.injected_content.metas&&e===t.injected_content.metas.tmpl_header_location},o=function(e){return t.injected_content&&t.injected_content.metas&&e===t.injected_content.metas.tmpl_footer_location},r=function(){var t=!1;return _.each(e,function(e){t||(n(e)||o(e))&&(t="no_match"!=(t=i.getLevelModel(e,s)))}),t&&!_.isEmpty(l.local_header_footer)},s=_.isArray(t.injected_content.data.collection)?w.extend(!0,[],t.injected_content.data.collection):[],e=t.injected_content.metas.tmpl_locations,a=[],c=i.updAPISetParams.newSetValue.collection;if(_.each(z.czr_sektions.activeLocations(),function(e){i.isGlobalLocationId(e)||a.push(e)}),_.isArray(e)&&!_.isEmpty(e)){var l=t.injected_content.data.local_options;l=w.extend(!0,{},_.isObject(l)?l:{});var d=t.injected_content.data.fonts;d=_.isArray(d)?w.extend(!0,[],d):[];var p,u,m,f,g=w.extend(!0,[],c),h=[],v="__not_set__";switch(_.each(s,function(e){n(e.id)||o(e.id)||_.isEmpty(e.collection)||(h=_.union(h,e.collection))}),t.tmpl_inject_mode){case"replace":if(f=!0,_.each(e,function(e){f&&(f=_.contains(a,e))}),f){var k,y;g=[],_.each(c,function(e){m=_.findWhere(s,{id:e.id})||{},_.isEmpty(m.collection)?i.isHeaderLocation(e.id)||i.isFooterLocation(e.id)?g.push(e):(k={collection:[],options:[]},y=w.extend(!0,{},e),y=w.extend(y,k),g.push(y)):g.push(m)})}else{if(l&&l.template&&"nimble_template"===l.template.local_template?v="loop_start":_.contains(a,"loop_start")?v="loop_start":_.each(a,function(e){i.isHeaderLocation(e)||i.isFooterLocation(e)||(v=e)}),"__not_set__"===v){z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}if("no_match"===(u=i.getLevelModel(v,g))){z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => target location id "+v);break}(u=w.extend(!0,{},u)).collection=h,g=[],r()&&_.each(e,function(e){if(n(e)||o(e)){if("no_match"===(m=i.getLevelModel(e,s)))return void z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id "+e+" not found in template collection");g.push(m)}}),_.each(a,function(e){v===e&&g.push(u),localLocModel=i.getLevelModel(e,c),"no_match"!==localLocModel?r()||(i.isHeaderLocation(e)||i.isFooterLocation(e))&&g.push(localLocModel):z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id "+e+" not found in current setting collection")})}break;case"before":if(_.each(a,function(e){"__not_set__"==v&&("no_match"!==(p=i.getLevelModel(e,g))?i.isHeaderLocation(e)||i.isFooterLocation(e)||_.isEmpty(p.collection)||(v=e,u=p):z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}(u=w.extend(!0,{},u)).collection=_.union(h,u.collection),g=[],_.each(a,function(e){if(v===e)g.push(u);else{if("no_match"===p)return void z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e);g.push(i.getLevelModel(e,c))}});break;case"after":if(_.each(a.reverse(),function(e){"__not_set__"==v&&("no_match"!==(p=i.getLevelModel(e,g))?i.isHeaderLocation(e)||i.isFooterLocation(e)||_.isEmpty(p.collection)||(v=e,u=p):z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}(u=w.extend(!0,{},u)).collection=_.union(u.collection,h),g=[],_.each(a,function(e){if(v===e)g.push(u);else{if("no_match"===(p=i.getLevelModel(e,c)))return void z.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => loc id not found"+e);g.push(p)}})}if(i.updAPISetParams.newSetValue.collection=g,!_.isEmpty(l)&&"replace"===t.tmpl_inject_mode){var b=i.updAPISetParams.newSetValue.local_options;b=w.extend(!0,{},_.isObject(b)?b:{}),i.updAPISetParams.newSetValue.local_options=_.extend(b,l)}if(_.isArray(d)&&!_.isEmpty(d))if("replace"!=t.tmpl_inject_mode){var I=i.updAPISetParams.newSetValue.fonts;I=w.extend(!0,[],_.isArray(I)?I:[]),i.updAPISetParams.newSetValue.fonts=_.uniq(_.union(d,I))}else i.updAPISetParams.newSetValue.fonts=d}else z.errare("updateAPISetting::sek-inject-tmpl-from-gallery => invalid imported template locations",t)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(n,o){o.extend(CZRSeksPrototype,{cleanRegisteredAndLargeSelectInput:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);n.trigger("sek-before-clean-registered"),e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e),i.cachedElements.$body.find('[data-input-type="font_picker"]').each(function(){var e=o(this).find("select[data-czrtype]").val();_.isUndefined(o(this).find("select[data-czrtype]").data("czrSelect2"))||o(this).find("select[data-czrtype]").czrSelect2("destroy"),o(this).find("select[data-czrtype]").html(""),o(this).find("select[data-czrtype]").html("").append(o("<option>",{value:e,html:e,selected:"selected"})),o(this).find("select[data-czrtype]").data("selectOptionsSet",!1)})},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return!_.isEmpty(e.level)&&"setting"===e.what&&n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"===e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(p,u){u.extend(CZRSeksPrototype,{rootPanelFocus:function(){p.section.has(p.czr_activeSectionId())?p.section(p.czr_activeSectionId()).expanded(!1):p.section.each(function(e){e.expanded(!1)}),p.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()},getGlobalSectionsSettingId:function(){return sektionsLocalizedData.settingIdForGlobalSections},getParentSectionFromColumnId:function(i,n){var s=this,a="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=p(n)(),r=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){var t;"no_match"==a&&("section"==e.level&&(t=_.findWhere(e.collection,{id:i})),_.isEmpty(t)?_.isArray(e.collection)&&c(i,e.collection,n,o):a=e)}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,s=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=p(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?u.extend(!0,{},n):r.getDefaultSektionSettingValue("global");e=_.isArray(o.collection)?o.collection:[]}return _.each(e,function(e){"no_match"==i&&(t===e.id?i=e:_.isArray(e.collection)&&(i=s(t,e.collection)))}),i};return"no_match"!==s(e)},isGlobalLocationId:function(e){var t=this.activeLocationsInfo(),i=_.isArray(t)?_.findWhere(t,{id:e}):{};return _.isObject(i)&&i.is_global},isHeaderLocation:function(e){var t=this.activeLocationsInfo(),i=_.isArray(t)?_.findWhere(t,{id:e}):{};return _.isObject(i)&&i.is_header},isFooterLocation:function(e){var t=this.activeLocationsInfo(),i=_.isArray(t)?_.findWhere(t,{id:e}):{};return _.isObject(i)&&i.is_footer},getLevelModel:function(i,n){var s=this,a="no_match",c=function(t,e,i,n){if(_.isUndefined(e)){var o=p(i)(),r=_.isObject(o)?u.extend(!0,{},o):u.extend(!0,{},s.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==a&&(t===e.id?a=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},getLevelPositionInCollection:function(i,n){var s=this,a="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=p(n)(),r=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==a&&(i===e.id?a=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,e,t,n)}):c(i,n),a},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))p.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];p.errare("getLevelProperty => invalid model for id : "+e.id,t)}else p.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=u.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.prefixForSettingsNotSaved+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.prefixForSettingsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(sektionsLocalizedData.registeredModules[e].is_father)return p.errare("getDefaultItemModelFromRegisteredModuleData => Father modules should be treated specifically"),{};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])},isMultiItemsModule:function(e){return sektionsLocalizedData.registeredModules[e]&&!0===sektionsLocalizedData.registeredModules[e].is_crud},maybeGenerateNewItemIdsForCrudModules:function(t){var i=this;return(_.isArray(t)||_.isObject(t))&&_.each(t,function(e){_.isArray(t)&&_.isObject(e)&&e.id&&!_.has(e,"level")?-1===e.id.indexOf(sektionsLocalizedData.prefixForSettingsNotSaved)&&(e.id=i.guid()):(_.isArray(e)||_.isObject(e))&&i.maybeGenerateNewItemIdsForCrudModules(e)}),t},sniffGFonts:function(e){var o=this,r=[],s=function(i,n,e){if(_.isUndefined(e)){var t=p(i)();e=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===o.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(r,e)&&r.push(e),(_.isArray(e)||_.isObject(e))&&s(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?s(o.getGlobalSectionsSettingId(),"global"):s(o.localSectionsSettingId(),"local"),r},sniffAllFonts:function(){var o=this,r=[],s=function(i,n,e){if(_.isUndefined(e)){var t=p(i)();e=_.isObject(t)?u.extend(!0,{},t):u.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&_.isString(e)&&(-1<e.indexOf("[gfont]")||-1<e.indexOf("[cfont]"))&&r.push(e),(_.isArray(e)||_.isObject(e))&&s(i,n,e)})};return _.each([{id:o.localSectionsSettingId(),scope:"local"},{id:o.getGlobalSectionsSettingId(),scope:"global"},{id:sektionsLocalizedData.optNameForGlobalOptions,scope:"global"}],function(e){s(e.id,e.scope)}),r},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))p.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))p.errare("getInputDefaultValue => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.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}p.errare("getInputDefaultValue => Father modules should be treated specifically")}},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))p.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))p.errare("getInputType => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.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}p.errare("getInputType => Father modules should be treated specifically")}},getInputRegistrationParams:function(i,n,e){var o=this;if(o.cachedInputRegistrationParams=o.cachedInputRegistrationParams||{},o.cachedInputRegistrationParams[n]=o.cachedInputRegistrationParams[n]||{},_.has(o.cachedInputRegistrationParams[n],i))return o.cachedInputRegistrationParams[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))p.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))p.errare("getInputRegistrationParams => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r={};return _.each(e,function(e,t){_.isEmpty(r)&&(i!==t||_.isUndefined(e.input_type)||(r=e),_.isEmpty(r)&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputRegistrationParams(i,n,e)),_.isEmpty(r)||(o.cachedInputRegistrationParams[n][i]=r))}),r}p.errare("getInputRegistrationParams => Father modules should be treated specifically")}},inputIsAFontFamilyModifier:function(i,e){var n=this;if(n.cachedFontFamilyModifier=n.cachedFontFamilyModifier||{},_.has(n.cachedFontFamilyModifier,i))return n.cachedFontFamilyModifier[i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules);var o="not_set";return _.each(e,function(e,t){"not_set"===o&&(i!==t||_.isUndefined(e.input_type)||(o=!_.isUndefined(e.refresh_fonts)&&e.refresh_fonts),"not_set"===o&&(_.isArray(e)||_.isObject(e))&&(o=n.inputIsAFontFamilyModifier(i,e)),"not_set"!==o&&(n.cachedFontFamilyModifier[i]=o))}),o}p.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){var a=this;if(!sektionsLocalizedData.registeredModules)return p.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return p.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t,i,n,c=function(e){return readyStartValues=[],_.each(e,function(e){if(_.isObject(e)){var t=u.extend(!0,{},e);t.id=p.czr_sektions.guid(),readyStartValues.push(t)}else p.errare("getModuleStartingValue => multi-item module => items should be objects for module "+mod_type)}),readyStartValues},l={},d=(t=e,sektionsLocalizedData.registeredModules[t]&&sektionsLocalizedData.registeredModules[t].starting_value?sektionsLocalizedData.registeredModules[t].starting_value:{});return n=e,sektionsLocalizedData.registeredModules[n]&&!0===sektionsLocalizedData.registeredModules[n].is_father?_.each((i=e,sektionsLocalizedData.registeredModules[i]&&sektionsLocalizedData.registeredModules[i].children?sektionsLocalizedData.registeredModules[i].children:{}),function(e,t){var i,n,o,r,s=(i=e,r=(o=d)[n=t]?o[n]:{},a.isMultiItemsModule(i)&&_.isArray(r)?c(r):r);_.isEmpty(s)||(l[t]=s)}):l=a.isMultiItemsModule(e)&&_.isArray(d)?c(d):d,_.isEmpty(l)?"no_starting_value":l},selectNextTabbableOrFocusable:function(e){var t=u(e),i=u(":focus"),n=0;if(1===i.length){var o=t.index(i);o+1<t.length&&(n=o+1)}t.eq(n).focus()},selectPrevTabbableOrFocusable:function(e){var t=u(e),i=u(":focus"),n=t.length-1;if(1===i.length){var o=t.index(i);0<o&&(n=o-1)}t.eq(n).focus()},setupSelectInput:function(e){var n=this,t=(n.input_parent,n.module,p.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type)),i={params:e=_.isEmpty(e)?t.choices:e};if(n.module.trigger("nimble-set-select-input-options",i),e=i.params,!_.isEmpty(e)&&_.isObject(e))switch(n.type){case"simpleselect":_.each(e,function(e,t){var i={value:t,html:e};t==n()?u.extend(i,{selected:"selected"}):"px"===t&&u.extend(i,{selected:"selected"}),u("select[data-czrtype]",n.container).append(u("<option>",i))}),u("select[data-czrtype]",n.container).selecter();break;case"multiselect":var o=n();o=_.isString(o)?[o]:o,o=_.isArray(o)?o:[],_.each(e,function(e,t){var i={value:t,html:e};_.contains(o,t)&&u.extend(i,{selected:"selected"}),u("select[data-czrtype]",n.container).append(u("<option>",i))}),u("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),u("select[data-czrtype]",n.container).on("change",function(){0===u(this).find("option:selected").length&&n([])});break;default:p.errare("::setupSelectInput => invalid input type => "+n.type)}else p.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in module "+n.module.module_type)},maybeSetupDeviceSwitcherForInput:function(){var n=this;if(!n.previewedDevice){var e=['<span class="sek-input-device-switcher">','<i data-sek-device="desktop" class="sek-switcher preview-desktop active" title="'+sektionsLocalizedData.i18n["Settings on desktops"]+'"></i>','<i data-sek-device="tablet" class="sek-switcher preview-tablet" title="'+sektionsLocalizedData.i18n["Settings on tablets"]+'"></i>','<i data-sek-device="mobile" class="sek-switcher preview-mobile" title="'+sektionsLocalizedData.i18n["Settings on mobiles"]+'"></i>',"</span>"].join(" ");n.container.find(".customize-control-title").first().prepend(e),n.previewedDevice=new p.Value(p.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),n.container.find("[data-sek-device]").removeClass("active"),u(this).addClass("active");var t,i="desktop";try{i=u(this).data("sek-device")}catch(e){p.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{p.previewedDevice(i)}catch(e){p.errare("maybeSetupDeviceSwitcherForInput => error when setting the previewed device",e)}n.previewedDevice(i),_.isUndefined(e.isTrigger)&&n.module&&n.module.control&&n.module.control.params.section&&(t=n.module.control.params.section,_.delay(function(){p.previewer.send("sek-animate-to-level",{id:t})},600))},n.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=n.container.find('[data-sek-device="'+p.previewedDevice()+'"]');0<t.length&&t.trigger("click")}},scheduleModuleAccordion:function(e){e=e||{expand_first_control:!0};var i=this;if(!0!==i.container.data("sek-module-accordion-has-been-setup")&&(u(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=u(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){u(this).attr("data-sek-accordion")||u(this).attr("data-sek-expanded","false")}),t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),t.trigger("true"==t.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed"),!0===t.data("module_ready_on_custom_control_event_is_setup")?t.trigger("sek-accordion-expanded"):t.one("module_ready_on_custom_control_event_is_setup",function(){t.trigger("sek-accordion-expanded")}))}),i.container.data("sek-module-accordion-has-been-setup",!0),e.expand_first_control)){var t=_.filter(i.controls(),function(e){return!e.params||!e.params.sek_registration_params||!1!==e.params.sek_registration_params.has_accordion}),n=_.first(t);_.isObject(n)&&!_.isEmpty(n.id)&&p.control(n.id,function(e){e.container.one("items-collection-populated",function(){u(this).find("label > .customize-control-title").trigger("click")}),!0===e.container.data("module_ready_on_custom_control_event_is_setup")?e.container.trigger("sek-accordion-expanded"):e.container.one("module_ready_on_custom_control_event_is_setup",function(){e.container.trigger("sek-accordion-expanded")})})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(u.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=u.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(u.Deferred(function(t){(i.isPromise(e)?e:u.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),u.when.apply(this,n).done(function(){var i={},e=Array.prototype.slice.call(arguments);_.each(e,function(e,t){i[o[t]]=e}),t.resolve(i)}).fail(t.reject),t},whenAllPromisesInSerie:function(t,i,n,o){i=i||0,n=n||{},o=o||u.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:u.Deferred(function(e){e.resolve()})).always(function(e){n[i]=e,i+1==t.length?o.resolve(n):i+1<t.length&&r.whenAllPromisesInSerie(t,i+1,n,o)})}return o},importAttachment:function(t){return wp.ajax.post("sek_import_attachment",{img_url:t,nonce:p.settings.nonce.save}).fail(function(e){p.errare("sek_import_attachment ajax action failed for image "+t,e)})},cleanIds:function(e){e.id="";var t=this;return _.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&t.cleanIds(e)}),e},getDefaultSektionSettingValue:function(e){return!_.isUndefined(e)&&_.contains(["local","global"],e)||p.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);if(!n.czr_Input.has(t))throw new Error("::scheduleVisibilityOfInputId => missing input id : "+t);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})},hasCurrentPageNBSectionsNotHeaderFooter:function(){var e,t=this,i=!1,n=this.localSectionsSettingId(),o=p(n)();this.activeLocationsInfo();return o=_.isObject(o)?o:{},e=u.extend(!0,{},o),e=_.isEmpty(e.collection)?[]:e.collection,e=_.isArray(e)?e:[],_.each(e,function(e){i||_.isObject(e)&&"location"==e.level&&e.collection&&(t.isHeaderLocation(e.id)||t.isFooterLocation(e.id)||(i=!_.isEmpty(e.collection)))}),i},isJsonString:function(e){try{JSON.parse(e)}catch(e){return!1}return!0}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.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(){c.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),c.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){c.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_intro_sec_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var n=this,o=function(){c.notifications.add(new c.Notification("missing-injection-target",{type:"info",message:sektionsLocalizedData.i18n["You first need to click on a target ( with a + icon ) in the preview."],dismissible:!0})),_.delay(function(){c.notifications.remove("missing-injection-target")},3e4)};e.find('[draggable="true"]').each(function(){m(this).on("dragstart",function(e){(function(e){n.lastClickedTargetInPreview({}),e.originalEvent.dataTransfer.setData("sek-content-type",m(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-eligible-for-module-dropzones",m(this).data("sek-eligible-for-module-dropzones")),e.originalEvent.dataTransfer.setData("sek-content-id",m(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",m(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",m(this).data("sek-is-user-section")),n.dndData={content_type:e.originalEvent.dataTransfer.getData("sek-content-type"),eligible_for_module_dropzones:"true"===e.originalEvent.dataTransfer.getData("sek-eligible-for-module-dropzones"),content_id:e.originalEvent.dataTransfer.getData("sek-content-id"),section_type:e.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===e.originalEvent.dataTransfer.getData("sek-is-user-section")};try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.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(){c.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),n.cachedElements.$body.addClass("sek-dragging"),c.previewer.send("sek-drag-start",{content_type:n.dndData.content_type,eligible_for_module_dropzones:n.dndData.eligible_for_module_dropzones})}).call(m(this),e)}).on("dragend",function(e){(function(e){n.cachedElements.$body.removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),c.previewer.send("sek-drag-stop")}).call(m(this),e)}).on("dblclick",function(e){(function(e){var t,i=n.lastClickedTargetInPreview();!_.isEmpty(i)&&i.id?t=n.dnd_getDropZonesElements().find('[data-sek-id="'+i.id+'"]').find(".sek-module-drop-zone-for-first-module").first():o(),t&&0<t.length?(c.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module_or_nested_section:t.data("drop-zone-before-module-or-nested-section"),after_module_or_nested_section:t.data("drop-zone-after-module-or-nested-section"),before_section:t.data("drop-zone-before-section"),after_section:t.data("drop-zone-after-section"),content_type:m(this).attr("data-sek-content-type"),content_id:m(this).attr("data-sek-content-id"),section_type:m(this).attr("data-sek-section-type"),is_user_section:"true"===m(this).attr("data-sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),c.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(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({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":this.$cachedDropZoneCandidates=null,t.dnd_canDrop({targetEl:m(this),evt:e})&&(e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),c.previewer.send("sek-drag-stop"))}}).data("zone-droppable-setup",!0))})},dnd_isInTarget:function(e,t){var i=t.clientY,n=t.clientX,o=e[0].getBoundingClientRect(),r=n<=o.right&&o.left<=n;return i>=o.top&&o.bottom>=i&&r},dnd_toggleDragApproachClassesToDropZones:function(p){var u=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.distanceTable=[],this.$dropZones.find(".sek-drop-zone").each(function(){var e,t,i=p.clientY,n=p.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),s=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),a=(o.right,o.left,r<50),c=s<50,l=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;u.distanceTable.push({el:m(this),dist:d&&l?0:(e=s,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(a||d)&&(c||l)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(u.distanceTable,"dist"));u.$dropTargetCandidate=null,_.each(u.distanceTable,function(e){_.isNull(u.$dropTargetCandidate)&&t===e.dist&&(u.$dropTargetCandidate=e.el)}),u.$dropTargetCandidate&&0<u.$dropTargetCandidate.length&&u.dnd_isInTarget(u.$dropTargetCandidate,p)&&u.$dropTargetCandidate.addClass("sek-drag-is-in"),u.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=m(e.currentTarget);switch(this.dndData.content_type){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:c.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(c.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;if(i.closest('[data-sek-level="location"]').length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),s=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),a="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,c=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return!!i.hasClass("sek-drop-zone")&&(!t.dndData.is_user_section&&(r||s)&&a?(c(r?sektionsLocalizedData.i18n["Header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["Footer location only accepts modules and pre-built footer sections"]),!1):s&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):"preset_section"===t.dndData.content_type&&!0===t.dndData.eligible_for_module_dropzones&&!n||("preset_section"===t.dndData.content_type&&n||"module"===t.dndData.content_type&&!n||"preset_section"===t.dndData.content_type&&o))},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){c.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"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(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"),e.removeClass("sek-feed-me-seymore"),e.find(".sek-no-drop-possible-message").remove())},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");m.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),e.addClass("sek-feed-me-seymore"),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,s=i.right,a=i.top,c=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=c-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();c.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module_or_nested_section:e.data("drop-zone-before-module-or-nested-section"),after_module_or_nested_section: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"),eligible_for_module_dropzones:"true"===t.originalEvent.dataTransfer.getData("sek-eligible-for-module-dropzones"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),section_type:t.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===t.originalEvent.dataTransfer.getData("sek-is-user-section")})},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,i=e.drop_target_element,n="content-in-column";switch(i.data("sek-location")){case"between-sections":n="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,n="content-in-empty-location";break;case"between-columns":n="content-in-new-column"}"preset_section"===e.content_type&&(i.hasClass("sek-module-drop-zone-for-first-module")?1<(t=i.closest('div[data-sek-level="section"]')).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(n="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=i.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=t.data("sek-id")):(e.sektion_to_replace=t.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),n="content-in-a-section-to-replace"):("between-sections"===i.data("sek-location")&&(n="content-in-a-section-to-create"),"between-modules-and-nested-sections"===i.data("sek-location")&&e.eligible_for_module_dropzones&&(n="preset-section-eligible-for-module-dropzones-in-new-nested-sektion",e.is_nested=!0,e.in_column=i.closest('[data-sek-level="column"]').data("sek-id"),t=i.closest('div[data-sek-level="section"]'),e.in_sektion=t.data("sek-id"))));switch(n){case"content-in-column":var o=i.closest("div[data-sek-level]");if(o.length<1)throw new Error("No valid level dom element found");var r=o.data("sek-level"),s=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(s))throw new Error("No valid level id found");c.previewer.trigger("sek-add-module",{level:r,id:s,in_column:i.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:i.closest('div[data-sek-level="section"]').data("sek-id"),before_module_or_nested_section:e.before_module_or_nested_section,after_module_or_nested_section:e.after_module_or_nested_section,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":case"content-in-empty-location":c.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":c.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"preset-section-eligible-for-module-dropzones-in-new-nested-sektion":var a=m.extend(!0,{},e);a=m.extend(a,{before_module_or_nested_section:e.before_module_or_nested_section,after_module_or_nested_section:e.after_module_or_nested_section}),c.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",a);break;default:c.errare("sek control panel => ::reactToDrop => invalid drop case : "+n)}}(e)}catch(e){c.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){try{!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}()}catch(e){window.console&&console.log("Error in mayBeAwakeTinyMceEditor ",e)}e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),n.cachedElements.$window[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){n.cachedElements.$window.trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.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-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),s=d("#wp-czr-customize-content_editor-tools"),a=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=s.outerHeight()+a.outerHeight()+c.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),r.css("height",o.height-o.components))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,a){a.extend(CZRSeksPrototype,{export_template:function(e){e=e||{},e=a.extend({scope:"local"},e);var i=[],t={sek_export_nonce:d.settings.nonce.save,skope_id:"local"===e.scope?d.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:d.czr_sektions.activeLocations()};_.each(t,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:d.settings.nonce.save,sek_export_nonce:d.settings.nonce.save,skope_id:"local"===e.scope?d.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:d.czr_sektions.activeLocations()}).done(function(){a(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),a(window).on("beforeunload")}).fail(function(e){d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Export failed"],encodeURIComponent(e)].join(" "),"</strong>","</span>"].join("")})})},import_template_from_file:function(i){i=i||{};var e,t,n=(i=a.extend({is_file_import:!0,pre_import_check:!1,assign_missing_locations:!1,input:"",file_input:""},i)).input;if(_.isEmpty(n))throw new Error("::import_template => missing file_input param");if(_.isEmpty(i.file_input))throw new Error("::import_template => missing file_input param");if(i.file_input.length<1||_.isUndefined(i.file_input[0])||!i.file_input[0].files||_.isEmpty(i.file_input.val()))d.previewer.trigger("sek-notify",{notif_id:"missing-import-file",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Missing file"],"</strong>","</span>"].join("")});else{t=d.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type).scope,n.container.find(".sek-uploading").show(),d.notifications.remove("missing-import-file"),d.notifications.remove("import-success"),d.notifications.remove("import-failed"),d.notifications.remove("img-import-errors");var o=new FormData;if(o.append("file_candidate",i.file_input[0].files[0]),o.append("action","sek_get_manually_imported_file_content"),o.append("nonce",d.settings.nonce.save),_.contains(["local","global"],t)){if(o.append("skope",t),i.pre_import_check&&o.append("pre_import_check",i.pre_import_check),o.append("import_img",n.input_parent.czr_Input("import_img")()),n.container.find(".sek-uploading").show(),e=a.ajax({url:wp.ajax.settings.url,data:o,processData:!1,contentType:!1,type:"POST"}),i.pre_import_check)return a.Deferred(function(){var t=this;e.done(function(e){e.success||t.reject(e),d.czr_sektions.isImportedContentEligibleForAPI(e,i)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)})});d.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),_.delay(function(){"pending"===e.state()&&d.previewer.trigger("sek-notify",{notif_id:"import-too-long",type:"error",duration:2e4,message:["<span>","<strong>",sektionsLocalizedData.i18n['Import exceeds server response time, try to uncheck "import images" option.'],"</strong>","</span>"].join("")})},3e4),e.done(function(e){d.czr_sektions.isImportedContentEligibleForAPI(e,i)?(e.data.data.collection=d.czr_sektions.setIdsForImportedTmpl(e.data.data.collection),d.czr_sektions.doUpdateApiSettingAfter_FileImport(e,i)):d.infoLog("::import_template problem => !api.czr_sektions.isImportedContentEligibleForAPI",e,i)}).fail(function(e){d.errare("::import_template => ajax error",e),d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Import failed, file problem"],"</strong>","</span>"].join("")})}).always(function(){d.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate(i)})}else d.errare("::import_template => invalid scope provided",t)}},pre_checks_from_file_import:function(e,t){if(t=t||{},(t=a.extend({is_file_import:!0,pre_import_check:!1,assign_missing_locations:!1,input:"",file_input:""},t)).is_file_import&&_.isEmpty(t.input))throw new Error("::pre_checks_from_file_import => missing file_input param");var i=d.czr_sektions.activeLocations(),n=a.extend(!0,[],_.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]),o=t.input,r=d.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type);if(n=_.filter(n,function(e){return!_.contains(["nimble_local_header","nimble_local_footer"],e)}),_.isArray(n)&&_.isArray(i)){var s=a(n).not(i).get();_.isEmpty(s)?d.czr_sektions.import_template_from_file(t):(t.is_file_import&&(o.container.find('button[data-czr-action="sek-pre-import"]').hide(),"local"===r.scope?o.container.find(".czr-import-dialog.czr-local-import").slideToggle():o.container.find(".czr-import-dialog.czr-global-import").slideToggle()),d.infoLog("sek-pre-import => imported locations missing in current page.",s))}else d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Import failed"],"</strong>","</span>"].join("")}),t.is_file_import&&d.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate(t)},setIdsForImportedTmpl:function(i){var n=this;return(_.isObject(i)||_.isArray(i))&&_.each(i,function(e,t){(_.isObject(e)||_.isArray(e))&&(i[t]=n.setIdsForImportedTmpl(e)),"id"!==t||!_.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.prefixForSettingsNotSaved+d.czr_sektions.guid())}),i},isImportedContentEligibleForAPI:function(e,t){var i=!0,n=e.data,o=null;e.success||(o=[sektionsLocalizedData.i18n["Import failed"],n].join(" : ")),_.isNull(o)&&!_.isObject(n)&&(o=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var r=n.data,s=n.metas,a=n.img_errors;_.isNull(o)&&!_.isObject(r)&&(o=sektionsLocalizedData.i18n["Import failed, invalid file content"]),_.isNull(o)&&!_.isObject(s)&&(o=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var c=d.czr_sektions.localSectionsSettingId();if(t.is_file_import){var l=t.input;c="local"===d.czr_sektions.getInputRegistrationParams(l.id,l.module.module_type).scope?c:d.czr_sektions.getGlobalSectionsSettingId()}return _.isNull(o)&&_.isEqual(d(c)(),r)&&(d.infoLog("::isImportedContentEligibleForAPI => Setting unchanged"),i=!1),_.isNull(o)||(d.errare("::isImportedContentEligibleForAPI => invalid data sent from server",n),d.errare("::isImportedContentEligibleForAPI => importErrorMsg",o),d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",o,"</strong>","</span>"].join("")}),i=!1),_.isEmpty(a)||d.previewer.trigger("sek-notify",{notif_id:"img-import-errors",type:"info",duration:6e4,message:['<span style="color:#0075a2">',["<strong>"+sektionsLocalizedData.i18n["Some image(s) could not be imported"]+"</strong><br/>",'<span style="font-size:11px">'+a+"</span>"].join(" : "),"</span>"].join("")}),i},doUpdateApiSettingAfter_FileImport:function(e,t){if(t=t||{},d.czr_sektions.isImportedContentEligibleForAPI(e,t)||!t.is_file_import){var i="local",n=!1;if(t.is_file_import){var o=t.input,r=d.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type);i=r.scope,n="local"===r.scope&&o.input_parent.czr_Input("keep_existing_sections")()}d.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:i,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:n}).done(function(){"local"===i&&d.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),d.previewer.refresh(),d.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["File successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){d.errare("::doUpdateApiSettingAfter_FileImport => error when firing ::updateAPISetting",e),d.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),d.previewer.refresh()}else d.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate(t)},doAlwaysAfterFileImportAndApiSettingUpdate:function(e){if(d.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),e=e||{},(e=a.extend({is_file_import:!0,pre_import_check:!1,assign_missing_locations:!1,input:"",file_input:""},e)).is_file_import){var t=e.input;t.container.find(".sek-uploading").hide(),e.file_input.val("").trigger("change"),t.container.find(".czr-import-dialog").hide(),t.container.find('button[data-czr-action="sek-pre-import"]').show()}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(o,d){d.extend(CZRSeksPrototype,{setupTemplateGallery:function(){var i=this;i.templateGalleryExpanded=new o.Value(!1),i.tmplInjectDialogVisible=new o.Value(!1),sektionsLocalizedData.isTemplateGalleryEnabled&&(i.tmplSearchFieldVisible=new o.Value(!1),i.tmplSearchFieldVisible.bind(function(e){var t=i.cachedElements.$body.find(".sek-tmpl-filter-wrapper");e?t.fadeIn("fast"):t.fadeOut("fast")}),i.templateGalleryExpanded.bind(function(e){i.cachedElements.$body.toggleClass("sek-template-gallery-expanded",e),e?(i.tmplDialogVisible(!1),i.levelTreeExpanded(!1),i.tmplInjectDialogVisible(!1),d("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTempGallery({tmpl_source:"api_tmpl"})):(d("#customize-preview iframe").css("z-index",""),o.trigger("nb-template-gallery-closed"))}),i.tmplInjectDialogVisible.bind(function(e){i.cachedElements.$body.toggleClass("sek-tmpl-dialog-expanded",e),e&&(i.tmplDialogVisible(!1),i.levelTreeExpanded(!1),d("#customize-preview iframe").css("z-index",1))}),o.previewer.bind("ready",function(){i.templateGalleryExpanded(!1)}))},renderTmplGalleryUI:function(){if(0<d("#nimble-tmpl-gallery").length)return d("#nimble-tmpl-gallery");try{_tmpl=wp.template("nimble-top-tmpl-gallery")({})}catch(e){return o.errare("Error when parsing nimble-top-tmpl-gallery template",e),!1}return d("#customize-preview").after(d(_tmpl)),d("#nimble-tmpl-gallery")},renderOrRefreshTempGallery:function(t){t=d.extend({tmpl_source:"api_tmpl"},t||{});var i,n=this;d("#nimble-tmpl-gallery").length<1&&d.when(n.renderTmplGalleryUI({})).done(function(){n.setupTmplGalleryDOMEvents()}),d("#nimble-tmpl-gallery").find(".sek-tmpl-gallery-inner").html("");var o=function(e){return n.getTemplateGalleryHtml(e).done(function(e){(i=d("#nimble-tmpl-gallery")).find(".sek-tmpl-gallery-inner").html(e)})};o(t).done(function(e){_.isEmpty(e)&&"api_tmpl"===t.tmpl_source?("function"==typeof window.console.log&&console.log("Nimble Builder API problem => could not fetch templates"),o({tmpl_source:"user_tmpl"})):((i=d("#nimble-tmpl-gallery")).find("#sek-tmpl-source-switcher").show(),i.find("#sek-tmpl-source-switcher button").attr("aria-pressed","false").removeClass("is-selected"),i.find('[data-sek-tmpl-source="'+t.tmpl_source+'"]').attr("aria-pressed","true").addClass("is-selected"))})},getTemplateGalleryHtml:function(n){var o,r,t=this,s="",a=[sektionsLocalizedData.baseUrl,"/assets/admin/img/wire_frame.png","?ver=",sektionsLocalizedData.nimbleVersion].join(""),c=d.Deferred(),l=d("#nimble-tmpl-gallery").find(".czr-css-loader");l.show();return("user_tmpl"===n.tmpl_source?t.setSavedTmplCollection:t.getApiTmplCollection).call(t).done(function(e){setTimeout(function(){!function(e){if(_.isEmpty(e)&&"user_tmpl"===n.tmpl_source){var t=[sektionsLocalizedData.baseUrl,"/assets/admin/img/empty_tmpl_collection_notice.jpg","?ver=",sektionsLocalizedData.nimbleVersion].join(""),i="https://docs.presscustomizr.com/article/426-how-to-save-and-reuse-templates-with-nimble-builder";s+='<div class="sek-tmpl-empty-collection">',s+="<p>"+sektionsLocalizedData.i18n["You did not save any template yet."]+"</p>",s+='<img src="'+t+'" />',s+='<br/><a href="'+i+'" target="_blank" rel="noreferrer nofollow">'+i+"</a>",s+="</div>"}else _.each(e,function(e,t){o=_.isEmpty(e.description)?[e.title,e.last_modified_date].join(" | "):[e.title,e.last_modified_date,e.description].join(" | "),r=_.isEmpty(e.thumb_url)?a:e.thumb_url,s+='<div class="sek-tmpl-item" data-sek-tmpl-item-id="'+t+'" data-sek-tmpl-item-source="'+n.tmpl_source+'">',s+='<div class="sek-tmpl-thumb" style="background-image:url('+r+')"></div>',s+='<div class="sek-tmpl-info" title="'+o+'">',s+='<h3 class="tmpl-title">'+e.title+"</h3>",s+='<p class="tmpl-date"><i>'+[sektionsLocalizedData.i18n["Last modified"]," : ",e.last_modified_date].join(" ")+"</i></p>",s+='<p class="tmpl-desc">'+e.description+"</p>",s+='<i class="material-icons use-tmpl" title="'+sektionsLocalizedData.i18n["Use this template"]+'">add_circle_outline</i>',"user_tmpl"===n.tmpl_source&&(s+='<i class="material-icons edit-tmpl" title="'+sektionsLocalizedData.i18n["Edit this template"]+'">edit</i>',s+='<i class="material-icons remove-tmpl" title="'+sektionsLocalizedData.i18n["Remove this template"]+'">delete_forever</i>'),"true"==e.is_pro_tmpl&&(s+='<div class="sek-is-pro"><img src="'+sektionsLocalizedData.czrAssetsPath+'sek/img/pro_orange.svg" alt="Pro feature"/></div>'),s+="</div>",s+="</div>"});0<l.length?l.hide({duration:100,complete:function(){c.resolve(s)}}):c.resolve(s)}(e),t.tmplSearchFieldVisible(!_.isEmpty(e))},0)}).fail(function(){console.log("tmpl collection promise failed",n),c.resolve("")}),c.promise()},setupTmplGalleryDOMEvents:function(){var l=d("#nimble-tmpl-gallery"),n=this;l.on("click",".sek-tmpl-item .use-tmpl",function(e){e.preventDefault(),e.stopPropagation();var t=d(this).closest(".sek-tmpl-item").data("sek-tmpl-item-id"),i=d(this).closest(".sek-tmpl-item").data("sek-tmpl-item-source");_.isEmpty(t)?o.errare("::setupTmplGalleryDOMEvents => error => invalid template id"):n.hasCurrentPageNBSectionsNotHeaderFooter()?(n._tmplNameWhileImportDialog=t,n._tmplSourceWhileImportDialog=i,n.tmplInjectDialogVisible(!0)):(o.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:t,tmpl_source:i}),n.templateGalleryExpanded(!1))}).on("click",".sek-tmpl-gal-inject-dialog .sek-ui-button",function(e){e.preventDefault(),e.stopPropagation();var t=d(this).data("sek-tmpl-inject-mode");"cancel"!==t?_.contains(["replace","before","after"],t)?(o.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:n._tmplNameWhileImportDialog,tmpl_source:n._tmplSourceWhileImportDialog,tmpl_inject_mode:t}),n.templateGalleryExpanded(!1)):o.errare("::setupTmplGalleryDOMEvents => error => invalid import mode"):n.tmplInjectDialogVisible(!1)}).on("propertychange change click keyup input paste",".sek-filter-tmpl",_.debounce(function(e){e.preventDefault();var t,i,n,o,r,s,a=d(this).val(),c=function(){l.removeClass("search-active"),l.find(".sek-tmpl-item").each(function(){d(this).removeClass("search-match")})};_.isString(a)?(a=a.trim().toLowerCase(),_.isEmpty(a.replace(/\s/g,""))?c():(l.addClass("search-active"),l.find(".sek-tmpl-item").each(function(){t=(d(this).find(".tmpl-title").html()+"").toLowerCase(),i=(d(this).find(".tmpl-desc").html()+"").toLowerCase(),n=(d(this).find(".tmpl-date").html()+"").toLowerCase(),o=-1!=t.indexOf(a),r=-1!=i.indexOf(a),s=-1!=n.indexOf(a),d(this).toggleClass("search-match",o||r||s)}))):c()},100)).on("click",".sek-tmpl-info .edit-tmpl",function(e){e.preventDefault();var t=function(e){n.tmplDialogMode("edit"),n.tmplDialogMode.unbind(t)};n.tmplToEdit=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),n.tmplDialogMode.bind(t),n.tmplDialogVisible(!0)}).on("click",".sek-tmpl-info .remove-tmpl",function(e){e.preventDefault();var t=function(e){n.tmplDialogMode("remove"),n.tmplDialogMode.unbind(t)};n.tmplToRemove=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),n.tmplDialogMode.bind(t),n.tmplDialogVisible(!0)}).on("click",".sek-close-dialog",function(e){e.preventDefault(),n.templateGalleryExpanded(!1)}).on("click","#sek-tmpl-source-switcher button",function(e){e.preventDefault(),d("#sek-tmpl-source-switcher button").removeClass("is-selected").attr("aria-pressed","false"),d(this).addClass("is-selected").attr("aria-pressed","true"),n.renderOrRefreshTempGallery({tmpl_source:d(this).data("sek-tmpl-source")})})}})}(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(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{content_type_switcher:function(e){var i,n=this,o=r.czr_sektions;if(!r.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=r.section(n.module.control.section());var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),a.each(i.controls(),function(e){a.isUndefined(e.content_type)||e.active(t===e.content_type)})};r.czr_sektions.currentContentPickerType=r.czr_sektions.currentContentPickerType||new r.Value,r.bind("nimble-modules-and-sections-controls-registered",function(){t(r.czr_sektions.currentContentPickerType())}),r.czr_sektions.currentContentPickerType.bind(function(e){t(e)}),r.czr_sektions.currentContentPickerType(n()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault();var t=s(this).data("sek-content-type");if(n.container.find("[data-sek-content-type]").attr("aria-pressed",!1),o.levelTreeExpanded(!1),o.tmplDialogVisible&&o.tmplDialogVisible(!1),o.saveSectionDialogVisible&&o.saveSectionDialogVisible(!1),"template"===t){var i=r.czr_sektions.templateGalleryExpanded();s(this).attr("aria-pressed",!i),r.czr_sektions.templateGalleryExpanded(!i)}else r.czr_sektions.templateGalleryExpanded(!1),s(this).attr("aria-pressed",!0),r.czr_sektions.currentContentPickerType(t)}),r.bind("nb-template-gallery-closed",function(){n.container.find('[data-sek-content-type="template"]').attr("aria-pressed",!1)}),t(r.czr_sektions.currentContentPickerType())}})}(wp.customize,jQuery,_),function(t,e,i){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})},section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(s,a,c){s.czrInputMap=s.czrInputMap||{},a.extend(s.czrInputMap,{module_option_switcher:function(e){var t=this;if(!s.section.has(t.module.control.section()))throw new Error(t.input_type+" => section not registered");s.section(t.module.control.section());var i,n="",o=t.module.control.params.sek_registration_params;if(c.isUndefined(o))throw new Error(t.input_type+" => missing registration params");if(o&&o.module_id&&(n=o.module_id,i=o.ui_action),c.isEmpty(n))throw new Error(t.input_type+" => missing module id");t.container.on("click","[data-sek-option-type]",function(e){e.preventDefault(),t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0),s.previewer.trigger("settings"===a(this).data("sek-option-type")?"sek-edit-options":"sek-edit-module",{id:n,level:"module"})});var r="sek-generate-level-options-ui"===i?"settings":"content";t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),t.container.find('[data-sek-option-type="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(l,d,p){l.czrInputMap=l.czrInputMap||{};var u=function(e){return p.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(l.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=p.isEmpty(t)||p.isEmpty(t.default)?[]:t.default;if(i.on("input",'input[type="number"]',function(e){var t=d(this).closest("[data-sek-spacing]").data("sek-spacing"),i=d.extend(!0,{},p.isObject(o())?o():{}),n=d(this).val();p.isString(n)&&!p.isEmpty(n)||p.isNumber(n)?i[t]=n:i=p.omit(i,t),o(i)}),m.call(o,i,n),p.isObject(o())){p.each(o(),function(e,t){d('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)});var r="px";d(".sek-unit-wrapper .sek-ui-button",o.container).each(function(){var e=d(this).data("sek-unit");p.isEmpty(o())||p.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+u.call(o,r)+'"]').trigger("click")}var s=o();o.initial_unit="px",p.isEmpty(s)||(o.initial_unit=p.isEmpty(s.unit)?"px":s.unit),o.css_unit=new l.Value(u.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=p.isEmpty(e)?"px":e,(t=d.extend(!0,{},p.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(l.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,s=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=p.isEmpty(t)||p.isEmpty(t.default)?{}:t.default,c=function(e,t){var i=["mobile","tablet","desktop"];if(p.has(e,t))return e[t];var n=p.findIndex(i,function(e){return t===e});return!p.isEmpty(t)&&n<i.length?c(e,i[n+1]):{}},i=function(e){var t=d.extend(!0,{},p.isObject(r())?r():{}),i=d.extend(!0,{},a);t=p.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",s).each(function(){var e=d(this).data("sek-spacing"),t="";p.isEmpty(n)||p.isEmpty(n[e])||(t=n[e]),d(this).find('input[type="number"]').val(t)});var o="px";d(".sek-unit-wrapper .sek-ui-button",r.container).each(function(){var e=d(this).data("sek-unit");p.isEmpty(n)||p.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+u.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",p.isEmpty(n)||p.isEmpty(n[r.previewedDevice()])||(r.initial_unit=p.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new l.Value(u.call(r,r.initial_unit)),s.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=l.previewedDevice()||"desktop";(t=d.extend(!0,{},p.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),p.isString(n)&&!p.isEmpty(n)||p.isNumber(n)?t[o][i]=n:t[o]=p.omit(t[o],i),t[o].unit&&r.css_unit()==t[o].unit||(t[o].unit=r.css_unit()),r(t)}),m.call(r,s,a),r.previewedDevice.bind(function(e){try{i(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!p.isObject(i)||!0!==i.previewed_device_switched){e=p.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},p.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,s);try{i(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,a,c){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(this).val())}),c.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=c.isEmpty(t)||c.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(c.has(e,t))return e[t];var n=c.findIndex(i,function(e){return t===e});return!c.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},c.isObject(o())?o():{}),i=a.extend(!0,{},r);t=c.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.extend(!0,{},c.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{};var e=function(e){var o=this,t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",s=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},n=function(e){var t=l.extend(!0,{},d.isObject(o())?o():{}),i=l.extend(!0,{},r);t=d.isObject(t)?l.extend(i,t):i;var n=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=l.extend(!0,{},d.isObject(o())?o():{}))[c.previewedDevice()||"desktop"]=l(this).data("sek-align"),s.find(".selected").removeClass("selected"),l.when(l(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};l.extend(c.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(f,g,h){f.czrInputMap=f.czrInputMap||{},g.extend(f.czrInputMap,{font_picker:function(e){var p=this,u=p.input_parent,_=g('select[data-czrtype="'+p.id+'"]',p.container),n=function(e,t){u();h.isNull(p())||h.isEmpty(p())?_.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):_.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>");var i=[{title:sektionsLocalizedData.i18n["Web safe fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google fonts"],type:"gfont",list:t.gfonts}],n=f.czr_sektions.sniffAllFonts(),o=sektionsLocalizedData.alreadyUsedFonts,r=[],s=[];if(!h.isEmpty(o)&&h.isObject(o)&&h.each(o,function(e){s.push(e)}),h.isArray(n)&&h.each(n,function(e){s.push(e)}),!h.isEmpty(s)){var a={},c=[];s.forEach(function(e){a[e]=(a[e]||0)+1});var l=h.sortBy(a,function(e){return e});h.each(l,function(i){h.each(a,function(e,t){i!==e||h.contains(c,t)||c.unshift(t)})}),h.each(c,function(e){r.push({name:e})}),i.unshift({title:sektionsLocalizedData.i18n["Already used fonts"],type:null,list:r})}h.each(i,function(e){var t,r,s,i=g("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",h.each(t,function(e){var t,i,n=h.isString(e.name)?e.name:"Undefined Font Family",o=n.replace(/[+|:]/g," ");t=n,i=r,n=h.isEmpty(i)?t:h.isString(t)?["[",i,"]",t].join(""):"",o=o.replace("[cfont]","").replace("[gfont]",""),n==p()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});_.append(i)});var d={escapeMarkup:function(e){return e}};e&&g.extend(d,{resultsAdapter:e,closeOnSelect:!1}),_.czrSelect2(d),g(".czrSelect2-selection__rendered",p.container).css(m(p()))},m=function(e){if(!h.isString(e)||h.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=r(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=h.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"}},r=function(e){if(!h.isString(e)||h.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return h.isString(t[0])?t[0].replace(/[+|:]/g," "):""},t=p();_.append(g("<option>",{value:t,html:t,selected:"selected"})),p.container.on("click",function(){!0!==_.data("selectOptionsSet")&&(_.data("selectOptionsSet",!0),_.html(""),g.when(function(){var e,t=g.Deferred();h.isEmpty(f.sek_fontCollections)?(h.isUndefined(f.sek_fetchingFontCollection)||"pending"!=f.sek_fetchingFontCollection.state()?(e=f.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:p.module.id}),f.sek_fetchingFontCollection=e):e=f.sek_fetchingFontCollection,e.done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");f.sek_fontCollections=JSON.parse(e),t.resolve(f.sek_fontCollections)}).fail(function(e){t.reject(e)})):t.resolve(f.sek_fontCollections);return t.promise()}()).done(function(t){var i;(i=g.Deferred(),void 0!==g.fn.czrSelect2&&void 0!==g.fn.czrSelect2.amd&&"function"==typeof g.fn.czrSelect2.amd.require?g.fn.czrSelect2.amd.require(["czrSelect2/results","czrSelect2/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),h.isUndefined(p.container.find("select[data-czrtype]").data("czrSelect2"))||p.container.find("select[data-czrtype]").czrSelect2("open")})}).fail(function(e){f.errare("font_picker => fail response =>",e)}))})}})}(wp.customize,jQuery,_),function(s,a,c){s.czrInputMap=s.czrInputMap||{},a.extend(s.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,r=a('select[data-czrtype="'+n.id+'"]',n.container);n.container.on("click",function(){!0!==n.iconCollectionSet&&(a.when(a.Deferred(function(t){c.isEmpty(n.sek_faIconCollection)?s.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection)})).done(function(e){!function(e){c.each(e,function(e){var t={value:e,html:s.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(a.extend(t,{selected:"selected"}),o=!0),r.append(a("<option>",t))});var t,i=function(e){return e.id?a('<span class="'+e.element.value+'"></span><span class="social-name"> '+e.text+"</span>"):e.text};t=o?a("<option>"):a("<option>",{selected:"selected"}),r.prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),c.isUndefined(n.container.find("select[data-czrtype]").data("czrSelect2"))||n.container.find("select[data-czrtype]").czrSelect2("open")}).fail(function(e){s.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)})}})}(wp.customize,jQuery,_),function(u,_,m){u.czrInputMap=u.czrInputMap||{},_.extend(u.czrInputMap,{code_editor:function(e){var n,r=this,i=this.module.control,o=(r.input_parent(),!1),s=r.container.find("textarea"),a=r.container.find(".customize-control-title"),c=function(){return _.Deferred(function(t){var i=m.isEmpty(s.data("editor-code-type"))?"text/html":s.data("editor-code-type");u.czr_sektions.code_editor_params&&u.czr_sektions.code_editor_params[i]?t.resolve(u.czr_sektions.code_editor_params[i]):wp.ajax.post("sek_get_code_editor_params",{nonce:u.settings.nonce.save,code_type:i}).done(function(e){m.isObject(e)||u.errare(r.id+" => error => invalid code editor params sent by server",e),u.czr_sektions.code_editor_params={},u.czr_sektions.code_editor_params[i]=e,t.resolve(u.czr_sektions.code_editor_params[i])}).fail(function(e){t.reject(e)})})};r.isReady.done(function(){var t=function(e){m.isEmpty(this.editor)&&(m.isEmpty(this.module.control.container.attr("data-sek-expanded"))||"false"==this.module.control.container.attr("data-sek-expanded")||setTimeout(function(){if(o)try{l(o)}catch(e){u.errare("error in sek_control => code_editor() input",e),d()}else d();a.trigger("click")},10))};n=r(),u.czr_sektions.isJsonString(n)&&(n=JSON.parse(n)),s.html(n),_.when(c()).done(function(e){wp.codeEditor&&(m.isUndefined(e)||!1!==e)&&(o=e),t.call(r),r.module.control.container.first().one("sek-accordion-expanded",function(){t.call(r)})}).fail(function(e){u.errare(r.id+" => error when getting the editor params from server")})});var l=function(e){var t,i=!1;t=m.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:p}),r.editor=wp.codeEditor.initialize(s,t),_(r.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":a.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),a.on("click",function(e){e.stopPropagation(),r.editor.codemirror.focus()}),r.editor.codemirror.on("change",function(e){i=!0,s.val(e.getValue()).trigger("change"),i=!1}),n=r(),u.czr_sektions.isJsonString(n)&&(n=JSON.parse(n)),r.editor.codemirror.setValue(n),r.bind(r.id+":changed",function(e){i||r.editor.codemirror.setValue(e)}),r.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},d=function(){var o=s[0];r.editor=o,s.on("blur",function(){s.data("next-tab-blurs",!1)}),s.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||s.data("next-tab-blurs")||(t=o.selectionStart,i=o.selectionEnd,n=o.value,0<=t&&(o.value=n.substring(0,t).concat("\t",n.substring(i)),s.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):s.data("next-tab-blurs")||(s.data("next-tab-blurs",!0),e.stopPropagation())})},p=function(e){var t;i.setting.notifications.remove(r.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",a.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",a.html()),i.setting.notifications.add(r.id,new u.Notification(r.id,{message:t,type:"warning"})))}}})}(wp.customize,jQuery,_),function(e,r,t){e.czrInputMap=e.czrInputMap||{},r.extend(e.czrInputMap,{range_simple:function(e){var t=this,i=r(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]');o.on("input",function(e){n.val(r(this).val()).trigger("input")}),n.on("input",function(e){t(r(this).val()),o.val(r(this).val())}),o.val(n.val()||0)},number_simple:function(e){var t=this;t.container.find('input[type="number"]').on("input",function(e){t(r(this).val())})}})}(wp.customize,jQuery,_),function(d,p,u){d.czrInputMap=d.czrInputMap||{},p.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var s=this,t=p(".sek-range-with-unit-picker-wrapper",s.container),a=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),c=u.isEmpty(i)||u.isEmpty(i.default)?{}:i.default,l=function(e,t){var i=["mobile","tablet","desktop"];if(u.has(e,t))return e[t];var n=u.findIndex(i,function(e){return t===e});return!u.isEmpty(t)&&n<i.length?l(e,i[n+1]):p.extend(!0,{desktop:""},c).desktop},n=function(e){var t=s(),i={};i=p.extend(!0,{},c),u.isObject(t)?i=p.extend(!0,{},t):u.isString(t)&&!u.isEmpty(t)&&(i={desktop:t});var n,o=l(i,e),r=(n=o,u.isEmpty(n)||!u.isString(n)?"16":n.replace(/px|em|%/g,""));a.val(r).trigger("input",{previewed_device_switched:!0})};d.czr_sektions.maybeSetupDeviceSwitcherForInput.call(s),r.on("input",function(e){a.val(p(this).val()).trigger("input")}),a.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=p(this).val();(i=p.extend(!0,{},u.isObject(s())?s():{}))[n]=p.extend(!0,{},i[n]||{}),u.isString(o)&&!u.isEmpty(o)&&(i[n]=o),(u.isEmpty(t)||u.isObject(t)&&!0!==t.previewed_device_switched)&&s(i),r.val(p(this).val())}),s.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}),r.val(a.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=c(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),s=function(e){return l.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(l.isEmpty(r)?"px":s(r)),t.css_unit.bind(function(e){e=l.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(c(this).val()).trigger("input")}),n.on("input",function(e){t(c(this).val()+s(t.css_unit())),o.val(c(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),c(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",c(this).data("sek-unit")),t.css_unit(c(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var c=this,l=_(".sek-range-with-unit-picker-wrapper",c.container),d=l.find('input[type="number"]'),r=l.find('input[type="range"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=a.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type),p=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return l.find("input[data-czrtype]").data("sek-unit")||"px"},u=function(e,t){var i=["mobile","tablet","desktop"];if(m.has(e,t))return e[t];var n=m.findIndex(i,function(e){return t===e});return!m.isEmpty(t)&&n<i.length?u(e,i[n+1]):_.extend(!0,{desktop:""},p).desktop},n=function(e){var t=c(),i={};i=_.extend(!0,{},p),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=u(i,e),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new a.Value(m.isEmpty(i())?"px":s(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";c.container.find(".customize-control-title").append(o),c.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=a.previewedDevice()||"desktop",o=_(this).val()+s(c.css_unit());(i=_.extend(!0,{},m.isObject(c())?c():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&c(i),r.val(_(this).val())}),l.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),l.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),c.css_unit(_(this).data("sek-unit"),t)}),c.previewedDevice.bind(function(e){try{n(e)}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}),c.container.on("click",".sek-reset-button",function(e){var t=a.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(g,h,v){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var a=this,c=h(".sek-borders",a.container),l=c.find('input[type="number"]'),d=c.find('input[type="range"]'),p=c.find(".sek-alpha-color-input"),u=function(e){return v.contains(["px","em","%"],e)||(g.errare("borders => error : invalid unit for input "+a.id,e),e="px"),e},_=function(e){return v.isEmpty(e)||!v.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return v.isEmpty(e)||!v.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=g.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),f=v.isEmpty(t)||v.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),t="px";return v.isObject(e)&&v.has(e,"_all_")&&v.isObject(e._all_)&&!v.isEmpty(e._all_.wght)&&(t=u(m(e._all_.wght))),t},r=function(){var e=a(),t="#000000";return v.isObject(e)&&v.has(e,"_all_")&&v.isObject(e._all_)&&!v.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!v.contains(v.union(a.cssBorderTypes,["_all_"]),e))throw new Error("Error in syncWithBorderType : the border type must be one of those values '_all_', 'top', 'left', 'right', 'bottom'");var t=a(),i={},n=h.extend(!0,{},f);v.isObject(t)?i=h.extend(!0,{},t):v.isString(t)&&(i={_all_:{wght:t}});var o,r,s=function(e,t){var i,n=h.extend(!0,{},f);if(!v.has(n,"_all_"))throw new Error("Error when firing getCurrentBorderTypeOrAllValue : the default value of the borders input must be php registered as an array formed : array( 'wght' => '1px', 'col' => '#000000' )");return i=v.isObject(e)&&v.has(e,"_all_")?v.extend(n._all_,e._all_):n._all_,v.has(e,t)&&v.isObject(e[t])?v.extend(i,e[t]):n._all_}(i=h.extend(n,i),e);if(v.isEmpty(s)||!v.isObject(s)||v.isEmpty(s.wght)||v.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.wght),h(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{border_type_switched:!0}),p.data("border_type_switched",!0),p.val(s.col).trigger("change"),p.data("border_type_switched",!1)};a.borderColor=new g.Value(v.isEmpty(r())?"#000000":r()),a.css_unit=new g.Value(v.isEmpty(o())?"px":u(o())),a.borderType=new g.Value("_all_"),l.val((i=a(),n=1,v.isObject(i)&&v.has(i,"_all_")&&v.isObject(i._all_)&&!v.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!v.isNumber(n)||n<0)&&(g.errare("Error in borders input type for module : "+a.module.module_type+" the initial border width is invalid : "+n),n=1),n)),p.val(a.borderColor()),p.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),a.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),a.borderColor("")}}),a.css_unit.bind(function(e,t,i){(!v.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!v.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}}),d.on("input",function(e){l.val(h(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.borderType()||"_all_",o=a.borderColor(),r=h(this).val()+u(a.css_unit()),s=h.extend(!0,{},f);(i=h.extend(!0,{},v.isObject(a())?a():s))[n]=h.extend(!0,{},i[n]||s[n]),v.isString(r)&&!v.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(v.isEmpty(t)||v.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&v.each(a.cssBorderTypes,function(e){i=v.omit(i,e)}),a(i)),d.val(h(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),a.css_unit(h(this).data("sek-unit"),t)}),c.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),c.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=h.extend(!0,{},v.isObject(a())?a():{});v.isEmpty(i[t])||(i=v.omit(i,t),a(i),s(t))}),d.val(l.val()||0);try{s(a.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}h('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var a=this,c=f(".sek-borders",a.container),l=c.find('input[type="number"]'),s=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.id,e),e="px"),e},p=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},u=function(e){return g.isEmpty(e)||!g.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;a.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=a(),t="px";return g.isObject(e)&&g.has(e,"_all_")&&(t=d(u(e._all_))),t},r=function(e){if(!g.contains(["_all_","top_left","top_right","bottom_right","bottom_left"],e))throw new Error("Error in syncWithRadiusType : the radius type must be one of those values '_all_', 'top_left', 'top_right', 'bottom_right', 'bottom_left', => radius type => "+e);var t=a(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,s=function(e,t){var i,n=f.extend(!0,{},_);if(!g.has(n,"_all_"))throw new Error("Error when firing getCurrentRadiusTypeOrAllValue : the default value of the border_radius input must be php registered as an array");return i=g.isObject(e)&&g.has(e,"_all_")?e._all_:n._all_,g.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(g.isEmpty(s)||!g.isString(s))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=u(s),r=p(s),f(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{radius_type_switched:!0})};a.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),l.val((i=a(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=p(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(a())?a():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(a.cssRadiusTypes,function(e){i=g.omit(i,e)}),a(i)),s.val(f(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),a.css_unit(f(this).data("sek-unit"),t)}),c.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),c.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(a())?a():{});g.isEmpty(i[t])||(i=g.omit(i,t),a(i),r(t))}),s.val(l.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).done(function(e){n.previewer.refresh(),n.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"<br/>","<i>"+e+"</i>","</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,s){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){s.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!s.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(s.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];s.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),s.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&s.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),s.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=_.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(f.isNull(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => missing textarea for module :"+t.module.id);if(!window.tinyMCE)throw new Error("api.czrInputMap.nimble_tinymce_editor => tinyMCE not defined.");if(tinyMCE.get(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => duplicate editor id.");var r,s,a=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&f.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=f.filter(e,function(e){return!f.contains(t,e)})}if(n.editor_params&&f.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;f.isEmpty(i)||!f.isArray(sektionsLocalizedData[i])?_.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=f.filter(e,function(e){return f.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),s=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(s=f.union(r.tinymce.content_css.split(","),s)),s.join(",")),min_height:40,height:n.editor_params&&f.isNumber(n.editor_params.height)?n.editor_params.height:_.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};c.tinymce.wpautop=a(),a()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);_.czrActiveWPEditors=_.czrActiveWPEditors||[];var d=m.extend(!0,[],_.czrActiveWPEditors);d.push(i),_.czrActiveWPEditors=d;var p,u=function(){p=t(),_.czr_sektions.isJsonString(p)&&(p=JSON.parse(p)),e.html(p),l.setContent(p)};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=m("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=_.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type);if(!(0<i.length))throw new Error("api.czrInputMap::detached_tinymce_editor => missing textarea element");if(e=i.attr("id"),window.tinymce&&(mceInstance=window.tinymce.get(e),mceInstance&&mceInstance.remove()),!window.nimbleTinyMCEPreInit||!window.nimbleTinyMCEPreInit.mceInit||!window.nimbleTinyMCEPreInit.mceInit[e])throw new Error("setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var");var o,r,s=nimbleTinyMCEPreInit.mceInit[e];s.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=f.union(o.tinymce.content_css.split(","),r)),r.join(","));var a,c=t.input_parent,l=function(){var e=c();return f.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};s.wpautop=l(),l()||(s.forced_root_block=""),s.toolbar1=sektionsLocalizedData.defaultToolbarBtns,s.toolbar2="",window.tinymce?(window.tinymce.init(s),window.QTags.getInstance(e)):window.console&&console.log("Error in ::detached_tinymce_editor => window.tinymce not defined "),window.tinyMCE?a=tinyMCE.get(e):window.console&&console.log("Error in ::detached_tinymce_editor => window.tinyMCE not defined ");var d,p=function(){d=t(),_.czr_sektions.isJsonString(d)&&(d=JSON.parse(d)),a.setContent(d),_.sekEditorExpanded(!0),m(window).trigger("resize")};a&&(a.initialized?p():a.on("init",p),a.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(l()?a.getContent():wp.editor.removep(a.getContent()))})),_.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){_.sekCurrentDetachedTinyMceInput(m(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(l,d,p){l.czrInputMap=l.czrInputMap||{},d.extend(l.czrInputMap,{import_export:function(){var r=this,t=r.container.find('button[data-czr-action="sek-pre-import"]'),s=r.container.find("input[name=sek-import-file]"),e=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=e.scope,c="local"===e.scope?l.czr_sektions.localSectionsSettingId():l.czr_sektions.getGlobalSectionsSettingId();p.contains(["local","global"],a)||l.errare("api.czrInputMap.import_export => invalid currentScope",a),s.on("change",function(e){t.toggleClass("disabled",p.isEmpty(d(this).val()))});r.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),d(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),p.isEmpty(t)||p.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=l(c)(),o=!0;if(p.each(n.collection,function(e){o&&(p.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}l.czr_sektions.export_template({scope:a});break;case"sek-pre-import":if(p.isEmpty(l.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}l.czr_sektions.import_template_from_file({pre_import_check:!0,input:r,file_input:s}).done(function(e){l.czr_sektions.pre_checks_from_file_import(e,{pre_import_check:!1,input:r,file_input:s})}).fail(function(e){l.errare("import_export_ input => pre_checks_from_file_import failed",e),l.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate({input:r,file_input:s}),l.czr_sektions.import_template_from_file({input:r,file_input:s})});break;case"sek-import-as-is":l.czr_sektions.import_template_from_file({input:r,file_input:s});break;case"sek-import-assign":l.czr_sektions.import_template_from_file({assign_missing_locations:!0,input:r,file_input:s});break;case"sek-cancel-import":l.czr_sektions.doAlwaysAfterFileImportAndApiSettingUpdate({input:r,file_input:s})}})}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{},l.extend(c.czrInputMap,{simpleselect:function(e){c.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){c.czr_sektions.setupSelectInput.call(this,e)},simpleselectWithDeviceSwitcher:function(e){var r=this,t=(r.input_parent,r.module,c.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type)),o=l("select",r.container),s=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i={params:e=d.isEmpty(e)?t.choices:e};if(r.module.trigger("nimble-set-select-input-options",i),e=i.params,!d.isEmpty(e)&&d.isObject(e)){d.each(e,function(e,t){var i={value:t,html:e};t==r()?l.extend(i,{selected:"selected"}):"px"===t&&l.extend(i,{selected:"selected"}),o.append(l("<option>",i))});var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):l.extend(!0,{desktop:""},s).desktop};c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r),o.on("change",function(e,t){var i,n=c.previewedDevice()||"desktop",o=l(this).val();(i=l.extend(!0,{},d.isObject(r())?r():{}))[n]=l.extend(!0,{},i[n]||{}),d.isString(o)&&!d.isEmpty(o)&&(i[n]=o),(d.isEmpty(t)||d.isObject(t)&&!0!==t.previewed_device_switched)&&r(i)}),r.previewedDevice.bind(function(e){try{!function(e){var t=r(),i={};i=l.extend(!0,{},s),d.isObject(t)?i=l.extend(!0,{},t):d.isString(t)&&!d.isEmpty(t)&&(i={desktop:t});var n=a(i,e);o.val(n).trigger("change",{previewed_device_switched:!0})}(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type "+r.type+" for input id "+r.id,e)}})}else c.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+r.id+" in module "+r.module.module_type)}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{category_picker:function(e){var n=this,o=c("select[data-czrtype]",n.container),r=function(){var e=n();return e=l.isString(e)?[e]:e,l.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(c.when(c.Deferred(function(i){l.isEmpty(a.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:a.settings.nonce.save}).done(function(e){l.isArray(e)||a.errare(n.id+" => error => invalid category collection sent by server");var t={};l.each(e,function(e){l.isEmpty(e.slug)||l.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),a.czr_sektions.post_categories=t,i.resolve(a.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(a.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&l.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){a.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){l.each(e,function(e,t){var i={value:t,html:e};l.contains(r(),t)&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===c(this).find("option:selected").length&&n([])})},s={};l.each(r(),function(e){s[e]=(e+"").replace(/-/g," ")}),i(s),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),c.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,s,e){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=s(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),s(this).addClass("selected").attr("aria-pressed",!0);try{i=s(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),s('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(i,e,t){i.czrInputMap=i.czrInputMap||{},e.extend(i.czrInputMap,{refresh_preview_button:function(e){this.container.on("click",".sek-refresh-button",function(e,t){e.stopPropagation(),i.previewer.refresh()})}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_module_picker_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{};var n=sektionsLocalizedData.presetSectionsModules;i.isArray(n)&&!i.isEmpty(n)?i.each(n,function(e){t.czrModuleMap[e]={crud:!1,name:t.czr_sektions.getRegisteredModuleProperty(e,"name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}}):t.errare("api.czrModuleMap => error when adding section modules")}(wp.customize,jQuery,_),function(a,n,c){var e={initialize:function(e,t){this.inputConstructor=a.CZRInput.extend({initialize:function(e,t){var i=this;a.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),i.attachDomEvents()})},getUserSavedSections:function(){var t=n.Deferred();return c.isEmpty(a.czr_sektions.userSavedSections)?a.czr_sektions.getSavedSectionCollection().done(function(e){t.resolve(e)}):t.resolve(a.czr_sektions.userSavedSections),t.promise()},renderUserSavedSections:function(){var o=this,r="",s=o.container.find(".sek-content-type-wrapper"),t=function(e){if(s.find(".sek-user-section-wrapper").remove(),c.isEmpty(e)){var t=[sektionsLocalizedData.baseUrl,"/assets/admin/img/save_section_notice.png","?ver=",sektionsLocalizedData.nimbleVersion].join(""),i="https://docs.presscustomizr.com/article/417-how-to-save-and-reuse-sections-with-nimble-builder";r=['<div class="sek-user-section-wrapper">','<img src="'+t+'" />','<br/><a href="'+i+'" target="_blank" rel="noreferrer nofollow">'+i+"</a>","</div>"].join(""),s.append(r),o.module.container.find(".czr-item-content .customize-control-title").html(sektionsLocalizedData.i18n["You did not save any section yet."])}else{var n="background: url("+[sektionsLocalizedData.baseUrl,"/assets/admin/img/nb_sec_pholder.png","?ver=",sektionsLocalizedData.nimbleVersion].join("")+") 50% 50% / cover no-repeat;";c.each(e,function(e,t){c.isEmpty(e.description)?_titleAttr=[e.title,e.last_modified_date].join(" | "):_titleAttr=[e.title,e.last_modified_date,e.description].join(" | "),r=['<div class="sek-user-section-wrapper">','<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="content" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-sec-thumb" style="'+n+'"></div>','<div class="sek-overlay"></div>','<div class="sek-sec-info" title="'+_titleAttr+'">','<h3 class="sec-title">'+e.title+"</h3>",'<p class="sec-date"><i>'+[sektionsLocalizedData.i18n["Last modified"]," : ",e.last_modified_date].join(" ")+"</i></p>",'<p class="sec-desc">'+e.description+"</p>",'<i class="material-icons edit-user-sec" title="'+sektionsLocalizedData.i18n["Edit this template"]+'">edit</i>','<i class="material-icons remove-user-sec" title="'+sektionsLocalizedData.i18n["Remove this template"]+'">delete_forever</i>',"</div>","</div>","</div>"].join(""),s.append(r)})}s.find(".czr-css-loader").remove(),a.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:o.container})};s.append('<div class="czr-css-loader czr-mr-loader" style="display:block"><div></div><div></div><div></div></div>'),o.getUserSavedSections().done(function(e){t(e)}),a.czr_sektions.allSavedSections.bind(function(e){t(e)})},attachDomEvents:function(){this.container.on("click",".sek-sec-info .remove-user-sec",function(e){e.preventDefault();var t=a.czr_sektions;t.saveSectionDialogVisible(!1);var i=function(e){t.saveSectionDialogMode("remove"),t.saveSectionDialogMode.unbind(i)};t.userSectionToRemove=n(this).closest("[data-sek-content-id]").data("sek-content-id"),t.saveSectionDialogMode.bind(i),t.saveSectionDialogVisible(!0)}).on("click",".sek-sec-info .edit-user-sec",function(e){e.preventDefault();var t=a.czr_sektions;t.saveSectionDialogVisible(!1);var i=function(e){t.saveSectionDialogMode("edit"),t.saveSectionDialogMode.unbind(i)};t.userSectionToEdit=n(this).closest("[data-sek-content-id]").data("sek-content-id"),t.saveSectionDialogMode.bind(i),t.saveSectionDialogVisible(!0)})}}),a.CZRDynModule.prototype.initialize.call(this,e,t)}};a.czrModuleMap=a.czrModuleMap||{},n.extend(a.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:e,crud:!1,name:a.czr_sektions.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:a.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_my_sections_sec_picker_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_mod_option_switcher_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_mod_option_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_mod_option_switcher_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_anchor_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_anchor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var t=this,n=t.module;t.czr_Input.each(function(i){switch(i.id){case"bg-apply-overlay":r.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return o.CZR_Helpers.isChecked(i())})}catch(e){o.errare(n.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":r.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=o.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!o.CZR_Helpers.isChecked(i())}return e})}catch(e){o.errare(n.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){o.CZR_Helpers.isChecked(i())&&o.CZR_Helpers.isChecked(t.czr_Input("bg-attachment")())&&t.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){o.CZR_Helpers.isChecked(i())&&o.CZR_Helpers.isChecked(t.czr_Input("bg-parallax")())&&t.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")});break;case"bg-use-video":r.each(["bg-video","bg-video-loop","bg-video-delay-start","bg-video-on-mobile","bg-video-start-time","bg-video-end-time"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return o.CZR_Helpers.isChecked(i())})}catch(e){o.errare(n.id+" => error in setInputVisibilityDeps",e)}})}}),n.control&&n.control.params&&n.control.params.sek_registration_params&&(r.contains(["section","column"],n.control.params.sek_registration_params.level)||r.each(["bg-use-video","bg-video","bg-video-loop","bg-video-on-mobile","bg-video-start-time","bg-video-end-time"],function(e){t.czr_Input(e).visible(!1)}))}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_text_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_text_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_text_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_border_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use-custom-breakpoint":o.each(["custom-breakpoint","apply-to-all"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(i.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_breakpoint_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height","overflow_hidden"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_height_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_visibility_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_visibility_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"width-type":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(d,p,u){var e={initialize:function(e,t){var i=this;i.inputConstructor=d.CZRInput.extend(i.CZRInputConstructor||{}),i.itemConstructor=d.CZRItem.extend(i.CZRItemConstructor||{}),d.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputConstructor:{range_simple:function(e){var t,i=this,n=p(".sek-range-with-unit-picker-wrapper",i.container),o=n.find('input[type="number"]'),r=n.find('input[type="range"]');try{t=i.module.control.params.sek_registration_params}catch(e){return void d.errare("Error when getting the module registration params",e)}if(u.isUndefined(t.level_id))d.errare("Error : missing column id",er);else if(i.columnId=t.level_id,i.columnModel=p.extend(!0,{},d.czr_sektions.getLevelModel(i.columnId)),i.parentSectionModel=d.czr_sektions.getParentSectionFromColumnId(i.columnId),"no_match"!=i.columnModel)if("no_match"!=i.parentSectionModel){i.colNb=u.size(i.parentSectionModel.collection),o.attr("data-sek-width-range-column-id",i.columnId),1===i.colNb?i.container.html(["<p>",sektionsLocalizedData.i18n["This is a single-column section with a width of 100%. You can act on the internal width of the parent section, or adjust padding and margin."]].join("")):i.container.show();var s,a=d.czr_sektions.getLevelModel(i.columnId),c="_not_set_";if("no_match"!=a){var l=a.options&&a.options.width&&a.options.width["custom-width"]&&u.isNumber(+a.options.width["custom-width"]);l?c=a.options.width["custom-width"]:!l&&a.width&&u.isNumber(+a.width)&&(c=a.width),s="_not_set_"!==c?c:"_not_set_"===i()?Math.floor(100/i.colNb):i(),s=1*+parseFloat(s).toFixed(3),(!u.isNumber(s)||100<s||s<0)&&(d.errare("Error => invalid column width",s),s=50),r.on("input",function(e,t){o.val(p(this).val()).trigger("input",t)}),o.on("input",u.debounce(function(e,t){r.val(p(this).val()),t&&t.is_init||i(+parseFloat(p(this).val()).toFixed(3))},300)),o.on("input",u.debounce(function(e,t){t&&(t.is_init||t.is_resize_column_trigger)||i.sayItToApi(p(this).val())},300)),r.val(s).trigger("input",{is_init:!0})}else d.errare("sek_level_width_column module => invalid column model")}else d.errare("sek_level_width_column module => invalid parent section model");else d.errare("sek_level_width_column module => invalid column model")},sayItToApi:function(e,t){var i=this,n=u.findIndex(i.parentSectionModel.collection,{id:i.columnId}),o=n+1==i.colNb?n-1:n+1,r=u.find(i.parentSectionModel.collection,function(e,t){return o===t});"no_match"===r&&d.errare("sek_level_width_column module => invalid sister column model"),d.previewer.trigger("sek-resize-columns",{action:"sek-resize-columns",level:"column",in_sektion:i.parentSectionModel.id,id:i.columnId,resized_column:i.columnId,sister_column:r.id,resizedColumnWidthInPercent:e,col_number:i.colNb})}}};d.czrModuleMap=d.czrModuleMap||{},p.extend(d.czrModuleMap,{sek_level_width_column:{mthds:e,crud:!1,name:d.czr_sektions.getRegisteredModuleProperty("sek_level_width_column","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:u.extend({id:"",title:""},d.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_column"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_section"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_spacing_module:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_cust_css_section:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_cust_css_section","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_cust_css_section"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this.module;i.trigger("nb_setup_visibility_deps_for_animation_module",{item:this,module:e})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_animation_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_animation_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_animation_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_template:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_custom_css:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_custom_css","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_custom_css"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_header_footer"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_imp_exp"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"links_underline":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"links_underline_hover",function(){return!e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_text:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_text","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_text"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use-custom-breakpoint":o.each(["global-custom-breakpoint","apply-to-all"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(i.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_breakpoint"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"enable":s.each(["public_key","private_key","badge","show_failure_message","failure_message","score"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"failure_message":e=i()&&n.czr_Input("show_failure_message")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_failure_message":s.each(["failure_message"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("enable")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_global_recaptcha:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_global_recaptcha","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:s.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_recaptcha"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_imp_exp"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_beta_features:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_beta_features","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_beta_features"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_site_tmpl_pickers:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_site_tmpl_pickers","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_site_tmpl_pickers"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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;case"link-pick-url":e="url"===i();break;case"link-target":e=!r.contains(["no-link","img-lightbox"],i())}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":r.each(["borders"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"none"!==i()})}catch(e){o.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":r.each(["custom_width"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_height":r.each(["custom_height"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_title_attr":r.each(["heading_title"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}})}}),o.trigger("nb_setup_visibility_deps_for_img_module",{item:n,module:t})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_borders_corners_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){this.inputConstructor=n.CZRInput.extend(this.CZRTextEditorInputMths||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;"detached_tinymce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")}),n.CZRInput.prototype.initialize.call(i,e,t)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_tinymce_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_tinymce_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tinymce_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_html_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_html_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(i){switch(i.id){case"img-type":o.each(["img-id","img-size"],function(t){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":o.each(["content-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"custom"===i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":o.each(["btn-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),this.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}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":s.each(["link-pick-url","link-custom-url","link-target"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.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){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"use_custom_color_on_hover":s.each(["color_hover"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.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})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.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(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e=i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":case"link-target":e=i()}return e})}catch(e){o.errare("Heading module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&!0===n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_heading_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_heading_spacing_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_divider_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_divider_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_spacer_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_spacer_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_spacer_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_map_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_map_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRButtonItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"quote_design":n.each(["border_width_css","border_color_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"border-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}}),n.each(["icon_color_css","icon_size_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_quote_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_cite_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),this.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}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.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(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.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("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"icon-side",function(){return!r.isEmpty(i())})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_btn_content_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_btn_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"width-type":n.czr_sektions.scheduleVisibilityOfInputId.call(t,"custom-width",function(){return"custom"===t()}),o.each(["custom-width","h_inner_align_css"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"height-type":n.czr_sektions.scheduleVisibilityOfInputId.call(t,"custom-height",function(){return"custom"===t()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"display_pagination":r.each(["posts_per_page","post_number"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"posts_per_page"===e?i():!i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":s.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":s.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_privacy_field":n.each(["privacy_field_label","privacy_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,"link-custom-url",function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_submission_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_submission_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_font_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_),function(s,a,c){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=s.CZRItem.extend(i.CZRItemConstructor||{}),s.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return s.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&a.fn.sortable){var i=this;a("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){c.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!c.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},_buildTitle:function(e,t,i){var n=this.module;return e=e||("string"==typeof t?s.CZR_Helpers.capitalize(t.replace("fa-","")):""),e=s.CZR_Helpers.truncate(e,20),'<div><span class="'+t+'" style="color:'+(i=i||n.defaultSocialColor)+'"></span> '+e+"</div>"},writeItemViewTitle:function(e){var t=this.module,i=e||this(),n=(i.icon?i.icon:"").replace("fa-","").replace("envelope","email").replace("far","").replace("fab","").replace("fas","");a("."+t.control.css_attr.item_title,this.container).html(this._buildTitle(n,i.icon,i.color_css))},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_color_on_hover":c.each(["social_color_hover"],function(e){try{s.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){s.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=c.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=c.without(n,c.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=a.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=s(i.control.id).transport||!c.has(e,"dom_event")||c.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){s.previewer.unbind("ready",r),i.trigger("item-removed",o)};s.previewer.bind("ready",r)}}}};s.czrModuleMap=s.czrModuleMap||{},a.extend(s.czrModuleMap,{czr_social_icons_settings_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_social_icons_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_settings_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_social_icons_style_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_social_icons_style_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_style_child")}})}(wp.customize,jQuery,_),function(g,h,v){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=g.CZRItem.extend(i.CZRItemConstructor||{}),g.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return g.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&h.fn.sortable){var i=this;h("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){v.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},getPreItem:function(){var e=g.czr_sektions.getRegisteredModuleProperty("czr_img_slider_collection_child","starting_value"),t=h.extend(!0,{},this.preItem());if(v.isObject(e)){var i=h.extend(!0,{},e);return h.extend(t,i)}return this.preItem()},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!v.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){g.errorLog("item.setInputVisibilityDeps() : "+e)}}),g.CZRItem.prototype.ready.call(t);var i=function(){g.previewer.send("sek-item-focus",{control_id:t.module.control.id,item_id:t.id,item_value:t()})};t.viewState.callbacks.add(function(e,t){"expanded"===e&&i()}),t.callbacks.add(i),t.bind("sek-request-item-focus-in-preview",i)},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="",s="",a="not_set",c=!v.isUndefined(t)&&v.isObject(t);if(!c||!t.input_changed||v.contains(["img","text_content"],t.input_changed)){if(v.isEmpty(o.title)){var l=v.findIndex(n.itemCollection(),function(e){return e.id===i.id});l=v.isUndefined(l)?1:l+1}else r=o.title;r=g.CZR_Helpers.truncate(r,15),o.img&&(s=o.img,v.isString(o.img)&&(s=-1!==o.img.indexOf("http")?o.img:parseInt(o.img,10)));var d=function(){return h.Deferred(function(){var e=this;v.isUndefined(s)||v.isEmpty(""+s)?e.resolve(""):v.isString(s)&&-1!==s.indexOf("http")?e.resolve(s):wp.media.attachment(s).fetch().always(function(){if(v.isObject(this)&&v.has(this,"attributes")&&v.has(this.attributes,"sizes")){var i=this.get("sizes");i&&v.isObject(i)&&v.each(["thumbnail","medium","large","full"],function(e,t){"not_set"===a&&i[e]&&v.isObject(i[e])&&i[e].url&&(a=i[e].url)}),e.resolve(a)}})}).promise()},p=h("."+n.control.css_attr.item_title,i.container).find(".sek-slide-title"),u=h("."+n.control.css_attr.item_title,i.container).find(".sek-slide-thumb"),_=o.text_content?o.text_content:"";_=(_=h("<div>").html(_).text()).substring(0,60),p.length<1?(h("."+n.control.css_attr.item_title,i.container).html(""),h("."+n.control.css_attr.item_title,i.container).append(h("<div/>",{class:"sek-slide-title",html:_}))):p.html(_);var m=c&&t.input_changed&&"img"===t.input_changed,f=function(e){return v.isEmpty(""+e)||"not_set"===e?"":'<img src="'+e+'" width="32" alt="'+r+'" />'};h("."+n.control.css_attr.item_title,i.container).css("padding","0 4px"),u.length<1?d().done(function(e){h("."+n.control.css_attr.item_title,i.container).prepend(h("<div/>",{class:"sek-slide-thumb",html:f(e)}))}):!m&&c||d().done(function(e){u.html(f(e))})}},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":v.each(["link-pick-url","link-custom-url","link-target"],function(t){try{g.czr_sektions.scheduleVisibilityOfInputId.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;case"link-pick-url":e="url"===i();break;case"link-target":e=!v.contains(["no-link"],i())}return e})}catch(e){g.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":g.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"apply-overlay":v.each(["color-overlay","opacity-overlay"],function(e){try{g.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return g.CZR_Helpers.isChecked(i())})}catch(e){g.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"enable_text":v.each(["text_content","font_family_css","font_size_css","line_height_css","color_css","h_alignment_css","v_alignment","spacing_css"],function(e){try{g.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return g.CZR_Helpers.isChecked(i())})}catch(e){g.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"apply_overlay":v.each(["color-overlay","opacity-overlay"],function(e){try{g.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return g.CZR_Helpers.isChecked(i())})}catch(e){g.errare(t.id+" => error in setInputVisibilityDeps",e)}})}})},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=v.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=v.without(n,v.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=h.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=g(i.control.id).transport||!v.has(e,"dom_event")||v.has(e.dom_event,"isTrigger")||g.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){g.previewer.unbind("ready",r),i.trigger("item-removed",o)};g.previewer.bind("ready",r)}}}};g.czrModuleMap=g.czrModuleMap||{},h.extend(g.czrModuleMap,{czr_img_slider_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:g.czr_sektions.getRegisteredModuleProperty("czr_img_slider_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:g.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_img_slider_collection_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"autoplay":o.each(["autoplay_delay","pause_on_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return n.CZR_Helpers.isChecked(t())})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_img_slider_opts_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_img_slider_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_img_slider_opts_child")}})}(wp.customize,jQuery,_),function(d,p,u){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=d.CZRItem.extend(i.CZRItemConstructor||{}),d.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return d.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&p.fn.sortable){var i=this;p("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){u.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},getPreItem:function(){var e=d.czr_sektions.getRegisteredModuleProperty("czr_accordion_collection_child","starting_value"),t=p.extend(!0,{},this.preItem());if(u.isObject(e)){var i=p.extend(!0,{},e);return p.extend(t,i)}return this.preItem()},CZRItemConstructor:{ready:function(){var e=this;d.CZRItem.prototype.ready.call(e);var i=function(){d.previewer.send("sek-item-focus",{control_id:e.module.control.id,item_id:e.id,item_value:e()})};e.viewState.callbacks.add(function(e,t){"expanded"===e&&i()}),e.callbacks.add(i),e.bind("sek-request-item-focus-in-preview",i),e.module.bind("item-collection-sorted",function(){e.writeItemViewTitle(e(),{input_changed:"title_text"})})},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="";if(!(!u.isUndefined(t)&&u.isObject(t))||!t.input_changed||u.contains(["title_text"],t.input_changed)){if(u.isEmpty(o.title)){var s=u.findIndex(n.itemCollection(),function(e){return e.id===i.id});s=u.isUndefined(s)?1:s+1}else r=o.title;r=d.CZR_Helpers.truncate(r,25);var a=p("."+n.control.css_attr.item_title,i.container).find(".sek-accord-title"),c=o.title_text?o.title_text:"";c=p("<div>").html(c).text();var l=i.module.container.find(".czr-items-wrapper > li").index(i.container);c=(c=u.isEmpty(c)?sektionsLocalizedData.i18n["Accordion title"]+" #"+(+l+1):c).substring(0,60),a.length<1?(p("."+n.control.css_attr.item_title,i.container).html(""),p("."+n.control.css_attr.item_title,i.container).append(p("<div/>",{class:"sek-accord-title",html:c}))):a.html(c)}},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=u.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=u.without(n,u.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=p.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=d(i.control.id).transport||!u.has(e,"dom_event")||u.has(e.dom_event,"isTrigger")||d.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){d.previewer.unbind("ready",r),i.trigger("item-removed",o)};d.previewer.bind("ready",r)}}}};d.czrModuleMap=d.czrModuleMap||{},p.extend(d.czrModuleMap,{czr_accordion_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:d.czr_sektions.getRegisteredModuleProperty("czr_accordion_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:d.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_collection_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){n.CZRItem.prototype.ready.call(this)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_accordion_opts_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_accordion_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_opts_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRButtonItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_flex":o.each(["h_alignment_css"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_shortcode_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_shortcode_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_shortcode_module")}})}(wp.customize,jQuery,_);
|
assets/czr/sek/js/ccat-sek-preview.js
CHANGED
@@ -1407,7 +1407,7 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
|
|
1407 |
clickedOn = 'inactiveZone';
|
1408 |
}
|
1409 |
|
1410 |
-
if ( _.isEmpty( _location_id ) ) {
|
1411 |
self.errare( '::scheduleUiClickReactions => error location id can not be empty' );
|
1412 |
}
|
1413 |
|
@@ -2679,7 +2679,7 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
|
|
2679 |
//in particular the 'customized' dirty values, that NB absolutely needs to dynamically register settings that have not yet been instantiated by WP_Customize_Manager
|
2680 |
// see WP Core => class WP_Customize_Manager, add_action( 'customize_register', array( $this, 'register_dynamic_settings' ), 11 );
|
2681 |
// see NB => class SEK_CZR_Dyn_Register
|
2682 |
-
// see NB =>
|
2683 |
doAjax : function( queryParams ) {
|
2684 |
var self = this;
|
2685 |
//do we have a queryParams ?
|
1407 |
clickedOn = 'inactiveZone';
|
1408 |
}
|
1409 |
|
1410 |
+
if ( $hookLocation.length > 0 && _.isEmpty( _location_id ) ) {
|
1411 |
self.errare( '::scheduleUiClickReactions => error location id can not be empty' );
|
1412 |
}
|
1413 |
|
2679 |
//in particular the 'customized' dirty values, that NB absolutely needs to dynamically register settings that have not yet been instantiated by WP_Customize_Manager
|
2680 |
// see WP Core => class WP_Customize_Manager, add_action( 'customize_register', array( $this, 'register_dynamic_settings' ), 11 );
|
2681 |
// see NB => class SEK_CZR_Dyn_Register
|
2682 |
+
// see NB => Nimble_Collection_Setting::filter_previewed_sek_get_skoped_seks => this is how we can get the sektions collection while customizing, see sek_get_skoped_seks()
|
2683 |
doAjax : function( queryParams ) {
|
2684 |
var self = this;
|
2685 |
//do we have a queryParams ?
|
assets/czr/sek/js/ccat-sek-preview.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var SekPreviewPrototype=SekPreviewPrototype||{};!function(a,s,i){s.extend(SekPreviewPrototype,{cachedElements:{$body:s("body"),$window:s(window)},initialize:function(){var t=this;try{this.skope_id=i.findWhere(_wpCustomizeSettings.czr_new_skopes,{skope:"local"}).skope_id}catch(e){return void this.errare("Preview => error when storing the skope_id",e)}this.scheduleHighlightActiveLevel(),t.setupLoader(),s(function(){t.setupSortable(),t.setupResizable(),t.setupUiHoverVisibility(),t.scheduleUiClickReactions(),t.schedulePanelMsgReactions()}),t.cachedElements.$body.on("sek-columns-refreshed sek-modules-refreshed",function(e,t){if(!i.isUndefined(t)&&!i.isUndefined(t.in_sektion)&&0<s('[data-sek-id="'+t.in_sektion+'"]').length){var a=s('[data-sek-id="'+t.in_sektion+'"]');a.toggleClass("sek-has-modules",0<a.find('[data-sek-level="module"]').length)}}),t.deactivateLinks(),t.cachedElements.$body.on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-edit-module"].join(" "),function(e){t.deactivateLinks(e)});var e=function(){var e=[],t=[];s('[data-sek-level="location"]').each(function(){e.push(s(this).data("sek-id")),t.push({id:s(this).data("sek-id"),is_global:!0===s(this).data("sek-is-global-location"),is_header_footer:!0===s(this).data("sek-is-header-location")||!0===s(this).data("sek-is-footer-location"),is_header:!0===s(this).data("sek-is-header-location"),is_footer:!0===s(this).data("sek-is-footer-location")})}),a.preview.send("sek-active-locations-in-preview",{active_locations:e,active_locs_info:t})};a.preview.bind("sek-request-active-locations",e),e()},deactivateLinks:function(e){e=e||{};this.cachedElements.$body.find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){try{(function(){if("yes"!==s(this).data("sek-unlinked")){var e=i.isString(s(this)[0].protocol)&&-1!==s(this)[0].protocol.indexOf("javascript");!e&&a.isLinkPreviewable(s(this)[0])?(s(this).addClass("nimble-shift-clickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).removeAttr("target"),s(this).on("mouseenter",function(){s(this).attr("title",sekPreviewLocalized.i18n["Shift-click to visit the link"])}),s(this).on("mouseleave",function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.shiftKey&&(e.preventDefault(),window.location.href=s(this).attr("data-nimble-href"))})):(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).on("mouseenter",function(){s(this).attr("title",e?sekPreviewLocalized.i18n["Link deactivated while previewing"]:sekPreviewLocalized.i18n["External links are disabled when customizing"])}).on("mouseleave",function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.preventDefault()}))}}).call(s(this))}catch(e){a.errare("::deactivateLinks => error ",e)}})})},scheduleHighlightActiveLevel:function(){var n=this;this.activeLevelUI=new a.Value(""),this.activeLevelEl=new a.Value(null),this.activeUIChangedRecently=new a.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),i=s('[data-sek-id="'+t+'"]');0<a.length&&(a.addClass("sek-active-ui sek-highlight-active-ui"),n.activeLevelEl(a)),0<i.length&&i.removeClass("sek-active-ui sek-highlight-active-ui"),n.activeUIChangedRecently(Date.now())}),n.activeLevelEl.bind(function(e){if(i.isObject(e)&&0<e.length&&!nb_.isInScreen(e[0]))try{e[0].scrollIntoView()}catch(e){n.errare("activeLevelEl error",e)}}),i.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){a.preview.bind(e,function(e){n.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+n.activeLevelUI()+'"]');s(".sek-highlight-active-ui").length&&s(".sek-highlight-active-ui").removeClass("sek-highlight-active-ui"),0<t.length&&t.toggleClass("sek-highlight-active-ui",!1!==e),clearTimeout(s.data(this,"_ui_change_timer_")),s.data(this,"_ui_change_timer_",setTimeout(function(){n.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,h,p){h.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},h('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(h(this).data("sek-id"))}),a.cachedElements.$body.on("sek-section-added sek-level-refreshed sek-location-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(h(this).data("sek-id"))}),h('[data-sek-level="location"]').each(function(){h(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(h(this).data("sek-id"))}),a.cachedElements.$body.on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(h(this).data("sek-id"))})}),h('[data-sek-level="location"]').each(function(){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))}),a.cachedElements.$body.on("sek-columns-refreshed",'[data-sek-level="section"]',function(){h(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-section-added",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-location-refreshed",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),this},printAllLevelsUi:function(){var e=this;e.cachedElements.$body.find("[data-sek-level]").each(function(){e.printLevelUI(h(this)),h(this).find(".sek-dyn-ui-wrapper").stop(!0,!0).show()})},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[];!0!==h('[data-sek-id="'+e+'"]').data("sek-is-global-location")&&(t=h.extend(!0,{},n.sortableDefaultParams),h('[data-sek-id="'+e+'"]').sortable(p.extend(t,{items:'[data-sek-level="section"]',handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return h('<div class="sortable-placeholder"><div class="sek-module-placeholder-content"><p>'+sekPreviewLocalized.i18n["Insert here"]+"</p></div></div>")[0]},update:function(e,t){}},start:function(e,t){n.cachedElements.$body.addClass("sek-moving-section"),n.isDraggingElement=!0,$sourceLocation=t.item.closest('[data-sek-level="location"]'),a=$sourceLocation.data("sek-id"),n.printAllLevelsUi()},stop:function(e,t){n.cachedElements.$body.removeClass("sek-moving-section"),n.isDraggingElement=!1,s=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),i=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){s.push(h(this).data("sek-id"))}),m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:s,from_location:a,to_location:i})},over:function(e,t){t.placeholder.addClass("sek-sortable-section-over")},out:function(e,t){t.placeholder.removeClass("sek-sortable-section-over")}})))},makeColumnsSortableInSektion:function(e){var a,i,n,s,o=this,t=h.extend(!0,{},o.sortableDefaultParams),d=[],r=[],l=h('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=h.extend({forTarget:!0},e||{}),!p.isEmpty(h(this).data("_sortable_columns_css_classes_")))return h(this).data("_sortable_columns_css_classes_");var t,a=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,i=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var n={current:"sek-col-"+i,next:"sek-col-"+Math.floor(100/t)};return h(this).data("_sortable_columns_css_classes_",n),n};l.sortable(p.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,i=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==h(this).data("sek-is-sender")?(a=c.call(h(this)),p.isEmpty(a)||i.each(function(){h(this).removeClass(a.current).addClass(a.next)})):(a=c.call(h(this),{forTarget:!1}),p.isEmpty(a)||i.each(function(){h(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==h(this).data("sek-is-sender")?(a=c.call(h(this)),p.isEmpty(a)||i.each(function(){h(this).addClass(a.current).removeClass(a.next)})):(a=c.call(h(this),{forTarget:!1}),p.isEmpty(a)||i.each(function(){h(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){n=t.item.closest('[data-sek-level="location"]'),to_location=n.data("sek-id"),s=!0===n.data("sek-is-global-location");var a=to_location!=from_location;return i!==s||!0===i&&!0===s&&a?(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1):($targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1))},start:function(e,t){a=t.item.closest('[data-sek-level="location"]'),from_location=a.data("sek-id"),i=!0===a.data("sek-is-global-location"),d=[],r=[],from_sektion=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){d.push(h(this).data("sek-id"))}),h(this).data("sek-is-sender",!0),p.isEmpty(d)?o.errare("column sortable => startOrder should not be empty"):o.printAllLevelsUi()},stop:function(e,t){$targetSektion=t.item.closest('[data-sek-level="section"]'),to_sektion=$targetSektion.data("sek-id"),$targetSektion.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){r.push(h(this).data("sek-id"))});var a,i=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==h(this).data("sek-is-sender")?(a=c.call(h(this)),p.isEmpty(a)||i.each(function(){h(this).removeClass(a.current).addClass(a.next)})):(a=c.call(h(this),{forTarget:!1}),p.isEmpty(a)||i.each(function(){h(this).addClass(a.current).removeClass(a.next)})),h('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){h(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),p.isEmpty(r)?o.errare("column sortable => newOrder should not be empty"):p.isEqual(r,d)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:r,from_sektion:from_sektion,to_sektion:to_sektion}),h('div[data-sek-id="'+from_sektion+'"]').trigger("sek-level-refreshed"),from_sektion!==to_sektion&&h('div[data-sek-id="'+to_sektion+'"]').trigger("sek-level-refreshed"))}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,d,r,l,c=[],k=[],u=this;t=h.extend(!0,{},u.sortableDefaultParams),h('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(p.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){h('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){h(this).removeClass("sek-sortable-overing")}),h(e.target).addClass("sek-sortable-overing")},remove:function(e,t){r=t.item.closest('[data-sek-level="location"]'),to_location=r.data("sek-id"),l=!0===r.data("sek-is-global-location");var a=to_location!=from_location;return!(d!==l||!0===d&&!0===l&&a)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1)},start:function(e,t){o=t.item.closest('[data-sek-level="location"]'),from_location=o.data("sek-id"),d=!0===o.data("sek-is-global-location"),c=[],k=[],u.cachedElements.$body.addClass("sek-dragging-element"),i=t.item.closest('[data-sek-level="column"]').data("sek-id"),a=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="column"]').find(".sek-column-inner").first().children('[data-sek-level="module"]').each(function(){c.push(h(this).data("sek-id"))}),p.isEmpty(c)?u.errare("makeModulesSortableInColumn => startOrder should not be empty"):u.printAllLevelsUi()},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),n=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){k.push(h(this).data("sek-id"))}),p.isEmpty(k)?u.errare("makeModulesSortableInColumn => newOrder should not be empty"):p.isEqual(k,c)&&n===i?u.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:k,from_column:i,to_column:n,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),u.cachedElements.$body.removeClass("sek-dragging-element"))}})),h('[data-sek-id="'+e+'"]').addClass("sek-module-sortable-setup")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupResizable:function(){var t=this;return c(".sektion-wrapper").find('div[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)}),t.cachedElements.$body.on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added sek-location-refreshed",'[data-sek-level="location"]',function(e){c(this).find('[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)})}),this},maybeMakeColumnResizableInSektion:function(){var a,i,n,s,o,d,r,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');if(!(e.length<2)){var t=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').last();e.not(t).each(function(){c(this).resizable({resize:function(e,t){c(".sektion-wrapper").data("sek-resizing-columns",!0)},start:function(e,t){if(a=t.element.closest('div[data-sek-level="section"]'),a.data("sek-id"),i=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((n=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");r=n.index()+1==o,d=r?n.prev():n.next(),c(".sektion-wrapper").data("sek-resizing-columns",!0),k.delay(function(){c(".sektion-wrapper").data("sek-resizing-columns",!1)},3e3)}},stop:function(e,t){if(!(o<2)){if(n.length<1)throw new Error("ERROR => resizable => No valid level dom element found");n.css({width:"",height:""}),s=(parseFloat(t.size.width)/parseFloat(i)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:n.data("sek-level"),in_sektion:a.data("sek-id"),id:n.data("sek-id"),resized_column:n.data("sek-id"),sister_column:d.data("sek-id"),resizedColumnWidthInPercent:s,col_number:o}),c(".sektion-wrapper").data("sek-resizing-columns",!1)}},helper:"ui-resizable-helper",handles:"e"});var e=c(this);k.delay(function(){e.find(".ui-resizable-handle").find(".fa-arrows-alt-h").length<1&&e.find(".ui-resizable-handle").append('<i class="fas fa-arrows-alt-h"></i>')},500)})}}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(c,h,p){h.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((p.isUndefined(e)||e.length<1)&&this.errare("sekPreview::printeLevelUI => invalid level element => ",e),"location"!=(a=e.data("sek-level"))&&!(0<(n=e).children(".sek-dyn-ui-wrapper").length)){var s=n[0].getBoundingClientRect(),o=n.data("sek-level");switch(n.toggleClass("sek-shrink-my-ui",s.width&&s.width<("section"===o?350:"column"===o?300:200)),i={id:n.data("sek-id"),level:o},a){case"section":var d,r,l=n.closest('div[data-sek-level="location"]'),c=n.closest('div[data-sek-level="column"]'),k=!0===n.data("sek-is-nested");k?0<c.length&&(d=c.find(".sek-column-inner").first().children("div[data-sek-level]").length==n.index()+1,r=0===n.index()):0<l.length&&(d=l.children('div[data-sek-level="section"]').length==n.index()+1,r=0===n.index()),i=p.extend(i,{is_nested:k,can_have_more_columns:n.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,is_global_location:!0===l.data("sek-is-global-location"),is_last_section_in_parent:d,is_first_section_in_parent:r,is_header_location:!0===l.data("sek-is-header-location"),is_footer_location:!0===l.data("sek-is-footer-location")});break;case"column":var u=n.closest('div[data-sek-level="section"]');i=p.extend(i,{parent_can_have_more_columns:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===u.data("sek-is-nested"),has_nested_section:0<n.find('[data-sek-is-nested="true"]').length});break;case"module":var m=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=p.extend(i,{module_name:"not_set"!=m?m:""})}!0===h(".sektion-wrapper").data("sek-resizing-columns")&&p.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),h.when(n.prepend(t(i))).done(function(){n.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}},setupUiHoverVisibility:function(){var i,e,d=this,r=function(){(e=h(this)).children(".sek-dyn-ui-wrapper").length<1||sekPreviewLocalized.isPreviewUIDebugMode||d.isDraggingElement||(e.data("UIisFadingOut",!0),e.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){h(this).remove(),e.data("UIisFadingOut",!1)}}))},n=function(){d.cachedElements.$body.stop(!0,!0).find(".sek-add-content-button").each(function(){h(this).fadeOut({duration:200,complete:function(){h(this).remove()}})})};d.cachedElements.$body.on("sek-location-refreshed sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){n()});var t,a=function(){var e=h(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){s.call(e)},1e4))},s=function(e){var t=h(this),a=h(this).closest(".sek-dyn-ui-location-type"),i=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),i.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),i.removeClass("sek-is-expanded"),a.show())};d.cachedElements.$body.on("click",".sek-dyn-ui-location-inner",function(e){var t=h(this).find(".sek-dyn-ui-hamb-menu-wrapper");h(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){s.call(h(this))}),s.call(t,!0),a.call(t)}),d.cachedElements.$body.on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",p.throttle(function(e){var t=h(this).find(".sek-dyn-ui-hamb-menu-wrapper");p.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),d.cachedElements.$body.on("click",".sek-minimize-ui",function(e){h(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),d.cachedElements.$body.on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=h(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(i=d.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),h.when(t.prepend(i({}))).done(function(){t.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}).on("mouseleave",".sek-wp-content-wrapper",function(e){h(this).data("UIisFadingOut",!0),t=h(this),h(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){h(this).remove(),t.data("UIisFadingOut",!1)}})});var l=function(s,e){var o,t=[];o=p.isUndefined(e)||e.length<1?(d.cachedElements.$body.find('[data-sek-level][data-sek-preview-level-guid="'+sekPreviewLocalized.previewLevelGuid+'"]').each(function(){t.push(h(this))}),"printOrScheduleRemoval"):(t.push(e),"mayBeRemove"),p.each(t,function(e){var t=e[0].getBoundingClientRect(),a=s.x<=t.right&&t.left<=s.x,i=s.y>=t.top&&t.bottom>=s.y,n=e;switch(o){case"mayBeRemove":n.data("sek-ui-removal-scheduled",!1),a&&i||r.call(n);break;case"printOrScheduleRemoval":a&&i?(n.data("sek-ui-removal-scheduled",!1),d.printLevelUI(n)):!0!==n.data("sek-ui-removal-scheduled")&&(n.data("sek-ui-removal-scheduled",!0),n.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?l(s,n):p.delay(function(){!0===n.data("sek-ui-removal-scheduled")&&l(d.mouseMovedRecently(),n)},3500))}})};d.mouseMovedRecently=new c.Value({}),d.mouseMovedRecently.bind(function(e){var k,t,a;p.isEmpty(e)?sekPreviewLocalized.isPreviewUIDebugMode||(n(),d.cachedElements.$body.stop(!0,!0).find("[data-sek-level]").each(function(){h(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&r.call(h(this))})):(d.cachedElements.$body.find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=h(this).children('div[data-sek-level="section"]'),i=d.parseTemplate("#sek-tmpl-add-content-button"),t=h(this).data("sek-id"),a=!0===h(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<h(this).find(".sek-add-content-button").length||(h.when(h(this).prepend(i({location:t,is_global_location:a}))).done(function(){e=h(this).find(".sek-add-content-button"),h(this).data("sek-id")&&e.attr("data-sek-before-section",h(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==h(this).index()+1&&h.when(h(this).append(i({is_last:!0,location:t,is_global_location:a}))).done(function(){e=h(this).find(".sek-add-content-button").last(),h(this).data("sek-id")&&e.attr("data-sek-after-section",h(this).data("sek-id")),e.fadeIn(300)}))})}),h(".sek-empty-location-placeholder").each(function(){0<h(this).find(".sek-add-content-button").length||(t=h(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===h(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),h.when(h(this).append(i({location:t,is_global_location:a}))).done(function(){$btn_el=h(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)}))}),k=e,d.cachedElements.$body.find(".sek-add-content-button").each(function(){var e=h(this)[0].getBoundingClientRect(),t=k.y,a=k.x,i=Math.abs(t-e.bottom),n=Math.abs(e.top-t),s=a-e.right,o=e.left-a,d=i<40||n<40,r=0<s&&s<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;h(this).toggleClass("sek-mouse-is-close",(d||c)&&(r||l))}),l(e))});var o=function(){clearTimeout(d.cachedElements.$window.data("_scroll_move_timer_")),d.mouseMovedRecently.set({})};return d.cachedElements.$window.on("mousemove scroll",p.throttle(function(e){d.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(d.cachedElements.$window.data("_scroll_move_timer_")),d.cachedElements.$window.data("_scroll_move_timer_",setTimeout(function(){d.mouseMovedRecently.set({})},4e3))},50)),c.preview.bind("sek-drag-start",function(){o()}),d.cachedElements.$body.on("sek-section-added",'[data-sek-level="location"]',function(e,t){o()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,h,p){h.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var u=this;u.cachedElements.$body.on("click",function(e){m.preview.send("sek-clean-target-drop-zone");var t,a="inactiveZone",i=h(e.target),n=i.closest('[data-sek-level="location"][data-sek-preview-level-guid="'+sekPreviewLocalized.previewLevelGuid+'"]'),s=i.closest('[data-sek-preview-level-guid="'+sekPreviewLocalized.previewLevelGuid+'"]'),o=i.closest("[data-sek-click-on]"),d=n.data("sek-id"),r=s.data("sek-level"),l=s.data("sek-id");switch(a="add-content"==i.data("sek-click-on")||0<i.closest("[data-sek-click-on]").length&&"add-content"==i.closest("[data-sek-click-on]").data("sek-click-on")?"addContentButton":!p.isEmpty(i.data("sek-click-on"))||0<o.length?"UIIcon":"module"==s.data("sek-level")?"moduleWrapper":"column"==s.data("sek-level")&&!0===s.data("sek-no-modules")?"noModulesColumn":i.hasClass("sek-to-json")?"sekToJson":"column"==s.data("sek-level")?"columnOutsideModules":"section"==s.data("sek-level")?"sectionOutsideColumns":p.isEmpty(i.data("sek-add"))?i.hasClass("sek-wp-content-wrapper")||i.hasClass("sek-wp-content-dyn-ui")?"wpContent":i.hasClass("sek-edit-wp-content")?"editWpContent":"inactiveZone":"addSektion",p.isEmpty(d)&&u.errare("::scheduleUiClickReactions => error location id can not be empty"),a){case"addContentButton":var c=!0===i.closest("[data-sek-is-first-section]").data("sek-is-first-section");m.preview.send("sek-add-section",{location:d,level:"section",before_section:i.closest("[data-sek-before-section]").data("sek-before-section"),after_section:i.closest("[data-sek-after-section]").data("sek-after-section"),is_first_section:c,send_to_preview:!c});break;case"UIIcon":if(s.length<1)throw new Error("ERROR => sek-front-preview => No valid level dom element found");if(t=i.closest("[data-sek-click-on]").data("sek-click-on"),p.isEmpty(t))throw new Error("Invalid action");if(p.isEmpty(r)||p.isEmpty(l))throw new Error("ERROR => sek-front-preview => No valid level id found");u._send_(i,{action:t,location:d,level:r,id:l,was_triggered:!1});break;case"moduleWrapper":if(0<i.parent(".sek-dyn-ui-icons").length)return;u._send_(i,{action:"edit-module",level:r,id:l});break;case"noModulesColumn":if(0<i.parent(".sek-dyn-ui-icons").length)return;u._send_(i,{action:"pick-content",content_type:"module",level:r,id:l});break;case"columnOutsideModules":case"sectionOutsideColumns":u._send_(i,{action:"edit-options",location:d,level:r,id:l});break;case"addSektion":m.preview.send("sek-add-section",{location:d,level:i.data("sek-add")});break;case"sekToJson":m.preview.send("sek-to-json",{id:l});break;case"wpContent":m.preview.send("sek-notify",{type:"info",duration:8e3,message:sekPreviewLocalized.i18n["This content has been created with the WordPress editor."]});break;case"editWpContent":var k=i.closest("[data-sek-wp-edit-link]").data("sek-wp-edit-link");p.isEmpty(k)||window.open(k,"_blank");break;case"inactiveZone":m.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=h.extend(!0,{},t),i="",n=e.closest('div[data-sek-level="module"]'),s="module"===t.level?n.data("sek-module-type"):"";"module"===t.level&&"czr_tiny_mce_editor_module"===s&&(i=0<n.find("div[data-sek-input-id]").length?n.find("div[data-sek-input-id]").data("sek-input-id"):""),m.preview.send("sek-"+t.action,p.extend({location:t.location,level:t.level,id:t.id,content_type:e.data("sek-content-type"),module_type:s,in_column:0<e.closest('div[data-sek-level="column"]').length?e.closest('div[data-sek-level="column"]').data("sek-id"):"",in_sektion:0<e.closest('div[data-sek-level="section"]').length?e.closest('div[data-sek-level="section"]').data("sek-id"):"",clicked_input_type:0<e.closest("div[data-sek-input-type]").length?e.closest("div[data-sek-input-type]").data("sek-input-type"):"",clicked_input_id:0<e.closest("div[data-sek-input-id]").length?e.closest("div[data-sek-input-id]").data("sek-input-id"):"",was_triggered:t.was_triggered,syncedTinyMceInputId:i},a))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{setupLoader:function(){var t=this;this._css_loader_html='<div class="sek-css-loader sek-mr-loader" style="display:none"><div></div><div></div><div></div></div>',t.cachedElements.$body.on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-stylesheet-refreshed","sek-ajax-error"].join(" "),function(e){t.cleanLoader()})},mayBePrintLoader:function(e){e=o.isObject(e)?e:{};var t=this,a=e.loader_located_in_level_id;if(!o.isEmpty(a)){var i=s('[data-sek-id="'+a+'"]');0<i.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),i.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),i.prepend($levelClone),$levelClone.css({width:i.outerWidth()+"px",height:i.outerHeight()+"px"}).append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),clearTimeout(s.data(this,"_nimble_loader_active_timer_")),s.data(this,"_nimble_loader_active_timer_",setTimeout(function(){t.cleanLoader()},e.duration||4e3)))}if(!0===e.fullPageLoader){var n=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});t.cachedElements.$body.append(n),n.fadeIn("fast").append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),s('[data-sek-level="location"]').each(function(){s(this).addClass("sek-blur")}),clearTimeout(s.data(this,"_nimble_full_page_loader_active_timer_")),s.data(this,"_nimble_full_page_loader_active_timer_",setTimeout(function(){t.cleanLoader({cleanFullPageLoader:!0})},e.duration||6e3))}},cleanLoader:function(e){s(".sek-level-clone").remove(),s("[data-sek-level]").each(function(){s(this).removeClass("sek-refreshing")}),!0===(e=e||{}).cleanFullPageLoader&&(s('[data-sek-level="location"]').each(function(){s(this).removeClass("sek-blur")}),s("#nimble-full-page-loader-wrapper").remove())}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,r,l){r.extend(SekPreviewPrototype,{schedulePanelMsgReactions:function(){var t,d=this,e={"sek-add-section":"ajaxAddSektion","sek-add-content-in-new-sektion":"ajaxAddSektion","sek-add-content-in-new-nested-sektion":"ajaxAddSektion","sek-add-column":"ajaxRefreshColumns","sek-add-module":"ajaxRefreshModulesAndNestedSections","sek-refresh-stylesheet":"ajaxRefreshStylesheet","sek-resize-columns":"ajaxResizeColumns","sek-maybe-print-loader":function(e){try{d.mayBePrintLoader(e)}catch(e){o.errare("sek-clean-loader => error",e)}},"sek-clean-loader":function(e){try{d.cleanLoader(e)}catch(e){o.errare("sek-clean-loader => error",e)}},"sek-remove":function(e){var t,a=e.apiParams.id,i=r('div[data-sek-id="'+a+'"]');switch(e.apiParams.action){case"sek-remove-section":d.mayBePrintLoader({loader_located_in_level_id:e.apiParams.location}),!0===e.apiParams.is_nested?t=d.ajaxRefreshModulesAndNestedSections(e):((l.isEmpty(a)||i.length<1)&&d.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),d.cachedElements.$body.find(i).remove(),r('[data-sek-id="'+e.apiParams.location+'"]').trigger("sek-level-refreshed"));break;case"sek-remove-column":t=d.ajaxRefreshColumns(e);break;case"sek-remove-module":t=d.ajaxRefreshModulesAndNestedSections(e)}return l.isEmpty(t)?r.Deferred(function(){this.resolve()}):t},"sek-duplicate":function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":e.apiParams.id=e.cloneId,t=d.ajaxAddSektion(e);break;case"sek-duplicate-column":e.apiParams.id=e.cloneId,t=d.ajaxRefreshColumns(e);break;case"sek-duplicate-module":e.apiParams.id=e.cloneId,t=d.ajaxRefreshModulesAndNestedSections(e)}return t},"sek-refresh-level":function(s){return d.mayBePrintLoader({loader_located_in_level_id:s.apiParams.id}),d.doAjax({location_skope_id:s.location_skope_id,local_skope_id:s.local_skope_id,action:"sek_get_content",id:s.apiParams.id,level:s.apiParams.level,sek_action:s.apiParams.action}).fail(function(e){d.errare("ERROR reactToPanelMsg => sek-refresh-level => ",e),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(d.errare("SekPreviewPrototype::sek-refresh-level => ajax_response.data.contents is undefined ",e),d.errare("params ?",s));var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',i=r('div[data-sek-id="'+s.apiParams.id+'"]');if(i.length<1)d.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{i.before(a);var n=r('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),l.isUndefined(t)?d.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.remove(),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-level-refreshed",{level:s.apiParams.level,id:s.apiParams.id}),s.apiParams.moved_level_id&&o.preview.trigger("sek-animate-to-level",{id:s.apiParams.moved_level_id})}})},"sek-move":function(e){switch(e.apiParams.action){case"sek-move-column":if(e.apiParams.from_sektion!=e.apiParams.to_sektion){var t=r.extend(!0,{},e),a=r.extend(!0,{},e);r('[data-sek-id="'+e.apiParams.from_sektion+'"]',".sektion-wrapper").find('div[data-sek-level="column"]').length<1?o.preview.send("sek-add-column",{in_sektion:e.apiParams.from_sektion,autofocus:!1}):(t.apiParams=l.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),d.ajaxRefreshColumns(t)),a.apiParams=l.extend(a.apiParams,{in_sektion:e.apiParams.to_sektion,action:"sek-refresh-columns-in-sektion"}),d.ajaxRefreshColumns(a)}break;case"sek-move-module":var i=r.extend(!0,{},e),n=r.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=l.extend(i.apiParams,{in_column:i.apiParams.from_column,in_sektion:i.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),d.ajaxRefreshModulesAndNestedSections(i)),e.apiParams=l.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),d.ajaxRefreshModulesAndNestedSections(n),r('[data-sek-id="'+e.apiParams.to_column+'"]',".sektion-wrapper").find(".sek-column-inner").sortable("refresh")}},"sek-edit-options":function(e){d.activeLevelUI(e.uiParams.id)},"sek-edit-module":function(e){d.activeLevelUI(e.uiParams.id)},"sek-drag-start":function(n){var s=1,o=!1;r('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=r(this).data("sek-id"),t=r(this).find('[data-sek-level="column"]').length,a=r(this).find('[data-sek-level="module"]').length,i=t<2&&a<1;!o&&!i&&r('[data-drop-zone-before-section="'+e+'"]').length<1&&r(this).before('<div class="sek-content-'+n.content_type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+e+'"></div>'),i||s!=r(".sektion-wrapper").children('[data-sek-level="section"]').length||r(this).after('<div class="sek-content-'+n.content_type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+e+'"></div>'),s++,o=i}),r(".sek-empty-location-placeholder").each(function(){r.when(r(this).append('<div class="sek-content-'+n.content_type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),("module"==n.content_type||"preset_section"==n.content_type&&!0===n.eligible_for_module_dropzones)&&r('[data-sek-level="column"]').each(function(){var e=r(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=r(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){r('[data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).before('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a==e.length&&r('[data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).after('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a++})}),d.cachedElements.$body.addClass("sek-dragging"),l.delay(function(){r(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){d.cachedElements.$body.removeClass("sek-dragging"),r(".sortable-placeholder").remove(),r(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&r("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-clean-level-uis":function(e){r(".sek-dyn-ui-wrapper").each(function(){r(this).remove()})},"sek-display-level-ui":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&d.printLevelUI(t)},"sek-set-double-click-target":function(e){if(r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),l.isObject(e)&&e.id){var t=r('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")},"sek-update-html-in-selector":function(e){var t,a=r('[data-sek-id="'+e.id+'"]');t=l.isEmpty(e.changed_item_id)?r(e.selector,a):r('[data-sek-item-id="'+e.changed_item_id+'"] '+e.selector,a),0<a.length&&0<t.length?t.html(e.html):d.errare("reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element",e)},"sek-print-confettis":function(e){if(window.confetti&&window.requestAnimationFrame){var t=(e=e||{}).duration||Date.now()+1e3,a=["#f18700","#684F2F","#eea236"];!function e(){confetti({particleCount:2,angle:60,spread:55,origin:{x:0,y:.8},colors:a}),confetti({particleCount:4,angle:120,spread:55,origin:{x:1,y:.8},colors:a}),Date.now()<t&&window.requestAnimationFrame(e)}()}}},i=function(a,e,i){a=l.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});d.cachedElements.$body.addClass(i);try{r.when(l.isFunction(e)?e(a):d[e].call(d,a)).done(function(e){var t;t=e,o.preview.send([i,"done"].join("_"),a),a.apiParams.is_multi_items&&"sek-refresh-level"===a.apiParams.action&&o.preview.send("multi-items-module-refreshed",a),l.isUndefined(t)||t.data&&t.data.setting_validities&&o.preview.send("selective-refresh-setting-validities",t.data.setting_validities)}).fail(function(){o.preview.send("sek-notify",{type:"error",duration:1e4,message:sekPreviewLocalized.i18n["Something went wrong, please refresh this page."]})}).always(function(e){d.cachedElements.$body.removeClass(i)}).then(function(){o.preview.trigger("control-panel-requested-action-done",{action:i,args:a})})}catch(e){d.errare("reactToPanelMsg => Error when firing the callback of "+i,e),d.cachedElements.$body.removeClass(i)}a.apiParams.id&&((!(t=d.activeLevelEl())||!l.isObject(t)||t.length<1||d.activeLevelUI()!==a.apiParams.id)&&(d.activeLevelEl(r('[data-sek-id="'+a.apiParams.id+'"]')),t=d.activeLevelEl()),0<t.length&&!nb_.isInScreen(t[0])&&t[0].scrollIntoView())};l.each(e,function(t,a){"sek-refresh-stylesheet"===a?(o.preview.bind(a,function(e){i(e,t,a)}),o.preview.bind(a,l.debounce(function(e){i(e,t,a),e&&e.apiParams&&e.apiParams.id&&o.preview.trigger("sek-animate-to-level",{id:e.apiParams.id})},1e3))):o.preview.bind(a,function(e){i(e,t,a)})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,d){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.location}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested,content_type:n.all_params&&n.all_params.content_type?n.all_params.content_type:null,collection_of_preset_section_id:n.all_params&&n.all_params.collection_of_preset_section_id?n.all_params.collection_of_preset_section_id:[]}).done(function(e){var t,a="";if(e.data&&e.data.contents?a=e.data.contents:(s.errare("SekPreviewPrototype::ajaxAddSektion => ajax_response.data.contents is undefined ",e),s.errare("params ?",n)),n.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_column+'"]')).length<1&&s.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';t.before(i),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=n.apiParams.action||d.isEmpty(n.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.after_section+'"]'),!d.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!d.isEmpty(n.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+n.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==n.apiParams.action&&o('div[data-sek-id="'+n.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),n.apiParams.is_nested&&(s.makeModulesSortableInColumn(n.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').each(function(){s.maybeMakeColumnResizableInSektion.call(this)})),n.cloneId&&o('div[data-sek-id="'+n.cloneId+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.location+'"]').trigger("sek-location-refreshed",n)}).fail(function(e){s.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,d,e){d.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_sektion}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshColumns => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=d('div[data-sek-id="'+n.apiParams.in_sektion+'"]');a.length<1&&s.errare("reactToPanelMsg => "+n.apiParams.action+" => no DOM node for parent sektion => ",n.apiParams.in_sektion);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_sektion+'"></span>';a.before(i),a.remove(),d(".sektion-wrapper").find(".sek-placeholder").after(t),d(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),d('div[data-sek-id="'+n.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-column => ",e),d('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),i.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(i.errare("SekPreviewPrototype::ajaxResizeColumns => ajax_response.data.contents is undefined ",e),i.errare("params ?",a)),d('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),d('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),d('[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,t){o.extend(SekPreviewPrototype,{ajaxRefreshModulesAndNestedSections:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_column}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshModulesAndNestedSections => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=o('[data-sek-id="'+n.apiParams.in_column+'"]');a.length<1&&s.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';a.before(i),a.remove(),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+n.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:n.apiParams.in_column,in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),i.doAjax({action:"sek_get_content",location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents&&(t=e.data.contents),i.appendDynStyleSheet(a.location_skope_id,t),s('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){i.errare("sek-refresh-stylesheet fail !"),s('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,i="#"+sekPreviewLocalized.googleFontsStyleId,n="#"+sekPreviewLocalized.globalOptionsStyleId;0<s("head").find(a).length&&s("head").find(a).remove(),0<s("head").find(i).length&&s("head").find(i).remove(),0<s("head").find(n).length&&s("head").find(n).remove(),o.isEmpty(t)||s("head").append(t),!o.isEmpty(t)&&s("head").find(a).length<1&&s("head").find(i).length<1&&s("head").find(n).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a,t):s("head").find(a).attr("sek-data-origin","customizer")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(d,r,l){r.extend(SekPreviewPrototype,{parseTemplate:l.memoize(function(t){var a,i=this,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(r(t).length<1)return i.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||l.template(r(t).html(),n)}catch(e){i.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=l.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=l.isEmpty(l.filter(a,function(e){return!l.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,l.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){l.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?l.isUndefined(t)?console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:[e]})))},errare:function(e,t){this._wrapLogInsideTags(e,t,"#ffd5a0")},infoLog:function(e,t){this._wrapLogInsideTags(e,t,"#5ed1f5")},doAjax:function(e){var t=this,a=(e=e||(l.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,i=sekPreviewLocalized.frontNonce,n=r.Deferred(),s=l.extend({action:"",withNonce:!1},e),o=document.createElement("a");return o.href=a,d.isLinkPreviewable(o,{allowAdminAjax:!0})?("https:"==document.location.protocol&&(a=a.replace("http://","https://")),l.isEmpty(s.action)||!l.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),n.resolve().promise()):(s[i.id]=i.handle,!l.isObject(i)||l.isUndefined(i.id)||l.isUndefined(i.handle)?(t.errare("self.doAjax : unproper nonce"),n.resolve().promise()):(s["preview-level-guid"]=sekPreviewLocalized.previewLevelGuid,s.czr_query_params=JSON.stringify(l.isObject(_wpCustomizeSettings.czr_query_params)?_wpCustomizeSettings.czr_query_params:[]),r.post(a,s).done(function(e){"0"!==e&&"-1"!==e&&!1!==e.success||(t.errare("self.doAjax : done ajax error for action : "+s.action,e),n.reject(e)),n.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+s.action,e),n.reject(e)}),n.promise()))):(t.errare("self.doAjax => error => !api.isLinkPreviewable for action "+s.action,o),n.resolve().promise())},isModuleRegistered:function(e){return sekPreviewLocalized.registeredModules&&!l.isUndefined(sekPreviewLocalized.registeredModules[e])},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sekPreviewLocalized.registeredModules[e][t]:"not_set"},getLevelModel:function(t,e){var a=this,i="no_match";return l.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),l.each(e,function(e){"no_match"==i&&(t===e.id?i=e:l.isArray(e.collection)&&(i=a.getLevelModel(t,e.collection)))}),i}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var i=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new i}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
|
1 |
+
var SekPreviewPrototype=SekPreviewPrototype||{};!function(a,s,i){s.extend(SekPreviewPrototype,{cachedElements:{$body:s("body"),$window:s(window)},initialize:function(){var t=this;try{this.skope_id=i.findWhere(_wpCustomizeSettings.czr_new_skopes,{skope:"local"}).skope_id}catch(e){return void this.errare("Preview => error when storing the skope_id",e)}this.scheduleHighlightActiveLevel(),t.setupLoader(),s(function(){t.setupSortable(),t.setupResizable(),t.setupUiHoverVisibility(),t.scheduleUiClickReactions(),t.schedulePanelMsgReactions()}),t.cachedElements.$body.on("sek-columns-refreshed sek-modules-refreshed",function(e,t){if(!i.isUndefined(t)&&!i.isUndefined(t.in_sektion)&&0<s('[data-sek-id="'+t.in_sektion+'"]').length){var a=s('[data-sek-id="'+t.in_sektion+'"]');a.toggleClass("sek-has-modules",0<a.find('[data-sek-level="module"]').length)}}),t.deactivateLinks(),t.cachedElements.$body.on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-edit-module"].join(" "),function(e){t.deactivateLinks(e)});var e=function(){var e=[],t=[];s('[data-sek-level="location"]').each(function(){e.push(s(this).data("sek-id")),t.push({id:s(this).data("sek-id"),is_global:!0===s(this).data("sek-is-global-location"),is_header_footer:!0===s(this).data("sek-is-header-location")||!0===s(this).data("sek-is-footer-location"),is_header:!0===s(this).data("sek-is-header-location"),is_footer:!0===s(this).data("sek-is-footer-location")})}),a.preview.send("sek-active-locations-in-preview",{active_locations:e,active_locs_info:t})};a.preview.bind("sek-request-active-locations",e),e()},deactivateLinks:function(e){e=e||{};this.cachedElements.$body.find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){try{(function(){if("yes"!==s(this).data("sek-unlinked")){var e=i.isString(s(this)[0].protocol)&&-1!==s(this)[0].protocol.indexOf("javascript");!e&&a.isLinkPreviewable(s(this)[0])?(s(this).addClass("nimble-shift-clickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).removeAttr("target"),s(this).on("mouseenter",function(){s(this).attr("title",sekPreviewLocalized.i18n["Shift-click to visit the link"])}),s(this).on("mouseleave",function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.shiftKey&&(e.preventDefault(),window.location.href=s(this).attr("data-nimble-href"))})):(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).on("mouseenter",function(){s(this).attr("title",e?sekPreviewLocalized.i18n["Link deactivated while previewing"]:sekPreviewLocalized.i18n["External links are disabled when customizing"])}).on("mouseleave",function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.preventDefault()}))}}).call(s(this))}catch(e){a.errare("::deactivateLinks => error ",e)}})})},scheduleHighlightActiveLevel:function(){var n=this;this.activeLevelUI=new a.Value(""),this.activeLevelEl=new a.Value(null),this.activeUIChangedRecently=new a.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),i=s('[data-sek-id="'+t+'"]');0<a.length&&(a.addClass("sek-active-ui sek-highlight-active-ui"),n.activeLevelEl(a)),0<i.length&&i.removeClass("sek-active-ui sek-highlight-active-ui"),n.activeUIChangedRecently(Date.now())}),n.activeLevelEl.bind(function(e){if(i.isObject(e)&&0<e.length&&!nb_.isInScreen(e[0]))try{e[0].scrollIntoView()}catch(e){n.errare("activeLevelEl error",e)}}),i.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){a.preview.bind(e,function(e){n.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+n.activeLevelUI()+'"]');s(".sek-highlight-active-ui").length&&s(".sek-highlight-active-ui").removeClass("sek-highlight-active-ui"),0<t.length&&t.toggleClass("sek-highlight-active-ui",!1!==e),clearTimeout(s.data(this,"_ui_change_timer_")),s.data(this,"_ui_change_timer_",setTimeout(function(){n.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,h,p){h.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},h('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(h(this).data("sek-id"))}),a.cachedElements.$body.on("sek-section-added sek-level-refreshed sek-location-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(h(this).data("sek-id"))}),h('[data-sek-level="location"]').each(function(){h(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(h(this).data("sek-id"))}),a.cachedElements.$body.on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(h(this).data("sek-id"))})}),h('[data-sek-level="location"]').each(function(){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))}),a.cachedElements.$body.on("sek-columns-refreshed",'[data-sek-level="section"]',function(){h(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-section-added",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),a.cachedElements.$body.on("sek-location-refreshed",'[data-sek-level="location"]',function(e,t){h(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(h(this).data("sek-id"))})}),this},printAllLevelsUi:function(){var e=this;e.cachedElements.$body.find("[data-sek-level]").each(function(){e.printLevelUI(h(this)),h(this).find(".sek-dyn-ui-wrapper").stop(!0,!0).show()})},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[];!0!==h('[data-sek-id="'+e+'"]').data("sek-is-global-location")&&(t=h.extend(!0,{},n.sortableDefaultParams),h('[data-sek-id="'+e+'"]').sortable(p.extend(t,{items:'[data-sek-level="section"]',handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return h('<div class="sortable-placeholder"><div class="sek-module-placeholder-content"><p>'+sekPreviewLocalized.i18n["Insert here"]+"</p></div></div>")[0]},update:function(e,t){}},start:function(e,t){n.cachedElements.$body.addClass("sek-moving-section"),n.isDraggingElement=!0,$sourceLocation=t.item.closest('[data-sek-level="location"]'),a=$sourceLocation.data("sek-id"),n.printAllLevelsUi()},stop:function(e,t){n.cachedElements.$body.removeClass("sek-moving-section"),n.isDraggingElement=!1,s=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),i=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){s.push(h(this).data("sek-id"))}),m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:s,from_location:a,to_location:i})},over:function(e,t){t.placeholder.addClass("sek-sortable-section-over")},out:function(e,t){t.placeholder.removeClass("sek-sortable-section-over")}})))},makeColumnsSortableInSektion:function(e){var a,i,n,s,o=this,t=h.extend(!0,{},o.sortableDefaultParams),d=[],r=[],l=h('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=h.extend({forTarget:!0},e||{}),!p.isEmpty(h(this).data("_sortable_columns_css_classes_")))return h(this).data("_sortable_columns_css_classes_");var t,a=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,i=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var n={current:"sek-col-"+i,next:"sek-col-"+Math.floor(100/t)};return h(this).data("_sortable_columns_css_classes_",n),n};l.sortable(p.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,i=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==h(this).data("sek-is-sender")?(a=c.call(h(this)),p.isEmpty(a)||i.each(function(){h(this).removeClass(a.current).addClass(a.next)})):(a=c.call(h(this),{forTarget:!1}),p.isEmpty(a)||i.each(function(){h(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==h(this).data("sek-is-sender")?(a=c.call(h(this)),p.isEmpty(a)||i.each(function(){h(this).addClass(a.current).removeClass(a.next)})):(a=c.call(h(this),{forTarget:!1}),p.isEmpty(a)||i.each(function(){h(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){n=t.item.closest('[data-sek-level="location"]'),to_location=n.data("sek-id"),s=!0===n.data("sek-is-global-location");var a=to_location!=from_location;return i!==s||!0===i&&!0===s&&a?(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1):($targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1))},start:function(e,t){a=t.item.closest('[data-sek-level="location"]'),from_location=a.data("sek-id"),i=!0===a.data("sek-is-global-location"),d=[],r=[],from_sektion=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){d.push(h(this).data("sek-id"))}),h(this).data("sek-is-sender",!0),p.isEmpty(d)?o.errare("column sortable => startOrder should not be empty"):o.printAllLevelsUi()},stop:function(e,t){$targetSektion=t.item.closest('[data-sek-level="section"]'),to_sektion=$targetSektion.data("sek-id"),$targetSektion.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){r.push(h(this).data("sek-id"))});var a,i=h(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==h(this).data("sek-is-sender")?(a=c.call(h(this)),p.isEmpty(a)||i.each(function(){h(this).removeClass(a.current).addClass(a.next)})):(a=c.call(h(this),{forTarget:!1}),p.isEmpty(a)||i.each(function(){h(this).addClass(a.current).removeClass(a.next)})),h('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){h(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),p.isEmpty(r)?o.errare("column sortable => newOrder should not be empty"):p.isEqual(r,d)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:r,from_sektion:from_sektion,to_sektion:to_sektion}),h('div[data-sek-id="'+from_sektion+'"]').trigger("sek-level-refreshed"),from_sektion!==to_sektion&&h('div[data-sek-id="'+to_sektion+'"]').trigger("sek-level-refreshed"))}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,d,r,l,c=[],k=[],u=this;t=h.extend(!0,{},u.sortableDefaultParams),h('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(p.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){h('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){h(this).removeClass("sek-sortable-overing")}),h(e.target).addClass("sek-sortable-overing")},remove:function(e,t){r=t.item.closest('[data-sek-level="location"]'),to_location=r.data("sek-id"),l=!0===r.data("sek-is-global-location");var a=to_location!=from_location;return!(d!==l||!0===d&&!0===l&&a)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1)},start:function(e,t){o=t.item.closest('[data-sek-level="location"]'),from_location=o.data("sek-id"),d=!0===o.data("sek-is-global-location"),c=[],k=[],u.cachedElements.$body.addClass("sek-dragging-element"),i=t.item.closest('[data-sek-level="column"]').data("sek-id"),a=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="column"]').find(".sek-column-inner").first().children('[data-sek-level="module"]').each(function(){c.push(h(this).data("sek-id"))}),p.isEmpty(c)?u.errare("makeModulesSortableInColumn => startOrder should not be empty"):u.printAllLevelsUi()},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),n=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){k.push(h(this).data("sek-id"))}),p.isEmpty(k)?u.errare("makeModulesSortableInColumn => newOrder should not be empty"):p.isEqual(k,c)&&n===i?u.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:k,from_column:i,to_column:n,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),u.cachedElements.$body.removeClass("sek-dragging-element"))}})),h('[data-sek-id="'+e+'"]').addClass("sek-module-sortable-setup")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupResizable:function(){var t=this;return c(".sektion-wrapper").find('div[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)}),t.cachedElements.$body.on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added sek-location-refreshed",'[data-sek-level="location"]',function(e){c(this).find('[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)})}),this},maybeMakeColumnResizableInSektion:function(){var a,i,n,s,o,d,r,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');if(!(e.length<2)){var t=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').last();e.not(t).each(function(){c(this).resizable({resize:function(e,t){c(".sektion-wrapper").data("sek-resizing-columns",!0)},start:function(e,t){if(a=t.element.closest('div[data-sek-level="section"]'),a.data("sek-id"),i=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((n=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");r=n.index()+1==o,d=r?n.prev():n.next(),c(".sektion-wrapper").data("sek-resizing-columns",!0),k.delay(function(){c(".sektion-wrapper").data("sek-resizing-columns",!1)},3e3)}},stop:function(e,t){if(!(o<2)){if(n.length<1)throw new Error("ERROR => resizable => No valid level dom element found");n.css({width:"",height:""}),s=(parseFloat(t.size.width)/parseFloat(i)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:n.data("sek-level"),in_sektion:a.data("sek-id"),id:n.data("sek-id"),resized_column:n.data("sek-id"),sister_column:d.data("sek-id"),resizedColumnWidthInPercent:s,col_number:o}),c(".sektion-wrapper").data("sek-resizing-columns",!1)}},helper:"ui-resizable-helper",handles:"e"});var e=c(this);k.delay(function(){e.find(".ui-resizable-handle").find(".fa-arrows-alt-h").length<1&&e.find(".ui-resizable-handle").append('<i class="fas fa-arrows-alt-h"></i>')},500)})}}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(c,h,p){h.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((p.isUndefined(e)||e.length<1)&&this.errare("sekPreview::printeLevelUI => invalid level element => ",e),"location"!=(a=e.data("sek-level"))&&!(0<(n=e).children(".sek-dyn-ui-wrapper").length)){var s=n[0].getBoundingClientRect(),o=n.data("sek-level");switch(n.toggleClass("sek-shrink-my-ui",s.width&&s.width<("section"===o?350:"column"===o?300:200)),i={id:n.data("sek-id"),level:o},a){case"section":var d,r,l=n.closest('div[data-sek-level="location"]'),c=n.closest('div[data-sek-level="column"]'),k=!0===n.data("sek-is-nested");k?0<c.length&&(d=c.find(".sek-column-inner").first().children("div[data-sek-level]").length==n.index()+1,r=0===n.index()):0<l.length&&(d=l.children('div[data-sek-level="section"]').length==n.index()+1,r=0===n.index()),i=p.extend(i,{is_nested:k,can_have_more_columns:n.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,is_global_location:!0===l.data("sek-is-global-location"),is_last_section_in_parent:d,is_first_section_in_parent:r,is_header_location:!0===l.data("sek-is-header-location"),is_footer_location:!0===l.data("sek-is-footer-location")});break;case"column":var u=n.closest('div[data-sek-level="section"]');i=p.extend(i,{parent_can_have_more_columns:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===u.data("sek-is-nested"),has_nested_section:0<n.find('[data-sek-is-nested="true"]').length});break;case"module":var m=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=p.extend(i,{module_name:"not_set"!=m?m:""})}!0===h(".sektion-wrapper").data("sek-resizing-columns")&&p.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),h.when(n.prepend(t(i))).done(function(){n.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}},setupUiHoverVisibility:function(){var i,e,d=this,r=function(){(e=h(this)).children(".sek-dyn-ui-wrapper").length<1||sekPreviewLocalized.isPreviewUIDebugMode||d.isDraggingElement||(e.data("UIisFadingOut",!0),e.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){h(this).remove(),e.data("UIisFadingOut",!1)}}))},n=function(){d.cachedElements.$body.stop(!0,!0).find(".sek-add-content-button").each(function(){h(this).fadeOut({duration:200,complete:function(){h(this).remove()}})})};d.cachedElements.$body.on("sek-location-refreshed sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){n()});var t,a=function(){var e=h(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){s.call(e)},1e4))},s=function(e){var t=h(this),a=h(this).closest(".sek-dyn-ui-location-type"),i=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),i.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),i.removeClass("sek-is-expanded"),a.show())};d.cachedElements.$body.on("click",".sek-dyn-ui-location-inner",function(e){var t=h(this).find(".sek-dyn-ui-hamb-menu-wrapper");h(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){s.call(h(this))}),s.call(t,!0),a.call(t)}),d.cachedElements.$body.on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",p.throttle(function(e){var t=h(this).find(".sek-dyn-ui-hamb-menu-wrapper");p.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),d.cachedElements.$body.on("click",".sek-minimize-ui",function(e){h(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),d.cachedElements.$body.on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=h(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(i=d.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),h.when(t.prepend(i({}))).done(function(){t.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}).on("mouseleave",".sek-wp-content-wrapper",function(e){h(this).data("UIisFadingOut",!0),t=h(this),h(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){h(this).remove(),t.data("UIisFadingOut",!1)}})});var l=function(s,e){var o,t=[];o=p.isUndefined(e)||e.length<1?(d.cachedElements.$body.find('[data-sek-level][data-sek-preview-level-guid="'+sekPreviewLocalized.previewLevelGuid+'"]').each(function(){t.push(h(this))}),"printOrScheduleRemoval"):(t.push(e),"mayBeRemove"),p.each(t,function(e){var t=e[0].getBoundingClientRect(),a=s.x<=t.right&&t.left<=s.x,i=s.y>=t.top&&t.bottom>=s.y,n=e;switch(o){case"mayBeRemove":n.data("sek-ui-removal-scheduled",!1),a&&i||r.call(n);break;case"printOrScheduleRemoval":a&&i?(n.data("sek-ui-removal-scheduled",!1),d.printLevelUI(n)):!0!==n.data("sek-ui-removal-scheduled")&&(n.data("sek-ui-removal-scheduled",!0),n.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?l(s,n):p.delay(function(){!0===n.data("sek-ui-removal-scheduled")&&l(d.mouseMovedRecently(),n)},3500))}})};d.mouseMovedRecently=new c.Value({}),d.mouseMovedRecently.bind(function(e){var k,t,a;p.isEmpty(e)?sekPreviewLocalized.isPreviewUIDebugMode||(n(),d.cachedElements.$body.stop(!0,!0).find("[data-sek-level]").each(function(){h(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&r.call(h(this))})):(d.cachedElements.$body.find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=h(this).children('div[data-sek-level="section"]'),i=d.parseTemplate("#sek-tmpl-add-content-button"),t=h(this).data("sek-id"),a=!0===h(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<h(this).find(".sek-add-content-button").length||(h.when(h(this).prepend(i({location:t,is_global_location:a}))).done(function(){e=h(this).find(".sek-add-content-button"),h(this).data("sek-id")&&e.attr("data-sek-before-section",h(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==h(this).index()+1&&h.when(h(this).append(i({is_last:!0,location:t,is_global_location:a}))).done(function(){e=h(this).find(".sek-add-content-button").last(),h(this).data("sek-id")&&e.attr("data-sek-after-section",h(this).data("sek-id")),e.fadeIn(300)}))})}),h(".sek-empty-location-placeholder").each(function(){0<h(this).find(".sek-add-content-button").length||(t=h(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===h(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),h.when(h(this).append(i({location:t,is_global_location:a}))).done(function(){$btn_el=h(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)}))}),k=e,d.cachedElements.$body.find(".sek-add-content-button").each(function(){var e=h(this)[0].getBoundingClientRect(),t=k.y,a=k.x,i=Math.abs(t-e.bottom),n=Math.abs(e.top-t),s=a-e.right,o=e.left-a,d=i<40||n<40,r=0<s&&s<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;h(this).toggleClass("sek-mouse-is-close",(d||c)&&(r||l))}),l(e))});var o=function(){clearTimeout(d.cachedElements.$window.data("_scroll_move_timer_")),d.mouseMovedRecently.set({})};return d.cachedElements.$window.on("mousemove scroll",p.throttle(function(e){d.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(d.cachedElements.$window.data("_scroll_move_timer_")),d.cachedElements.$window.data("_scroll_move_timer_",setTimeout(function(){d.mouseMovedRecently.set({})},4e3))},50)),c.preview.bind("sek-drag-start",function(){o()}),d.cachedElements.$body.on("sek-section-added",'[data-sek-level="location"]',function(e,t){o()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,h,p){h.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var u=this;u.cachedElements.$body.on("click",function(e){m.preview.send("sek-clean-target-drop-zone");var t,a="inactiveZone",i=h(e.target),n=i.closest('[data-sek-level="location"][data-sek-preview-level-guid="'+sekPreviewLocalized.previewLevelGuid+'"]'),s=i.closest('[data-sek-preview-level-guid="'+sekPreviewLocalized.previewLevelGuid+'"]'),o=i.closest("[data-sek-click-on]"),d=n.data("sek-id"),r=s.data("sek-level"),l=s.data("sek-id");switch(a="add-content"==i.data("sek-click-on")||0<i.closest("[data-sek-click-on]").length&&"add-content"==i.closest("[data-sek-click-on]").data("sek-click-on")?"addContentButton":!p.isEmpty(i.data("sek-click-on"))||0<o.length?"UIIcon":"module"==s.data("sek-level")?"moduleWrapper":"column"==s.data("sek-level")&&!0===s.data("sek-no-modules")?"noModulesColumn":i.hasClass("sek-to-json")?"sekToJson":"column"==s.data("sek-level")?"columnOutsideModules":"section"==s.data("sek-level")?"sectionOutsideColumns":p.isEmpty(i.data("sek-add"))?i.hasClass("sek-wp-content-wrapper")||i.hasClass("sek-wp-content-dyn-ui")?"wpContent":i.hasClass("sek-edit-wp-content")?"editWpContent":"inactiveZone":"addSektion",0<n.length&&p.isEmpty(d)&&u.errare("::scheduleUiClickReactions => error location id can not be empty"),a){case"addContentButton":var c=!0===i.closest("[data-sek-is-first-section]").data("sek-is-first-section");m.preview.send("sek-add-section",{location:d,level:"section",before_section:i.closest("[data-sek-before-section]").data("sek-before-section"),after_section:i.closest("[data-sek-after-section]").data("sek-after-section"),is_first_section:c,send_to_preview:!c});break;case"UIIcon":if(s.length<1)throw new Error("ERROR => sek-front-preview => No valid level dom element found");if(t=i.closest("[data-sek-click-on]").data("sek-click-on"),p.isEmpty(t))throw new Error("Invalid action");if(p.isEmpty(r)||p.isEmpty(l))throw new Error("ERROR => sek-front-preview => No valid level id found");u._send_(i,{action:t,location:d,level:r,id:l,was_triggered:!1});break;case"moduleWrapper":if(0<i.parent(".sek-dyn-ui-icons").length)return;u._send_(i,{action:"edit-module",level:r,id:l});break;case"noModulesColumn":if(0<i.parent(".sek-dyn-ui-icons").length)return;u._send_(i,{action:"pick-content",content_type:"module",level:r,id:l});break;case"columnOutsideModules":case"sectionOutsideColumns":u._send_(i,{action:"edit-options",location:d,level:r,id:l});break;case"addSektion":m.preview.send("sek-add-section",{location:d,level:i.data("sek-add")});break;case"sekToJson":m.preview.send("sek-to-json",{id:l});break;case"wpContent":m.preview.send("sek-notify",{type:"info",duration:8e3,message:sekPreviewLocalized.i18n["This content has been created with the WordPress editor."]});break;case"editWpContent":var k=i.closest("[data-sek-wp-edit-link]").data("sek-wp-edit-link");p.isEmpty(k)||window.open(k,"_blank");break;case"inactiveZone":m.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=h.extend(!0,{},t),i="",n=e.closest('div[data-sek-level="module"]'),s="module"===t.level?n.data("sek-module-type"):"";"module"===t.level&&"czr_tiny_mce_editor_module"===s&&(i=0<n.find("div[data-sek-input-id]").length?n.find("div[data-sek-input-id]").data("sek-input-id"):""),m.preview.send("sek-"+t.action,p.extend({location:t.location,level:t.level,id:t.id,content_type:e.data("sek-content-type"),module_type:s,in_column:0<e.closest('div[data-sek-level="column"]').length?e.closest('div[data-sek-level="column"]').data("sek-id"):"",in_sektion:0<e.closest('div[data-sek-level="section"]').length?e.closest('div[data-sek-level="section"]').data("sek-id"):"",clicked_input_type:0<e.closest("div[data-sek-input-type]").length?e.closest("div[data-sek-input-type]").data("sek-input-type"):"",clicked_input_id:0<e.closest("div[data-sek-input-id]").length?e.closest("div[data-sek-input-id]").data("sek-input-id"):"",was_triggered:t.was_triggered,syncedTinyMceInputId:i},a))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{setupLoader:function(){var t=this;this._css_loader_html='<div class="sek-css-loader sek-mr-loader" style="display:none"><div></div><div></div><div></div></div>',t.cachedElements.$body.on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-stylesheet-refreshed","sek-ajax-error"].join(" "),function(e){t.cleanLoader()})},mayBePrintLoader:function(e){e=o.isObject(e)?e:{};var t=this,a=e.loader_located_in_level_id;if(!o.isEmpty(a)){var i=s('[data-sek-id="'+a+'"]');0<i.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),i.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),i.prepend($levelClone),$levelClone.css({width:i.outerWidth()+"px",height:i.outerHeight()+"px"}).append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),clearTimeout(s.data(this,"_nimble_loader_active_timer_")),s.data(this,"_nimble_loader_active_timer_",setTimeout(function(){t.cleanLoader()},e.duration||4e3)))}if(!0===e.fullPageLoader){var n=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});t.cachedElements.$body.append(n),n.fadeIn("fast").append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),s('[data-sek-level="location"]').each(function(){s(this).addClass("sek-blur")}),clearTimeout(s.data(this,"_nimble_full_page_loader_active_timer_")),s.data(this,"_nimble_full_page_loader_active_timer_",setTimeout(function(){t.cleanLoader({cleanFullPageLoader:!0})},e.duration||6e3))}},cleanLoader:function(e){s(".sek-level-clone").remove(),s("[data-sek-level]").each(function(){s(this).removeClass("sek-refreshing")}),!0===(e=e||{}).cleanFullPageLoader&&(s('[data-sek-level="location"]').each(function(){s(this).removeClass("sek-blur")}),s("#nimble-full-page-loader-wrapper").remove())}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,r,l){r.extend(SekPreviewPrototype,{schedulePanelMsgReactions:function(){var t,d=this,e={"sek-add-section":"ajaxAddSektion","sek-add-content-in-new-sektion":"ajaxAddSektion","sek-add-content-in-new-nested-sektion":"ajaxAddSektion","sek-add-column":"ajaxRefreshColumns","sek-add-module":"ajaxRefreshModulesAndNestedSections","sek-refresh-stylesheet":"ajaxRefreshStylesheet","sek-resize-columns":"ajaxResizeColumns","sek-maybe-print-loader":function(e){try{d.mayBePrintLoader(e)}catch(e){o.errare("sek-clean-loader => error",e)}},"sek-clean-loader":function(e){try{d.cleanLoader(e)}catch(e){o.errare("sek-clean-loader => error",e)}},"sek-remove":function(e){var t,a=e.apiParams.id,i=r('div[data-sek-id="'+a+'"]');switch(e.apiParams.action){case"sek-remove-section":d.mayBePrintLoader({loader_located_in_level_id:e.apiParams.location}),!0===e.apiParams.is_nested?t=d.ajaxRefreshModulesAndNestedSections(e):((l.isEmpty(a)||i.length<1)&&d.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),d.cachedElements.$body.find(i).remove(),r('[data-sek-id="'+e.apiParams.location+'"]').trigger("sek-level-refreshed"));break;case"sek-remove-column":t=d.ajaxRefreshColumns(e);break;case"sek-remove-module":t=d.ajaxRefreshModulesAndNestedSections(e)}return l.isEmpty(t)?r.Deferred(function(){this.resolve()}):t},"sek-duplicate":function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":e.apiParams.id=e.cloneId,t=d.ajaxAddSektion(e);break;case"sek-duplicate-column":e.apiParams.id=e.cloneId,t=d.ajaxRefreshColumns(e);break;case"sek-duplicate-module":e.apiParams.id=e.cloneId,t=d.ajaxRefreshModulesAndNestedSections(e)}return t},"sek-refresh-level":function(s){return d.mayBePrintLoader({loader_located_in_level_id:s.apiParams.id}),d.doAjax({location_skope_id:s.location_skope_id,local_skope_id:s.local_skope_id,action:"sek_get_content",id:s.apiParams.id,level:s.apiParams.level,sek_action:s.apiParams.action}).fail(function(e){d.errare("ERROR reactToPanelMsg => sek-refresh-level => ",e),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(d.errare("SekPreviewPrototype::sek-refresh-level => ajax_response.data.contents is undefined ",e),d.errare("params ?",s));var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',i=r('div[data-sek-id="'+s.apiParams.id+'"]');if(i.length<1)d.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{i.before(a);var n=r('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),l.isUndefined(t)?d.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.remove(),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-level-refreshed",{level:s.apiParams.level,id:s.apiParams.id}),s.apiParams.moved_level_id&&o.preview.trigger("sek-animate-to-level",{id:s.apiParams.moved_level_id})}})},"sek-move":function(e){switch(e.apiParams.action){case"sek-move-column":if(e.apiParams.from_sektion!=e.apiParams.to_sektion){var t=r.extend(!0,{},e),a=r.extend(!0,{},e);r('[data-sek-id="'+e.apiParams.from_sektion+'"]',".sektion-wrapper").find('div[data-sek-level="column"]').length<1?o.preview.send("sek-add-column",{in_sektion:e.apiParams.from_sektion,autofocus:!1}):(t.apiParams=l.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),d.ajaxRefreshColumns(t)),a.apiParams=l.extend(a.apiParams,{in_sektion:e.apiParams.to_sektion,action:"sek-refresh-columns-in-sektion"}),d.ajaxRefreshColumns(a)}break;case"sek-move-module":var i=r.extend(!0,{},e),n=r.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=l.extend(i.apiParams,{in_column:i.apiParams.from_column,in_sektion:i.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),d.ajaxRefreshModulesAndNestedSections(i)),e.apiParams=l.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),d.ajaxRefreshModulesAndNestedSections(n),r('[data-sek-id="'+e.apiParams.to_column+'"]',".sektion-wrapper").find(".sek-column-inner").sortable("refresh")}},"sek-edit-options":function(e){d.activeLevelUI(e.uiParams.id)},"sek-edit-module":function(e){d.activeLevelUI(e.uiParams.id)},"sek-drag-start":function(n){var s=1,o=!1;r('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=r(this).data("sek-id"),t=r(this).find('[data-sek-level="column"]').length,a=r(this).find('[data-sek-level="module"]').length,i=t<2&&a<1;!o&&!i&&r('[data-drop-zone-before-section="'+e+'"]').length<1&&r(this).before('<div class="sek-content-'+n.content_type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+e+'"></div>'),i||s!=r(".sektion-wrapper").children('[data-sek-level="section"]').length||r(this).after('<div class="sek-content-'+n.content_type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+e+'"></div>'),s++,o=i}),r(".sek-empty-location-placeholder").each(function(){r.when(r(this).append('<div class="sek-content-'+n.content_type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),("module"==n.content_type||"preset_section"==n.content_type&&!0===n.eligible_for_module_dropzones)&&r('[data-sek-level="column"]').each(function(){var e=r(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=r(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){r('[data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).before('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a==e.length&&r('[data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).after('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a++})}),d.cachedElements.$body.addClass("sek-dragging"),l.delay(function(){r(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){d.cachedElements.$body.removeClass("sek-dragging"),r(".sortable-placeholder").remove(),r(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&r("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-clean-level-uis":function(e){r(".sek-dyn-ui-wrapper").each(function(){r(this).remove()})},"sek-display-level-ui":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&d.printLevelUI(t)},"sek-set-double-click-target":function(e){if(r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),l.isObject(e)&&e.id){var t=r('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")},"sek-update-html-in-selector":function(e){var t,a=r('[data-sek-id="'+e.id+'"]');t=l.isEmpty(e.changed_item_id)?r(e.selector,a):r('[data-sek-item-id="'+e.changed_item_id+'"] '+e.selector,a),0<a.length&&0<t.length?t.html(e.html):d.errare("reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element",e)},"sek-print-confettis":function(e){if(window.confetti&&window.requestAnimationFrame){var t=(e=e||{}).duration||Date.now()+1e3,a=["#f18700","#684F2F","#eea236"];!function e(){confetti({particleCount:2,angle:60,spread:55,origin:{x:0,y:.8},colors:a}),confetti({particleCount:4,angle:120,spread:55,origin:{x:1,y:.8},colors:a}),Date.now()<t&&window.requestAnimationFrame(e)}()}}},i=function(a,e,i){a=l.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});d.cachedElements.$body.addClass(i);try{r.when(l.isFunction(e)?e(a):d[e].call(d,a)).done(function(e){var t;t=e,o.preview.send([i,"done"].join("_"),a),a.apiParams.is_multi_items&&"sek-refresh-level"===a.apiParams.action&&o.preview.send("multi-items-module-refreshed",a),l.isUndefined(t)||t.data&&t.data.setting_validities&&o.preview.send("selective-refresh-setting-validities",t.data.setting_validities)}).fail(function(){o.preview.send("sek-notify",{type:"error",duration:1e4,message:sekPreviewLocalized.i18n["Something went wrong, please refresh this page."]})}).always(function(e){d.cachedElements.$body.removeClass(i)}).then(function(){o.preview.trigger("control-panel-requested-action-done",{action:i,args:a})})}catch(e){d.errare("reactToPanelMsg => Error when firing the callback of "+i,e),d.cachedElements.$body.removeClass(i)}a.apiParams.id&&((!(t=d.activeLevelEl())||!l.isObject(t)||t.length<1||d.activeLevelUI()!==a.apiParams.id)&&(d.activeLevelEl(r('[data-sek-id="'+a.apiParams.id+'"]')),t=d.activeLevelEl()),0<t.length&&!nb_.isInScreen(t[0])&&t[0].scrollIntoView())};l.each(e,function(t,a){"sek-refresh-stylesheet"===a?(o.preview.bind(a,function(e){i(e,t,a)}),o.preview.bind(a,l.debounce(function(e){i(e,t,a),e&&e.apiParams&&e.apiParams.id&&o.preview.trigger("sek-animate-to-level",{id:e.apiParams.id})},1e3))):o.preview.bind(a,function(e){i(e,t,a)})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,d){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.location}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested,content_type:n.all_params&&n.all_params.content_type?n.all_params.content_type:null,collection_of_preset_section_id:n.all_params&&n.all_params.collection_of_preset_section_id?n.all_params.collection_of_preset_section_id:[]}).done(function(e){var t,a="";if(e.data&&e.data.contents?a=e.data.contents:(s.errare("SekPreviewPrototype::ajaxAddSektion => ajax_response.data.contents is undefined ",e),s.errare("params ?",n)),n.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_column+'"]')).length<1&&s.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';t.before(i),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=n.apiParams.action||d.isEmpty(n.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.after_section+'"]'),!d.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!d.isEmpty(n.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+n.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==n.apiParams.action&&o('div[data-sek-id="'+n.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),n.apiParams.is_nested&&(s.makeModulesSortableInColumn(n.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').each(function(){s.maybeMakeColumnResizableInSektion.call(this)})),n.cloneId&&o('div[data-sek-id="'+n.cloneId+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.location+'"]').trigger("sek-location-refreshed",n)}).fail(function(e){s.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,d,e){d.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_sektion}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshColumns => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=d('div[data-sek-id="'+n.apiParams.in_sektion+'"]');a.length<1&&s.errare("reactToPanelMsg => "+n.apiParams.action+" => no DOM node for parent sektion => ",n.apiParams.in_sektion);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_sektion+'"></span>';a.before(i),a.remove(),d(".sektion-wrapper").find(".sek-placeholder").after(t),d(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),d('div[data-sek-id="'+n.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-column => ",e),d('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),i.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(i.errare("SekPreviewPrototype::ajaxResizeColumns => ajax_response.data.contents is undefined ",e),i.errare("params ?",a)),d('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),d('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),d('[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,t){o.extend(SekPreviewPrototype,{ajaxRefreshModulesAndNestedSections:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_column}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshModulesAndNestedSections => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=o('[data-sek-id="'+n.apiParams.in_column+'"]');a.length<1&&s.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';a.before(i),a.remove(),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+n.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:n.apiParams.in_column,in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),i.doAjax({action:"sek_get_content",location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents&&(t=e.data.contents),i.appendDynStyleSheet(a.location_skope_id,t),s('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){i.errare("sek-refresh-stylesheet fail !"),s('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,i="#"+sekPreviewLocalized.googleFontsStyleId,n="#"+sekPreviewLocalized.globalOptionsStyleId;0<s("head").find(a).length&&s("head").find(a).remove(),0<s("head").find(i).length&&s("head").find(i).remove(),0<s("head").find(n).length&&s("head").find(n).remove(),o.isEmpty(t)||s("head").append(t),!o.isEmpty(t)&&s("head").find(a).length<1&&s("head").find(i).length<1&&s("head").find(n).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a,t):s("head").find(a).attr("sek-data-origin","customizer")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(d,r,l){r.extend(SekPreviewPrototype,{parseTemplate:l.memoize(function(t){var a,i=this,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(r(t).length<1)return i.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||l.template(r(t).html(),n)}catch(e){i.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=l.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=l.isEmpty(l.filter(a,function(e){return!l.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,l.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){l.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?l.isUndefined(t)?console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:[e]})))},errare:function(e,t){this._wrapLogInsideTags(e,t,"#ffd5a0")},infoLog:function(e,t){this._wrapLogInsideTags(e,t,"#5ed1f5")},doAjax:function(e){var t=this,a=(e=e||(l.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,i=sekPreviewLocalized.frontNonce,n=r.Deferred(),s=l.extend({action:"",withNonce:!1},e),o=document.createElement("a");return o.href=a,d.isLinkPreviewable(o,{allowAdminAjax:!0})?("https:"==document.location.protocol&&(a=a.replace("http://","https://")),l.isEmpty(s.action)||!l.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),n.resolve().promise()):(s[i.id]=i.handle,!l.isObject(i)||l.isUndefined(i.id)||l.isUndefined(i.handle)?(t.errare("self.doAjax : unproper nonce"),n.resolve().promise()):(s["preview-level-guid"]=sekPreviewLocalized.previewLevelGuid,s.czr_query_params=JSON.stringify(l.isObject(_wpCustomizeSettings.czr_query_params)?_wpCustomizeSettings.czr_query_params:[]),r.post(a,s).done(function(e){"0"!==e&&"-1"!==e&&!1!==e.success||(t.errare("self.doAjax : done ajax error for action : "+s.action,e),n.reject(e)),n.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+s.action,e),n.reject(e)}),n.promise()))):(t.errare("self.doAjax => error => !api.isLinkPreviewable for action "+s.action,o),n.resolve().promise())},isModuleRegistered:function(e){return sekPreviewLocalized.registeredModules&&!l.isUndefined(sekPreviewLocalized.registeredModules[e])},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sekPreviewLocalized.registeredModules[e][t]:"not_set"},getLevelModel:function(t,e){var a=this,i="no_match";return l.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),l.each(e,function(e){"no_match"==i&&(t===e.id?i=e:l.isArray(e.collection)&&(i=a.getLevelModel(t,e.collection)))}),i}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var i=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new i}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
|
inc/admin/nb-options.php
CHANGED
@@ -265,12 +265,12 @@ function nb_maybe_update_checkbox_option( $opt_name, $unchecked_value ) {
|
|
265 |
$opt_value = get_option( $opt_name );
|
266 |
$posted_value = array_key_exists( $opt_name, $_POST ) ? $_POST[$opt_name] : $unchecked_value;
|
267 |
if ( $unchecked_value !== $posted_value ) {
|
268 |
-
update_option( $opt_name, esc_attr( $posted_value ) );
|
269 |
} else {
|
270 |
// if the option was never set before, then leave it not set
|
271 |
// otherwise update it to 'off'
|
272 |
if ( false !== $opt_value ) {
|
273 |
-
update_option( $opt_name, $unchecked_value );
|
274 |
}
|
275 |
}
|
276 |
}
|
265 |
$opt_value = get_option( $opt_name );
|
266 |
$posted_value = array_key_exists( $opt_name, $_POST ) ? $_POST[$opt_name] : $unchecked_value;
|
267 |
if ( $unchecked_value !== $posted_value ) {
|
268 |
+
update_option( $opt_name, esc_attr( $posted_value ), 'no' );
|
269 |
} else {
|
270 |
// if the option was never set before, then leave it not set
|
271 |
// otherwise update it to 'off'
|
272 |
if ( false !== $opt_value ) {
|
273 |
+
update_option( $opt_name, $unchecked_value, 'no' );
|
274 |
}
|
275 |
}
|
276 |
}
|
inc/admin/nimble-admin.php
CHANGED
@@ -34,7 +34,7 @@ add_action( 'plugins_loaded', '\Nimble\sek_versionning');
|
|
34 |
function sek_versionning() {
|
35 |
$current_version = get_option( 'nimble_version' );
|
36 |
if ( $current_version != NIMBLE_VERSION ) {
|
37 |
-
update_option( 'nimble_version_upgraded_from', $current_version );
|
38 |
update_option( 'nimble_version', NIMBLE_VERSION );
|
39 |
}
|
40 |
$started_with = get_option( 'nimble_started_with_version' );
|
@@ -471,7 +471,7 @@ function sek_may_be_display_update_notice() {
|
|
471 |
|
472 |
if ( !$last_update_notice_values || !is_array($last_update_notice_values) ) {
|
473 |
$last_update_notice_values = array( "version" => NIMBLE_VERSION, "display_count" => 0 );
|
474 |
-
update_option( 'nimble_last_update_notice', $last_update_notice_values );
|
475 |
if ( sek_user_started_before_version( NIMBLE_VERSION ) ) {
|
476 |
$show_new_notice = true;
|
477 |
}
|
@@ -484,11 +484,11 @@ function sek_may_be_display_update_notice() {
|
|
484 |
$show_new_notice = true;
|
485 |
(int) $_db_displayed_count++;
|
486 |
$last_update_notice_values["display_count"] = $_db_displayed_count;
|
487 |
-
update_option( 'nimble_last_update_notice', $last_update_notice_values );
|
488 |
}
|
489 |
else {
|
490 |
$new_val = array( "version" => NIMBLE_VERSION, "display_count" => 0 );
|
491 |
-
update_option('nimble_last_update_notice', $new_val );
|
492 |
}//end else
|
493 |
}//end if
|
494 |
|
@@ -570,7 +570,7 @@ function sek_may_be_display_update_notice() {
|
|
570 |
function sek_dismiss_update_notice_action() {
|
571 |
check_ajax_referer( 'dismiss-update-notice-nonce', 'dismissUpdateNoticeNonce' );
|
572 |
$new_val = array( "version" => NIMBLE_VERSION, "display_count" => 0 );
|
573 |
-
update_option( 'nimble_last_update_notice', $new_val );
|
574 |
wp_die( 1 );
|
575 |
}
|
576 |
function sek_welcome_notice_is_dismissed() {
|
34 |
function sek_versionning() {
|
35 |
$current_version = get_option( 'nimble_version' );
|
36 |
if ( $current_version != NIMBLE_VERSION ) {
|
37 |
+
update_option( 'nimble_version_upgraded_from', $current_version, 'no' );
|
38 |
update_option( 'nimble_version', NIMBLE_VERSION );
|
39 |
}
|
40 |
$started_with = get_option( 'nimble_started_with_version' );
|
471 |
|
472 |
if ( !$last_update_notice_values || !is_array($last_update_notice_values) ) {
|
473 |
$last_update_notice_values = array( "version" => NIMBLE_VERSION, "display_count" => 0 );
|
474 |
+
update_option( 'nimble_last_update_notice', $last_update_notice_values, 'no' );
|
475 |
if ( sek_user_started_before_version( NIMBLE_VERSION ) ) {
|
476 |
$show_new_notice = true;
|
477 |
}
|
484 |
$show_new_notice = true;
|
485 |
(int) $_db_displayed_count++;
|
486 |
$last_update_notice_values["display_count"] = $_db_displayed_count;
|
487 |
+
update_option( 'nimble_last_update_notice', $last_update_notice_values, 'no' );
|
488 |
}
|
489 |
else {
|
490 |
$new_val = array( "version" => NIMBLE_VERSION, "display_count" => 0 );
|
491 |
+
update_option('nimble_last_update_notice', $new_val, 'no' );
|
492 |
}//end else
|
493 |
}//end if
|
494 |
|
570 |
function sek_dismiss_update_notice_action() {
|
571 |
check_ajax_referer( 'dismiss-update-notice-nonce', 'dismissUpdateNoticeNonce' );
|
572 |
$new_val = array( "version" => NIMBLE_VERSION, "display_count" => 0 );
|
573 |
+
update_option( 'nimble_last_update_notice', $new_val, 'no' );
|
574 |
wp_die( 1 );
|
575 |
}
|
576 |
function sek_welcome_notice_is_dismissed() {
|
inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.js
CHANGED
@@ -564,7 +564,7 @@ if ( 'function' != typeof(jQuery.fn.stepper) ) {
|
|
564 |
// @see core customize-preview.js
|
565 |
// This is how NB can :
|
566 |
// - dynamically register settings server side in PHP customize manager while doing ajax actions
|
567 |
-
// - get the customized sektion collection. @see sek_get_skoped_seks() and
|
568 |
setting.previewer.send( 'setting', [ setting.id, setting() ] );
|
569 |
|
570 |
dfd.resolve( arguments );
|
564 |
// @see core customize-preview.js
|
565 |
// This is how NB can :
|
566 |
// - dynamically register settings server side in PHP customize manager while doing ajax actions
|
567 |
+
// - get the customized sektion collection. @see sek_get_skoped_seks() and Nimble_Collection_Setting::filter_previewed_sek_get_skoped_seks
|
568 |
setting.previewer.send( 'setting', [ setting.id, setting() ] );
|
569 |
|
570 |
dfd.resolve( arguments );
|
inc/sektions/ccat-constants-and-helper-functions.php
CHANGED
@@ -29,10 +29,11 @@ if ( !defined( 'NIMBLE_DEPREC_TWO_CSS_FOLDER_NAME' ) ) { define( 'NIMBLE_DEPREC_
|
|
29 |
if ( !defined( 'NIMBLE_CSS_FOLDER_NAME' ) ) { define( 'NIMBLE_CSS_FOLDER_NAME' , 'nimble_css' ); }
|
30 |
if ( !defined( 'NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS' ) ) { define( 'NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS' , 'nimble_module_css_read_status' ); }
|
31 |
|
|
|
32 |
if ( !defined( 'NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION' ) ) { define( 'NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION' , 'nimble___' ); }
|
33 |
if ( !defined( 'NIMBLE_GLOBAL_SKOPE_ID' ) ) { define( 'NIMBLE_GLOBAL_SKOPE_ID' , 'skp__global' ); }
|
34 |
|
35 |
-
if ( !defined( 'NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS' ) ) { define( 'NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS' , '
|
36 |
|
37 |
if ( !defined( 'NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS' ) ) { define( 'NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS' , 'nimble_site_templates' ); }
|
38 |
|
@@ -40,7 +41,7 @@ if ( !defined( 'NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS' ) ) { define( 'NIMBLE_OPT
|
|
40 |
if ( !defined( 'NIMBLE_OPT_NAME_FOR_MOST_USED_FONTS' ) ) { define( 'NIMBLE_OPT_NAME_FOR_MOST_USED_FONTS' , 'nimble_most_used_fonts' ); }
|
41 |
if ( !defined( 'NIMBLE_OPT_FOR_GLOBAL_CSS' ) ) { define( 'NIMBLE_OPT_FOR_GLOBAL_CSS' , 'nimble_global_css' ); }
|
42 |
|
43 |
-
if ( !defined( 'NIMBLE_OPT_NAME_FOR_SECTION_JSON' ) ) { define( 'NIMBLE_OPT_NAME_FOR_SECTION_JSON' , '
|
44 |
|
45 |
if ( !defined( 'NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES' ) ) { define( 'NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES' , 'nb_backward_fixes' ); }
|
46 |
|
@@ -65,7 +66,7 @@ if ( !defined( 'NIMBLE_TEMPLATE_SAVE_ENABLED' ) ) { define ( 'NIMBLE_TEMPLATE_SA
|
|
65 |
if ( !defined( 'NIMBLE_TEMPLATE_GALLERY_ENABLED' ) ) { define ( 'NIMBLE_TEMPLATE_GALLERY_ENABLED', file_exists( get_template_directory() . '/core/init-pro.php' )); }
|
66 |
|
67 |
if ( !defined( "NIMBLE_DATA_API_URL_V2" ) ) { define( "NIMBLE_DATA_API_URL_V2",
|
68 |
-
( defined('
|
69 |
); }
|
70 |
|
71 |
?><?php
|
@@ -999,6 +1000,23 @@ function sek_get_module_collection() {
|
|
999 |
|
1000 |
|
1001 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1002 |
// @return void()
|
1003 |
// Fired in 'wp_enqueue_scripts'
|
1004 |
// Recursively sniff the local and global sections to populate Nimble_Manager()->contextually_active_modules
|
@@ -2379,7 +2397,7 @@ function sek_site_has_nimble_sections_created() {
|
|
2379 |
$sek_post_query_vars = array(
|
2380 |
'post_type' => NIMBLE_CPT,
|
2381 |
'post_status' => get_post_stati(),
|
2382 |
-
//'name' => sanitize_title(
|
2383 |
'posts_per_page' => -1,
|
2384 |
'no_found_rows' => true,
|
2385 |
'cache_results' => true,
|
@@ -2445,7 +2463,7 @@ function sek_get_feedback_notif_status() {
|
|
2445 |
$sek_post_query_vars = array(
|
2446 |
'post_type' => NIMBLE_CPT,
|
2447 |
'post_status' => get_post_stati(),
|
2448 |
-
//'name' => sanitize_title(
|
2449 |
'posts_per_page' => -1,
|
2450 |
'no_found_rows' => true,
|
2451 |
'cache_results' => true,
|
@@ -2954,22 +2972,6 @@ function sek_get_pro_notice_for_czr_input( $features = '' ) {
|
|
2954 |
}
|
2955 |
|
2956 |
|
2957 |
-
// September 2020 : filter the collection of modules
|
2958 |
-
// Removes pro upsell modules if NIMBLE_PRO_UPSELL_ON is false
|
2959 |
-
// filter declared in inc/sektions/_front_dev_php/_constants_and_helper_functions/0_0_5_modules_helpers.php
|
2960 |
-
add_filter('sek_get_module_collection', function( $collection ) {
|
2961 |
-
if ( defined('NIMBLE_PRO_UPSELL_ON') && NIMBLE_PRO_UPSELL_ON )
|
2962 |
-
return $collection;
|
2963 |
-
|
2964 |
-
$filtered = [];
|
2965 |
-
foreach ($collection as $mod => $mod_data) {
|
2966 |
-
if ( array_key_exists('is_pro', $mod_data) && $mod_data['is_pro'] )
|
2967 |
-
continue;
|
2968 |
-
$filtered[] = $mod_data;
|
2969 |
-
}
|
2970 |
-
return $filtered;
|
2971 |
-
});
|
2972 |
-
|
2973 |
// September 2020 : filter the collection of pre-built sections
|
2974 |
// Removes pro upsell modules if NIMBLE_PRO_UPSELL_ON is false
|
2975 |
// filter declared in _front_dev_php/_constants_and_helper_functions/0_5_2_sektions_local_sektion_data.php
|
@@ -2991,48 +2993,6 @@ add_filter('sek_get_raw_section_registration_params', function( $collection ) {
|
|
2991 |
return $filtered;
|
2992 |
});
|
2993 |
|
2994 |
-
// @return bool
|
2995 |
-
function sek_is_json( $string ){
|
2996 |
-
if ( !is_string( $string ) )
|
2997 |
-
return false;
|
2998 |
-
json_decode($string);
|
2999 |
-
return (json_last_error() == JSON_ERROR_NONE);
|
3000 |
-
}
|
3001 |
-
|
3002 |
-
// @return string
|
3003 |
-
function sek_maybe_decode_json( $string ){
|
3004 |
-
if ( !is_string($string) )
|
3005 |
-
return $string;
|
3006 |
-
|
3007 |
-
$json_decoded_candidate = json_decode($string, true);
|
3008 |
-
if ( json_last_error() == JSON_ERROR_NONE ) {
|
3009 |
-
// https://stackoverflow.com/questions/6465263/how-to-reverse-htmlentities
|
3010 |
-
// added to fix regression https://github.com/presscustomizr/nimble-builder/issues/791
|
3011 |
-
$json_decoded_candidate = html_entity_decode($json_decoded_candidate, ENT_QUOTES, get_bloginfo( 'charset' ) );
|
3012 |
-
//sek_error_log('DECODED DECODED ?', $json_decoded_candidate );
|
3013 |
-
return $json_decoded_candidate;
|
3014 |
-
}
|
3015 |
-
|
3016 |
-
return $string;
|
3017 |
-
}
|
3018 |
-
|
3019 |
-
// @return string
|
3020 |
-
function sek_maybe_json_encode( $string ){
|
3021 |
-
if ( !is_string($string) )
|
3022 |
-
return $string;
|
3023 |
-
// only encode if not already encoded
|
3024 |
-
if ( !sek_is_json($string) ) {
|
3025 |
-
// https://stackoverflow.com/questions/6465263/how-to-reverse-htmlentities
|
3026 |
-
// added to fix regression https://github.com/presscustomizr/nimble-builder/issues/791
|
3027 |
-
$string = htmlentities($string, ENT_COMPAT, get_bloginfo( 'charset' ) );//reversed with html_entity_decode
|
3028 |
-
//$string = wp_encode_emoji( $string );
|
3029 |
-
$string = wp_json_encode($string);
|
3030 |
-
//sek_error_log('JSON ENCODED ?', $string );
|
3031 |
-
}
|
3032 |
-
return $string;
|
3033 |
-
}
|
3034 |
-
|
3035 |
-
|
3036 |
|
3037 |
// Feb 2021 : site templates exploration
|
3038 |
// see https://github.com/presscustomizr/nimble-builder/issues/478
|
@@ -3052,9 +3012,6 @@ function sek_generate_level_guid() {
|
|
3052 |
// * NIMBLE API
|
3053 |
// /* ------------------------------------------------------------------------- */
|
3054 |
// if ( !defined( "NIMBLE_SECTIONS_LIBRARY_OPT_NAME" ) ) { define( "NIMBLE_SECTIONS_LIBRARY_OPT_NAME", 'nimble_api_prebuilt_sections_data' ); } <= DEPRECATED, Now uses local json
|
3055 |
-
if ( !defined( "NIMBLE_API_TMPL_LIB_OPT_NAME" ) ) { define( "NIMBLE_API_TMPL_LIB_OPT_NAME", 'nimble_api_tmpl_data' ); }
|
3056 |
-
if ( !defined( "NIMBLE_API_NEWS_OPT_NAME" ) ) { define( "NIMBLE_API_NEWS_OPT_NAME", 'nimble_api_news_data' ); }
|
3057 |
-
|
3058 |
|
3059 |
// Nimble api returns a set of value structured as follow
|
3060 |
// return array(
|
@@ -3074,80 +3031,104 @@ if ( !defined( "NIMBLE_API_NEWS_OPT_NAME" ) ) { define( "NIMBLE_API_NEWS_OPT_NAM
|
|
3074 |
// );
|
3075 |
// @return array|false Info data, or false.
|
3076 |
// api data is refreshed on plugin update and theme switch
|
3077 |
-
|
3078 |
-
|
3079 |
-
$
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3086 |
}
|
3087 |
|
3088 |
-
// July 2020 => new static transient name, not updated on each NB version
|
3089 |
-
$api_data_transient_name = 'nimble_data_api';
|
3090 |
-
$info_data = get_transient( $api_data_transient_name );
|
3091 |
$theme_slug = sek_get_parent_theme_slug();
|
3092 |
-
$
|
|
|
|
|
|
|
|
|
|
|
3093 |
// set this constant in wp_config.php
|
3094 |
$force_update = ( defined( 'NIMBLE_FORCE_UPDATE_API_DATA') && NIMBLE_FORCE_UPDATE_API_DATA ) ? true : $force_update;
|
3095 |
-
if ( true === $force_update
|
3096 |
-
sek_error_log('API is in force update mode');
|
3097 |
-
}
|
3098 |
-
|
3099 |
-
// Refresh every 12 hours, unless force_update set to true
|
3100 |
-
if ( $force_update || false === $info_data ) {
|
3101 |
-
$timeout = ( $force_update ) ? 25 : 8;
|
3102 |
-
$response = wp_remote_get( NIMBLE_DATA_API_URL_V2, array(
|
3103 |
-
'timeout' => $timeout,
|
3104 |
-
'body' => [
|
3105 |
-
'api_version' => NIMBLE_VERSION,
|
3106 |
-
'site_lang' => get_bloginfo( 'language' ),
|
3107 |
-
'theme_name' => $pc_theme_name,
|
3108 |
-
'start_ver' => sek_get_th_start_ver( $pc_theme_name )
|
3109 |
-
],
|
3110 |
-
) );
|
3111 |
|
3112 |
-
if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
|
3113 |
-
// HOUR_IN_SECONDS is a default WP constant
|
3114 |
-
set_transient( $api_data_transient_name, [], 2 * HOUR_IN_SECONDS );
|
3115 |
-
return false;
|
3116 |
-
}
|
3117 |
|
3118 |
-
|
|
|
|
|
|
|
|
|
|
|
3119 |
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
|
|
|
|
|
|
|
|
3124 |
|
3125 |
-
//
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
// }
|
3133 |
-
|
3134 |
-
if ( !empty( $info_data['lib'] ) ) {
|
3135 |
-
if ( !empty( $info_data['lib']['templates'] ) ) {
|
3136 |
-
//sek_error_log('UPDATE TMPL API DATA ?', $info_data['lib']['templates'] );
|
3137 |
-
update_option( NIMBLE_API_TMPL_LIB_OPT_NAME, maybe_serialize( $info_data['lib']['templates'] ), 'no' );
|
3138 |
-
}
|
3139 |
-
unset( $info_data['lib'] );
|
3140 |
}
|
3141 |
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
|
|
|
|
|
|
3145 |
}
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
|
|
|
|
|
|
|
|
3149 |
|
3150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3151 |
}
|
3152 |
|
3153 |
|
@@ -3161,19 +3142,17 @@ function sek_get_tmpl_api_data( $force_update = false ) {
|
|
3161 |
// Let's use the data saved as options
|
3162 |
// Those data are updated on plugin install, plugin update( upgrader_process_complete ), theme switch
|
3163 |
// @see https://github.com/presscustomizr/nimble-builder/issues/441
|
3164 |
-
$
|
3165 |
-
|
3166 |
-
|
3167 |
-
$tmpl_data = maybe_unserialize( get_option( NIMBLE_API_TMPL_LIB_OPT_NAME ) );
|
3168 |
-
}
|
3169 |
//sek_error_log('TMPL DATA ?', $tmpl_data);
|
3170 |
-
if ( empty( $
|
3171 |
sek_error_log( __FUNCTION__ . ' => error => no json_collection' );
|
3172 |
return array();
|
3173 |
}
|
3174 |
|
3175 |
//return [];
|
3176 |
-
return maybe_unserialize( $
|
3177 |
}
|
3178 |
|
3179 |
|
@@ -3183,14 +3162,12 @@ function sek_get_tmpl_api_data( $force_update = false ) {
|
|
3183 |
function sek_get_latest_posts_api_data( $force_update = false ) {
|
3184 |
// set this constant in wp_config.php
|
3185 |
$force_update = ( defined( 'NIMBLE_FORCE_UPDATE_API_DATA') && NIMBLE_FORCE_UPDATE_API_DATA ) ? true : $force_update;
|
3186 |
-
|
3187 |
-
|
3188 |
-
$latest_posts = get_option( NIMBLE_API_NEWS_OPT_NAME );
|
3189 |
-
if ( empty( $latest_posts ) ) {
|
3190 |
sek_error_log( __FUNCTION__ . ' => error => no latest_posts' );
|
3191 |
-
return
|
3192 |
}
|
3193 |
-
return $latest_posts;
|
3194 |
}
|
3195 |
|
3196 |
// @return html string
|
@@ -3198,12 +3175,13 @@ function sek_start_msg_from_api( $theme_name, $force_update = false ) {
|
|
3198 |
// set this constant in wp_config.php
|
3199 |
$force_update = ( defined( 'NIMBLE_FORCE_UPDATE_API_DATA') && NIMBLE_FORCE_UPDATE_API_DATA ) ? true : $force_update;
|
3200 |
|
3201 |
-
$
|
3202 |
-
if ( !sek_is_presscustomizr_theme( $theme_name ) || !is_array( $
|
3203 |
return '';
|
3204 |
}
|
3205 |
$msg = '';
|
3206 |
-
$
|
|
|
3207 |
|
3208 |
if ( !is_null($api_msg) && is_string($api_msg) ) {
|
3209 |
$msg = $api_msg;
|
@@ -3212,13 +3190,13 @@ function sek_start_msg_from_api( $theme_name, $force_update = false ) {
|
|
3212 |
}
|
3213 |
|
3214 |
// Refresh the api data on plugin update and theme switch
|
3215 |
-
add_action( 'after_switch_theme', '\Nimble\sek_refresh_nimble_api_data');
|
3216 |
-
add_action( 'upgrader_process_complete', '\Nimble\sek_refresh_nimble_api_data');
|
3217 |
-
function sek_refresh_nimble_api_data() {
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
}
|
3222 |
|
3223 |
|
3224 |
//////////////////////////////////////////////////
|
@@ -3482,6 +3460,7 @@ function sek_get_preset_section_collection_from_json( $force_update = false ) {
|
|
3482 |
update_option( NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES, $bw_fixes_options );
|
3483 |
}
|
3484 |
|
|
|
3485 |
$json_collection = get_option( NIMBLE_OPT_NAME_FOR_SECTION_JSON );
|
3486 |
|
3487 |
// Refresh every 30 days, unless force_update set to true
|
@@ -3494,7 +3473,7 @@ function sek_get_preset_section_collection_from_json( $force_update = false ) {
|
|
3494 |
|
3495 |
$json_collection = json_decode( $json_raw, true );
|
3496 |
// Save now as option for faster access next time
|
3497 |
-
update_option( NIMBLE_OPT_NAME_FOR_SECTION_JSON, $json_collection );
|
3498 |
}
|
3499 |
// Filter used by NB Pro to add pro sections
|
3500 |
return apply_filters( 'nimble_preset_sections_collection', $json_collection, $force_update );
|
@@ -3648,6 +3627,91 @@ function sek_get_customize_url_for_post_id( $post_id, $return_url = '' ) {
|
|
3648 |
}
|
3649 |
|
3650 |
?><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3651 |
// JULY 2020 => NOT FIRED ANYMORE ( because introduced in oct 2018 ) => DEACTIVATED IN nimble-builder.php
|
3652 |
// fired @wp_loaded
|
3653 |
// Note : if fired @plugins_loaded, invoking wp_update_post() generates php notices
|
@@ -3698,7 +3762,7 @@ function sek_do_compat_to_1_4_0() {
|
|
3698 |
$post_id_storing_home_page_sections = (int)get_option( $current_option_name );
|
3699 |
if ( $post_id_storing_home_page_sections > 0 ) {
|
3700 |
$new_option_name = NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . "skp__post_page_{$home_page_id}";
|
3701 |
-
update_option( $new_option_name, $post_id_storing_home_page_sections );
|
3702 |
}
|
3703 |
}
|
3704 |
}
|
@@ -3714,7 +3778,7 @@ function sek_do_compat_1_0_4_to_1_1_0() {
|
|
3714 |
$sek_post_query_vars = array(
|
3715 |
'post_type' => NIMBLE_CPT,
|
3716 |
'post_status' => get_post_stati(),
|
3717 |
-
//'name' => sanitize_title(
|
3718 |
'posts_per_page' => -1,
|
3719 |
'no_found_rows' => true,
|
3720 |
'cache_results' => true,
|
@@ -3967,7 +4031,43 @@ register_post_type( NIMBLE_CPT , array(
|
|
3967 |
)
|
3968 |
));
|
3969 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3970 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3971 |
|
3972 |
|
3973 |
|
@@ -4009,20 +4109,18 @@ function sek_get_seks_post( $skope_id = '', $skope_level = 'local' ) {
|
|
4009 |
|
4010 |
$post = null;
|
4011 |
|
4012 |
-
$
|
4013 |
-
|
4014 |
-
|
|
|
|
|
4015 |
// if the options has not been set yet, it will return (int) 0
|
4016 |
// id #1 is already taken by the 'Hello World' post.
|
4017 |
if ( 1 > $post_id ) {
|
4018 |
-
//error_log( 'sek_get_seks_post => post_id is not valid for options => ' . $
|
4019 |
return;
|
4020 |
}
|
4021 |
|
4022 |
-
if ( !is_int( $post_id ) ) {
|
4023 |
-
error_log( 'sek_get_seks_post => post_id !is_int() for options => ' . $option_name );
|
4024 |
-
}
|
4025 |
-
|
4026 |
if ( is_int( $post_id ) && $post_id > 0 && get_post( $post_id ) ) {
|
4027 |
$post = get_post( $post_id );
|
4028 |
}
|
@@ -4036,7 +4134,7 @@ function sek_get_seks_post( $skope_id = '', $skope_level = 'local' ) {
|
|
4036 |
* Cache the lookup. See sek_update_sek_post().
|
4037 |
* @todo This should get cleared if a skope post is added/removed.
|
4038 |
*/
|
4039 |
-
|
4040 |
}
|
4041 |
if ( !skp_is_customizing() ) {
|
4042 |
$cached_seks_posts[$skope_id] = $post;
|
@@ -4362,10 +4460,9 @@ function sek_update_sek_post( $seks_data, $args = array() ) {
|
|
4362 |
} else {
|
4363 |
$r = wp_insert_post( wp_slash( $post_data ), true );
|
4364 |
if ( !is_wp_error( $r ) ) {
|
4365 |
-
$option_name = NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . $skope_id;
|
4366 |
$post_id = $r;//$r is the post ID
|
4367 |
|
4368 |
-
|
4369 |
|
4370 |
// Trigger creation of a revision. This should be removed once #30854 is resolved.
|
4371 |
if ( 0 === count( wp_get_post_revisions( $r ) ) ) {
|
@@ -4485,7 +4582,7 @@ function sek_get_all_saved_sections() {
|
|
4485 |
$sek_post_query_vars = array(
|
4486 |
'post_type' => NIMBLE_SECTION_CPT,
|
4487 |
'post_status' => 'publish',
|
4488 |
-
//'name' => sanitize_title(
|
4489 |
'posts_per_page' => -1,
|
4490 |
'no_found_rows' => true,
|
4491 |
'cache_results' => true,
|
@@ -4561,7 +4658,7 @@ function sek_get_all_saved_sections() {
|
|
4561 |
// )
|
4562 |
// );
|
4563 |
// @return WP_Post|WP_Error Post on success, error on failure.
|
4564 |
-
function sek_update_saved_section_post( $section_data ) {
|
4565 |
if ( !is_array( $section_data ) ) {
|
4566 |
sek_error_log( __FUNCTION__ . ' => $section_data is not an array' );
|
4567 |
return new \WP_Error( __FUNCTION__ . ' => $section_data is not an array');
|
@@ -4588,7 +4685,6 @@ function sek_update_saved_section_post( $section_data ) {
|
|
4588 |
|
4589 |
// the section post name is provided only when updating
|
4590 |
$is_update_case = !is_null($section_data['section_post_name']);
|
4591 |
-
$is_edit_metas_only_case = 'yes' === $section_data['edit_metas_only'];
|
4592 |
|
4593 |
// $post_name_to_update will be used when user updates an existing section
|
4594 |
if ( !is_null($section_data['section_post_name']) ) {
|
@@ -4616,6 +4712,9 @@ function sek_update_saved_section_post( $section_data ) {
|
|
4616 |
}
|
4617 |
}
|
4618 |
|
|
|
|
|
|
|
4619 |
$new_or_updated_post_data = array(
|
4620 |
'post_title' => esc_attr( $section_data['metas']['title'] ),
|
4621 |
'post_name' => $section_post_name,
|
@@ -4754,7 +4853,7 @@ function sek_get_all_saved_templates() {
|
|
4754 |
$sek_post_query_vars = array(
|
4755 |
'post_type' => NIMBLE_TEMPLATE_CPT,
|
4756 |
'post_status' => 'publish',
|
4757 |
-
//'name' => sanitize_title(
|
4758 |
'posts_per_page' => -1,
|
4759 |
'no_found_rows' => true,
|
4760 |
'cache_results' => true,
|
@@ -4819,9 +4918,17 @@ function sek_get_all_saved_templates() {
|
|
4819 |
function sek_get_all_api_templates() {
|
4820 |
$raw_tmpl = sek_get_tmpl_api_data();
|
4821 |
$collection = [];
|
|
|
4822 |
if( !is_array( $raw_tmpl) )
|
4823 |
return $collection;
|
|
|
4824 |
foreach ( $raw_tmpl as $tmpl_cpt_post_name => $tmpl_data ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
4825 |
$metas = !is_array( $tmpl_data['metas'] ) ? [] : $tmpl_data['metas'];
|
4826 |
if ( empty($metas) )
|
4827 |
continue;
|
@@ -4855,7 +4962,7 @@ function sek_get_all_api_templates() {
|
|
4855 |
// )
|
4856 |
// );
|
4857 |
// @return WP_Post|WP_Error Post on success, error on failure.
|
4858 |
-
function sek_update_saved_tmpl_post( $tmpl_data ) {
|
4859 |
if ( !is_array( $tmpl_data ) ) {
|
4860 |
sek_error_log( __FUNCTION__ . ' => $tmpl_data is not an array' );
|
4861 |
return new \WP_Error( __FUNCTION__ . ' => $tmpl_data is not an array');
|
@@ -4875,14 +4982,18 @@ function sek_update_saved_tmpl_post( $tmpl_data ) {
|
|
4875 |
'skope_id' => '',
|
4876 |
'version' => NIMBLE_VERSION,
|
4877 |
'tmpl_locations' => array(),
|
|
|
|
|
4878 |
'date' => '',
|
4879 |
-
'theme' => ''
|
|
|
|
|
|
|
4880 |
)
|
4881 |
));
|
4882 |
|
4883 |
// the template post name is provided only when updating
|
4884 |
$is_update_case = !is_null($tmpl_data['tmpl_post_name']);
|
4885 |
-
$is_edit_metas_only_case = 'yes' === $tmpl_data['edit_metas_only'];
|
4886 |
|
4887 |
// $post_name_to_update will be used when user updates an existing template
|
4888 |
if ( !is_null($tmpl_data['tmpl_post_name']) ) {
|
@@ -4912,6 +5023,9 @@ function sek_update_saved_tmpl_post( $tmpl_data ) {
|
|
4912 |
}
|
4913 |
}
|
4914 |
|
|
|
|
|
|
|
4915 |
$new_or_updated_post_data = array(
|
4916 |
'post_title' => esc_attr( $tmpl_data['metas']['title'] ),
|
4917 |
'post_name' => $tmpl_post_name,
|
@@ -5034,7 +5148,7 @@ add_filter( 'wp_insert_post_data', function( $data, $postarr, $unsanitized_posta
|
|
5034 |
return new \WP_Error( 'db_insert_error', __('Could not insert NB template into the database : invalid JSON', 'nimble-builder'), json_last_error() );
|
5035 |
}
|
5036 |
}
|
5037 |
-
return $data;
|
5038 |
}, 10 , 3);
|
5039 |
|
5040 |
?><?php
|
@@ -5055,8 +5169,7 @@ function sek_get_revision_history_from_posts( $skope_id = '', $skope_level = 'lo
|
|
5055 |
if ( defined('DOING_AJAX') && DOING_AJAX && '_skope_not_set_' === $skope_id ) {
|
5056 |
wp_send_json_error( __FUNCTION__ . ' => invalid skope id' );
|
5057 |
}
|
5058 |
-
$
|
5059 |
-
$post_id = (int)get_option( $option_name );
|
5060 |
$raw_revision_history = array();
|
5061 |
if ( -1 !== $post_id ) {
|
5062 |
$args = array(
|
@@ -5095,4 +5208,121 @@ function sek_get_single_post_revision( $post_id = null ) {
|
|
5095 |
return maybe_unserialize( $post->post_content );
|
5096 |
}
|
5097 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5098 |
?>
|
29 |
if ( !defined( 'NIMBLE_CSS_FOLDER_NAME' ) ) { define( 'NIMBLE_CSS_FOLDER_NAME' , 'nimble_css' ); }
|
30 |
if ( !defined( 'NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS' ) ) { define( 'NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS' , 'nimble_module_css_read_status' ); }
|
31 |
|
32 |
+
if ( !defined( 'NIMBLE_OPT_SEKTION_POST_INDEX' ) ) { define( 'NIMBLE_OPT_SEKTION_POST_INDEX' , 'nimble_posts_index' ); }
|
33 |
if ( !defined( 'NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION' ) ) { define( 'NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION' , 'nimble___' ); }
|
34 |
if ( !defined( 'NIMBLE_GLOBAL_SKOPE_ID' ) ) { define( 'NIMBLE_GLOBAL_SKOPE_ID' , 'skp__global' ); }
|
35 |
|
36 |
+
if ( !defined( 'NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS' ) ) { define( 'NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS' , 'nimble_global_opts' ); }// <= name updated in march 2021 was __nimble_options__
|
37 |
|
38 |
if ( !defined( 'NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS' ) ) { define( 'NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS' , 'nimble_site_templates' ); }
|
39 |
|
41 |
if ( !defined( 'NIMBLE_OPT_NAME_FOR_MOST_USED_FONTS' ) ) { define( 'NIMBLE_OPT_NAME_FOR_MOST_USED_FONTS' , 'nimble_most_used_fonts' ); }
|
42 |
if ( !defined( 'NIMBLE_OPT_FOR_GLOBAL_CSS' ) ) { define( 'NIMBLE_OPT_FOR_GLOBAL_CSS' , 'nimble_global_css' ); }
|
43 |
|
44 |
+
if ( !defined( 'NIMBLE_OPT_NAME_FOR_SECTION_JSON' ) ) { define( 'NIMBLE_OPT_NAME_FOR_SECTION_JSON' , 'nimble_prebuild_sections' ); }// <= name updated in march 2021, was nb_prebuild_section_json
|
45 |
|
46 |
if ( !defined( 'NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES' ) ) { define( 'NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES' , 'nb_backward_fixes' ); }
|
47 |
|
66 |
if ( !defined( 'NIMBLE_TEMPLATE_GALLERY_ENABLED' ) ) { define ( 'NIMBLE_TEMPLATE_GALLERY_ENABLED', file_exists( get_template_directory() . '/core/init-pro.php' )); }
|
67 |
|
68 |
if ( !defined( "NIMBLE_DATA_API_URL_V2" ) ) { define( "NIMBLE_DATA_API_URL_V2",
|
69 |
+
( defined('NIMBLE_FETCH_API_LOCALLY') && NIMBLE_FETCH_API_LOCALLY ) ? 'http://customizr-dev.test/wp-json/nimble/v2/cravan' : 'https://api.nimblebuilder.com/wp-json/nimble/v2/cravan'
|
70 |
); }
|
71 |
|
72 |
?><?php
|
1000 |
|
1001 |
|
1002 |
|
1003 |
+
// September 2020 : filter the collection of modules
|
1004 |
+
// Removes pro upsell modules if NIMBLE_PRO_UPSELL_ON is false
|
1005 |
+
// filter declared in inc/sektions/_front_dev_php/_constants_and_helper_functions/0_0_5_modules_helpers.php
|
1006 |
+
add_filter('sek_get_module_collection', function( $collection ) {
|
1007 |
+
if ( defined('NIMBLE_PRO_UPSELL_ON') && NIMBLE_PRO_UPSELL_ON )
|
1008 |
+
return $collection;
|
1009 |
+
|
1010 |
+
$filtered = [];
|
1011 |
+
foreach ($collection as $mod => $mod_data) {
|
1012 |
+
if ( array_key_exists('is_pro', $mod_data) && $mod_data['is_pro'] )
|
1013 |
+
continue;
|
1014 |
+
$filtered[] = $mod_data;
|
1015 |
+
}
|
1016 |
+
return $filtered;
|
1017 |
+
});
|
1018 |
+
|
1019 |
+
|
1020 |
// @return void()
|
1021 |
// Fired in 'wp_enqueue_scripts'
|
1022 |
// Recursively sniff the local and global sections to populate Nimble_Manager()->contextually_active_modules
|
2397 |
$sek_post_query_vars = array(
|
2398 |
'post_type' => NIMBLE_CPT,
|
2399 |
'post_status' => get_post_stati(),
|
2400 |
+
//'name' => sanitize_title(),
|
2401 |
'posts_per_page' => -1,
|
2402 |
'no_found_rows' => true,
|
2403 |
'cache_results' => true,
|
2463 |
$sek_post_query_vars = array(
|
2464 |
'post_type' => NIMBLE_CPT,
|
2465 |
'post_status' => get_post_stati(),
|
2466 |
+
//'name' => sanitize_title(),
|
2467 |
'posts_per_page' => -1,
|
2468 |
'no_found_rows' => true,
|
2469 |
'cache_results' => true,
|
2972 |
}
|
2973 |
|
2974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2975 |
// September 2020 : filter the collection of pre-built sections
|
2976 |
// Removes pro upsell modules if NIMBLE_PRO_UPSELL_ON is false
|
2977 |
// filter declared in _front_dev_php/_constants_and_helper_functions/0_5_2_sektions_local_sektion_data.php
|
2993 |
return $filtered;
|
2994 |
});
|
2995 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2996 |
|
2997 |
// Feb 2021 : site templates exploration
|
2998 |
// see https://github.com/presscustomizr/nimble-builder/issues/478
|
3012 |
// * NIMBLE API
|
3013 |
// /* ------------------------------------------------------------------------- */
|
3014 |
// if ( !defined( "NIMBLE_SECTIONS_LIBRARY_OPT_NAME" ) ) { define( "NIMBLE_SECTIONS_LIBRARY_OPT_NAME", 'nimble_api_prebuilt_sections_data' ); } <= DEPRECATED, Now uses local json
|
|
|
|
|
|
|
3015 |
|
3016 |
// Nimble api returns a set of value structured as follow
|
3017 |
// return array(
|
3031 |
// );
|
3032 |
// @return array|false Info data, or false.
|
3033 |
// api data is refreshed on plugin update and theme switch
|
3034 |
+
// @$what param can be 'latest_posts_and_start_msg', 'templates'
|
3035 |
+
function sek_get_nimble_api_data( $what = null, $force_update = false ) {
|
3036 |
+
if ( is_null( $what ) || !is_string($what) ) {
|
3037 |
+
sek_error_log( __FUNCTION__ . ' => error => $what param not set');
|
3038 |
+
return false;
|
3039 |
+
}
|
3040 |
+
|
3041 |
+
$cached_api_data = wp_cache_get( 'nimble_api_data_'.$what );
|
3042 |
+
|
3043 |
+
if ( $cached_api_data && is_array($cached_api_data) && !empty($cached_api_data) ) {
|
3044 |
+
return $cached_api_data;
|
3045 |
+
}
|
3046 |
+
|
3047 |
+
$transient_name = '';
|
3048 |
+
$transient_duration = 24 * HOUR_IN_SECONDS;
|
3049 |
+
|
3050 |
+
switch ( $what ) {
|
3051 |
+
case 'latest_posts_and_start_msg':
|
3052 |
+
$transient_name = 'nimble_api_posts';
|
3053 |
+
$transient_duration = 48 * HOUR_IN_SECONDS;
|
3054 |
+
break;
|
3055 |
+
case 'templates':
|
3056 |
+
$transient_name = 'nimble_api_templates';
|
3057 |
+
break;
|
3058 |
+
default:
|
3059 |
+
sek_error_log( __FUNCTION__ . ' => error => invalid $what param => ' . $what );
|
3060 |
+
break;
|
3061 |
+
}
|
3062 |
+
|
3063 |
+
if ( empty( $transient_name ) ) {
|
3064 |
+
return false;
|
3065 |
}
|
3066 |
|
|
|
|
|
|
|
3067 |
$theme_slug = sek_get_parent_theme_slug();
|
3068 |
+
$version_transient_value = get_transient( 'nimble_version_check_for_api');
|
3069 |
+
$expected_version_transient_value = NIMBLE_VERSION . '_' . $theme_slug;
|
3070 |
+
$api_needs_update = $version_transient_value != $expected_version_transient_value;
|
3071 |
+
|
3072 |
+
$api_data = maybe_unserialize( get_transient( $transient_name ) );
|
3073 |
+
|
3074 |
// set this constant in wp_config.php
|
3075 |
$force_update = ( defined( 'NIMBLE_FORCE_UPDATE_API_DATA') && NIMBLE_FORCE_UPDATE_API_DATA ) ? true : $force_update;
|
3076 |
+
if ( true === $force_update ) {
|
3077 |
+
sek_error_log( __FUNCTION__ . ' API is in force update mode. API data requested => ' . $transient_name );
|
3078 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3079 |
|
|
|
|
|
|
|
|
|
|
|
3080 |
|
3081 |
+
// Connect to remote NB api when :
|
3082 |
+
// 1) api data transient is not set or has expired ( false === $api_data )
|
3083 |
+
// 2) force_update param is true
|
3084 |
+
// 3) NB has been updated to a new version ( $api_needs_update case )
|
3085 |
+
// 4) Theme has been changed ( $api_needs_update case )
|
3086 |
+
if ( $force_update || false === $api_data || $api_needs_update ) {
|
3087 |
|
3088 |
+
$query_params = [
|
3089 |
+
'timeout' => ( $force_update ) ? 25 : 8,
|
3090 |
+
'body' => [
|
3091 |
+
'api_version' => NIMBLE_VERSION,
|
3092 |
+
'site_lang' => get_bloginfo( 'language' ),
|
3093 |
+
'what' => $what//<= latest posts about Nimble Builder or templates
|
3094 |
+
]
|
3095 |
+
];
|
3096 |
|
3097 |
+
//sek_error_log('CALL TO REMOTE API NOW FOR DATA => ' . $transient_name . ' | ' . $force_update . ' | ' . $api_needs_update, $query_params );
|
3098 |
+
|
3099 |
+
$response = wp_remote_get( NIMBLE_DATA_API_URL_V2, $query_params );
|
3100 |
+
if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
|
3101 |
+
// set the transient to '_api_error_', so that we don't hammer the api if not reachable. next call will be done after transient expiration
|
3102 |
+
$api_data = '_api_error_';
|
3103 |
+
sek_error_log( __FUNCTION__ . ' invalid api response');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3104 |
}
|
3105 |
|
3106 |
+
$api_data = json_decode( wp_remote_retrieve_body( $response ), true );
|
3107 |
+
|
3108 |
+
if ( empty( $api_data ) || !is_array( $api_data ) ) {
|
3109 |
+
// set the transient to '_api_error_', so that we don't hammer the api if not reachable. next call will be done after transient expiration
|
3110 |
+
$api_data = '_api_error_';
|
3111 |
+
sek_error_log( __FUNCTION__ . ' invalid api data after json decode');
|
3112 |
}
|
3113 |
+
|
3114 |
+
//sek_error_log('API DATA ?', $api_data );
|
3115 |
+
set_transient( $transient_name, $api_data, $transient_duration );
|
3116 |
+
// The api data will be refreshed on next plugin update, or next theme switch. Or if $transient_name has expired.
|
3117 |
+
// $expected_version_transient_value = NIMBLE_VERSION . '_' . $theme_slug;
|
3118 |
+
set_transient( 'nimble_version_check_for_api', $expected_version_transient_value, 100 * DAY_IN_SECONDS );
|
3119 |
+
}//if ( $force_update || false === $api_data )
|
3120 |
|
3121 |
+
// if api_error a new api call will be done when the relevant transient will expire
|
3122 |
+
if ( '_api_error_' === $api_data ) {
|
3123 |
+
sek_error_log( __FUNCTION__ . ' API data value is _api_error_ for transient data : ' . $transient_name );
|
3124 |
+
}
|
3125 |
+
|
3126 |
+
$api_data = '_api_error_' === $api_data ? null : $api_data;
|
3127 |
+
wp_cache_set( 'nimble_api_data_'. $what , $api_data );
|
3128 |
+
|
3129 |
+
//sek_error_log('API DATA for ' . $transient_name, $api_data );
|
3130 |
+
|
3131 |
+
return $api_data;
|
3132 |
}
|
3133 |
|
3134 |
|
3142 |
// Let's use the data saved as options
|
3143 |
// Those data are updated on plugin install, plugin update( upgrader_process_complete ), theme switch
|
3144 |
// @see https://github.com/presscustomizr/nimble-builder/issues/441
|
3145 |
+
$api_data = sek_get_nimble_api_data( 'templates', $force_update );
|
3146 |
+
$api_data = is_array( $api_data ) ? $api_data : [];
|
3147 |
+
|
|
|
|
|
3148 |
//sek_error_log('TMPL DATA ?', $tmpl_data);
|
3149 |
+
if ( empty($api_data) || !array_key_exists('lib', $api_data) || !is_array($api_data['lib']) || empty($api_data['lib']['templates']) || !is_array($api_data['lib']['templates']) ) {
|
3150 |
sek_error_log( __FUNCTION__ . ' => error => no json_collection' );
|
3151 |
return array();
|
3152 |
}
|
3153 |
|
3154 |
//return [];
|
3155 |
+
return maybe_unserialize( $api_data['lib']['templates'] );
|
3156 |
}
|
3157 |
|
3158 |
|
3162 |
function sek_get_latest_posts_api_data( $force_update = false ) {
|
3163 |
// set this constant in wp_config.php
|
3164 |
$force_update = ( defined( 'NIMBLE_FORCE_UPDATE_API_DATA') && NIMBLE_FORCE_UPDATE_API_DATA ) ? true : $force_update;
|
3165 |
+
$api_data = sek_get_nimble_api_data( 'latest_posts_and_start_msg', $force_update );
|
3166 |
+
if ( !is_array( $api_data['latest_posts'] ) || empty( $api_data['latest_posts'] ) ) {
|
|
|
|
|
3167 |
sek_error_log( __FUNCTION__ . ' => error => no latest_posts' );
|
3168 |
+
return [];
|
3169 |
}
|
3170 |
+
return $api_data['latest_posts'];
|
3171 |
}
|
3172 |
|
3173 |
// @return html string
|
3175 |
// set this constant in wp_config.php
|
3176 |
$force_update = ( defined( 'NIMBLE_FORCE_UPDATE_API_DATA') && NIMBLE_FORCE_UPDATE_API_DATA ) ? true : $force_update;
|
3177 |
|
3178 |
+
$api_data = sek_get_nimble_api_data( 'latest_posts_and_start_msg', $force_update );
|
3179 |
+
if ( !sek_is_presscustomizr_theme( $theme_name ) || !is_array( $api_data ) ) {
|
3180 |
return '';
|
3181 |
}
|
3182 |
$msg = '';
|
3183 |
+
$api_data = is_array($api_data) ? $api_data : [];
|
3184 |
+
$api_msg = isset( $api_data['start_msg'] ) ? $api_data['start_msg'] : null;
|
3185 |
|
3186 |
if ( !is_null($api_msg) && is_string($api_msg) ) {
|
3187 |
$msg = $api_msg;
|
3190 |
}
|
3191 |
|
3192 |
// Refresh the api data on plugin update and theme switch
|
3193 |
+
// add_action( 'after_switch_theme', '\Nimble\sek_refresh_nimble_api_data');
|
3194 |
+
// add_action( 'upgrader_process_complete', '\Nimble\sek_refresh_nimble_api_data');
|
3195 |
+
// function sek_refresh_nimble_api_data() {
|
3196 |
+
// // Refresh data on theme switch
|
3197 |
+
// // => so the posts and message are up to date
|
3198 |
+
// sek_get_nimble_api_data( 'all_data', $force_update = true );
|
3199 |
+
// }
|
3200 |
|
3201 |
|
3202 |
//////////////////////////////////////////////////
|
3460 |
update_option( NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES, $bw_fixes_options );
|
3461 |
}
|
3462 |
|
3463 |
+
// Try to get the collection from an option
|
3464 |
$json_collection = get_option( NIMBLE_OPT_NAME_FOR_SECTION_JSON );
|
3465 |
|
3466 |
// Refresh every 30 days, unless force_update set to true
|
3473 |
|
3474 |
$json_collection = json_decode( $json_raw, true );
|
3475 |
// Save now as option for faster access next time
|
3476 |
+
update_option( NIMBLE_OPT_NAME_FOR_SECTION_JSON, $json_collection, 'no' );
|
3477 |
}
|
3478 |
// Filter used by NB Pro to add pro sections
|
3479 |
return apply_filters( 'nimble_preset_sections_collection', $json_collection, $force_update );
|
3627 |
}
|
3628 |
|
3629 |
?><?php
|
3630 |
+
// introduced for #799
|
3631 |
+
function sek_maybe_optimize_options() {
|
3632 |
+
$bw_fixes_options = get_option( NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES );
|
3633 |
+
$bw_fixes_options = is_array( $bw_fixes_options ) ? $bw_fixes_options : array();
|
3634 |
+
|
3635 |
+
// March 13th 2021 => removed previous option used to store api post news, now handled with a transient.
|
3636 |
+
if ( !array_key_exists('optimize_opts_0321_2', $bw_fixes_options ) || 'done' != $bw_fixes_options['optimize_opts_0321_2'] ) {
|
3637 |
+
delete_option( 'nimble_api_news_data' );
|
3638 |
+
|
3639 |
+
// flag as done
|
3640 |
+
$bw_fixes_options['optimize_opts_0321_2'] = 'done';
|
3641 |
+
update_option( NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES, $bw_fixes_options );
|
3642 |
+
}
|
3643 |
+
|
3644 |
+
|
3645 |
+
if ( !array_key_exists('optimize_opts_0321', $bw_fixes_options ) || 'done' != $bw_fixes_options['optimize_opts_0321'] ) {
|
3646 |
+
$current_global_opts = get_option('__nimble_options__');
|
3647 |
+
if ( false !== $current_global_opts ) {
|
3648 |
+
update_option( NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS, $current_global_opts, 'no' );
|
3649 |
+
delete_option( '__nimble_options__' );
|
3650 |
+
}
|
3651 |
+
// delete previous option for prebuild section json
|
3652 |
+
// => the option will be re-created with autoload set to "no" and renamed "nimble_prebuild_sections"
|
3653 |
+
delete_option( 'nb_prebuild_section_json' );
|
3654 |
+
|
3655 |
+
// flag as done
|
3656 |
+
$bw_fixes_options['optimize_opts_0321'] = 'done';
|
3657 |
+
update_option( NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES, $bw_fixes_options );
|
3658 |
+
}
|
3659 |
+
|
3660 |
+
|
3661 |
+
|
3662 |
+
// If the move in post index has been done, let's update to autoload = false the previous post_id options LIKE nimble___skp__post_page_*****, nimble___skp__tax_product_cat_*****
|
3663 |
+
// As of March 2021, event if those previous options are not used anymore, let's keep them in DB to cover potential retro-compat problems
|
3664 |
+
// in a future release, if no regression was reported, we'll remove them forever.
|
3665 |
+
if ( array_key_exists('move_in_post_index_0321', $bw_fixes_options ) && 'done' === $bw_fixes_options['move_in_post_index_0321'] ) {
|
3666 |
+
if ( !array_key_exists('fix_skope_opt_autoload_0321', $bw_fixes_options ) || 'done' != $bw_fixes_options['fix_skope_opt_autoload_0321'] ) {
|
3667 |
+
// MOVE ALL OPTIONS LIKE nimble___skp__post_page_*****, nimble___skp__tax_product_cat_***** in a new option ( NIMBLE_OPT_SEKTION_POST_INDEX ), not autoloaded
|
3668 |
+
global $wpdb;
|
3669 |
+
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE autoload = 'yes' and option_name like 'nimble___skp_%'", ARRAY_A );
|
3670 |
+
if ( is_array( $results ) ) {
|
3671 |
+
foreach( $results as $old_opt_data ) {
|
3672 |
+
if ( !is_array($old_opt_data) )
|
3673 |
+
continue;
|
3674 |
+
if ( empty($old_opt_data['option_name']) || empty($old_opt_data['option_value']) )
|
3675 |
+
continue;
|
3676 |
+
// update it with autoload set to "no"
|
3677 |
+
update_option( $old_opt_data['option_name'], (int)$old_opt_data['option_value'], 'no' );
|
3678 |
+
}
|
3679 |
+
}
|
3680 |
+
|
3681 |
+
// flag as done
|
3682 |
+
$bw_fixes_options['fix_skope_opt_autoload_0321'] = 'done';
|
3683 |
+
update_option( NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES, $bw_fixes_options );
|
3684 |
+
}
|
3685 |
+
}
|
3686 |
+
|
3687 |
+
|
3688 |
+
if ( !array_key_exists('move_in_post_index_0321', $bw_fixes_options ) || 'done' != $bw_fixes_options['move_in_post_index_0321'] ) {
|
3689 |
+
// MOVE ALL OPTIONS LIKE nimble___skp__post_page_*****, nimble___skp__tax_product_cat_***** in a new option ( NIMBLE_OPT_SEKTION_POST_INDEX ), not autoloaded
|
3690 |
+
global $wpdb;
|
3691 |
+
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE autoload = 'yes' and option_name like 'nimble___skp_%'", ARRAY_A );
|
3692 |
+
if ( is_array( $results ) ) {
|
3693 |
+
// Populate the new option ( it should not exists at this point )
|
3694 |
+
$nb_posts_index = get_option(NIMBLE_OPT_SEKTION_POST_INDEX);
|
3695 |
+
$nb_posts_index = is_array($nb_posts_index) ? $nb_posts_index : [];
|
3696 |
+
foreach( $results as $old_opt_data ) {
|
3697 |
+
if ( !is_array($old_opt_data) )
|
3698 |
+
continue;
|
3699 |
+
if ( empty($old_opt_data['option_name']) || empty($old_opt_data['option_value']) )
|
3700 |
+
continue;
|
3701 |
+
|
3702 |
+
$nb_posts_index[ $old_opt_data['option_name'] ] = (int)$old_opt_data['option_value'];
|
3703 |
+
}
|
3704 |
+
// update it with autoload set to "no"
|
3705 |
+
update_option( NIMBLE_OPT_SEKTION_POST_INDEX, $nb_posts_index, 'no');
|
3706 |
+
}
|
3707 |
+
|
3708 |
+
// flag as done
|
3709 |
+
$bw_fixes_options['move_in_post_index_0321'] = 'done';
|
3710 |
+
update_option( NIMBLE_OPT_NAME_FOR_BACKWARD_FIXES, $bw_fixes_options );
|
3711 |
+
}
|
3712 |
+
}
|
3713 |
+
|
3714 |
+
|
3715 |
// JULY 2020 => NOT FIRED ANYMORE ( because introduced in oct 2018 ) => DEACTIVATED IN nimble-builder.php
|
3716 |
// fired @wp_loaded
|
3717 |
// Note : if fired @plugins_loaded, invoking wp_update_post() generates php notices
|
3762 |
$post_id_storing_home_page_sections = (int)get_option( $current_option_name );
|
3763 |
if ( $post_id_storing_home_page_sections > 0 ) {
|
3764 |
$new_option_name = NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . "skp__post_page_{$home_page_id}";
|
3765 |
+
update_option( $new_option_name, $post_id_storing_home_page_sections, 'no' );
|
3766 |
}
|
3767 |
}
|
3768 |
}
|
3778 |
$sek_post_query_vars = array(
|
3779 |
'post_type' => NIMBLE_CPT,
|
3780 |
'post_status' => get_post_stati(),
|
3781 |
+
//'name' => sanitize_title(),
|
3782 |
'posts_per_page' => -1,
|
3783 |
'no_found_rows' => true,
|
3784 |
'cache_results' => true,
|
4031 |
)
|
4032 |
));
|
4033 |
|
4034 |
+
// Returns the id of the post in which the local collection is stored
|
4035 |
+
// This option NIMBLE_OPT_SEKTION_POST_INDEX is updated when publishing in the customizer and may also be updated when getting the collection in sek_get_seks_post()
|
4036 |
+
// introduced for #799
|
4037 |
+
function sek_get_nb_post_id_from_index( $skope_id ) {
|
4038 |
+
$nb_posts_index = get_option(NIMBLE_OPT_SEKTION_POST_INDEX);
|
4039 |
+
$option_name = NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . $skope_id;
|
4040 |
+
$post_id = 0;
|
4041 |
+
// Backward compat => march 2021, NB introduces a new option 'nimble_posts_index' dedicated to store the NB post_id associated to a skope_id.
|
4042 |
+
// For previous user, a backward compatibility code is ran on each load at 'wp_loaded', to transfer all previous options to the new one.
|
4043 |
+
// if the transfer went wrong, or if the option 'nimble_posts_index' was deleted, we can attempt to get the post_id from the previous option
|
4044 |
+
if ( !is_array( $nb_posts_index ) ) {
|
4045 |
+
$post_id = get_option( $option_name );
|
4046 |
+
} else {
|
4047 |
+
if ( array_key_exists( $option_name, $nb_posts_index ) ) {
|
4048 |
+
$post_id = (int)$nb_posts_index[$option_name];
|
4049 |
+
}
|
4050 |
+
}
|
4051 |
+
return $post_id;
|
4052 |
+
}
|
4053 |
|
4054 |
+
// @return int
|
4055 |
+
function sek_get_index_for_api() {
|
4056 |
+
$nb_posts_index = get_option(NIMBLE_OPT_SEKTION_POST_INDEX);
|
4057 |
+
$nb_posts_index = is_array( $nb_posts_index ) ? $nb_posts_index : [];
|
4058 |
+
return count( $nb_posts_index );
|
4059 |
+
}
|
4060 |
+
|
4061 |
+
|
4062 |
+
// Associates a skope_id to a NB post id in the NB post index option
|
4063 |
+
// introduced for #799
|
4064 |
+
function sek_set_nb_post_id_in_index( $skope_id, $post_id ) {
|
4065 |
+
$nb_posts_index = get_option(NIMBLE_OPT_SEKTION_POST_INDEX);
|
4066 |
+
$nb_posts_index = is_array($nb_posts_index) ? $nb_posts_index : [];
|
4067 |
+
$option_name = NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . $skope_id;
|
4068 |
+
$nb_posts_index[$option_name] = (int)$post_id;
|
4069 |
+
update_option( NIMBLE_OPT_SEKTION_POST_INDEX, $nb_posts_index, 'no');
|
4070 |
+
}
|
4071 |
|
4072 |
|
4073 |
|
4109 |
|
4110 |
$post = null;
|
4111 |
|
4112 |
+
$post_id = sek_get_nb_post_id_from_index( $skope_id );
|
4113 |
+
|
4114 |
+
if ( !is_int( $post_id ) ) {
|
4115 |
+
error_log( 'sek_get_seks_post => post_id !is_int() for options => ' . NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . $skope_id );
|
4116 |
+
}
|
4117 |
// if the options has not been set yet, it will return (int) 0
|
4118 |
// id #1 is already taken by the 'Hello World' post.
|
4119 |
if ( 1 > $post_id ) {
|
4120 |
+
//error_log( 'sek_get_seks_post => post_id is not valid for options => ' . NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . $skope_id );
|
4121 |
return;
|
4122 |
}
|
4123 |
|
|
|
|
|
|
|
|
|
4124 |
if ( is_int( $post_id ) && $post_id > 0 && get_post( $post_id ) ) {
|
4125 |
$post = get_post( $post_id );
|
4126 |
}
|
4134 |
* Cache the lookup. See sek_update_sek_post().
|
4135 |
* @todo This should get cleared if a skope post is added/removed.
|
4136 |
*/
|
4137 |
+
sek_set_nb_post_id_in_index( $skope_id, (int)$post_id );
|
4138 |
}
|
4139 |
if ( !skp_is_customizing() ) {
|
4140 |
$cached_seks_posts[$skope_id] = $post;
|
4460 |
} else {
|
4461 |
$r = wp_insert_post( wp_slash( $post_data ), true );
|
4462 |
if ( !is_wp_error( $r ) ) {
|
|
|
4463 |
$post_id = $r;//$r is the post ID
|
4464 |
|
4465 |
+
sek_set_nb_post_id_in_index( $skope_id, (int)$post_id );
|
4466 |
|
4467 |
// Trigger creation of a revision. This should be removed once #30854 is resolved.
|
4468 |
if ( 0 === count( wp_get_post_revisions( $r ) ) ) {
|
4582 |
$sek_post_query_vars = array(
|
4583 |
'post_type' => NIMBLE_SECTION_CPT,
|
4584 |
'post_status' => 'publish',
|
4585 |
+
//'name' => sanitize_title(),
|
4586 |
'posts_per_page' => -1,
|
4587 |
'no_found_rows' => true,
|
4588 |
'cache_results' => true,
|
4658 |
// )
|
4659 |
// );
|
4660 |
// @return WP_Post|WP_Error Post on success, error on failure.
|
4661 |
+
function sek_update_saved_section_post( $section_data, $is_edit_metas_only_case = false ) {
|
4662 |
if ( !is_array( $section_data ) ) {
|
4663 |
sek_error_log( __FUNCTION__ . ' => $section_data is not an array' );
|
4664 |
return new \WP_Error( __FUNCTION__ . ' => $section_data is not an array');
|
4685 |
|
4686 |
// the section post name is provided only when updating
|
4687 |
$is_update_case = !is_null($section_data['section_post_name']);
|
|
|
4688 |
|
4689 |
// $post_name_to_update will be used when user updates an existing section
|
4690 |
if ( !is_null($section_data['section_post_name']) ) {
|
4712 |
}
|
4713 |
}
|
4714 |
|
4715 |
+
// March 2021 : make sure text input are sanitized like in #544 #792
|
4716 |
+
$section_data = sek_sektion_collection_sanitize_cb( $section_data );
|
4717 |
+
|
4718 |
$new_or_updated_post_data = array(
|
4719 |
'post_title' => esc_attr( $section_data['metas']['title'] ),
|
4720 |
'post_name' => $section_post_name,
|
4853 |
$sek_post_query_vars = array(
|
4854 |
'post_type' => NIMBLE_TEMPLATE_CPT,
|
4855 |
'post_status' => 'publish',
|
4856 |
+
//'name' => sanitize_title(),
|
4857 |
'posts_per_page' => -1,
|
4858 |
'no_found_rows' => true,
|
4859 |
'cache_results' => true,
|
4918 |
function sek_get_all_api_templates() {
|
4919 |
$raw_tmpl = sek_get_tmpl_api_data();
|
4920 |
$collection = [];
|
4921 |
+
|
4922 |
if( !is_array( $raw_tmpl) )
|
4923 |
return $collection;
|
4924 |
+
|
4925 |
foreach ( $raw_tmpl as $tmpl_cpt_post_name => $tmpl_data ) {
|
4926 |
+
if ( !is_array( $tmpl_data ) )
|
4927 |
+
continue;
|
4928 |
+
|
4929 |
+
if ( !array_key_exists( 'metas', $tmpl_data ) )
|
4930 |
+
continue;
|
4931 |
+
|
4932 |
$metas = !is_array( $tmpl_data['metas'] ) ? [] : $tmpl_data['metas'];
|
4933 |
if ( empty($metas) )
|
4934 |
continue;
|
4962 |
// )
|
4963 |
// );
|
4964 |
// @return WP_Post|WP_Error Post on success, error on failure.
|
4965 |
+
function sek_update_saved_tmpl_post( $tmpl_data, $is_edit_metas_only_case = false ) {
|
4966 |
if ( !is_array( $tmpl_data ) ) {
|
4967 |
sek_error_log( __FUNCTION__ . ' => $tmpl_data is not an array' );
|
4968 |
return new \WP_Error( __FUNCTION__ . ' => $tmpl_data is not an array');
|
4982 |
'skope_id' => '',
|
4983 |
'version' => NIMBLE_VERSION,
|
4984 |
'tmpl_locations' => array(),
|
4985 |
+
'tmpl_header_location' => '',
|
4986 |
+
'tmpl_footer_location' => '',
|
4987 |
'date' => '',
|
4988 |
+
'theme' => '',
|
4989 |
+
// for api templates
|
4990 |
+
'is_pro_tmpl' => false,
|
4991 |
+
'thumb_url' => ''
|
4992 |
)
|
4993 |
));
|
4994 |
|
4995 |
// the template post name is provided only when updating
|
4996 |
$is_update_case = !is_null($tmpl_data['tmpl_post_name']);
|
|
|
4997 |
|
4998 |
// $post_name_to_update will be used when user updates an existing template
|
4999 |
if ( !is_null($tmpl_data['tmpl_post_name']) ) {
|
5023 |
}
|
5024 |
}
|
5025 |
|
5026 |
+
// March 2021 : make sure text input are sanitized like in #544 #792
|
5027 |
+
$tmpl_data = sek_sektion_collection_sanitize_cb( $tmpl_data );
|
5028 |
+
|
5029 |
$new_or_updated_post_data = array(
|
5030 |
'post_title' => esc_attr( $tmpl_data['metas']['title'] ),
|
5031 |
'post_name' => $tmpl_post_name,
|
5148 |
return new \WP_Error( 'db_insert_error', __('Could not insert NB template into the database : invalid JSON', 'nimble-builder'), json_last_error() );
|
5149 |
}
|
5150 |
}
|
5151 |
+
return wp_slash($data);
|
5152 |
}, 10 , 3);
|
5153 |
|
5154 |
?><?php
|
5169 |
if ( defined('DOING_AJAX') && DOING_AJAX && '_skope_not_set_' === $skope_id ) {
|
5170 |
wp_send_json_error( __FUNCTION__ . ' => invalid skope id' );
|
5171 |
}
|
5172 |
+
$post_id = sek_get_nb_post_id_from_index($skope_id);
|
|
|
5173 |
$raw_revision_history = array();
|
5174 |
if ( -1 !== $post_id ) {
|
5175 |
$args = array(
|
5208 |
return maybe_unserialize( $post->post_content );
|
5209 |
}
|
5210 |
|
5211 |
+
?><?php
|
5212 |
+
/* ------------------------------------------------------------------------- *
|
5213 |
+
* SANIIZATION AND VALIDATION HELPERS
|
5214 |
+
* used before saving NB main settings in DB
|
5215 |
+
* used before saving user template in DB
|
5216 |
+
* added March 2021 for https://github.com/presscustomizr/nimble-builder/issues/792, after fixing formatting issues : #544 #791
|
5217 |
+
/* ------------------------------------------------------------------------- */
|
5218 |
+
// Uses the sanitize_callback function specified on module registration if any
|
5219 |
+
// Recursively loop on the local or global main NB collection and fire the sanitize callback
|
5220 |
+
// the $setting_instance param is passed when sanitizing the customizer settings. Not used when sanitizing a user template
|
5221 |
+
function sek_sektion_collection_sanitize_cb( $setting_data, $setting_instance = null ) {
|
5222 |
+
if ( !is_array( $setting_data ) ) {
|
5223 |
+
return $setting_data;
|
5224 |
+
} else {
|
5225 |
+
if ( !is_array( $setting_data ) ) {
|
5226 |
+
return $setting_data;
|
5227 |
+
} else {
|
5228 |
+
if ( array_key_exists('module_type', $setting_data ) ) {
|
5229 |
+
$san_callback = sek_get_registered_module_type_property( $setting_data['module_type'], 'sanitize_callback' );
|
5230 |
+
if ( !empty( $san_callback ) && is_string( $san_callback ) && function_exists( $san_callback ) && array_key_exists('value', $setting_data ) ) {
|
5231 |
+
//sek_error_log('SANITIZE ??', $san_callback );
|
5232 |
+
$setting_data['value'] = $san_callback( $setting_data['value'] );
|
5233 |
+
}
|
5234 |
+
} else {
|
5235 |
+
foreach( $setting_data as $k => $data ) {
|
5236 |
+
$setting_data[$k] = sek_sektion_collection_sanitize_cb( $data, $setting_instance );
|
5237 |
+
}
|
5238 |
+
}
|
5239 |
+
}
|
5240 |
+
}
|
5241 |
+
//return new \WP_Error( 'required', __( 'Error in a sektion', 'text_doma' ), $setting_data );
|
5242 |
+
return $setting_data;
|
5243 |
+
}
|
5244 |
+
|
5245 |
+
// Uses the validate_callback function specified on module registration if any
|
5246 |
+
// @return validity object
|
5247 |
+
function sek_sektion_collection_validate_cb( $validity, $setting_data, $setting_instance = null ) {
|
5248 |
+
$validated = true;
|
5249 |
+
if ( !is_array( $setting_data ) ) {
|
5250 |
+
return $setting_data;
|
5251 |
+
} else {
|
5252 |
+
if ( !is_array( $setting_data ) ) {
|
5253 |
+
return $setting_data;
|
5254 |
+
} else {
|
5255 |
+
if ( array_key_exists('module_type', $setting_data ) ) {
|
5256 |
+
$validation_callback = sek_get_registered_module_type_property( $setting_data['module_type'], 'validate_callback' );
|
5257 |
+
if ( !empty( $validation_callback ) && is_string( $validation_callback ) && function_exists( $validation_callback ) && array_key_exists('value', $setting_data ) ) {
|
5258 |
+
$validated = $validation_callback( $setting_data );
|
5259 |
+
}
|
5260 |
+
} else {
|
5261 |
+
foreach( $setting_data as $k => $data ) {
|
5262 |
+
$validated = sek_sektion_collection_validate_cb($validity, $data, $setting_instance);
|
5263 |
+
}
|
5264 |
+
}
|
5265 |
+
}
|
5266 |
+
}
|
5267 |
+
|
5268 |
+
//return new \WP_Error( 'required', __( 'Error in a sektion', 'text_doma' ), $setting_data );
|
5269 |
+
if ( true !== $validated ) {
|
5270 |
+
if ( is_wp_error( $validated ) ) {
|
5271 |
+
$validation_msg = $validation_msg->get_error_message();
|
5272 |
+
$validity->add(
|
5273 |
+
is_null( $setting_instance ) ? 'nimble_validation_error' : 'nimble_validation_error_in_' . $setting_instance->id,
|
5274 |
+
$validation_msg
|
5275 |
+
);
|
5276 |
+
}
|
5277 |
+
|
5278 |
+
}
|
5279 |
+
return $validity;
|
5280 |
+
}
|
5281 |
+
|
5282 |
+
|
5283 |
+
|
5284 |
+
|
5285 |
+
// @return bool
|
5286 |
+
function sek_is_json( $string ){
|
5287 |
+
if ( !is_string( $string ) )
|
5288 |
+
return false;
|
5289 |
+
json_decode($string);
|
5290 |
+
return (json_last_error() == JSON_ERROR_NONE);
|
5291 |
+
}
|
5292 |
+
|
5293 |
+
// @return string
|
5294 |
+
function sek_maybe_decode_richtext( $string ){
|
5295 |
+
if ( !is_string($string) )
|
5296 |
+
return $string;
|
5297 |
+
|
5298 |
+
$json_decoded_candidate = json_decode($string, true);
|
5299 |
+
if ( json_last_error() == JSON_ERROR_NONE ) {
|
5300 |
+
// https://stackoverflow.com/questions/6465263/how-to-reverse-htmlentities
|
5301 |
+
// added to fix regression https://github.com/presscustomizr/nimble-builder/issues/791
|
5302 |
+
$json_decoded_candidate = html_entity_decode($json_decoded_candidate, ENT_QUOTES, get_bloginfo( 'charset' ) );
|
5303 |
+
//sek_error_log('DECODED DECODED ?', $json_decoded_candidate );
|
5304 |
+
return $json_decoded_candidate;
|
5305 |
+
}
|
5306 |
+
|
5307 |
+
return $string;
|
5308 |
+
}
|
5309 |
+
|
5310 |
+
// @return string
|
5311 |
+
function sek_maybe_encode_richtext( $string ){
|
5312 |
+
if ( !is_string($string) )
|
5313 |
+
return $string;
|
5314 |
+
// only encode if not already encoded
|
5315 |
+
if ( !sek_is_json($string) ) {
|
5316 |
+
// https://stackoverflow.com/questions/6465263/how-to-reverse-htmlentities
|
5317 |
+
// added to fix regression https://github.com/presscustomizr/nimble-builder/issues/791
|
5318 |
+
$string = htmlentities($string, ENT_COMPAT, get_bloginfo( 'charset' ) );//reversed with html_entity_decode
|
5319 |
+
//$string = wp_encode_emoji( $string );
|
5320 |
+
$string = wp_json_encode($string);
|
5321 |
+
//sek_error_log('JSON ENCODED ?', $string );
|
5322 |
+
}
|
5323 |
+
return $string;
|
5324 |
+
}
|
5325 |
+
|
5326 |
+
|
5327 |
+
|
5328 |
?>
|
inc/sektions/ccat-czr-sektions.php
CHANGED
@@ -14,7 +14,7 @@ function sek_update_most_used_gfonts( $manager ) {
|
|
14 |
$skope_id = skp_get_skope_id();
|
15 |
$all_gfonts = sek_get_all_gfonts( $skope_id );
|
16 |
if ( is_array($all_gfonts) && !empty($all_gfonts) ) {
|
17 |
-
update_option( NIMBLE_OPT_NAME_FOR_MOST_USED_FONTS, $all_gfonts );
|
18 |
}
|
19 |
}
|
20 |
|
@@ -50,7 +50,7 @@ function sek_get_all_gfonts() {
|
|
50 |
$sek_post_query_vars = array(
|
51 |
'post_type' => NIMBLE_CPT,
|
52 |
'post_status' => get_post_stati(),
|
53 |
-
//'name' => sanitize_title(
|
54 |
'posts_per_page' => -1,
|
55 |
'no_found_rows' => true,
|
56 |
'cache_results' => true,
|
@@ -138,7 +138,7 @@ function sek_enqueue_controls_js_css() {
|
|
138 |
'optNameForSiteTmplOptions' => NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS,// nimble_site_templates
|
139 |
'prefixForSettingsNotSaved' => NIMBLE_PREFIX_FOR_SETTING_NOT_SAVED,//"__nimble__"
|
140 |
|
141 |
-
'globalOptionDBValues' => get_option( NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS ),// '
|
142 |
'siteTmplOptionDBValues' => get_option( NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS ),// 'nimble_site_templates
|
143 |
|
144 |
'isSiteTmplEnabled' => defined('NIMBLE_SITE_TEMPLATES_ENABLED') && NIMBLE_SITE_TEMPLATES_ENABLED,
|
@@ -547,7 +547,7 @@ function nimble_add_i18n_localized_control_params( $params ) {
|
|
547 |
// UI global and local options
|
548 |
'Current page options' => __( 'Current page options', 'nimble-builder'),
|
549 |
'Page template' => __( 'Page template', 'nimble-builder'),
|
550 |
-
'This page uses
|
551 |
'Page header and footer' => __( 'Page header and footer', 'nimble-builder'),
|
552 |
'Inner and outer widths' => __( 'Inner and outer widths', 'nimble-builder'),
|
553 |
'Custom CSS' => __( 'Custom CSS', 'nimble-builder'),
|
@@ -685,7 +685,7 @@ function sek_prepare_seks_data_for_customizer( $seks_data ) {
|
|
685 |
$seks_data[$key] = sek_prepare_seks_data_for_customizer( $data );
|
686 |
} else {
|
687 |
if ( is_string($data) ) {
|
688 |
-
$seks_data[$key] =
|
689 |
}
|
690 |
}
|
691 |
}
|
@@ -861,10 +861,10 @@ function sek_print_nimble_customizer_tmpl() {
|
|
861 |
<?php endif; ?>
|
862 |
</div>
|
863 |
<div class="sek-nimble-doc" data-doc-href="https://docs.presscustomizr.com/collection/334-nimble-builder/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-customizer-topbar">
|
864 |
-
<div class="sek-nimble-icon"><img src="<?php echo NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION; ?>" alt="<?php _e('Nimble Builder','nimble-builder'); ?>" title="<?php _e('
|
865 |
-
<span class="sek-pointer" title="<?php _e('
|
866 |
-
<button class="far fa-question-circle" type="button" title="<?php _e('
|
867 |
-
<span class="screen-reader-text"><?php _e('
|
868 |
</button>
|
869 |
</div>
|
870 |
</div>
|
@@ -2100,7 +2100,7 @@ if ( !class_exists( 'SEK_CZR_Dyn_Register' ) ) :
|
|
2100 |
|
2101 |
//@filter 'customize_dynamic_setting_args'
|
2102 |
function set_dyn_setting_args( $setting_args, $setting_id ) {
|
2103 |
-
// shall start with "nimble___" or "
|
2104 |
// those are the setting that will actually be saved in DB :
|
2105 |
// - sektion collections ( local and global skope )
|
2106 |
// - global options
|
@@ -2112,8 +2112,8 @@ if ( !class_exists( 'SEK_CZR_Dyn_Register' ) ) :
|
|
2112 |
'type' => 'option',
|
2113 |
'default' => array(),
|
2114 |
// Only the section collections are sanitized on save
|
2115 |
-
'sanitize_callback' => 0 === strpos( $setting_id, NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION ) ?
|
2116 |
-
//'validate_callback' =>
|
2117 |
);
|
2118 |
} else if ( 0 === strpos( $setting_id, NIMBLE_PREFIX_FOR_SETTING_NOT_SAVED ) ) {
|
2119 |
//sek_error_log( 'DYNAMICALLY REGISTERING SEK SETTING => ' . $setting_id, $setting_args);
|
@@ -2122,7 +2122,7 @@ if ( !class_exists( 'SEK_CZR_Dyn_Register' ) ) :
|
|
2122 |
'type' => '_nimble_ui_',//won't be saved as is,
|
2123 |
'default' => array(),
|
2124 |
//'sanitize_callback' => array( $this, 'sanitize_callback' ),
|
2125 |
-
//'validate_callback'
|
2126 |
);
|
2127 |
}
|
2128 |
return $setting_args;
|
@@ -2133,77 +2133,19 @@ if ( !class_exists( 'SEK_CZR_Dyn_Register' ) ) :
|
|
2133 |
//@filter 'customize_dynamic_setting_class'
|
2134 |
// We use a custom setting class only for the section collections ( local and global ), not for global options and site template options
|
2135 |
function set_dyn_setting_class( $class, $setting_id, $args ) {
|
2136 |
-
// shall start with 'nimble___'
|
2137 |
-
if ( 0 !== strpos( $setting_id, NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION ) )
|
2138 |
-
return $class;
|
2139 |
//sek_error_log( 'REGISTERING CLASS DYNAMICALLY for setting =>' . $setting_id );
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
// Uses the sanitize_callback function specified on module registration if any
|
2145 |
-
// Recursively loop on the local or global main NB collection and fire the sanitize callback
|
2146 |
-
function sektion_collection_sanitize_cb( $setting_data, $setting_instance ) {
|
2147 |
-
if ( !is_array( $setting_data ) ) {
|
2148 |
-
return $setting_data;
|
2149 |
-
} else {
|
2150 |
-
if ( !is_array( $setting_data ) ) {
|
2151 |
-
return $setting_data;
|
2152 |
-
} else {
|
2153 |
-
if ( array_key_exists('module_type', $setting_data ) ) {
|
2154 |
-
$san_callback = sek_get_registered_module_type_property( $setting_data['module_type'], 'sanitize_callback' );
|
2155 |
-
if ( !empty( $san_callback ) && is_string( $san_callback ) && function_exists( $san_callback ) && array_key_exists('value', $setting_data ) ) {
|
2156 |
-
$setting_data['value'] = $san_callback( $setting_data['value'] );
|
2157 |
-
}
|
2158 |
-
} else {
|
2159 |
-
foreach( $setting_data as $k => $data ) {
|
2160 |
-
$setting_data[$k] = $this->sektion_collection_sanitize_cb($data, $setting_instance);
|
2161 |
-
}
|
2162 |
-
}
|
2163 |
-
}
|
2164 |
-
}
|
2165 |
-
//return new \WP_Error( 'required', __( 'Error in a sektion', 'text_doma' ), $setting_data );
|
2166 |
-
return $setting_data;
|
2167 |
-
}
|
2168 |
-
|
2169 |
-
// Uses the validate_callback function specified on module registration if any
|
2170 |
-
// @return validity object
|
2171 |
-
function validate_callback( $validity, $setting_data, $setting_instance ) {
|
2172 |
-
$validated = true;
|
2173 |
-
if ( !is_array( $setting_data ) ) {
|
2174 |
-
return $setting_data;
|
2175 |
-
} else {
|
2176 |
-
if ( !is_array( $setting_data ) ) {
|
2177 |
-
return $setting_data;
|
2178 |
-
} else {
|
2179 |
-
if ( array_key_exists('module_type', $setting_data ) ) {
|
2180 |
-
$validation_callback = sek_get_registered_module_type_property( $setting_data['module_type'], 'validate_callback' );
|
2181 |
-
if ( !empty( $validation_callback ) && is_string( $validation_callback ) && function_exists( $validation_callback ) && array_key_exists('value', $setting_data ) ) {
|
2182 |
-
$validated = $validation_callback( $setting_data );
|
2183 |
-
}
|
2184 |
-
} else {
|
2185 |
-
foreach( $setting_data as $k => $data ) {
|
2186 |
-
$validated = $this->validate_callback($validity, $data, $setting_instance);
|
2187 |
-
}
|
2188 |
-
}
|
2189 |
-
}
|
2190 |
}
|
2191 |
-
|
2192 |
-
//
|
2193 |
-
if (
|
2194 |
-
|
2195 |
-
$validation_msg = $validation_msg->get_error_message();
|
2196 |
-
$validity->add(
|
2197 |
-
'nimble_validation_error_in_' . $setting_instance->id ,
|
2198 |
-
$validation_msg
|
2199 |
-
);
|
2200 |
-
}
|
2201 |
-
|
2202 |
}
|
2203 |
-
return $
|
2204 |
}
|
2205 |
|
2206 |
-
|
2207 |
}//class
|
2208 |
endif;
|
2209 |
|
@@ -4649,6 +4591,8 @@ function sek_maybe_import_imgs( $seks_data, $do_import_images = true ) {
|
|
4649 |
$value = $id;
|
4650 |
}
|
4651 |
}
|
|
|
|
|
4652 |
}
|
4653 |
$new_seks_data[$key] = $value;
|
4654 |
}
|
@@ -4746,6 +4690,9 @@ function sek_ajax_sek_get_user_tmpl_json() {
|
|
4746 |
// the image import errors won't block the import
|
4747 |
// they are used when notifying user in the customizer
|
4748 |
$tmpl_decoded['img_errors'] = !empty( Nimble_Manager()->img_import_errors ) ? implode(',', Nimble_Manager()->img_import_errors) : array();
|
|
|
|
|
|
|
4749 |
wp_send_json_success( $tmpl_decoded );
|
4750 |
} else {
|
4751 |
wp_send_json_error( __FUNCTION__ . '_invalid_tmpl_post_data' );
|
@@ -4785,6 +4732,9 @@ function sek_ajax_sek_get_api_tmpl_json() {
|
|
4785 |
$tmpl_as_array = $raw_tmpl[$tmpl_name];
|
4786 |
$raw_tmpl[$tmpl_name]['data'] = sek_maybe_import_imgs( $raw_tmpl[$tmpl_name]['data'], $do_import_images = true );
|
4787 |
$raw_tmpl[$tmpl_name]['img_errors'] = !empty( Nimble_Manager()->img_import_errors ) ? implode(',', Nimble_Manager()->img_import_errors) : array();
|
|
|
|
|
|
|
4788 |
wp_send_json_success( $raw_tmpl[$tmpl_name] );
|
4789 |
}
|
4790 |
//return [];
|
@@ -4856,12 +4806,14 @@ function sek_ajax_save_user_template() {
|
|
4856 |
'tmpl_header_location' => isset( $_POST['tmpl_header_location'] ) ? $_POST['tmpl_header_location'] : '',
|
4857 |
'tmpl_footer_location' => isset( $_POST['tmpl_footer_location'] ) ? $_POST['tmpl_footer_location'] : '',
|
4858 |
'date' => date("Y-m-d"),
|
4859 |
-
'theme' => sanitize_title_with_dashes( get_stylesheet() )
|
4860 |
-
|
4861 |
-
|
|
|
|
|
4862 |
);
|
4863 |
|
4864 |
-
$saved_template_post = sek_update_saved_tmpl_post( $template_to_save );
|
4865 |
if ( is_wp_error( $saved_template_post ) || is_null($saved_template_post) || empty($saved_template_post) ) {
|
4866 |
wp_send_json_error( __FUNCTION__ . ' => error when invoking sek_update_saved_tmpl_post()' );
|
4867 |
} else {
|
@@ -5005,7 +4957,9 @@ function sek_ajax_sek_get_user_section_json() {
|
|
5005 |
if ( is_array( $section_decoded ) && !empty( $section_decoded['data'] ) && is_string( $section_decoded['data'] ) ) {
|
5006 |
$section_decoded['data'] = json_decode( wp_unslash( $section_decoded['data'], true ) );
|
5007 |
}
|
5008 |
-
|
|
|
|
|
5009 |
wp_send_json_success( $section_decoded );
|
5010 |
} else {
|
5011 |
wp_send_json_error( __FUNCTION__ . '_section_post_not_found' );
|
@@ -5075,11 +5029,10 @@ function sek_ajax_save_user_section() {
|
|
5075 |
//'active_locations' => is_array( $_POST['active_locations'] ) ? $_POST['active_locations'] : array(),
|
5076 |
'date' => date("Y-m-d"),
|
5077 |
'theme' => sanitize_title_with_dashes( get_stylesheet() )
|
5078 |
-
)
|
5079 |
-
'edit_metas_only' => $is_edit_metas_only_case ? 'yes' : 'no'
|
5080 |
);
|
5081 |
|
5082 |
-
$saved_section_post = sek_update_saved_section_post( $section_to_save );
|
5083 |
if ( is_wp_error( $saved_section_post ) || is_null($saved_section_post) || empty($saved_section_post) ) {
|
5084 |
wp_send_json_error( __FUNCTION__ . ' => error when invoking sek_update_saved_section_post()' );
|
5085 |
} else {
|
14 |
$skope_id = skp_get_skope_id();
|
15 |
$all_gfonts = sek_get_all_gfonts( $skope_id );
|
16 |
if ( is_array($all_gfonts) && !empty($all_gfonts) ) {
|
17 |
+
update_option( NIMBLE_OPT_NAME_FOR_MOST_USED_FONTS, $all_gfonts, 'no' );
|
18 |
}
|
19 |
}
|
20 |
|
50 |
$sek_post_query_vars = array(
|
51 |
'post_type' => NIMBLE_CPT,
|
52 |
'post_status' => get_post_stati(),
|
53 |
+
//'name' => sanitize_title(),
|
54 |
'posts_per_page' => -1,
|
55 |
'no_found_rows' => true,
|
56 |
'cache_results' => true,
|
138 |
'optNameForSiteTmplOptions' => NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS,// nimble_site_templates
|
139 |
'prefixForSettingsNotSaved' => NIMBLE_PREFIX_FOR_SETTING_NOT_SAVED,//"__nimble__"
|
140 |
|
141 |
+
'globalOptionDBValues' => get_option( NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS ),// 'nimble_global_opts'
|
142 |
'siteTmplOptionDBValues' => get_option( NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS ),// 'nimble_site_templates
|
143 |
|
144 |
'isSiteTmplEnabled' => defined('NIMBLE_SITE_TEMPLATES_ENABLED') && NIMBLE_SITE_TEMPLATES_ENABLED,
|
547 |
// UI global and local options
|
548 |
'Current page options' => __( 'Current page options', 'nimble-builder'),
|
549 |
'Page template' => __( 'Page template', 'nimble-builder'),
|
550 |
+
'This page uses Nimble Builder template.' => __( 'This page uses Nimble Builder template.', 'nimble-builder'),
|
551 |
'Page header and footer' => __( 'Page header and footer', 'nimble-builder'),
|
552 |
'Inner and outer widths' => __( 'Inner and outer widths', 'nimble-builder'),
|
553 |
'Custom CSS' => __( 'Custom CSS', 'nimble-builder'),
|
685 |
$seks_data[$key] = sek_prepare_seks_data_for_customizer( $data );
|
686 |
} else {
|
687 |
if ( is_string($data) ) {
|
688 |
+
$seks_data[$key] = sek_maybe_decode_richtext( $data );
|
689 |
}
|
690 |
}
|
691 |
}
|
861 |
<?php endif; ?>
|
862 |
</div>
|
863 |
<div class="sek-nimble-doc" data-doc-href="https://docs.presscustomizr.com/collection/334-nimble-builder/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-customizer-topbar">
|
864 |
+
<div class="sek-nimble-icon"><img src="<?php echo NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION; ?>" alt="<?php _e('Nimble Builder','nimble-builder'); ?>" title="<?php _e('Knowledge base', 'nimble-builder'); ?>"/></div>
|
865 |
+
<span class="sek-pointer" title="<?php _e('Knowledge base', 'nimble-builder'); ?>"><?php _e('Knowledge base', 'nimble-builder'); ?></span>
|
866 |
+
<button class="far fa-question-circle" type="button" title="<?php _e('Knowledge base', 'nimble-builder'); ?>" data-nimble-state="enabled">
|
867 |
+
<span class="screen-reader-text"><?php _e('Knowledge base', 'nimble-builder'); ?></span>
|
868 |
</button>
|
869 |
</div>
|
870 |
</div>
|
2100 |
|
2101 |
//@filter 'customize_dynamic_setting_args'
|
2102 |
function set_dyn_setting_args( $setting_args, $setting_id ) {
|
2103 |
+
// shall start with "nimble___" or "nimble_global_opts"
|
2104 |
// those are the setting that will actually be saved in DB :
|
2105 |
// - sektion collections ( local and global skope )
|
2106 |
// - global options
|
2112 |
'type' => 'option',
|
2113 |
'default' => array(),
|
2114 |
// Only the section collections are sanitized on save
|
2115 |
+
'sanitize_callback' => 0 === strpos( $setting_id, NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION ) ? '\Nimble\sek_sektion_collection_sanitize_cb' : null
|
2116 |
+
//'validate_callback' => '\Nimble\sek_sektion_collection_validate_cb'
|
2117 |
);
|
2118 |
} else if ( 0 === strpos( $setting_id, NIMBLE_PREFIX_FOR_SETTING_NOT_SAVED ) ) {
|
2119 |
//sek_error_log( 'DYNAMICALLY REGISTERING SEK SETTING => ' . $setting_id, $setting_args);
|
2122 |
'type' => '_nimble_ui_',//won't be saved as is,
|
2123 |
'default' => array(),
|
2124 |
//'sanitize_callback' => array( $this, 'sanitize_callback' ),
|
2125 |
+
//'validate_callback' => '\Nimble\sek_sektion_collection_validate_cb'
|
2126 |
);
|
2127 |
}
|
2128 |
return $setting_args;
|
2133 |
//@filter 'customize_dynamic_setting_class'
|
2134 |
// We use a custom setting class only for the section collections ( local and global ), not for global options and site template options
|
2135 |
function set_dyn_setting_class( $class, $setting_id, $args ) {
|
|
|
|
|
|
|
2136 |
//sek_error_log( 'REGISTERING CLASS DYNAMICALLY for setting =>' . $setting_id );
|
2137 |
+
// Setting class for NB global options and Site Template options
|
2138 |
+
if ( 0 === strpos( $setting_id, NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS ) || 0 === strpos( $setting_id, NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS ) ) {
|
2139 |
+
return '\Nimble\Nimble_Options_Setting';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2140 |
}
|
2141 |
+
|
2142 |
+
// Setting class for NB sektion collections => shall start with 'nimble___'
|
2143 |
+
if ( 0 === strpos( $setting_id, NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION ) ) {
|
2144 |
+
return '\Nimble\Nimble_Collection_Setting';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2145 |
}
|
2146 |
+
return $class;
|
2147 |
}
|
2148 |
|
|
|
2149 |
}//class
|
2150 |
endif;
|
2151 |
|
4591 |
$value = $id;
|
4592 |
}
|
4593 |
}
|
4594 |
+
} else if ( is_string( $value ) && false !== strpos( $value, '__default_img_medium__' ) ) {
|
4595 |
+
$value = NIMBLE_BASE_URL . '/assets/img/default-img.png';
|
4596 |
}
|
4597 |
$new_seks_data[$key] = $value;
|
4598 |
}
|
4690 |
// the image import errors won't block the import
|
4691 |
// they are used when notifying user in the customizer
|
4692 |
$tmpl_decoded['img_errors'] = !empty( Nimble_Manager()->img_import_errors ) ? implode(',', Nimble_Manager()->img_import_errors) : array();
|
4693 |
+
// Make sure we decode encoded rich text before sending to the customizer
|
4694 |
+
// see #544 and #791
|
4695 |
+
$tmpl_decoded['data'] = sek_prepare_seks_data_for_customizer( $tmpl_decoded['data'] );
|
4696 |
wp_send_json_success( $tmpl_decoded );
|
4697 |
} else {
|
4698 |
wp_send_json_error( __FUNCTION__ . '_invalid_tmpl_post_data' );
|
4732 |
$tmpl_as_array = $raw_tmpl[$tmpl_name];
|
4733 |
$raw_tmpl[$tmpl_name]['data'] = sek_maybe_import_imgs( $raw_tmpl[$tmpl_name]['data'], $do_import_images = true );
|
4734 |
$raw_tmpl[$tmpl_name]['img_errors'] = !empty( Nimble_Manager()->img_import_errors ) ? implode(',', Nimble_Manager()->img_import_errors) : array();
|
4735 |
+
// Make sure we decode encoded rich text before sending to the customizer
|
4736 |
+
// see #544 and #791
|
4737 |
+
$raw_tmpl[$tmpl_name]['data'] = sek_prepare_seks_data_for_customizer( $raw_tmpl[$tmpl_name]['data'] );
|
4738 |
wp_send_json_success( $raw_tmpl[$tmpl_name] );
|
4739 |
}
|
4740 |
//return [];
|
4806 |
'tmpl_header_location' => isset( $_POST['tmpl_header_location'] ) ? $_POST['tmpl_header_location'] : '',
|
4807 |
'tmpl_footer_location' => isset( $_POST['tmpl_footer_location'] ) ? $_POST['tmpl_footer_location'] : '',
|
4808 |
'date' => date("Y-m-d"),
|
4809 |
+
'theme' => sanitize_title_with_dashes( get_stylesheet() ),
|
4810 |
+
// for api templates
|
4811 |
+
'is_pro_tmpl' => false,
|
4812 |
+
'thumb_url' => ''
|
4813 |
+
)
|
4814 |
);
|
4815 |
|
4816 |
+
$saved_template_post = sek_update_saved_tmpl_post( $template_to_save, $is_edit_metas_only_case );
|
4817 |
if ( is_wp_error( $saved_template_post ) || is_null($saved_template_post) || empty($saved_template_post) ) {
|
4818 |
wp_send_json_error( __FUNCTION__ . ' => error when invoking sek_update_saved_tmpl_post()' );
|
4819 |
} else {
|
4957 |
if ( is_array( $section_decoded ) && !empty( $section_decoded['data'] ) && is_string( $section_decoded['data'] ) ) {
|
4958 |
$section_decoded['data'] = json_decode( wp_unslash( $section_decoded['data'], true ) );
|
4959 |
}
|
4960 |
+
// Make sure we decode encoded rich text before sending to the customizer
|
4961 |
+
// see #544 and #791
|
4962 |
+
$section_decoded['data'] = sek_prepare_seks_data_for_customizer( $section_decoded['data'] );
|
4963 |
wp_send_json_success( $section_decoded );
|
4964 |
} else {
|
4965 |
wp_send_json_error( __FUNCTION__ . '_section_post_not_found' );
|
5029 |
//'active_locations' => is_array( $_POST['active_locations'] ) ? $_POST['active_locations'] : array(),
|
5030 |
'date' => date("Y-m-d"),
|
5031 |
'theme' => sanitize_title_with_dashes( get_stylesheet() )
|
5032 |
+
)
|
|
|
5033 |
);
|
5034 |
|
5035 |
+
$saved_section_post = sek_update_saved_section_post( $section_to_save, $is_edit_metas_only_case );
|
5036 |
if ( is_wp_error( $saved_section_post ) || is_null($saved_section_post) || empty($saved_section_post) ) {
|
5037 |
wp_send_json_error( __FUNCTION__ . ' => error when invoking sek_update_saved_section_post()' );
|
5038 |
} else {
|
inc/sektions/ccat-sektions-base.php
CHANGED
@@ -509,10 +509,10 @@ class Sek_Dyn_CSS_Builder {
|
|
509 |
|
510 |
if ( $read_attempt ) {
|
511 |
if ( $reading_issue ) {
|
512 |
-
update_option( NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS, 'failed'
|
513 |
sek_error_log( __CLASS__ . '::' . __FUNCTION__ . ' => reading issue => impossible to concatenate module stylesheets');
|
514 |
} else {
|
515 |
-
update_option( NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS, 'OK'
|
516 |
}
|
517 |
}
|
518 |
//sek_error_log('$modules_css ??', $modules_css );
|
@@ -954,7 +954,7 @@ class Sek_Dyn_CSS_Handler {
|
|
954 |
'dep' => $this->dep,
|
955 |
'hook' => '',
|
956 |
'priority' => $this->priority,
|
957 |
-
'customizer_save' => false,//<= used when saving the customizer settins => we want to write the css file on
|
958 |
'force_write' => $this->force_write,
|
959 |
'force_rewrite' => $this->force_rewrite
|
960 |
);
|
@@ -1012,7 +1012,7 @@ class Sek_Dyn_CSS_Handler {
|
|
1012 |
// If not, delete any previouly created stylesheet
|
1013 |
|
1014 |
//hook setup for printing or enqueuing
|
1015 |
-
//bail if "customizer_save" == true, typically when saving the customizer settings @see
|
1016 |
if ( !$this->customizer_save ) {
|
1017 |
// when not customizing, we write and enqueue :
|
1018 |
// - if the file already exists,
|
@@ -1042,7 +1042,7 @@ class Sek_Dyn_CSS_Handler {
|
|
1042 |
if ( is_customize_preview() || $this->force_rewrite || $this->customizer_save ) {
|
1043 |
$global_style = Nimble_Manager()->sek_build_global_options_inline_css();
|
1044 |
//sek_error_log('SOO GLOBAL INLINE CSS?', $global_style );
|
1045 |
-
update_option( NIMBLE_OPT_FOR_GLOBAL_CSS, $global_style );
|
1046 |
}
|
1047 |
}
|
1048 |
}//__construct
|
@@ -5155,11 +5155,11 @@ if ( !class_exists( 'SEK_Front_Render' ) ) :
|
|
5155 |
// updated May 2020 : prevent doing shortcode when customizing
|
5156 |
// fixes https://github.com/presscustomizr/nimble-builder/issues/704
|
5157 |
function sek_do_shortcode( $content ) {
|
5158 |
-
|
5159 |
-
if ( $allow_shortcode_parsing_when_customizing ) {
|
5160 |
$content = do_shortcode( $content );
|
5161 |
} else {
|
5162 |
-
|
|
|
5163 |
$content = do_shortcode( $content );
|
5164 |
} else {
|
5165 |
global $shortcode_tags;
|
@@ -5168,10 +5168,10 @@ if ( !class_exists( 'SEK_Front_Render' ) ) :
|
|
5168 |
$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
|
5169 |
|
5170 |
if ( !empty( $tagnames ) ) {
|
5171 |
-
|
5172 |
-
|
5173 |
-
|
5174 |
-
|
5175 |
}
|
5176 |
}
|
5177 |
}
|
@@ -5182,9 +5182,14 @@ if ( !class_exists( 'SEK_Front_Render' ) ) :
|
|
5182 |
// updated May 2020 : prevent doing shortcode when customizing
|
5183 |
// fixes https://github.com/presscustomizr/nimble-builder/issues/704
|
5184 |
function sek_run_shortcode( $content ) {
|
5185 |
-
|
5186 |
-
if ( skp_is_customizing()
|
5187 |
-
|
|
|
|
|
|
|
|
|
|
|
5188 |
if ( array_key_exists( 'wp_embed', $GLOBALS ) && $GLOBALS['wp_embed'] instanceof \WP_Embed ) {
|
5189 |
$content = $GLOBALS['wp_embed']->run_shortcode( $content );
|
5190 |
}
|
@@ -6178,7 +6183,7 @@ class Sek_Simple_Form extends SEK_Front_Render_Css {
|
|
6178 |
// Feb 2021 : now saved as a json to fix emojis issues
|
6179 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6180 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
6181 |
-
$user_form_composition[$field_id]['label'] =
|
6182 |
}
|
6183 |
break;
|
6184 |
|
@@ -6198,7 +6203,7 @@ class Sek_Simple_Form extends SEK_Front_Render_Css {
|
|
6198 |
// Feb 2021 : now saved as a json to fix emojis issues
|
6199 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6200 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
6201 |
-
$user_form_composition[$field_id]['value'] =
|
6202 |
break;
|
6203 |
case 'nimble_skope_id':
|
6204 |
$user_form_composition[$field_id] = $field_data;
|
@@ -6927,7 +6932,7 @@ class Sek_Mailer {
|
|
6927 |
// Feb 2021 : now saved as a json to fix emojis issues
|
6928 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6929 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
6930 |
-
$email_footer =
|
6931 |
$email_footer = sek_strip_script_tags( $email_footer );
|
6932 |
} else {
|
6933 |
$email_footer = sprintf( __( 'This e-mail was sent from a contact form on %1$s (<a href="%2$s" target="_blank">%2$s</a>)', 'nimble-builder' ),
|
509 |
|
510 |
if ( $read_attempt ) {
|
511 |
if ( $reading_issue ) {
|
512 |
+
update_option( NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS, 'failed');
|
513 |
sek_error_log( __CLASS__ . '::' . __FUNCTION__ . ' => reading issue => impossible to concatenate module stylesheets');
|
514 |
} else {
|
515 |
+
update_option( NIMBLE_OPT_FOR_MODULE_CSS_READING_STATUS, 'OK');
|
516 |
}
|
517 |
}
|
518 |
//sek_error_log('$modules_css ??', $modules_css );
|
954 |
'dep' => $this->dep,
|
955 |
'hook' => '',
|
956 |
'priority' => $this->priority,
|
957 |
+
'customizer_save' => false,//<= used when saving the customizer settins => we want to write the css file on Nimble_Collection_Setting::update()
|
958 |
'force_write' => $this->force_write,
|
959 |
'force_rewrite' => $this->force_rewrite
|
960 |
);
|
1012 |
// If not, delete any previouly created stylesheet
|
1013 |
|
1014 |
//hook setup for printing or enqueuing
|
1015 |
+
//bail if "customizer_save" == true, typically when saving the customizer settings @see Nimble_Collection_Setting::update()
|
1016 |
if ( !$this->customizer_save ) {
|
1017 |
// when not customizing, we write and enqueue :
|
1018 |
// - if the file already exists,
|
1042 |
if ( is_customize_preview() || $this->force_rewrite || $this->customizer_save ) {
|
1043 |
$global_style = Nimble_Manager()->sek_build_global_options_inline_css();
|
1044 |
//sek_error_log('SOO GLOBAL INLINE CSS?', $global_style );
|
1045 |
+
update_option( NIMBLE_OPT_FOR_GLOBAL_CSS, $global_style, 'no' );
|
1046 |
}
|
1047 |
}
|
1048 |
}//__construct
|
5155 |
// updated May 2020 : prevent doing shortcode when customizing
|
5156 |
// fixes https://github.com/presscustomizr/nimble-builder/issues/704
|
5157 |
function sek_do_shortcode( $content ) {
|
5158 |
+
if ( !skp_is_customizing() ) {
|
|
|
5159 |
$content = do_shortcode( $content );
|
5160 |
} else {
|
5161 |
+
$allow_shortcode_parsing_when_customizing = sek_booleanize_checkbox_val( get_option( 'nb_shortcodes_parsed_in_czr' ) );
|
5162 |
+
if ( $allow_shortcode_parsing_when_customizing ) {
|
5163 |
$content = do_shortcode( $content );
|
5164 |
} else {
|
5165 |
global $shortcode_tags;
|
5168 |
$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
|
5169 |
|
5170 |
if ( !empty( $tagnames ) ) {
|
5171 |
+
$content = sprintf('<div class="nimble-shortcode-notice-in-preview"><i class="fas fa-info-circle"></i> %1$s</div>%2$s',
|
5172 |
+
__('Shortcodes are not parsed by default when customizing. You can change this setting in your WP admin > Settings > Nimble Builder options.', 'nimble-builder'),
|
5173 |
+
$content
|
5174 |
+
);
|
5175 |
}
|
5176 |
}
|
5177 |
}
|
5182 |
// updated May 2020 : prevent doing shortcode when customizing
|
5183 |
// fixes https://github.com/presscustomizr/nimble-builder/issues/704
|
5184 |
function sek_run_shortcode( $content ) {
|
5185 |
+
// customizing => check if NB can parse the shortcode
|
5186 |
+
if ( skp_is_customizing() ) {
|
5187 |
+
$allow_shortcode_parsing_when_customizing = sek_booleanize_checkbox_val( get_option( 'nb_shortcodes_parsed_in_czr' ) );
|
5188 |
+
if ( !$allow_shortcode_parsing_when_customizing ) {
|
5189 |
+
return $content;
|
5190 |
+
}
|
5191 |
+
}
|
5192 |
+
// Not customizing always run
|
5193 |
if ( array_key_exists( 'wp_embed', $GLOBALS ) && $GLOBALS['wp_embed'] instanceof \WP_Embed ) {
|
5194 |
$content = $GLOBALS['wp_embed']->run_shortcode( $content );
|
5195 |
}
|
6183 |
// Feb 2021 : now saved as a json to fix emojis issues
|
6184 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6185 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
6186 |
+
$user_form_composition[$field_id]['label'] = sek_maybe_decode_richtext( $user_form_composition[$field_id]['label'] );
|
6187 |
}
|
6188 |
break;
|
6189 |
|
6203 |
// Feb 2021 : now saved as a json to fix emojis issues
|
6204 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6205 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
6206 |
+
$user_form_composition[$field_id]['value'] = sek_maybe_decode_richtext( $form_fields_options['button_text'] );
|
6207 |
break;
|
6208 |
case 'nimble_skope_id':
|
6209 |
$user_form_composition[$field_id] = $field_data;
|
6932 |
// Feb 2021 : now saved as a json to fix emojis issues
|
6933 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6934 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
6935 |
+
$email_footer = sek_maybe_decode_richtext( $submission_options['email_footer'] );
|
6936 |
$email_footer = sek_strip_script_tags( $email_footer );
|
6937 |
} else {
|
6938 |
$email_footer = sprintf( __( 'This e-mail was sent from a contact form on %1$s (<a href="%2$s" target="_blank">%2$s</a>)', 'nimble-builder' ),
|
inc/sektions/ccat-sektions-front-modules.php
CHANGED
@@ -184,7 +184,7 @@ function sanitize_callback__czr_simple_html_module( $value ) {
|
|
184 |
}
|
185 |
// convert into a json to prevent emoji breaking global json data structure
|
186 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
187 |
-
$value[ 'html_content' ] =
|
188 |
}
|
189 |
return $value;
|
190 |
}
|
@@ -232,7 +232,7 @@ function sek_get_module_params_for_czr_tiny_mce_editor_module() {
|
|
232 |
function sek_sanitize_czr_tiny_mce_editor_module( $content ) {
|
233 |
if ( is_array($content) && !empty($content['main_settings']) && is_array($content['main_settings']) ) {
|
234 |
$editor_content = !empty($content['main_settings']['content']) ? $content['main_settings']['content'] : '';
|
235 |
-
$content['main_settings']['content'] =
|
236 |
}
|
237 |
//sek_error_log( 'ALORS MODULE CONTENT ?', $content );
|
238 |
return $content;
|
@@ -1247,10 +1247,10 @@ function sek_sanitize_czr_heading_module( $content ) {
|
|
1247 |
}
|
1248 |
// convert into a json to prevent emoji breaking global json data structure
|
1249 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
1250 |
-
$content['main_settings']['heading_text'] =
|
1251 |
}
|
1252 |
if ( !empty($content['main_settings']['heading_title']) ) {
|
1253 |
-
$content['main_settings']['heading_title'] =
|
1254 |
}
|
1255 |
}
|
1256 |
return $content;
|
@@ -2294,7 +2294,7 @@ function sanitize_callback__czr_quote_module( $value ) {
|
|
2294 |
}
|
2295 |
// convert into a json to prevent emoji breaking global json data structure
|
2296 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
2297 |
-
$value['quote_content']['quote_text'] =
|
2298 |
}
|
2299 |
if ( array_key_exists( 'cite_content', $value ) && is_array( $value['cite_content'] ) && !empty($value['cite_content']['cite_text']) ) {
|
2300 |
//sanitize quote_text
|
@@ -2303,7 +2303,7 @@ function sanitize_callback__czr_quote_module( $value ) {
|
|
2303 |
}
|
2304 |
// convert into a json to prevent emoji breaking global json data structure
|
2305 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
2306 |
-
$value['cite_content']['cite_text'] =
|
2307 |
}
|
2308 |
return $value;
|
2309 |
}
|
@@ -2627,7 +2627,7 @@ function sanitize_callback__czr_button_module( $value ) {
|
|
2627 |
//$value['content'][ 'button_text' ] = sanitize_text_field( $value['content'][ 'button_text' ] );
|
2628 |
// convert into a json to prevent emoji breaking global json data structure
|
2629 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
2630 |
-
$value['content']['button_text'] =
|
2631 |
}
|
2632 |
return $value;
|
2633 |
}
|
@@ -3648,15 +3648,15 @@ function sanitize_callback__czr_simple_form_module( $value ) {
|
|
3648 |
if ( array_key_exists( 'form_fields', $value ) && is_array( $value['form_fields'] ) ) {
|
3649 |
if ( !empty($value['form_fields']['button_text']) ) {
|
3650 |
$value['form_fields']['button_text'] = sanitize_text_field( $value['form_fields']['button_text'] );
|
3651 |
-
$value['form_fields']['button_text'] =
|
3652 |
}
|
3653 |
if ( !empty($value['form_fields']['privacy_field_label']) ) {
|
3654 |
-
$value['form_fields']['privacy_field_label'] =
|
3655 |
}
|
3656 |
}
|
3657 |
if ( array_key_exists( 'form_submission', $value ) && is_array( $value['form_submission'] ) ) {
|
3658 |
if ( !empty($value['form_submission']['email_footer']) ) {
|
3659 |
-
$value['form_submission']['email_footer'] =
|
3660 |
}
|
3661 |
}
|
3662 |
return $value;
|
@@ -5505,7 +5505,7 @@ function sanitize_cb__czr_img_slider_module( $value ) {
|
|
5505 |
if ( !empty($value['img_collection']) && is_array( $value['img_collection'] ) ) {
|
5506 |
foreach( $value['img_collection'] as $key => $data ) {
|
5507 |
if ( array_key_exists( 'text_content', $data ) && is_string( $data['text_content'] ) ) {
|
5508 |
-
$value['img_collection'][$key]['text_content'] =
|
5509 |
}
|
5510 |
}
|
5511 |
}
|
@@ -6137,10 +6137,10 @@ function sanitize_cb__czr_accordion_module( $value ) {
|
|
6137 |
if ( !empty($value['accord_collec']) && is_array( $value['accord_collec'] ) ) {
|
6138 |
foreach( $value['accord_collec'] as $key => $data ) {
|
6139 |
if ( array_key_exists( 'text_content', $data ) && is_string( $data['text_content'] ) ) {
|
6140 |
-
$value['accord_collec'][$key]['text_content'] =
|
6141 |
}
|
6142 |
if ( array_key_exists( 'title_text', $data ) && is_string( $data['title_text'] ) ) {
|
6143 |
-
$value['accord_collec'][$key]['title_text'] =
|
6144 |
}
|
6145 |
}
|
6146 |
}
|
@@ -6702,7 +6702,7 @@ function sek_get_module_params_for_czr_shortcode_module() {
|
|
6702 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6703 |
function sek_sanitize_czr_shortcode_module( $content ) {
|
6704 |
if ( is_array($content) && !empty($content['text_content']) ) {
|
6705 |
-
$content['text_content'] =
|
6706 |
}
|
6707 |
return $content;
|
6708 |
}
|
184 |
}
|
185 |
// convert into a json to prevent emoji breaking global json data structure
|
186 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
187 |
+
$value[ 'html_content' ] = sek_maybe_encode_richtext( $value[ 'html_content' ] );
|
188 |
}
|
189 |
return $value;
|
190 |
}
|
232 |
function sek_sanitize_czr_tiny_mce_editor_module( $content ) {
|
233 |
if ( is_array($content) && !empty($content['main_settings']) && is_array($content['main_settings']) ) {
|
234 |
$editor_content = !empty($content['main_settings']['content']) ? $content['main_settings']['content'] : '';
|
235 |
+
$content['main_settings']['content'] = sek_maybe_encode_richtext($editor_content);
|
236 |
}
|
237 |
//sek_error_log( 'ALORS MODULE CONTENT ?', $content );
|
238 |
return $content;
|
1247 |
}
|
1248 |
// convert into a json to prevent emoji breaking global json data structure
|
1249 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
1250 |
+
$content['main_settings']['heading_text'] = sek_maybe_encode_richtext($content['main_settings']['heading_text']);
|
1251 |
}
|
1252 |
if ( !empty($content['main_settings']['heading_title']) ) {
|
1253 |
+
$content['main_settings']['heading_title'] = sek_maybe_encode_richtext($content['main_settings']['heading_title']);
|
1254 |
}
|
1255 |
}
|
1256 |
return $content;
|
2294 |
}
|
2295 |
// convert into a json to prevent emoji breaking global json data structure
|
2296 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
2297 |
+
$value['quote_content']['quote_text'] = sek_maybe_encode_richtext($value['quote_content']['quote_text']);
|
2298 |
}
|
2299 |
if ( array_key_exists( 'cite_content', $value ) && is_array( $value['cite_content'] ) && !empty($value['cite_content']['cite_text']) ) {
|
2300 |
//sanitize quote_text
|
2303 |
}
|
2304 |
// convert into a json to prevent emoji breaking global json data structure
|
2305 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
2306 |
+
$value['cite_content']['cite_text'] = sek_maybe_encode_richtext($value['cite_content']['cite_text']);
|
2307 |
}
|
2308 |
return $value;
|
2309 |
}
|
2627 |
//$value['content'][ 'button_text' ] = sanitize_text_field( $value['content'][ 'button_text' ] );
|
2628 |
// convert into a json to prevent emoji breaking global json data structure
|
2629 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
2630 |
+
$value['content']['button_text'] = sek_maybe_encode_richtext($value['content']['button_text']);
|
2631 |
}
|
2632 |
return $value;
|
2633 |
}
|
3648 |
if ( array_key_exists( 'form_fields', $value ) && is_array( $value['form_fields'] ) ) {
|
3649 |
if ( !empty($value['form_fields']['button_text']) ) {
|
3650 |
$value['form_fields']['button_text'] = sanitize_text_field( $value['form_fields']['button_text'] );
|
3651 |
+
$value['form_fields']['button_text'] = sek_maybe_encode_richtext($value['form_fields']['button_text']);
|
3652 |
}
|
3653 |
if ( !empty($value['form_fields']['privacy_field_label']) ) {
|
3654 |
+
$value['form_fields']['privacy_field_label'] = sek_maybe_encode_richtext($value['form_fields']['privacy_field_label']);
|
3655 |
}
|
3656 |
}
|
3657 |
if ( array_key_exists( 'form_submission', $value ) && is_array( $value['form_submission'] ) ) {
|
3658 |
if ( !empty($value['form_submission']['email_footer']) ) {
|
3659 |
+
$value['form_submission']['email_footer'] = sek_maybe_encode_richtext($value['form_submission']['email_footer']);
|
3660 |
}
|
3661 |
}
|
3662 |
return $value;
|
5505 |
if ( !empty($value['img_collection']) && is_array( $value['img_collection'] ) ) {
|
5506 |
foreach( $value['img_collection'] as $key => $data ) {
|
5507 |
if ( array_key_exists( 'text_content', $data ) && is_string( $data['text_content'] ) ) {
|
5508 |
+
$value['img_collection'][$key]['text_content'] = sek_maybe_encode_richtext( $data['text_content'] );
|
5509 |
}
|
5510 |
}
|
5511 |
}
|
6137 |
if ( !empty($value['accord_collec']) && is_array( $value['accord_collec'] ) ) {
|
6138 |
foreach( $value['accord_collec'] as $key => $data ) {
|
6139 |
if ( array_key_exists( 'text_content', $data ) && is_string( $data['text_content'] ) ) {
|
6140 |
+
$value['accord_collec'][$key]['text_content'] = sek_maybe_encode_richtext( $data['text_content'] );
|
6141 |
}
|
6142 |
if ( array_key_exists( 'title_text', $data ) && is_string( $data['title_text'] ) ) {
|
6143 |
+
$value['accord_collec'][$key]['title_text'] = sek_maybe_encode_richtext( $data['title_text'] );
|
6144 |
}
|
6145 |
}
|
6146 |
}
|
6702 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
6703 |
function sek_sanitize_czr_shortcode_module( $content ) {
|
6704 |
if ( is_array($content) && !empty($content['text_content']) ) {
|
6705 |
+
$content['text_content'] = sek_maybe_encode_richtext($content['text_content']);
|
6706 |
}
|
6707 |
return $content;
|
6708 |
}
|
inc/sektions/seks_setting_class.php
CHANGED
@@ -3,6 +3,33 @@ namespace Nimble;
|
|
3 |
if ( !defined( 'ABSPATH' ) ) {
|
4 |
exit;
|
5 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
/**
|
7 |
* This handles validation, sanitization and saving of the value.
|
8 |
*/
|
@@ -12,9 +39,10 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
12 |
*
|
13 |
* @see WP_Customize_Setting
|
14 |
*/
|
|
|
15 |
// Note : the backslash before WP_Customize_Setting is here to indicate the global namespace
|
16 |
// otherwise "PHP Fatal error: Class 'Nimble\WP_Customize_Setting'" not found will be triggered by the php engine
|
17 |
-
final class
|
18 |
|
19 |
/**
|
20 |
* The setting type.
|
@@ -45,13 +73,13 @@ final class Nimble_Customizer_Setting extends \WP_Customize_Setting {
|
|
45 |
parent::__construct( $manager, $id, $args );
|
46 |
// shall start with "nimble___"
|
47 |
if ( 0 !== strpos( $this->id_data['base'], NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION ) ) { //$this->id_data['base'] looks like "nimble___"
|
48 |
-
throw new Exception( '
|
49 |
}
|
50 |
|
51 |
|
52 |
//there can be only one skope_id key instantiated at a time
|
53 |
if ( 1 !== count( $this->id_data['keys'] ) || empty( $this->id_data['keys'][0] ) ) {
|
54 |
-
throw new Exception( '
|
55 |
}
|
56 |
$this->skope_id = $this->id_data['keys'][0];
|
57 |
}
|
@@ -110,7 +138,7 @@ final class Nimble_Customizer_Setting extends \WP_Customize_Setting {
|
|
110 |
}
|
111 |
$id_base = $this->id_data['base'];
|
112 |
|
113 |
-
//error_log('id_base in
|
114 |
|
115 |
$value = '';
|
116 |
$post = sek_get_seks_post( $this->skope_id );
|
@@ -144,7 +172,7 @@ final class Nimble_Customizer_Setting extends \WP_Customize_Setting {
|
|
144 |
// sek_error_log( __CLASS__. ' $seks_collection' , $seks_collection );
|
145 |
|
146 |
if ( empty( $this->skope_id ) || !is_string( $this->skope_id ) ) {
|
147 |
-
throw new Exception( '
|
148 |
}
|
149 |
|
150 |
$r = sek_update_sek_post( $seks_collection, array(
|
@@ -170,8 +198,6 @@ final class Nimble_Customizer_Setting extends \WP_Customize_Setting {
|
|
170 |
}
|
171 |
$post_id = $r->ID;
|
172 |
|
173 |
-
$option_name = NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . $this->skope_id;
|
174 |
-
|
175 |
// Cache post ID in option for performance to avoid additional DB query.
|
176 |
// $seks_options = get_option( $option_name );
|
177 |
// $seks_options = is_array( $seks_options ) ? $seks_options : array();
|
@@ -179,7 +205,7 @@ final class Nimble_Customizer_Setting extends \WP_Customize_Setting {
|
|
179 |
// //$seks_options[ $this->skope_id ] = $post_id;//$r is the post ID
|
180 |
// $seks_options = (int)$post_id;//$r is the post ID
|
181 |
|
182 |
-
|
183 |
// sek_error_log( __CLASS__ . '::' . __FUNCTION__ . ' => $seks_options', (int)$post_id);
|
184 |
|
185 |
return $post_id;
|
3 |
if ( !defined( 'ABSPATH' ) ) {
|
4 |
exit;
|
5 |
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
*
|
9 |
+
*
|
10 |
+
* @see WP_Customize_Setting
|
11 |
+
*/
|
12 |
+
// Setting class for NB global options and Site Template options
|
13 |
+
// Note : the backslash before WP_Customize_Setting is here to indicate the global namespace
|
14 |
+
// otherwise "PHP Fatal error: Class 'Nimble\WP_Customize_Setting'" not found will be triggered by the php engine
|
15 |
+
// This Setting class has been introduced in March 2021 for #799, to set option to autoload 'no' in wp_options
|
16 |
+
final class Nimble_Options_Setting extends \WP_Customize_Setting {
|
17 |
+
public function __construct( $manager, $id, $args = array() ) {
|
18 |
+
parent::__construct( $manager, $id, $args );
|
19 |
+
// Make sure NB doesn't override the wrong setting
|
20 |
+
if ( 0 !== strpos( $this->id_data['base'], NIMBLE_OPT_NAME_FOR_GLOBAL_OPTIONS ) && 0 !== strpos( $this->id_data['base'], NIMBLE_OPT_NAME_FOR_SITE_TMPL_OPTIONS ) ) {
|
21 |
+
throw new \Exception( 'Nimble_Options_Customizer_Setting => __construct => invalid ID base' );
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
// March 2021 => set autoload to "no" for #799
|
26 |
+
public function update( $value ) {
|
27 |
+
update_option( $this->id_data['base'], $value, 'no' );
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
/**
|
34 |
* This handles validation, sanitization and saving of the value.
|
35 |
*/
|
39 |
*
|
40 |
* @see WP_Customize_Setting
|
41 |
*/
|
42 |
+
// Setting class for NB sektion collections => shall start with 'nimble___'
|
43 |
// Note : the backslash before WP_Customize_Setting is here to indicate the global namespace
|
44 |
// otherwise "PHP Fatal error: Class 'Nimble\WP_Customize_Setting'" not found will be triggered by the php engine
|
45 |
+
final class Nimble_Collection_Setting extends \WP_Customize_Setting {
|
46 |
|
47 |
/**
|
48 |
* The setting type.
|
73 |
parent::__construct( $manager, $id, $args );
|
74 |
// shall start with "nimble___"
|
75 |
if ( 0 !== strpos( $this->id_data['base'], NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION ) ) { //$this->id_data['base'] looks like "nimble___"
|
76 |
+
throw new \Exception( 'Nimble_Collection_Setting => __construct => Expected ' . NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . ' id_base.' );
|
77 |
}
|
78 |
|
79 |
|
80 |
//there can be only one skope_id key instantiated at a time
|
81 |
if ( 1 !== count( $this->id_data['keys'] ) || empty( $this->id_data['keys'][0] ) ) {
|
82 |
+
throw new \Exception( 'Nimble_Collection_Setting => __construct => Expected single option key.' );
|
83 |
}
|
84 |
$this->skope_id = $this->id_data['keys'][0];
|
85 |
}
|
138 |
}
|
139 |
$id_base = $this->id_data['base'];
|
140 |
|
141 |
+
//error_log('id_base in Nimble_Collection_Setting class => ' . $this->id_data['base'] );
|
142 |
|
143 |
$value = '';
|
144 |
$post = sek_get_seks_post( $this->skope_id );
|
172 |
// sek_error_log( __CLASS__. ' $seks_collection' , $seks_collection );
|
173 |
|
174 |
if ( empty( $this->skope_id ) || !is_string( $this->skope_id ) ) {
|
175 |
+
throw new \Exception( 'Nimble_Collection_Setting => update => invalid skope id' );
|
176 |
}
|
177 |
|
178 |
$r = sek_update_sek_post( $seks_collection, array(
|
198 |
}
|
199 |
$post_id = $r->ID;
|
200 |
|
|
|
|
|
201 |
// Cache post ID in option for performance to avoid additional DB query.
|
202 |
// $seks_options = get_option( $option_name );
|
203 |
// $seks_options = is_array( $seks_options ) ? $seks_options : array();
|
205 |
// //$seks_options[ $this->skope_id ] = $post_id;//$r is the post ID
|
206 |
// $seks_options = (int)$post_id;//$r is the post ID
|
207 |
|
208 |
+
sek_set_nb_post_id_in_index( $this->skope_id, (int)$post_id );
|
209 |
// sek_error_log( __CLASS__ . '::' . __FUNCTION__ . ' => $seks_options', (int)$post_id);
|
210 |
|
211 |
return $post_id;
|
nimble-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Nimble Page Builder
|
4 |
* Plugin URI: https://nimblebuilder.com
|
5 |
* Description: Simple and smart companion that allows you to insert sections into any existing page, create landing pages or entire websites including header and footer.
|
6 |
-
* Version: 2.2.
|
7 |
* Text Domain: nimble-builder
|
8 |
* Author: Press Customizr
|
9 |
* Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
|
@@ -16,7 +16,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
16 |
/* ------------------------------------------------------------------------- *
|
17 |
* CONSTANTS
|
18 |
/* ------------------------------------------------------------------------- */
|
19 |
-
$current_version = "2.2.
|
20 |
|
21 |
if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
|
22 |
if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
|
@@ -160,6 +160,8 @@ if ( nimble_passes_requirements() ) {
|
|
160 |
// Fire the retro compatibility functions
|
161 |
// Note : if fired @plugins_loaded, invoking wp_update_post() generates php notices
|
162 |
//add_action( 'wp_loaded', '\Nimble\sek_maybe_do_version_mapping' );
|
|
|
|
|
163 |
|
164 |
// Load admin
|
165 |
if ( is_admin() ) {
|
3 |
* Plugin Name: Nimble Page Builder
|
4 |
* Plugin URI: https://nimblebuilder.com
|
5 |
* Description: Simple and smart companion that allows you to insert sections into any existing page, create landing pages or entire websites including header and footer.
|
6 |
+
* Version: 2.2.6
|
7 |
* Text Domain: nimble-builder
|
8 |
* Author: Press Customizr
|
9 |
* Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
|
16 |
/* ------------------------------------------------------------------------- *
|
17 |
* CONSTANTS
|
18 |
/* ------------------------------------------------------------------------- */
|
19 |
+
$current_version = "2.2.6";
|
20 |
|
21 |
if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
|
22 |
if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
|
160 |
// Fire the retro compatibility functions
|
161 |
// Note : if fired @plugins_loaded, invoking wp_update_post() generates php notices
|
162 |
//add_action( 'wp_loaded', '\Nimble\sek_maybe_do_version_mapping' );
|
163 |
+
// introduced for https://github.com/presscustomizr/nimble-builder/issues/799
|
164 |
+
add_action( 'wp_loaded', '\Nimble\sek_maybe_optimize_options' );
|
165 |
|
166 |
// Load admin
|
167 |
if ( is_admin() ) {
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Plugin URI: https://wordpress.org/plugins/nimble-builder/
|
|
5 |
Tags: page builder, visual editor, customizer, drag and drop, header, footer, landing page, contact form, grid, post grid
|
6 |
Requires at least: 4.7
|
7 |
Requires PHP: 5.4
|
8 |
-
Tested up to: 5.
|
9 |
-
Stable tag: 2.2.
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
|
@@ -120,9 +120,29 @@ We have also published a detailed [troubleshooting guide for Nimble Builder](htt
|
|
120 |
If you can't troubleshoot your issue, please open a new thread in [Nimble Builder support forum](https://wordpress.org/support/plugin/nimble-builder/).
|
121 |
|
122 |
== Upgrade Notice ==
|
123 |
-
2.2.
|
124 |
|
125 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
= 2.2.2 February 18th, 2021 =
|
127 |
* fixed : [character encoding] some characters like (€ quotemarks „“, ä ü ö ß and € 😘🚀) can break rich text editor content
|
128 |
|
@@ -196,127 +216,3 @@ If you can't troubleshoot your issue, please open a new thread in [Nimble Builde
|
|
196 |
= 2.1.23 November 17th 2020 =
|
197 |
* fixed : [jQuery][javascript] prepare code for WordPress 5.6+ and removal of jquery migrate
|
198 |
* fixed : fixed : [CSS][default style] headings font-sizes should be styled by default when used in another module than the heading one, like in the rich text module for example
|
199 |
-
|
200 |
-
= 2.1.22 November 9th 2020 =
|
201 |
-
* fixed : [dynamic CSS] a missing input id can break building css rules
|
202 |
-
* fixed : [global style] global font size not taking precedence over default theme rules in menu items, and ul / ol lists
|
203 |
-
* fixed : [search form] add max-width rule to search input to reinforce Nimble CSS precedence over active theme/plugins
|
204 |
-
* fixed : [menu module] removed buttons added with a filter by upcoming Twenty Twenty One theme to top level menu-items
|
205 |
-
* fixed : [level background] print inline css when customizing instead of relying on data-sek-src
|
206 |
-
* fixed : [special image][pro] added more specificity to the link CSS rules to prevent override by global link rules
|
207 |
-
* added : [module,column,section] new z-index option in "Height" options
|
208 |
-
* added : [links] simple default color CSS transition
|
209 |
-
* improved : [lazy load] Disable smart load parsing when building in the customizer
|
210 |
-
|
211 |
-
= 2.1.21 November 5th 2020 =
|
212 |
-
* fixed : [Image module] custom width not taken into account if > 100% of the parent element.
|
213 |
-
* fixed : [link picker][customizer] list of links not visible (opacity set to 0) due to "clearfix" class styled by other plugins
|
214 |
-
|
215 |
-
= 2.1.20 October 22nd 2020 =
|
216 |
-
* fixed : [javascript] replaced javascript alert when jQuery not detected by a console log
|
217 |
-
|
218 |
-
= 2.1.19 October 17th 2020 =
|
219 |
-
* fixed : [CSS] php error when user not logged in when enqueuing CSS stylesheets
|
220 |
-
|
221 |
-
= 2.1.18 October 17th 2020 =
|
222 |
-
* fixed : [javascript][performance] front javascript can break when user activates the ajax load performance option
|
223 |
-
* added : [front assets][performance] introduction of a new property Nimble_Manager()::page_has_local_or_global_sections, set @template_redirect, which let us know if NB asset are needed on a given page. More efficitent that the previous check which was running several times a recursive walker on the section tree.
|
224 |
-
|
225 |
-
= 2.1.17 October 16th 2020 =
|
226 |
-
* fixed : [global CSS] bug : missing global style options after updating Nimble Builder to v2.1.15+
|
227 |
-
* added : [customizer][font picker] link to Google fonts showcase
|
228 |
-
|
229 |
-
= 2.1.16 October 16th 2020 =
|
230 |
-
* fixed : [CSS] specificity too low for rules generated for modules
|
231 |
-
* fixed : [html] attribute data-sek-lazy-bg is added to all levels even when there's no lazy backround to load
|
232 |
-
|
233 |
-
= 2.1.15 October 15th, 2020 =
|
234 |
-
* fixed : [CSS][Button module] border and text color should have more specificity to avoid being overridden by future WP default theme twentytwentyone
|
235 |
-
* fixed : [customizer preview] some CSS rules for UI buttons are not specific enough when using a theme like twentytwentyone
|
236 |
-
* fixed : [CSS] global stylesheet may be erased when generating local stylesheet with no global locations
|
237 |
-
* fixed : [CSS] specificity too low for module dynamic styles, in particular for text CSS rules
|
238 |
-
* fixed : [CSS][performance] better performances on front for global options CSS, like text, breakpoint, sections widths
|
239 |
-
* fixed : [menu module] added more specificity to button style to avoid inheritance of themes or plugins style ( twentytwentyone overrides buttons style )
|
240 |
-
* added : [CSS] new selector .nb-loc to location wrappers
|
241 |
-
* added : [CSS][performance] use a new global option to store global style to be rendered inline
|
242 |
-
* improved : [JS][Performances] reduce main script file + defer loading of partial ones + load when needed only
|
243 |
-
* improved : [CSS][Global options] implement a better way to print global options stylesheets with a filter 'nimble_set_global_inline_style'
|
244 |
-
* improved : [performance] preload some front assets like Font Awesome style and fonts
|
245 |
-
* improved : [performance][js][css] assets for magn. popup, swiper, video bg are now by default loaded by js on front. WP enqueueing is only used when customizing for those assets.
|
246 |
-
* improved : [CSS][Performance] implement dynamic module stylesheet concatenation + added a new folder name 'nimble_css' for new concatenated stylesheets + clean the previous one 'nb_css' + removed global performance option 'use_partial_module_stylesheets'. Fallback on full stylesheet if concatenation broken due to permissions problems.
|
247 |
-
* removed : [performance] option 'preload_front_scripts', now implemented by default
|
248 |
-
* removed : [performance] removed php sniffers to detect if we need to load specific assets in favor of a js detection
|
249 |
-
|
250 |
-
= 2.1.14 October 6th, 2020 =
|
251 |
-
* fixed : [performance][Lazy loading] when rendering NB content, remove attr loading="lazy" added to images by WP
|
252 |
-
* fixed : [scroll to anchor] + [lazyload] => avoid layout shifts problems for page with many images
|
253 |
-
|
254 |
-
= 2.1.13 September 30, 2020 =
|
255 |
-
* fixed : [module settings] horizontal alignment should be customizable without setting a custom width
|
256 |
-
* added : [prebuilt sections] link to live demo when hovering thumbnail
|
257 |
-
* improved : [i18n] clean unused translation strings
|
258 |
-
|
259 |
-
= 2.1.12 September 28, 2020 =
|
260 |
-
* fixed : [lazy load] background images off screen are not loaded when lazy load is disabled
|
261 |
-
* fixed : [image module] an image with an invalid url should not be rendered
|
262 |
-
* fixed : [shadow on levels] not refreshed when customizing
|
263 |
-
* fixed : [scroll to anchor] when lazy loading is on, the scroll might not land to the right anchor
|
264 |
-
* fixed : [carousel module] first image not displayed when customizing with global lazyload disabled BUT slider lazyload enabled
|
265 |
-
* fixed : [carousel module] adapt image to carousel height broken
|
266 |
-
* added : [carousel module] new image layout option so that images fill space and are centered without being stretched
|
267 |
-
* improved : [scroll to anchor] implement scrollIntoView
|
268 |
-
|
269 |
-
= 2.1.11 September 26, 2020 =
|
270 |
-
* fixed : [dynamic css] css value may not be taken into account when typed fast, for example when setting an height in pixels
|
271 |
-
* fixed : [slider module] horizontal centering broken when slider fills 100% of height
|
272 |
-
* fixed : [slider module] improved slider image style when chosen option is to adapt image on height
|
273 |
-
* fixed : [prebuilt sections][performances] removed the get sections action at 'nimble_front_classes_ready'
|
274 |
-
* fixed : [img module] make sure the html has a minimum height when no image was found
|
275 |
-
* improved : [dynamic stylesheet] always animate to level when stylesheet is generated
|
276 |
-
* improved : [dynamic stylesheet][performance] improved the CSS rule generation for level box shadow
|
277 |
-
* added : [fonts] new web safe font
|
278 |
-
* added : [image module] introduction of a custom height option
|
279 |
-
* added: [prebuilt sections] new group of sections "Team" with 2 new prebuilt sections included
|
280 |
-
|
281 |
-
= 2.1.10 September 17, 2020 =
|
282 |
-
* improved : [admin] settings links should point to "Options" tab
|
283 |
-
* fixed : [accordion module] striping script tags should be moved before parsing video embed, leading to tiktok videos embeds not working
|
284 |
-
|
285 |
-
= 2.1.9 September 11th 2020 =
|
286 |
-
* fixed : php fatal error on front end
|
287 |
-
|
288 |
-
= 2.1.8 September 11th 2020 =
|
289 |
-
* added : [contact form module] introduction of a privacy checkbox for a better GDPR compliancy
|
290 |
-
|
291 |
-
= 2.1.7 September 7 2020 =
|
292 |
-
* improved : Maintenance release, minor admin code improvement.
|
293 |
-
|
294 |
-
= 2.1.6 September 1st 2020 =
|
295 |
-
* fixed : [customizer] fixed possible javascript error when setting a font family
|
296 |
-
* improved : [admin] Welcome notice doesn't need to be displayed on all screens
|
297 |
-
|
298 |
-
= 2.1.5 July 20th 2020 =
|
299 |
-
* fixed : [compatibility with WP 5.5] wp_make_content_images_responsive is deprecated, replaced by wp_filter_content_tags
|
300 |
-
* fixed : [compatibility with WP 5.5] adapt customizer color-picker script with latest version of WP 5.5
|
301 |
-
* improved : [performance] limit the number of transients created by Nimble Builder + clean old unused transients.
|
302 |
-
* improved : [icon module] added a default line-height of 1em to the icon wrapper
|
303 |
-
|
304 |
-
= 2.1.4 July 18th 2020 =
|
305 |
-
* fixed : [Customizer UI][device switcher] limit scenarii when preview is automatically set back to desktop, while user customizes mobile or tablet preview.
|
306 |
-
|
307 |
-
= 2.1.3 July 17th 2020 =
|
308 |
-
* fixed : [CSS generation][performances] empty stylesheets not always removed from upload sek_css folder. Introduction of a new folder 'nb_css' in /upload to store Nimble dynamic stylesheets.
|
309 |
-
|
310 |
-
= 2.1.2 July 7th 2020 =
|
311 |
-
* fixed : [performance][css] don't generate CSS for inactive locations on a page
|
312 |
-
* fixed : [menu module] submenu items won't inherit user defined text styles
|
313 |
-
* fixed : [menu module][mobile menu] make sure users can scroll down mobile menu items if menu wrapper is higher than vh
|
314 |
-
* fixed : [lazy load][performances] image parsing can break srcset and sizes attributes
|
315 |
-
* fixed : [UI][Content Picker] Fix all content type displayed in some cases + make sure the content picker is set to "section" when user creates a new section
|
316 |
-
|
317 |
-
= 2.1.1 June 17th 2020 =
|
318 |
-
* fixed : [options] prevent duplicated dismissed pointer in user_meta
|
319 |
-
* fixed : [admin] wrong url for NB icon in options title
|
320 |
-
* improved : [developers] allow filtering module params from a plugin
|
321 |
-
* improved : [developers] allow filtering of NB header CSS classes
|
322 |
-
* improved : [developers] the way section CSS classes are printed + add a way to filter from a plugin
|
5 |
Tags: page builder, visual editor, customizer, drag and drop, header, footer, landing page, contact form, grid, post grid
|
6 |
Requires at least: 4.7
|
7 |
Requires PHP: 5.4
|
8 |
+
Tested up to: 5.7
|
9 |
+
Stable tag: 2.2.6
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
|
120 |
If you can't troubleshoot your issue, please open a new thread in [Nimble Builder support forum](https://wordpress.org/support/plugin/nimble-builder/).
|
121 |
|
122 |
== Upgrade Notice ==
|
123 |
+
2.2.6 : fixed [customizer][font-picker and icon picker] automatically opens the select options after first click + various minor improvements
|
124 |
|
125 |
== Changelog ==
|
126 |
+
= 2.2.6 March 13th 2021 =
|
127 |
+
* fixed : [tiny MCE editor][customizer] make sure window.tinyMCE global is declared
|
128 |
+
* improved : [customizer][font-picker and icon picker] automatically opens the select options after first click
|
129 |
+
* improved : [customizer] added a link to the documentation to the template notification + various wording style improvements
|
130 |
+
|
131 |
+
= 2.2.5 March 9th 2021 =
|
132 |
+
* fixed : [performance][customizer] the font picker input of the global options could slow down UI
|
133 |
+
* fixed : [performance][customizer] the list of icons is now generated only when clicking on the control
|
134 |
+
* fixed : [sections][templates] prevent NB writing the boolean is_edit_meta in the section or template meta data
|
135 |
+
* fixed : [user sections and templates] html encoding problem when injecting a user saved section or template that includes html markup
|
136 |
+
* fixed : [template API] avoid hammering NB api with multiple calls at the same time
|
137 |
+
|
138 |
+
= 2.2.4 March 8th 2021 =
|
139 |
+
* improved : [performances] deactivate autoloading for some options
|
140 |
+
|
141 |
+
= 2.2.3 March 4th, 2021 =
|
142 |
+
* 100% compatible with WordPress 5.7 ( scheduled for March 9th 2021 )
|
143 |
+
* fixed : [customizer] collection validation => allow setting value to be set even when there are errors + print an error message.
|
144 |
+
* fixed : [customizer] prevent logging message of "missing location id" when click is outside a NB location
|
145 |
+
|
146 |
= 2.2.2 February 18th, 2021 =
|
147 |
* fixed : [character encoding] some characters like (€ quotemarks „“, ä ü ö ß and € 😘🚀) can break rich text editor content
|
148 |
|
216 |
= 2.1.23 November 17th 2020 =
|
217 |
* fixed : [jQuery][javascript] prepare code for WordPress 5.6+ and removal of jquery migrate
|
218 |
* fixed : fixed : [CSS][default style] headings font-sizes should be styled by default when used in another module than the heading one, like in the rich text module for example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tmpl/modules/accordion_tmpl.php
CHANGED
@@ -34,8 +34,8 @@ if ( !function_exists( 'Nimble\sek_print_accordion' ) ) {
|
|
34 |
$item_html_content = $item['text_content'];
|
35 |
// convert into a json to prevent emoji breaking global json data structure
|
36 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
37 |
-
$title =
|
38 |
-
$item_html_content =
|
39 |
|
40 |
if ( !skp_is_customizing() ) {
|
41 |
$item_html_content = apply_filters( 'nimble_parse_for_smart_load', $item_html_content );
|
34 |
$item_html_content = $item['text_content'];
|
35 |
// convert into a json to prevent emoji breaking global json data structure
|
36 |
// fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
37 |
+
$title = sek_maybe_decode_richtext($title);
|
38 |
+
$item_html_content = sek_maybe_decode_richtext($item_html_content);
|
39 |
|
40 |
if ( !skp_is_customizing() ) {
|
41 |
$item_html_content = apply_filters( 'nimble_parse_for_smart_load', $item_html_content );
|
tmpl/modules/button_module_tmpl.php
CHANGED
@@ -49,7 +49,7 @@ if ( isset( $design_settings['use_box_shadow'] ) && true === sek_booleanize_chec
|
|
49 |
// Feb 2021 : now saved as a json to fix emojis issues
|
50 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
51 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
52 |
-
$btn_text =
|
53 |
$icon_html = sek_get_button_module_icon( $content_settings );
|
54 |
$icon_side = empty($content_settings['icon-side']) ? 'left' : $content_settings['icon-side'];
|
55 |
|
49 |
// Feb 2021 : now saved as a json to fix emojis issues
|
50 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
51 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
52 |
+
$btn_text = sek_maybe_decode_richtext( $content_settings[ 'button_text'] );
|
53 |
$icon_html = sek_get_button_module_icon( $content_settings );
|
54 |
$icon_side = empty($content_settings['icon-side']) ? 'left' : $content_settings['icon-side'];
|
55 |
|
tmpl/modules/heading_module_tmpl.php
CHANGED
@@ -25,7 +25,7 @@ if ( !function_exists( 'Nimble\sek_print_text_heading_content' ) ) {
|
|
25 |
// Feb 2021 : now saved as a json to fix emojis issues
|
26 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
27 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
28 |
-
$heading_content =
|
29 |
|
30 |
$heading_content = apply_filters( 'the_nimble_tinymce_module_content', $heading_content );
|
31 |
$heading_content = sek_strip_script_tags($heading_content);
|
@@ -71,7 +71,7 @@ if ( array_key_exists('heading_text', $value ) ) {
|
|
71 |
// Feb 2021 : now saved as a json to fix emojis issues
|
72 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
73 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
74 |
-
$heading_title =
|
75 |
if ( false === sek_booleanize_checkbox_val( $value['link-to'] ) ) {
|
76 |
printf( '<%1$s %3$s class="sek-heading">%2$s</%1$s>',
|
77 |
$tag,
|
25 |
// Feb 2021 : now saved as a json to fix emojis issues
|
26 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
27 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
28 |
+
$heading_content = sek_maybe_decode_richtext($heading_content);
|
29 |
|
30 |
$heading_content = apply_filters( 'the_nimble_tinymce_module_content', $heading_content );
|
31 |
$heading_content = sek_strip_script_tags($heading_content);
|
71 |
// Feb 2021 : now saved as a json to fix emojis issues
|
72 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
73 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
74 |
+
$heading_title = sek_maybe_decode_richtext( empty( $value['heading_title'] ) ? '' : $value['heading_title'] );
|
75 |
if ( false === sek_booleanize_checkbox_val( $value['link-to'] ) ) {
|
76 |
printf( '<%1$s %3$s class="sek-heading">%2$s</%1$s>',
|
77 |
$tag,
|
tmpl/modules/img_slider_tmpl.php
CHANGED
@@ -228,7 +228,7 @@ if ( !function_exists( 'Nimble\sek_print_img_slider' ) ) {
|
|
228 |
// Feb 2021 : now saved as a json to fix emojis issues
|
229 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
230 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
231 |
-
$text_content =
|
232 |
$text_content = sek_strip_script_tags( $text_content );
|
233 |
$text_html = sprintf('<div class="sek-slider-text-wrapper"><div class="sek-slider-text-content">%1$s</div></div>', $text_content );
|
234 |
if ( !skp_is_customizing() ) {
|
228 |
// Feb 2021 : now saved as a json to fix emojis issues
|
229 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
230 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
231 |
+
$text_content = sek_maybe_decode_richtext( $text_content );
|
232 |
$text_content = sek_strip_script_tags( $text_content );
|
233 |
$text_html = sprintf('<div class="sek-slider-text-wrapper"><div class="sek-slider-text-content">%1$s</div></div>', $text_content );
|
234 |
if ( !skp_is_customizing() ) {
|
tmpl/modules/quote_module_tmpl.php
CHANGED
@@ -45,7 +45,7 @@ if ( !empty( $quote_content_settings['quote_text'] ) ) {
|
|
45 |
// Feb 2021 : now saved as a json to fix emojis issues
|
46 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
47 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
48 |
-
$cite_text =
|
49 |
|
50 |
// filter added since text editor implementation https://github.com/presscustomizr/nimble-builder/issues/403
|
51 |
$cite_text = apply_filters( 'the_nimble_tinymce_module_content', sek_strip_script_tags( $cite_text ) );
|
@@ -56,7 +56,7 @@ if ( !empty( $quote_content_settings['quote_text'] ) ) {
|
|
56 |
// Feb 2021 : now saved as a json to fix emojis issues
|
57 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
58 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
59 |
-
|
60 |
!empty( $cite_text ) ? sprintf( '<footer class="sek-quote-footer"><cite class="sek-cite">%1$s</cite></footer>', $cite_text ) : '',
|
61 |
empty( $design_settings['quote_design'] ) || 'none' == $design_settings['quote_design'] ? '' : " sek-quote-design sek-{$design_settings['quote_design']}",
|
62 |
$design_settings['quote_design']
|
45 |
// Feb 2021 : now saved as a json to fix emojis issues
|
46 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
47 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
48 |
+
$cite_text = sek_maybe_decode_richtext( $cite_content_settings['cite_text'] );
|
49 |
|
50 |
// filter added since text editor implementation https://github.com/presscustomizr/nimble-builder/issues/403
|
51 |
$cite_text = apply_filters( 'the_nimble_tinymce_module_content', sek_strip_script_tags( $cite_text ) );
|
56 |
// Feb 2021 : now saved as a json to fix emojis issues
|
57 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
58 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
59 |
+
sek_maybe_decode_richtext( $quote_content_settings['quote_text'] ),
|
60 |
!empty( $cite_text ) ? sprintf( '<footer class="sek-quote-footer"><cite class="sek-cite">%1$s</cite></footer>', $cite_text ) : '',
|
61 |
empty( $design_settings['quote_design'] ) || 'none' == $design_settings['quote_design'] ? '' : " sek-quote-design sek-{$design_settings['quote_design']}",
|
62 |
$design_settings['quote_design']
|
tmpl/modules/shortcode_module_tmpl.php
CHANGED
@@ -13,7 +13,7 @@ if ( !function_exists( 'Nimble\sek_print_shortcode_module_content' ) ) {
|
|
13 |
// Feb 2021 : now saved as a json to fix emojis issues
|
14 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
15 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
16 |
-
$shortcode_mod_html_content =
|
17 |
|
18 |
$shortcode_mod_html_content = sek_strip_script_tags( $shortcode_mod_html_content );
|
19 |
|
13 |
// Feb 2021 : now saved as a json to fix emojis issues
|
14 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
15 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
16 |
+
$shortcode_mod_html_content = sek_maybe_decode_richtext( $value['text_content'] );
|
17 |
|
18 |
$shortcode_mod_html_content = sek_strip_script_tags( $shortcode_mod_html_content );
|
19 |
|
tmpl/modules/simple_html_module_tmpl.php
CHANGED
@@ -19,7 +19,7 @@ if ( !function_exists( 'Nimble\sek_print_html_content') ) {
|
|
19 |
// Feb 2021 : now saved as a json to fix emojis issues
|
20 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
21 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
22 |
-
$html_content =
|
23 |
|
24 |
// added September 2019 when revamping presscustomizr.com
|
25 |
$html_content = sek_parse_template_tags( $html_content );
|
19 |
// Feb 2021 : now saved as a json to fix emojis issues
|
20 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
21 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
22 |
+
$html_content = sek_maybe_decode_richtext( $html_content );
|
23 |
|
24 |
// added September 2019 when revamping presscustomizr.com
|
25 |
$html_content = sek_parse_template_tags( $html_content );
|
tmpl/modules/tinymce_editor_module_tmpl.php
CHANGED
@@ -24,7 +24,7 @@ if ( !function_exists( 'Nimble\sek_print_tiny_mce_text_content') ) {
|
|
24 |
// Feb 2021 : now saved as a json to fix emojis issues
|
25 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
26 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
27 |
-
$content =
|
28 |
|
29 |
// Use our own content filter instead of $content = apply_filters( 'the_content', $tiny_mce_content );
|
30 |
// because of potential third party plugins corrupting 'the_content' filter. https://github.com/presscustomizr/nimble-builder/issues/233
|
24 |
// Feb 2021 : now saved as a json to fix emojis issues
|
25 |
// see fix for https://github.com/presscustomizr/nimble-builder/issues/544
|
26 |
// to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
|
27 |
+
$content = sek_maybe_decode_richtext( $tiny_mce_content );
|
28 |
|
29 |
// Use our own content filter instead of $content = apply_filters( 'the_content', $tiny_mce_content );
|
30 |
// because of potential third party plugins corrupting 'the_content' filter. https://github.com/presscustomizr/nimble-builder/issues/233
|