Nimble Page Builder - Version 3.2.4

Version Description

Visit the Github release page.

Download this release

Release Info

Developer nikeo
Plugin Icon 128x128 Nimble Page Builder
Version 3.2.4
Comparing to
See all releases

Code changes from version 3.1.33 to 3.2.4

assets/admin/css/nimble-admin.css CHANGED
@@ -451,6 +451,12 @@ body .block-editor .sek-nimble-mobile-admin-bar-title { display: none; }
451
  #nimble-options .nb-option-page-title {
452
  padding-left: 40px;
453
  position: relative;
 
 
 
 
 
 
454
  }
455
  [dir="rtl"] .nb-option-page-title {
456
  padding-right: 40px;
451
  #nimble-options .nb-option-page-title {
452
  padding-left: 40px;
453
  position: relative;
454
+ display: -webkit-box;
455
+ display: -ms-flexbox;
456
+ display: flex;
457
+ -webkit-box-align: center;
458
+ -ms-flex-align: center;
459
+ align-items: center;
460
  }
461
  [dir="rtl"] .nb-option-page-title {
462
  padding-right: 40px;
assets/czr/sek/css/sek-preview.css CHANGED
@@ -1520,4 +1520,6 @@ https://github.com/presscustomizr/nimble-builder/issues/317 */
1520
  .nimble-notice-in-preview {
1521
  font-size: 14px;
1522
  }
1523
- }
 
 
1520
  .nimble-notice-in-preview {
1521
  font-size: 14px;
1522
  }
1523
+ }
1524
+
1525
+ @-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%;z-index: 1000;}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.white-loader>.sek-mr-loader>div{border:2px solid #fff}
assets/czr/sek/css/sek-preview.min.css CHANGED
@@ -1 +1 @@
1
- .sektion-wrapper{min-height:50px;margin-top:21px}.sek-section{position:relative}.sek-column{position:relative}.sek-column-inner.sek-empty-col{min-height:130px;height:100%}.sek-has-modules .sek-column-inner.sek-empty-col{min-height:auto;height:auto}.sek-module{position:relative}.sek-module-inner{position:relative;-webkit-transition:all .25s ease-in-out;-moz-transition:all,.25s ease-in-out;-ms-transition:all,.25s ease-in-out;-o-transition:all,.25s ease-in-out;transition:all .25s ease-in-out}[data-sek-level]:not([data-sek-bg-parallax]){-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out}.sek-duplicate [data-sek-level],.sek-refresh-stylesheet [data-sek-level],.sek-remove [data-sek-level]{-webkit-transition:inherit!important;-o-transition:inherit!important;transition:inherit!important}.sek-module [data-sek-input-type=detached_tinymce_editor]:hover{outline:1px solid #1d85bb}.sek-module [data-sek-input-type=detached_tinymce_editor],[data-sek-module-type=czr_simple_html_module]{min-height:30px}.sek-dyn-ui-wrapper{display:none;position:absolute;bottom:0;left:0;top:0;right:0;color:#fff;background:rgba(190,239,255,0);border-radius:4px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important}.sek-dyn-ui-wrapper,.sek-dyn-ui-wrapper *{text-shadow:none;-webkit-touch-callout:none}.sek-dyn-ui-inner{position:absolute;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.sek-dyn-ui-inner.sek-is-expanded{display:block!important;z-index:2000!important}.sek-dyn-left-icons{left:0}.sek-dyn-right-icons{right:0}.sek-dyn-ui-inner:hover{opacity:1}.sek-dyn-ui-wrapper-active{position:relative}.sek-dyn-ui-icons{background:#00a0d2;float:left;min-height:18px;padding:0 4px;text-shadow:none;font-size:1em}.sek-dyn-ui-icons>span{display:block;float:left}.sek-dyn-ui-icons i{color:#fff!important;cursor:pointer;float:left;font-size:1em;height:1.4em;line-height:1.4em;opacity:.8;text-align:center;width:1em}.sek-dyn-left-icons .sek-dyn-ui-icons i,.sek-dyn-right-icons .sek-dyn-ui-icons i{margin:0 .3em}.sek-dyn-ui-icons i:hover{opacity:1}.sek-dyn-ui-icons .fa-arrows-alt{cursor:move}.sek-dyn-ui-icons [data-sek-click-on=remove]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-wrapper .sek-dyn-ui-icons [data-sek-click-on=toggle-save-section-ui]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff;color:#ff0!important}.sek-dyn-ui-location-type{position:absolute;z-index:2;bottom:0;padding:0 .5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:11px;line-height:16px;font-style:normal;letter-spacing:0;text-align:center;text-indent:0;text-shadow:none;text-decoration:none;text-transform:none;right:0;cursor:pointer;opacity:.75}.sek-dyn-ui-location-type:hover{opacity:1}.sek-dyn-ui-location-inner{padding:3px 0}.sek-minimize-ui{float:left;text-align:center;width:16px;padding:3px}.sek-column-dyn-ui,.sek-module-dyn-ui,.sek-section-dyn-ui{font-size:16px}.sek-shrink-my-ui .sek-module-dyn-ui,.sek-shrink-my-ui>.sek-column-dyn-ui,.sek-shrink-my-ui>.sek-section-dyn-ui{font-size:11px}.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-module-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper{height:8px;width:16px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper .line{width:15px;height:1px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type:hover .line{width:16px;-webkit-transform:translate(-1px,0);transform:translate(-1px,0)}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type{font-size:10px;line-height:11px}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#000;opacity:.75}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{z-index:1001;display:none}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons:hover{opacity:1}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1000;position:relative;float:left}.sek-section[data-sek-is-nested=true]>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1002}.sek-section-dyn-ui{border:2px dotted #000}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{top:-1px;z-index:1000}.sek-section[data-sek-is-nested=true]>.sek-section-dyn-ui .sek-dyn-ui-inner{top:18px}.sek-section.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,0,0,.8);box-shadow:0 0 2px rgba(0,0,0,.8)}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-column>.sek-column-dyn-ui .sek-dyn-ui-inner{bottom:0;z-index:1002;display:none}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#00b846}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1001;bottom:3px}.sek-column>.sek-dyn-ui-wrapper.sek-col-has-nested-section .sek-dyn-ui-location-type{top:0;bottom:auto}.sek-column>.sek-column-dyn-ui.sek-col-has-nested-section .sek-dyn-ui-inner{top:0;bottom:auto;z-index:1002;display:none}.sek-column-dyn-ui{border:2px dotted #00b846;font-size:16px}.sek-column-dyn-ui .dev-level-data{background:#0085ba}.sek-column.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,184,70,.8);box-shadow:0 0 2px rgba(0,184,70,.8)}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:right}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-right:.5em}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-module:hover{cursor:pointer}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-inner{bottom:0;z-index:1006;display:none}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#0085ba}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:0;top:auto;bottom:0;right:auto;z-index:1005}.sek-module-dyn-ui{border:2px dotted #0085ba;font-size:16px}.dev-level-data{position:absolute;bottom:0;left:0;background:#000;padding:1px 12px;font-size:11px}.sek-module-dyn-ui .dev-level-data{background:#c68f00;right:0;left:unset}.sek-module.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,133,186,.8);box-shadow:0 0 2px rgba(0,133,186,.8)}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-ham__toggler-spn-wrapper{height:10px;position:relative;width:16px;display:block}.sek-ham__toggler-spn-wrapper .line.line-1{top:10%}.sek-ham__toggler-spn-wrapper .line.line-2{top:60%}.sek-ham__toggler-spn-wrapper .line.line-3{top:110%}.sek-ham__toggler-spn-wrapper .line{background:#fff;display:block;width:16px;height:2px;position:absolute;-webkit-border-radius:5px;-webkit-background-clip:padding-box;-moz-border-radius:5px;-moz-background-clip:padding;border-radius:5px;background-clip:padding-box;-webkit-transition:all ease .2s;-o-transition:all ease .2s;transition:all ease .2s;-webkit-backface-visibility:hidden;backface-visibility:hidden}.sek-dyn-ui-location-type:hover .line{-webkit-transform:translate(-2px,0);transform:translate(-2px,0);width:20px}.sek-wp-content-wrapper{cursor:pointer;position:relative}.sek-wp-content-wrapper:after{content:'';display:block;clear:both}.sek-wp-content-wrapper:hover{outline:2px dashed #036697}.sek-wp-content-wrapper>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:auto;right:0;z-index:1005;background:#036697}.sek-wp-content-wrapper .sek-dyn-ui-icons{background-color:#036697}.sek-wp-content-wrapper .sek-dyn-ui-inner{top:0;z-index:1005}.sek-wp-content-dyn-ui{bottom:0;left:0;top:0;right:0;font-size:16px}.sek-empty-location-placeholder{position:relative;min-height:50px;margin:20px 0;border-radius:5px;text-align:center}[data-sek-is-footer-location=true]>.sek-empty-location-placeholder,[data-sek-is-header-location=true]>.sek-empty-location-placeholder{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;background:#eee;line-height:45px;font-size:20px}.sek-header-footer-location-placeholder{opacity:1;-webkit-transition:opacity ease .4s;-o-transition:opacity ease .4s;transition:opacity ease .4s}.sek-header-footer-location-placeholder .sek-nimble-icon img{width:30px;height:30px;position:relative;top:-2px;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-filter:gray;filter:gray;display:inline}.sek-empty-location-placeholder:hover .sek-nimble-icon img{-webkit-filter:none;filter:none;-webkit-filter:none;filter:none}.sek-empty-location-placeholder:hover .sek-header-footer-location-placeholder{opacity:.6}.sek-empty-location-placeholder:hover{outline:2px dotted #000}.sek-add-button-wrapper{text-align:center;width:100%;margin:16px 0;position:relative}.sek-no-modules-column{position:relative;height:100%;bottom:0;left:0;right:0;z-index:1}.sek-module-drop-zone-for-first-module{text-align:center;border:1px dotted #ccc;background:#eee;background:rgba(0,0,0,.1);height:100%;min-height:40px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:-webkit-box;display:flex}.sek-module-drop-zone-for-first-module:hover{background:rgba(0,0,0,.5)}.sek-module-drop-zone-for-first-module:hover [data-sek-click-on=pick-content]{color:#fff}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{cursor:pointer;width:50px;height:50px;line-height:50px;font-size:22px;color:#535353;border-radius:30px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]:hover{-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);color:#fff}.sek-col-10 [data-sek-click-on=pick-content],.sek-col-11 [data-sek-click-on=pick-content],.sek-col-12 [data-sek-click-on=pick-content],.sek-col-14 [data-sek-click-on=pick-content],.sek-col-16 [data-sek-click-on=pick-content],.sek-col-20 [data-sek-click-on=pick-content],.sek-col-25 [data-sek-click-on=pick-content],.sek-col-8 [data-sek-click-on=pick-content],.sek-col-9 [data-sek-click-on=pick-content]{font-size:14px}.sek-sortable-overing>.sek-no-modules-column{display:none}.sek-drop-zone{-webkit-transition:opacity,height,background .4s ease;-o-transition:opacity,height,background .4s ease;transition:opacity,height,background .4s ease;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%;text-align:center}.sek-no-drop-possible-message{margin:auto;padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#004085;background-color:#cce5ff;border:1px solid #b8daff;border-radius:.25rem;font-size:16px;line-height:1.5em;max-width:80%}.sek-active-drop-zone.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dynamic-drop-zone{opacity:0}.sek-active-drop-zone.sek-dynamic-drop-zone{height:auto!important;min-height:50px}.sek-dragging .sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dragging .sek-drop-zone .sek-injection-instructions{display:none!important}.sek-dragging [data-sek-location=between-sections].sek-dynamic-drop-zone{height:15px}.sek-dragging .sek-dynamic-drop-zone{height:5px;-webkit-transition:all 3s ease;-o-transition:all 3s ease;transition:all 3s ease;border:2px dotted #72777c;background:#ddd;border-radius:5px}.sek-dragging .sek-drop-zone{-webkit-transition:all 1s ease;-o-transition:all 1s ease;transition:all 1s ease}.sek-dragging [data-sek-location=between-sections],.sek-dragging [data-sek-location=in-empty-location]{background:#ddd;border:2px dotted #72777c}.sek-dragging .sek-drag-is-approaching.sek-dynamic-drop-zone{height:20px}.sek-dragging .sek-drag-is-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-very-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-in.sek-dynamic-drop-zone{height:100px;-webkit-transition:all .75s ease;-o-transition:all .75s ease;transition:all .75s ease}.sek-dragging .sek-feed-me-seymore{-moz-box-shadow:inset 0 0 30px #000;-webkit-box-shadow:inset 0 0 30px #000;box-shadow:inset 0 0 30px #000}.sek-dragging .sek-module-drop-zone-for-first-module,.sek-dragging [data-sek-location=between-modules-and-nested-sections]{background:#dcefff;background:rgba(220,239,255,.84);border:2px dotted #1d85bb;border-radius:5px}.sek-dragging-element .sek-column-inner,.sek-dragging-element .sek-sektion-inner{min-height:50px}.sek-module-placeholder-content{text-align:center;text-transform:uppercase}.sek-module-placeholder-content>p{padding:35px 10px;font-size:16px!important}.sek-add-content-button{position:absolute;top:0;width:100%;z-index:1001;display:none}.sek-empty-location-placeholder .sek-add-content-button{top:50%}.sek-add-content-button.is_last{bottom:0;top:unset}.sek-add-content-button-wrapper{position:relative;top:-5px;width:100%;border:1px dashed #ccc;height:10px;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:.35s ease-in-out;-o-transition:.35s ease-in-out;transition:.35s ease-in-out}.is_last .sek-add-content-button-wrapper{top:10px}.sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed #333}.sektion-wrapper .sek-mouse-is-close .sek-add-content-button-wrapper .sek-add-content-btn{opacity:1}.sektion-wrapper .sek-add-content-button-wrapper .sek-add-content-btn{text-decoration:none;margin:auto;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1000px;width:18px;height:18px;font-size:13px;line-height:18px;background-color:#000;color:#fff;border:none;outline:0;overflow:hidden;-webkit-transition:width .5s ease,background-color .5s ease;-o-transition:width .5s ease,background-color .5s ease;transition:width .5s ease,background-color .5s ease;font-weight:400;font-style:normal;cursor:pointer;position:absolute;left:calc(50% - 12px);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;opacity:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.sektion-wrapper .sek-add-content-btn.sek-mouse-is-close{z-index:10000}.sektion-wrapper .sek-add-content-button-wrapper .sek-add-content-btn:hover{width:26px;height:26px;--sek-add-content-btn-width:65px;width:calc(var(--sek-add-content-btn-width) + 70px);background-color:#000;color:#fff;opacity:1;left:calc(50% - var(--sek-add-content-btn-width));-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2)}.sek-click-on-button-icon{line-height:18px;width:18px}.sek-add-content-btn:hover .sek-click-on-button-icon{padding-left:6px;font-size:13px;line-height:26px}.action-button-text{visibility:hidden;display:none;white-space:nowrap;padding-left:5px;padding-bottom:2px;text-transform:none;letter-spacing:0;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.sek-add-content-btn:not(.disabled):hover .action-button-text{visibility:visible;display:inline-block}.sortable-placeholder{max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#00a2d7;border-radius:4px;color:#fff!important;display:block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;-o-text-overflow:ellipsis;text-overflow:ellipsis;text-shadow:none;text-transform:none;white-space:nowrap;overflow:hidden;z-index:10}.in-new-sektion.sortable-placeholder{background:#72777c}.sek-moving-section [data-sek-level=location]{background:#ddd;border:2px dotted #72777c;border-radius:5px}.sek-moving-section .sek-empty-location-placeholder{display:none}.sek-sortable-section-over .sortable-placeholder{background:#72777c}.ui-resizable-helper{border:2px dotted #00b846}[data-sek-level=column] .ui-resizable-e{cursor:e-resize;width:7px;right:-4px;font-size:.55em}[data-sek-level=column] .ui-resizable-e i{background:#00b846;border-radius:12px;color:#fff;padding:2px;width:auto;display:none}[data-sek-level=section]:hover .ui-resizable-e{background:#d5d5d573;background:rgba(213,213,213,.42)}[data-sek-level=section]:hover .ui-resizable-e i{display:block}[data-sek-level=column] .ui-resizable-handle{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-blur,.sek-refreshing{-webkit-filter:blur(3px);filter:blur(3px);-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}.sek-level-clone{position:absolute!important;z-index:10000}.sek-level-clone::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;opacity:.5}#nimble-full-page-loader-wrapper{height:100vh;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,.8);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%;display:none}@-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.white-loader>.sek-mr-loader>div{border:2px solid #fff}.nimble-unclickable{cursor:not-allowed!important}.nimble-shift-clickable{cursor:alias!important}[data-sek-is-global-location=true] .sek-empty-location-placeholder:hover{outline:2px dotted red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper{border:1px dashed #ff7878}[data-sek-is-global-location=true] .sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper .sek-add-content-btn{background-color:red}[data-sek-is-global-location=true] .sek-module-drop-zone-for-first-module{border:1px dotted red}[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:red;opacity:.75}[data-sek-is-footer-location=true]{margin-bottom:40px}[data-sek-is-header-location=true]{margin-top:0}@keyframes sek-target-highlight{0%{background-color:#0085ba}50%{background-color:#00a0d2}100%{background-color:#0085ba}}.sek-target-for-double-click-insertion .sek-drop-zone{animation:sek-target-highlight 3s infinite;background-color:#eee}.sektion-wrapper .sek-injection-instructions{display:none;font-size:13px;line-height:1.5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:#fff;padding:4px;overflow:hidden;max-width:80%;max-height:100%;min-height:50px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute}.sek-shrink-my-ui .sek-injection-instructions{font-size:10px}.sek-target-for-double-click-insertion .sek-drop-zone .sek-injection-instructions{display:-webkit-box;display:-ms-flexbox;display:flex}.sek-target-for-double-click-insertion .sek-drop-zone [data-sek-click-on=pick-content]{visibility:hidden}.sek-tiny-mce-module-placeholder-text{padding:10px;border:1px dotted;background:rgba(0,0,0,.35);color:#fff;font-size:1rem;line-height:1.5rem}.sek-module-placeholder.sek-post-grid{font-size:150px}[data-sek-module-type] .sek-mod-preview-placeholder{height:150px;background:#eee}[data-sek-module-type] .sek-mod-preview-placeholder .sek-preview-ph-text{font-size:25px;position:relative;width:100%;height:100%;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:flex-end;align-items:flex-end}[data-sek-module-type] .sek-mod-preview-placeholder .sek-preview-ph-text>p{padding:10px;position:relative;margin:0;color:#767676}[data-sek-module-type] .sek-mod-preview-placeholder .sek-preview-ph-text::before{content:'';left:0;right:0;bottom:0;top:0;position:absolute;background-color:#fff;opacity:.6}@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;font-feature-settings:'liga'}.sek-module-placeholder{text-align:center}.sek-module-placeholder .material-icons{font-size:inherit;color:#cfcfcf}.nimble-notice-in-preview{font-size:16px;line-height:1.5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",sans-serif;padding:10px 20px;margin:5px 0 15px;position:relative;background:#fff;border:1px solid #ccd0d4;border-left-color:#00a0d2;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.04)}.sek-module-inner .nimble-inline-notice-in-preview{display:inline;font-size:13px;line-height:calc(1.5em + 20px)}.nimble-notice-in-preview>i{color:#00a0d2}@media(max-width:768px){.nimble-notice-in-preview{font-size:14px}}
1
+ .sektion-wrapper{min-height:50px;margin-top:21px}.sek-section{position:relative}.sek-column{position:relative}.sek-column-inner.sek-empty-col{min-height:130px;height:100%}.sek-has-modules .sek-column-inner.sek-empty-col{min-height:auto;height:auto}.sek-module{position:relative}.sek-module-inner{position:relative;-webkit-transition:all .25s ease-in-out;-moz-transition:all,.25s ease-in-out;-ms-transition:all,.25s ease-in-out;-o-transition:all,.25s ease-in-out;transition:all .25s ease-in-out}[data-sek-level]:not([data-sek-bg-parallax]){-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out}.sek-duplicate [data-sek-level],.sek-refresh-stylesheet [data-sek-level],.sek-remove [data-sek-level]{-webkit-transition:inherit!important;-o-transition:inherit!important;transition:inherit!important}.sek-module [data-sek-input-type=detached_tinymce_editor]:hover{outline:1px solid #1d85bb}.sek-module [data-sek-input-type=detached_tinymce_editor],[data-sek-module-type=czr_simple_html_module]{min-height:30px}.sek-dyn-ui-wrapper{display:none;position:absolute;bottom:0;left:0;top:0;right:0;color:#fff;background:rgba(190,239,255,0);border-radius:4px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important}.sek-dyn-ui-wrapper,.sek-dyn-ui-wrapper *{text-shadow:none;-webkit-touch-callout:none}.sek-dyn-ui-inner{position:absolute;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.sek-dyn-ui-inner.sek-is-expanded{display:block!important;z-index:2000!important}.sek-dyn-left-icons{left:0}.sek-dyn-right-icons{right:0}.sek-dyn-ui-inner:hover{opacity:1}.sek-dyn-ui-wrapper-active{position:relative}.sek-dyn-ui-icons{background:#00a0d2;float:left;min-height:18px;padding:0 4px;text-shadow:none;font-size:1em}.sek-dyn-ui-icons>span{display:block;float:left}.sek-dyn-ui-icons i{color:#fff!important;cursor:pointer;float:left;font-size:1em;height:1.4em;line-height:1.4em;opacity:.8;text-align:center;width:1em}.sek-dyn-left-icons .sek-dyn-ui-icons i,.sek-dyn-right-icons .sek-dyn-ui-icons i{margin:0 .3em}.sek-dyn-ui-icons i:hover{opacity:1}.sek-dyn-ui-icons .fa-arrows-alt{cursor:move}.sek-dyn-ui-icons [data-sek-click-on=remove]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-wrapper .sek-dyn-ui-icons [data-sek-click-on=toggle-save-section-ui]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff;color:#ff0!important}.sek-dyn-ui-location-type{position:absolute;z-index:2;bottom:0;padding:0 .5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:11px;line-height:16px;font-style:normal;letter-spacing:0;text-align:center;text-indent:0;text-shadow:none;text-decoration:none;text-transform:none;right:0;cursor:pointer;opacity:.75}.sek-dyn-ui-location-type:hover{opacity:1}.sek-dyn-ui-location-inner{padding:3px 0}.sek-minimize-ui{float:left;text-align:center;width:16px;padding:3px}.sek-column-dyn-ui,.sek-module-dyn-ui,.sek-section-dyn-ui{font-size:16px}.sek-shrink-my-ui .sek-module-dyn-ui,.sek-shrink-my-ui>.sek-column-dyn-ui,.sek-shrink-my-ui>.sek-section-dyn-ui{font-size:11px}.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-module-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper{height:8px;width:16px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper .line{width:15px;height:1px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type:hover .line{width:16px;-webkit-transform:translate(-1px,0);transform:translate(-1px,0)}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type{font-size:10px;line-height:11px}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#000;opacity:.75}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{z-index:1001;display:none}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons:hover{opacity:1}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1000;position:relative;float:left}.sek-section[data-sek-is-nested=true]>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1002}.sek-section-dyn-ui{border:2px dotted #000}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{top:-1px;z-index:1000}.sek-section[data-sek-is-nested=true]>.sek-section-dyn-ui .sek-dyn-ui-inner{top:18px}.sek-section.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,0,0,.8);box-shadow:0 0 2px rgba(0,0,0,.8)}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-column>.sek-column-dyn-ui .sek-dyn-ui-inner{bottom:0;z-index:1002;display:none}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#00b846}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1001;bottom:3px}.sek-column>.sek-dyn-ui-wrapper.sek-col-has-nested-section .sek-dyn-ui-location-type{top:0;bottom:auto}.sek-column>.sek-column-dyn-ui.sek-col-has-nested-section .sek-dyn-ui-inner{top:0;bottom:auto;z-index:1002;display:none}.sek-column-dyn-ui{border:2px dotted #00b846;font-size:16px}.sek-column-dyn-ui .dev-level-data{background:#0085ba}.sek-column.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,184,70,.8);box-shadow:0 0 2px rgba(0,184,70,.8)}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:right}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-right:.5em}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-module:hover{cursor:pointer}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-inner{bottom:0;z-index:1006;display:none}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#0085ba}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:0;top:auto;bottom:0;right:auto;z-index:1005}.sek-module-dyn-ui{border:2px dotted #0085ba;font-size:16px}.dev-level-data{position:absolute;bottom:0;left:0;background:#000;padding:1px 12px;font-size:11px}.sek-module-dyn-ui .dev-level-data{background:#c68f00;right:0;left:unset}.sek-module.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,133,186,.8);box-shadow:0 0 2px rgba(0,133,186,.8)}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-ham__toggler-spn-wrapper{height:10px;position:relative;width:16px;display:block}.sek-ham__toggler-spn-wrapper .line.line-1{top:10%}.sek-ham__toggler-spn-wrapper .line.line-2{top:60%}.sek-ham__toggler-spn-wrapper .line.line-3{top:110%}.sek-ham__toggler-spn-wrapper .line{background:#fff;display:block;width:16px;height:2px;position:absolute;-webkit-border-radius:5px;-webkit-background-clip:padding-box;-moz-border-radius:5px;-moz-background-clip:padding;border-radius:5px;background-clip:padding-box;-webkit-transition:all ease .2s;-o-transition:all ease .2s;transition:all ease .2s;-webkit-backface-visibility:hidden;backface-visibility:hidden}.sek-dyn-ui-location-type:hover .line{-webkit-transform:translate(-2px,0);transform:translate(-2px,0);width:20px}.sek-wp-content-wrapper{cursor:pointer;position:relative}.sek-wp-content-wrapper:after{content:'';display:block;clear:both}.sek-wp-content-wrapper:hover{outline:2px dashed #036697}.sek-wp-content-wrapper>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:auto;right:0;z-index:1005;background:#036697}.sek-wp-content-wrapper .sek-dyn-ui-icons{background-color:#036697}.sek-wp-content-wrapper .sek-dyn-ui-inner{top:0;z-index:1005}.sek-wp-content-dyn-ui{bottom:0;left:0;top:0;right:0;font-size:16px}.sek-empty-location-placeholder{position:relative;min-height:50px;margin:20px 0;border-radius:5px;text-align:center}[data-sek-is-footer-location=true]>.sek-empty-location-placeholder,[data-sek-is-header-location=true]>.sek-empty-location-placeholder{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;background:#eee;line-height:45px;font-size:20px}.sek-header-footer-location-placeholder{opacity:1;-webkit-transition:opacity ease .4s;-o-transition:opacity ease .4s;transition:opacity ease .4s}.sek-header-footer-location-placeholder .sek-nimble-icon img{width:30px;height:30px;position:relative;top:-2px;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-filter:gray;filter:gray;display:inline}.sek-empty-location-placeholder:hover .sek-nimble-icon img{-webkit-filter:none;filter:none;-webkit-filter:none;filter:none}.sek-empty-location-placeholder:hover .sek-header-footer-location-placeholder{opacity:.6}.sek-empty-location-placeholder:hover{outline:2px dotted #000}.sek-add-button-wrapper{text-align:center;width:100%;margin:16px 0;position:relative}.sek-no-modules-column{position:relative;height:100%;bottom:0;left:0;right:0;z-index:1}.sek-module-drop-zone-for-first-module{text-align:center;border:1px dotted #ccc;background:#eee;background:rgba(0,0,0,.1);height:100%;min-height:40px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:-webkit-box;display:flex}.sek-module-drop-zone-for-first-module:hover{background:rgba(0,0,0,.5)}.sek-module-drop-zone-for-first-module:hover [data-sek-click-on=pick-content]{color:#fff}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{cursor:pointer;width:50px;height:50px;line-height:50px;font-size:22px;color:#535353;border-radius:30px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]:hover{-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);color:#fff}.sek-col-10 [data-sek-click-on=pick-content],.sek-col-11 [data-sek-click-on=pick-content],.sek-col-12 [data-sek-click-on=pick-content],.sek-col-14 [data-sek-click-on=pick-content],.sek-col-16 [data-sek-click-on=pick-content],.sek-col-20 [data-sek-click-on=pick-content],.sek-col-25 [data-sek-click-on=pick-content],.sek-col-8 [data-sek-click-on=pick-content],.sek-col-9 [data-sek-click-on=pick-content]{font-size:14px}.sek-sortable-overing>.sek-no-modules-column{display:none}.sek-drop-zone{-webkit-transition:opacity,height,background .4s ease;-o-transition:opacity,height,background .4s ease;transition:opacity,height,background .4s ease;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%;text-align:center}.sek-no-drop-possible-message{margin:auto;padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#004085;background-color:#cce5ff;border:1px solid #b8daff;border-radius:.25rem;font-size:16px;line-height:1.5em;max-width:80%}.sek-active-drop-zone.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dynamic-drop-zone{opacity:0}.sek-active-drop-zone.sek-dynamic-drop-zone{height:auto!important;min-height:50px}.sek-dragging .sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dragging .sek-drop-zone .sek-injection-instructions{display:none!important}.sek-dragging [data-sek-location=between-sections].sek-dynamic-drop-zone{height:15px}.sek-dragging .sek-dynamic-drop-zone{height:5px;-webkit-transition:all 3s ease;-o-transition:all 3s ease;transition:all 3s ease;border:2px dotted #72777c;background:#ddd;border-radius:5px}.sek-dragging .sek-drop-zone{-webkit-transition:all 1s ease;-o-transition:all 1s ease;transition:all 1s ease}.sek-dragging [data-sek-location=between-sections],.sek-dragging [data-sek-location=in-empty-location]{background:#ddd;border:2px dotted #72777c}.sek-dragging .sek-drag-is-approaching.sek-dynamic-drop-zone{height:20px}.sek-dragging .sek-drag-is-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-very-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-in.sek-dynamic-drop-zone{height:100px;-webkit-transition:all .75s ease;-o-transition:all .75s ease;transition:all .75s ease}.sek-dragging .sek-feed-me-seymore{-moz-box-shadow:inset 0 0 30px #000;-webkit-box-shadow:inset 0 0 30px #000;box-shadow:inset 0 0 30px #000}.sek-dragging .sek-module-drop-zone-for-first-module,.sek-dragging [data-sek-location=between-modules-and-nested-sections]{background:#dcefff;background:rgba(220,239,255,.84);border:2px dotted #1d85bb;border-radius:5px}.sek-dragging-element .sek-column-inner,.sek-dragging-element .sek-sektion-inner{min-height:50px}.sek-module-placeholder-content{text-align:center;text-transform:uppercase}.sek-module-placeholder-content>p{padding:35px 10px;font-size:16px!important}.sek-add-content-button{position:absolute;top:0;width:100%;z-index:1001;display:none}.sek-empty-location-placeholder .sek-add-content-button{top:50%}.sek-add-content-button.is_last{bottom:0;top:unset}.sek-add-content-button-wrapper{position:relative;top:-5px;width:100%;border:1px dashed #ccc;height:10px;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:.35s ease-in-out;-o-transition:.35s ease-in-out;transition:.35s ease-in-out}.is_last .sek-add-content-button-wrapper{top:10px}.sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed #333}.sektion-wrapper .sek-mouse-is-close .sek-add-content-button-wrapper .sek-add-content-btn{opacity:1}.sektion-wrapper .sek-add-content-button-wrapper .sek-add-content-btn{text-decoration:none;margin:auto;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1000px;width:18px;height:18px;font-size:13px;line-height:18px;background-color:#000;color:#fff;border:none;outline:0;overflow:hidden;-webkit-transition:width .5s ease,background-color .5s ease;-o-transition:width .5s ease,background-color .5s ease;transition:width .5s ease,background-color .5s ease;font-weight:400;font-style:normal;cursor:pointer;position:absolute;left:calc(50% - 12px);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;opacity:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.sektion-wrapper .sek-add-content-btn.sek-mouse-is-close{z-index:10000}.sektion-wrapper .sek-add-content-button-wrapper .sek-add-content-btn:hover{width:26px;height:26px;--sek-add-content-btn-width:65px;width:calc(var(--sek-add-content-btn-width) + 70px);background-color:#000;color:#fff;opacity:1;left:calc(50% - var(--sek-add-content-btn-width));-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2)}.sek-click-on-button-icon{line-height:18px;width:18px}.sek-add-content-btn:hover .sek-click-on-button-icon{padding-left:6px;font-size:13px;line-height:26px}.action-button-text{visibility:hidden;display:none;white-space:nowrap;padding-left:5px;padding-bottom:2px;text-transform:none;letter-spacing:0;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.sek-add-content-btn:not(.disabled):hover .action-button-text{visibility:visible;display:inline-block}.sortable-placeholder{max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#00a2d7;border-radius:4px;color:#fff!important;display:block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;-o-text-overflow:ellipsis;text-overflow:ellipsis;text-shadow:none;text-transform:none;white-space:nowrap;overflow:hidden;z-index:10}.in-new-sektion.sortable-placeholder{background:#72777c}.sek-moving-section [data-sek-level=location]{background:#ddd;border:2px dotted #72777c;border-radius:5px}.sek-moving-section .sek-empty-location-placeholder{display:none}.sek-sortable-section-over .sortable-placeholder{background:#72777c}.ui-resizable-helper{border:2px dotted #00b846}[data-sek-level=column] .ui-resizable-e{cursor:e-resize;width:7px;right:-4px;font-size:.55em}[data-sek-level=column] .ui-resizable-e i{background:#00b846;border-radius:12px;color:#fff;padding:2px;width:auto;display:none}[data-sek-level=section]:hover .ui-resizable-e{background:#d5d5d573;background:rgba(213,213,213,.42)}[data-sek-level=section]:hover .ui-resizable-e i{display:block}[data-sek-level=column] .ui-resizable-handle{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-blur,.sek-refreshing{-webkit-filter:blur(3px);filter:blur(3px);-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}.sek-level-clone{position:absolute!important;z-index:10000}.sek-level-clone::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;opacity:.5}#nimble-full-page-loader-wrapper{height:100vh;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,.8);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%;display:none}@-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.white-loader>.sek-mr-loader>div{border:2px solid #fff}.nimble-unclickable{cursor:not-allowed!important}.nimble-shift-clickable{cursor:alias!important}[data-sek-is-global-location=true] .sek-empty-location-placeholder:hover{outline:2px dotted red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper{border:1px dashed #ff7878}[data-sek-is-global-location=true] .sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper .sek-add-content-btn{background-color:red}[data-sek-is-global-location=true] .sek-module-drop-zone-for-first-module{border:1px dotted red}[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:red;opacity:.75}[data-sek-is-footer-location=true]{margin-bottom:40px}[data-sek-is-header-location=true]{margin-top:0}@keyframes sek-target-highlight{0%{background-color:#0085ba}50%{background-color:#00a0d2}100%{background-color:#0085ba}}.sek-target-for-double-click-insertion .sek-drop-zone{animation:sek-target-highlight 3s infinite;background-color:#eee}.sektion-wrapper .sek-injection-instructions{display:none;font-size:13px;line-height:1.5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:#fff;padding:4px;overflow:hidden;max-width:80%;max-height:100%;min-height:50px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute}.sek-shrink-my-ui .sek-injection-instructions{font-size:10px}.sek-target-for-double-click-insertion .sek-drop-zone .sek-injection-instructions{display:-webkit-box;display:-ms-flexbox;display:flex}.sek-target-for-double-click-insertion .sek-drop-zone [data-sek-click-on=pick-content]{visibility:hidden}.sek-tiny-mce-module-placeholder-text{padding:10px;border:1px dotted;background:rgba(0,0,0,.35);color:#fff;font-size:1rem;line-height:1.5rem}.sek-module-placeholder.sek-post-grid{font-size:150px}[data-sek-module-type] .sek-mod-preview-placeholder{height:150px;background:#eee}[data-sek-module-type] .sek-mod-preview-placeholder .sek-preview-ph-text{font-size:25px;position:relative;width:100%;height:100%;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:flex-end;align-items:flex-end}[data-sek-module-type] .sek-mod-preview-placeholder .sek-preview-ph-text>p{padding:10px;position:relative;margin:0;color:#767676}[data-sek-module-type] .sek-mod-preview-placeholder .sek-preview-ph-text::before{content:'';left:0;right:0;bottom:0;top:0;position:absolute;background-color:#fff;opacity:.6}@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;font-feature-settings:'liga'}.sek-module-placeholder{text-align:center}.sek-module-placeholder .material-icons{font-size:inherit;color:#cfcfcf}.nimble-notice-in-preview{font-size:16px;line-height:1.5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",sans-serif;padding:10px 20px;margin:5px 0 15px;position:relative;background:#fff;border:1px solid #ccd0d4;border-left-color:#00a0d2;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.04)}.sek-module-inner .nimble-inline-notice-in-preview{display:inline;font-size:13px;line-height:calc(1.5em + 20px)}.nimble-notice-in-preview>i{color:#00a0d2}@media(max-width:768px){.nimble-notice-in-preview{font-size:14px}}@-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%;z-index:1000}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.white-loader>.sek-mr-loader>div{border:2px solid #fff}
assets/czr/sek/js/ccat-sek-control.js CHANGED
@@ -15884,7 +15884,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
15884
  // we've started to implement the json saved for the heading module, but all modules will progressively transition to this new format
15885
  // see fix for https://github.com/presscustomizr/nimble-builder/issues/544
15886
  // to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
15887
- initial_value = input();
15888
  if ( api.czr_sektions.isJsonString(initial_value) ) {
15889
  initial_value = JSON.parse( initial_value );
15890
  }
@@ -19049,116 +19049,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
19049
  });
19050
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
19051
  //extends api.CZRDynModule
19052
- ( function ( api, $, _ ) {
19053
- var FeaturedPagesConstruct = {
19054
- initialize: function( id, options ) {
19055
- //console.log('INITIALIZING FP MODULE', id, options );
19056
- var module = this;
19057
-
19058
- // //EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
19059
- module.itemConstructor = api.CZRItem.extend( module.CZRItemConstructor || {} );
19060
-
19061
- // run the parent initialize
19062
- // Note : must be always invoked always after the input / item class extension
19063
- // Otherwise the constructor might be extended too early and not taken into account. @see https://github.com/presscustomizr/nimble-builder/issues/37
19064
- api.CZRDynModule.prototype.initialize.call( module, id, options );
19065
- },//initialize
19066
-
19067
- //////////////////////////////////////////////////////////
19068
- /// ITEM CONSTRUCTOR
19069
- //////////////////////////////////////////
19070
- CZRItemConstructor : {
19071
- //overrides the parent ready
19072
- ready : function() {
19073
- var item = this;
19074
- //wait for the input collection to be populated,
19075
- //and then set the input visibility dependencies
19076
- item.inputCollection.bind( function( col ) {
19077
- if( _.isEmpty( col ) )
19078
- return;
19079
- try { item.setInputVisibilityDeps(); } catch( er ) {
19080
- api.errorLog( 'item.setInputVisibilityDeps() : ' + er );
19081
- }
19082
- });//item.inputCollection.bind()
19083
-
19084
- //fire the parent
19085
- api.CZRItem.prototype.ready.call( item );
19086
- },
19087
- //Fired when the input collection is populated
19088
- //At this point, the inputs are all ready (input.isReady.state() === 'resolved') and we can use their visible Value ( set to true by default )
19089
- setInputVisibilityDeps : function() {
19090
- var item = this,
19091
- module = item.module;
19092
-
19093
- //Internal item dependencies
19094
- item.czr_Input.each( function( input ) {
19095
- switch( input.id ) {
19096
- case 'img-type' :
19097
- _.each( [ 'img-id', 'img-size' ] , function( _inputId_ ) {
19098
- try { api.czr_sektions.scheduleVisibilityOfInputId.call( input, _inputId_, function() {
19099
- var bool = false;
19100
- switch( _inputId_ ) {
19101
- case 'img-id' :
19102
- bool = 'custom' === input();
19103
- break;
19104
- default :
19105
- bool = 'none' !== input();
19106
- break;
19107
- }
19108
- return bool;
19109
- }); } catch( er ) {
19110
- api.errare( 'Featured pages module => error in setInputVisibilityDeps', er );
19111
- }
19112
- });
19113
- break;
19114
- case 'content-type' :
19115
- _.each( [ 'content-custom-text' ] , function( _inputId_ ) {
19116
- try { api.czr_sektions.scheduleVisibilityOfInputId.call( input, _inputId_, function() {
19117
- return 'custom' === input();
19118
- }); } catch( er ) {
19119
- api.errare( 'Featured pages module => error in setInputVisibilityDeps', er );
19120
- }
19121
- });
19122
- break;
19123
- case 'btn-display' :
19124
- _.each( [ 'btn-custom-text' ] , function( _inputId_ ) {
19125
- try { api.czr_sektions.scheduleVisibilityOfInputId.call( input, _inputId_, function() {
19126
- return input();
19127
- }); } catch( er ) {
19128
- api.errare( 'Featured pages module => error in setInputVisibilityDeps', er );
19129
- }
19130
- });
19131
- break;
19132
- }
19133
- });
19134
- }
19135
- },//CZRItemConstructor
19136
- };//FeaturedPagesConstruct
19137
-
19138
- //provides a description of each module
19139
- //=> will determine :
19140
- //1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
19141
- //2) which js template(s) to use : if crud, the module template shall include the add new and pre-item elements.
19142
- // , if crud, the item shall be removable
19143
- //3) how to render : if multi item, the item content is rendered when user click on edit button.
19144
- // If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
19145
- //4) some DOM behaviour. For example, a multi item shall be sortable.
19146
- api.czrModuleMap = api.czrModuleMap || {};
19147
- $.extend( api.czrModuleMap, {
19148
- czr_featured_pages_module : {
19149
- mthds : FeaturedPagesConstruct,
19150
- crud : api.czr_sektions.getRegisteredModuleProperty( 'czr_featured_pages_module', 'is_crud' ),
19151
- hasPreItem : false,//a crud module has a pre item by default
19152
- refresh_on_add_item : false,// the preview is refreshed on item add
19153
- name : api.czr_sektions.getRegisteredModuleProperty( 'czr_featured_pages_module', 'name' ),
19154
- has_mod_opt : false,
19155
- ready_on_section_expanded : false,
19156
- ready_on_control_event : 'sek-accordion-expanded',// triggered in ::scheduleModuleAccordion()
19157
- defaultItemModel : api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( 'czr_featured_pages_module' )
19158
- },
19159
- });
19160
- })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
19161
- //extends api.CZRDynModule
19162
  ( function ( api, $, _ ) {
19163
  //ICON MODULE
19164
  var Constructor = {
15884
  // we've started to implement the json saved for the heading module, but all modules will progressively transition to this new format
15885
  // see fix for https://github.com/presscustomizr/nimble-builder/issues/544
15886
  // to ensure retrocompatibility with data previously not saved as json, we need to perform a json validity check
15887
+ initial_value = input.input_value;
15888
  if ( api.czr_sektions.isJsonString(initial_value) ) {
15889
  initial_value = JSON.parse( initial_value );
15890
  }
19049
  });
19050
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
19051
  //extends api.CZRDynModule
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19052
  ( function ( api, $, _ ) {
19053
  //ICON MODULE
19054
  var Constructor = {
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.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(),inherit_group_template:!0})});var t=function(){_.isArray(r.czrActiveWPEditors)&&(_.each(r.czrActiveWPEditors,function(e){wp.oldEditor.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"})}))})}),r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0,e.expanded.bind(function(){o.templateGalleryExpanded&&o.templateGalleryExpanded(!1)}))}),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(),r.previewer.bind("czr-new-skopes-synced",function(e){var t=r.czr_skopeBase.getSkopeProperty("sektions","local");sektionsLocalizedData.isDevMode&&r.infoLog("::czr-new-skopes-synced => SEKTIONS DATA ? ",t),_.isEmpty(t)&&r.errare("::czr-new-skopes-synced => no sektionsData"),_.isEmpty(t.setting_id)&&r.errare("::czr-new-skopes-synced => missing setting_id")})},registerAndSetupDefaultPanelSectionOptions:function(){var n=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:n.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(n.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>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.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(n.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>'),n.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:"section",id:n.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(n.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})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&(!_.isUndefined(r._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate)&&r._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate||r.previewer.trigger("sek-pick-content")),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&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(d,p){p.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new d.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new d.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)),d.previewer.bind("ready",function(){p(d.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?p.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){i.cachedElements.$body.addClass("nimble-top-bar-visible")},200)}):(t=p.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,c=this;if(0<p(c.topBarId).length)return p(c.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return d.errare("Error when parsing the the top note template",e),!1}p("#customize-preview").after(p(t)),p("#customize-preview").trigger("nimble-top-bar-rendered"),p(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{c.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){d.errare("Error when firing self.navigateHistory",e)}}),p(".sek-add-content",c.topBarId).on("click",function(e){e.preventDefault(),d.previewer.trigger("sek-pick-content",{content_type:"module"})}),p(".sek-level-tree",c.topBarId).on("click",function(e){e.preventDefault(),c.levelTreeExpanded(!c.levelTreeExpanded())}),p("[data-nimble-history]",c.topBarId).on("click",function(e){try{c.navigateHistory(p(this).data("nimble-history"))}catch(e){d.errare("Error when firing self.navigateHistory",e)}}),p(".sek-settings",c.topBarId).on("click",function(e){d.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.rootPanelFocus(),e.focus()})}),p(".sek-nimble-doc, .sek-notifications",c.topBarId).on("click",function(e){e.preventDefault(),p(this).data("doc-href")&&window.open(p(this).data("doc-href"),"_blank")}),p(".sek-tmpl-saving",c.topBarId).on("click",function(e){e.preventDefault(),c.tmplDialogVisible(!c.tmplDialogVisible())}),p(c.topBarId).on("click",".sek-reset-local-sektions",function(e){d.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.rootPanelFocus(),e.focus(),d.section(c.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.focus(),setTimeout(function(){d.control(c.getLocalSkopeOptionId()+"__local_reset",function(e){e.focus(),e.container.find(".customize-control-title").trigger("click"),e.container.addClass("button-see-me"),_.delay(function(){e.container.removeClass("button-see-me")},800)})},500)})})}),p(c.topBarId).on("click",".sek-goto-site-tmpl-options",function(e){d.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.rootPanelFocus(),e.focus(),d.section(c.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){e.focus(),setTimeout(function(){d.control(sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForGlobalOptions+"__site_templates",function(e){e.focus(),e.container.find(".customize-control-title").trigger("click")})},500)})})});var i=function(e){if(!(p(c.topBarId).length<1||sektionsLocalizedData.isDebugMode)){var t=!1;t=e&&e.on_init?d.czr_skopeBase.getSkopeProperty("has_local_nimble_customizations","local"):(!e||!e.after_reset)&&c.hasLocalSettingBeenCustomized();var i,n=c.getGroupSkopeForSiteTemplate(),o=!1,r=d(sektionsLocalizedData.optNameForGlobalOptions)(),s=!0,a=d(c.localSectionsSettingId())().local_options;a&&_.isObject(a)&&a.local_reset&&!_.isUndefined(a.local_reset.inherit_group_scope)&&(s=a.local_reset.inherit_group_scope),_.isObject(r)&&r.site_templates&&_.isObject(r.site_templates)&&_.each(r.site_templates,function(e,t){o||(o=n===t)}),i=o&&!t&&s;var l=sektionsLocalizedData.i18n["This page is not customized with NB"];i?l='<span class="sek-goto-site-tmpl-options">'+sektionsLocalizedData.i18n["This page inherits a NB site template"]+"</span>":t&&(l=sektionsLocalizedData.i18n["This page is customized with NB"],l+='<button type="button" class="far fa-trash-alt sek-reset-local-sektions" title="'+sektionsLocalizedData.i18n["Remove all sections and options of this page"]+'" data-nimble-state="enabled"><span class="screen-reader-text">'+sektionsLocalizedData.i18n["Remove all sections and options of this page"]+"</span></button>"),p(c.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',l].join(" "))}};d.bind("nimble-update-topbar-skope-status",i);var n=function(){d(c.localSectionsSettingId(),function(e){i({on_init:!0})})};return n(),d.bind("nimble-ready-for-current-skope",function(){n()}),p(c.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_and_controls_first:!0})),_.isEmpty(r.global)||c(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});c.previewer.refresh(),c.previewer.trigger("sek-pick-content",{}),e.cleanRegisteredAndLargeSelectInput(),e.cleanRegisteredLevelSettings()}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,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var t,i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(e){i.levelTreeExpanded()&&i.renderOrRefreshTree()});var n=function(e){try{t=JSON.stringify(e)}catch(e){b.errorLog("::setupLevelTree => error when JSON.stringify Level Tree")}_.isString(t)&&(-1!==t.indexOf("__nimble__")?z(".sek-level-tree button",i.topBarId).css("color","#46d2ff"):z(".sek-level-tree button",i.topBarId).css("color",""))};i.levelTree.bind(_.debounce(function(e){n(e)},1e3)),z("#customize-preview").one("nimble-top-bar-rendered",function(){n(i.setLevelTreeValue())}),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);z("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<z("#nimble-level-tree").length&&_.delay(function(){z("#nimble-level-tree").remove(),z("#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=z(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=z(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)?z.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(s)(),t=_.isObject(t)?t:{},n=z.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=z.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=[];return _.isEmpty(k)?y=g:_.each(k,function(e){v=_.findWhere(g,{id:e}),_.isUndefined(v)||y.push(v)}),this.levelTree(y),y}b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(z("#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}z("#customize-preview").after(z(e))}z("#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,t){var i=r.Deferred();return wp.ajax.post("sek_get_api_tmpl_json",{nonce:o.settings.nonce.save,api_tmpl_name:e,api_tmpl_is_pro:t?"yes":"no"}).done(function(e){i.resolve({success:!0,tmpl_json:e})}).fail(function(e){i.resolve({success:!1}),o.errorLog("ajax getTmplJsonFromApiTmpl => error",e);var t="Error when fetching the template";_.isString(e)&&!_.isEmpty(e)&&(t=e),o.previewer.trigger("sek-notify",{type:"error",duration:6e4,is_pro_notif:!0,notif_id:"pro_tmpl_error",message:['<span style="font-size:0.95em">',"<strong>"+t+"</strong>","</span>"].join("")})}),i},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",tmpl_is_pro:!1},t||{})).tmpl_name;return!_.isEmpty(n)&&_.isString(n)||o.errare("::tmpl inject => error => invalid template name"),(e="api_tmpl"===t.tmpl_source?i.getTmplJsonFromApi(n,t.tmpl_is_pro):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,tmpl_is_pro:t.tmpl_is_pro}):o.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}).fail(function(){o.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}),_.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),e},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.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(){var e=function(){o.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings_and_controls_first:!0}),o.previewer.unbind("czr-new-skopes-synced",e)};o.previewer.bind("czr-new-skopes-synced",e),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,d){d.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(i){var n,r=this;i=i||{dirty:!1,is_group_inheritance_enabled:!0};var e={local:{collectionSettingId:r.localSectionsSettingId()},global:{collectionSettingId:r.getGlobalSectionsSettingId()}};_.each(e,function(e,o){if(n=c.czr_skopeBase.getSkopeProperty("sektions",o).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){var t=_.isObject(n)?n:r.getDefaultSektionSettingValue(o);"local"!=o||i.is_group_inheritance_enabled||(t.local_options.local_reset=_.isObject(t.local_options.local_reset)?t.local_options.local_reset:{},t.local_options.local_reset.inherit_group_scope=!1);c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:r.validateSettingValue(t,o),transport:"postMessage",type:"option",track:!1,origin:"nimble",dirty:i.dirty});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{r.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}"local"===o&&c.trigger("nimble-update-topbar-skope-status")},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=["collection","local_options","fonts","__inherits_group_skope_tmpl_when_exists__"],a=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},l=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=d.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void a("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void a('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(s,t))return void a("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void a("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,l(e)})}}else{if(_.isUndefined(t)||!_.isObject(t))return void a("validation error => a level is invalid");if(_.isEmpty(t.id)||!_.isString(t.id))return void a("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void a("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void a("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void a('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void a("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void a("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 a("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 a("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void a("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void a("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void a("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=d.extend(!0,{},t),_.isUndefined(e)?a("validation error => undefined level "):l(e)})}};return l(),r?(c.infoLog("error in ::validateSettingValue",i),null):i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e,t){var i;if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);var n=!0;return"local"===e&&t&&_.isObject(t)&&t.local_reset&&!_.isUndefined(t.local_reset.inherit_group_scope)&&(n=t.local_reset.inherit_group_scope),i=d.extend(!0,{},this.getDefaultSektionSettingValue(e)),n||(i.local_options.local_reset={inherit_group_scope:!1}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,o){o.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var r=this,s={},a={},l=!0,e={"sek-add-section":{callback:function(e){return c.previewedDevice("desktop"),l=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},s={action:"sek-add-section",id:sektionsLocalizedData.prefixForSettingsNotSaved+r.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},r.updateAPISetting(s)},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 l=!0,a={},s={id:sektionsLocalizedData.prefixForSettingsNotSaved+r.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},r.updateAPISetting(s)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return l=!0,a={},s={id:sektionsLocalizedData.prefixForSettingsNotSaved+r.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},r.updateAPISetting(s)},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}),r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.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(l=!0,a={},e.level){case"section":var t=r.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}s={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":s={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":s={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 r.updateAPISetting(s)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(e.apiParams)}),"sek-remove-section"===e.apiParams.action){var t=r.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(l=!0,a={},e.level){case"section":s={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":s={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":s={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 r.updateAPISetting(s)},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 l=!1,a={},s={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},r.updateAPISetting(s)},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 l=!1,a={},s={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},r.updateAPISetting(s)},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(l=!0,a={},e.level){case"section":s={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":s={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":s={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return r.updateAPISetting(s)},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 l=!0,a={},s=e,r.updateAPISetting(s)},"sek-add-content-in-new-sektion":{callback:function(e){switch(l=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(s=e).action="sek-add-content-in-new-sektion",s.id=sektionsLocalizedData.prefixForSettingsNotSaved+r.guid(),e.content_type){case"module":s.droppedModuleId=sektionsLocalizedData.prefixForSettingsNotSaved+r.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 r.updateAPISetting(s)},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})}r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.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:r.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 l=!1,a={},(s=e).action="sek-add-preset-section-in-new-nested-sektion",c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),r.updateAPISetting(s)},complete:function(e){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.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&&r.lastClickedTargetInPreview({id:e.id}),l=!0,s={},a={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},r.generateUI(a)},"sek-edit-options":function(e){return l=!0,s={},_.isEmpty(e.id)?o.Deferred(function(){this.reject("missing id")}):(a={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||[]},r.generateUI(a))},"sek-edit-module":function(e){return l=!0,s={},a={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},r.generateUI(a)},"sek-notify":function(i){l=!1;var n=i.notif_id||"sek-notify";return i.button_see_me=!!_.isUndefined(i.button_see_me)||i.button_see_me,r.lastNimbleNotificationId&&c.notifications.remove(r.lastNimbleNotificationId),o.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(n,{type:i.type||"info",message:i.message,dismissible:!0})),r.lastNimbleNotificationId=n;var t=function(){i.is_pro_notif&&c.notifications(n).container.css("background","#ffff88"),i.button_see_me&&(c.notifications(n).container.addClass("button-see-me-twice"),_.delay(function(){c.notifications.container.removeClass("button-see-me-twice")},2e3)),c.notifications.unbind("rendered",t)};c.notifications.has(n)&&c.notifications.bind("rendered",t),_.delay(function(){c.notifications.remove(n)},i.duration||5e3)}),this.resolve({is_global_location:r.isGlobalLocation(i)})})},"sek-refresh-level":function(t){return l=!0,o.Deferred(function(e){s={action:"sek-refresh-level",level:t.level,id:t.id,original_action:t.original_action,moved_level_id:t.moved_level_id},a={},e.resolve({is_global_location:r.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return l=!0,t=t||{},o.Deferred(function(e){s={id:t.id},a={},e.resolve({is_global_location:r.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return l=!1,r.idOfSectionToSave=t.id,r.saveSectionDialogVisible(!0),o.Deferred(function(e){s={},a={},e.resolve({is_global_location:r.isGlobalLocation(t)})})},"sek-reset-collection":{callback:function(t){return l=!1,a={},(s=t).action="sek-reset-collection",s.scope=t.scope,r.updateAPISetting(s).done(function(e){if(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("")}),"local"===t.scope){var i=function(){var e=!0,t=c(r.localSectionsSettingId())().local_options;t&&_.isObject(t)&&t.local_reset&&!_.isUndefined(t.local_reset.inherit_group_scope)&&(e=t.local_reset.inherit_group_scope),r.cleanRegisteredLevelSettings(),c.remove(r.localSectionsSettingId());try{r.setupSettingsToBeSaved({dirty:!0,is_group_inheritance_enabled:e})}catch(e){c.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}c.trigger("nimble-update-topbar-skope-status",{after_reset:!0}),r.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings_and_controls_first:!0}),c.previewer.unbind("czr-new-skopes-synced",i)};c.previewer.bind("czr-new-skopes-synced",i)}}).fail(function(e){c.errare("reset_button input => error when firing ::updateAPISetting",e),c.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("")})})},complete:function(e){}}};_.each(e,function(t,o){c.previewer.bind(o,function(n){var e;if(_.isFunction(t))e=t;else{if(!_.isFunction(t.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+o);e=t.callback}"sek-notify"!==o&&(r.templateGalleryExpanded(!1),r.tmplDialogVisible(!1));try{e(n).done(function(e){if(e=e||{},l){var t={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:s,uiParams:a,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId},i=!1;try{JSON.stringify(t)}catch(e){c.errare("JSON.stringify problem when executing the callback of "+o,t),i=!0}i||c.previewer.send(o,t)}else c.previewer.trigger([o,"done"].join("_"),{apiParams:s,uiParams:a});r.trigger([o,"done"].join("_"),n)}).fail(function(e){c.errare("reactToPreviewMsg => problem or error when running action "+o,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 "+o,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=o.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(y,b){b.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=b.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){y.errare("::generateUI() => error",e),i=b.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=b.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforDraggableContent(e,i)}catch(e){y.errare("::generateUI() => error",e),i=b.Deferred()}y.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){y.errare("::generateUI() => error",e),i=b.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=b.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(r){if(!_.isEmpty(r.settingParams)&&_.has(r.settingParams,"to")){var o,s=this,e=r.settingParams.to,t=null,a=!1;if(!_.isEmpty(r.settingParams.args)&&_.has(r.settingParams.args,"moduleRegistrationParams")){var l=r.settingParams.args.moduleRegistrationParams.control,i=r.settingParams.args.moduleRegistrationParams.id,n=l.czr_Module(i);if(_.isEmpty(n)?y.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",r):(t=n.module_type,a=n.isMultiItem()),!a&&_.isObject(e)?o=s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!1}):(o=[],_.each(e,function(e){o.push(s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!0}))})),_.isEmpty(r.defaultPreviewAction))y.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",r);else{var c,d="refresh_stylesheet"===r.defaultPreviewAction,p="refresh_markup"===r.defaultPreviewAction,u="refresh_fonts"===r.defaultPreviewAction,m="refresh_preview"===r.defaultPreviewAction,f=!1,g=r.settingParams.args.input_changed,h=function(){return c&&_.isString(c.refresh_markup)&&"true"!==c.refresh_markup&&"false"!==c.refresh_markup};_.isUndefined(g)||(c=s.getInputRegistrationParams(g,t),_.isUndefined(c.refresh_stylesheet)||(d=Boolean(c.refresh_stylesheet)),_.isUndefined(c.refresh_markup)||(p=h()?c.refresh_markup:Boolean(c.refresh_markup)),_.isUndefined(c.refresh_fonts)||(u=Boolean(c.refresh_fonts)),_.isUndefined(c.refresh_preview)||(m=Boolean(c.refresh_preview)),_.isUndefined(c.refresh_css_via_post_message)||(f=Boolean(c.refresh_css_via_post_message)));var v=function(){if(!0!==r.isGlobalOptions)return s.updateAPISetting({action:r.uiParams.action,id:r.uiParams.id,value:o,in_column:r.uiParams.in_column,in_sektion:r.uiParams.in_sektion,options_type:r.options_type,settingParams:r.settingParams}).done(function(e){var t;!0===d&&y.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:r.uiParams.id,level:r.uiParams.level}}),a&&r.settingParams.args.inputRegistrationParams&&_.isFunction(r.settingParams.args.inputRegistrationParams.input_parent)&&(t=r.settingParams.args.inputRegistrationParams.input_parent.id);var i=function(){y.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:r.uiParams.id,level:r.uiParams.level,changed_item_id:t,control_id:l.id,is_multi_items:a},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===p&&i(),h()){var n=r.settingParams.args.input_value;if(!_.isString(n))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");s.htmlIncludesElementsThatNeedAnAjaxRefresh(n)?i():y.previewer.send("sek-update-html-in-selector",{selector:c.refresh_markup,changed_item_id:t,is_multi_items:a,html:n,id:r.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:r.uiParams.id,level:r.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}if(!0===f){var o=r.settingParams.args.input_value;if(!_.isString(o))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refresh css with post message => css content is not a string.");y.previewer.send("sek-update-css-with-postmessage",{changed_item_id:t,is_multi_items:a,css_content:o,id:r.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-css-with-postmessage",id:r.uiParams.id,level:r.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),is_current_page_custom_css:"local_custom_css"===g})}!0===m&&y.previewer.refresh()}).fail(function(e){y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated",e),y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ",r)});if(_.isEmpty(r.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(sektionsLocalizedData.optNameForGlobalOptions)(),t=b.extend(!0,{},_.isObject(e)?e:{}),i={};if(_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[r.options_type]=i,y(sektionsLocalizedData.optNameForGlobalOptions)(t),!1!==m&&y.previewer.refresh(),!0===u){var n=r.settingParams.args.input_value;if(!_.isString(n))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",n);s.updateGlobalGFonts(n)}!0===d&&y.previewer.send("sek-refresh-stylesheet",{local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),location_skope_id:sektionsLocalizedData.globalSkopeId})}};if(!0===u){var k=r.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);!0===r.isGlobalOptions?v():s.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:s.isGlobalLocation(r.uiParams)}).always(function(){v().then(function(){s.updateAPISetting({action:"sek-update-fonts",is_global_location:s.isGlobalLocation(r.uiParams)})})})}else v()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",r)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",r)},updateGlobalGFonts:function(e){var t=y(sektionsLocalizedData.optNameForGlobalOptions)(),i=b.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,y(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))&&y.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=y.control.has(t):(i=!0,1<e.length&&y.errare("isUIControlAlreadyRegistered => why is this control registered more than once ? => "+t)),i},htmlIncludesElementsThatNeedAnAjaxRefresh:function(e){if(!_.isString(e))return!1;var t=(e=e.replace(/\s+/g,"")).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:!1}}),_.each(["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_post_grids_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>',is_new:"sek_post_grids_sec_picker_module"===e}});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.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(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:"column"===s.level?"sek_level_spacing_module_for_columns":"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>'}})),"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>'}}),(sektionsLocalizedData.isUpsellEnabled||sektionsLocalizedData.isPro)&&d.extend(t,{level_cust_css:{settingControlId:s.id+"__level_custom_css",module_type:"sek_level_cust_css_level",controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>',isPro:!0}});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.cleanRegisteredAndLargeSelectInput(),_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("::_do_register_ => 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&&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_and_controls_first&&a.cleanRegisteredLocalOptionSettingsAndControls(),_.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["Remove all sections and options of this page"],icon:'<i class="material-icons sek-level-option-icon">delete</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.control.has(n.settingControlId)||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},track:!0}).done(function(){c.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title").first(),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(d,p){p.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(a,e){var l=this,i=sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(l.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return d.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"site_templates":n[t]={settingControlId:i+"__site_templates",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site templates"],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"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"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["Remove the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">delete</i>'};break;case"beta_features":break;default:d.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("site_templates"===o)var r=function(){d.trigger("nimble-update-topbar-skope-status"),d.previewer.trigger("sek-notify",{type:"info",duration:2e4,message:['<span style="">',sektionsLocalizedData.i18n["Refreshed to home page : site templates must be set when previewing home"],"</span>"].join("")}),d.previewer.unbind("czr-new-skopes-synced",r),setTimeout(function(){d._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate=!1},1e3)};if(!d.has(n.settingControlId)){var t=function(e,t,i){try{l.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){"site_templates"===o&&e.bind(function(e){d._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate=!0,d.previewer.bind("czr-new-skopes-synced",r),d.previewer.previewUrl(d.settings.url.home),d.trigger("nimble-update-topbar-skope-status")}),e.bind(_.debounce(t,l.SETTING_UPDATE_BUFFER))});var e=l.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var s=p.extend(!0,{},e);i=p.extend(s,i)}d.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:l.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){d.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"),"site_templates"===o&&e.container.one("click",".customize-control-title",function(){d._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate=!0,d.previewer.bind("czr-new-skopes-synced",r),d.previewer.previewUrl(d.settings.url.home),d.trigger("nimble-update-topbar-skope-status")})})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(g,h){h.extend(CZRSeksPrototype,{updateAPISetting:function(p){var u=this;(p=p||{}).is_global_location="global"===p.scope||u.isGlobalLocation(p);var m=p.is_global_location?u.getGlobalSectionsSettingId():u.localSectionsSettingId(),f=g(m)();u.updAPISetParams={params:p,promise:h.Deferred(),newSetValue:_.isObject(f)?h.extend(!0,{},f):u.getDefaultSektionSettingValue(p.is_global_location?"global":"local"),cloneId:"",sectionInjectPromise:"_not_injection_scenario_"};return g(m,function(e){!function(){switch(u.updAPISetParams.newSetValue.collection=_.isArray(u.updAPISetParams.newSetValue.collection)?u.updAPISetParams.newSetValue.collection:u.getDefaultSektionSettingValue(p.is_global_location?"global":"local").collection,p.action){case"sek-maybe-add-missing-locations":var t,i,e=u.activeLocations();h.extend(!0,[],u.updAPISetParams.newSetValue.collection),_.each(e,function(e){t=_.findWhere(u.updAPISetParams.newSetValue.collection,{id:e}),_.isUndefined(t)&&((i=h.extend(!0,{},sektionsLocalizedData.defaultLocationModel)).id=e,g.infoLog("=> need to add missing location to api setting value",i),u.updAPISetParams.newSetValue.collection.push(i))});break;case"sek-add-section":u._updAPISet_sek_add_sektion();break;case"sek-duplicate-section":u._updAPISet_sek_duplicate_sektion();break;case"sek-remove-section":u._updAPISet_sek_remove_sektion();break;case"sek-move-section":u._updAPISet_sek_move_sektion();break;case"sek-move-section-up-down":u._updAPISet_sek_move_sektion_up_down();break;case"sek-add-column":u._updAPISet_sek_add_column();break;case"sek-remove-column":u._updAPISet_sek_remove_column();break;case"sek-duplicate-column":u._updAPISet_sek_duplicate_column();break;case"sek-resize-columns":u._updAPISet_sek_resize_column();break;case"sek-move-column":u._updAPISet_sek_move_column();break;case"sek-add-module":u._updAPISet_sek_add_module();break;case"sek-duplicate-module":u._updAPISet_sek_duplicate_module();break;case"sek-remove-module":u._updAPISet_sek_remove_module();break;case"sek-move-module":u._updAPISet_sek_move_module();break;case"sek-set-module-value":u._updAPISet_sek_set_module_value();break;case"sek-add-content-in-new-sektion":u._updAPISet_sek_add_content_in_new_sektion();break;case"sek-add-preset-section-in-new-nested-sektion":u._updAPISet_sek_add_preset_sektion_in_new_nested_sektion();break;case"sek-import-from-file":u._updAPISet_sek_import_from_file();break;case"sek-inject-tmpl-from-gallery":u._updAPISet_sek_inject_tmpl_from_gallery();break;case"sek-generate-level-options-ui":var n=u.getLevelModel(p.id,u.updAPISetParams.newSetValue.collection),o={};if("no_match"===n){g.errare("updateAPISetting => "+p.action+" => no parent sektion matched"),u.updAPISetParams.promise.reject("updateAPISetting => "+p.action+" => no parent sektion matched");break}var r=h.extend(!0,{},n.options||{});_.each(p.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(p.options_type)&&g.errare("updateAPISetting => "+p.action+" => missing options_type"),r[p.options_type]=o,n.options=r;break;case"sek-generate-local-skope-options-ui":o={};var s=h.extend(!0,{},_.isObject(u.updAPISetParams.newSetValue.local_options)?u.updAPISetParams.newSetValue.local_options:{});if(_.each(p.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(p.options_type)||!_.isString(p.options_type))g.errare("updateAPISetting => "+p.action+" => missing options_type");else{var a={};a[p.options_type]=o,u.updAPISetParams.newSetValue.local_options=h.extend(s,a)}break;case"sek-update-fonts":var l=u.sniffGFonts({is_global_location:p&&!0===p.is_global_location});!_.isEmpty(p.font_family)&&_.isString(p.font_family)&&-1<p.font_family.indexOf("gfont")&&!_.contains(l,p.font_family)&&l.push(p.font_family),u.updAPISetParams.newSetValue.fonts=l;break;case"sek-restore-revision":u.updAPISetParams.newSetValue=p.revision_value;break;case"sek-reset-collection":var c;"local"===p.scope&&(c=h.extend(!0,{},_.isObject(u.updAPISetParams.newSetValue.local_options)?u.updAPISetParams.newSetValue.local_options:{}));try{u.updAPISetParams.newSetValue=g.czr_sektions.resetCollectionSetting(p.scope,c)}catch(e){g.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==u.updAPISetParams.promise.state()){var d=function(){var e=p.settingParams&&p.settingParams.from&&p.settingParams.to;if(e&&_.isEqual(p.settingParams.from,p.settingParams.to))u.updAPISetParams.promise.reject("updateAPISetting => main sektion setting change => the new setting value is unchanged when firing action : "+p.action);else if(!e&&_.isEqual(f,u.updAPISetParams.newSetValue))u.updAPISetParams.promise.reject("updateAPISetting => the new setting value is unchanged when firing action : "+p.action);else{var t=u.validateSettingValue(u.updAPISetParams.newSetValue,p.is_global_location?"global":"local");if(null===t||_.isUndefined(t))u.updAPISetParams.promise.reject("Validation problem for action "+p.action);else{if(!p.is_global_location){var i=!0,n=u.updAPISetParams.newSetValue;n.local_options&&n.local_options.local_reset&&!_.isUndefined(n.local_options.local_reset.inherit_group_scope)&&(i=n.local_options.local_reset.inherit_group_scope),u.updAPISetParams.newSetValue.__inherits_group_skope_tmpl_when_exists__="sek-reset-collection"===p.action&&i}g(m)(u.updAPISetParams.newSetValue,p),p.is_global_location||g.trigger("nimble-update-topbar-skope-status"),p.cloneId=u.updAPISetParams.cloneId,u.updAPISetParams.promise.resolve(p)}}};"_not_injection_scenario_"===u.updAPISetParams.sectionInjectPromise?(d(),"pending"===u.updAPISetParams.promise.state()&&g.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")):u.updAPISetParams.sectionInjectPromise.done(function(){d(),"pending"===u.updAPISetParams.promise.state()&&g.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")}).fail(function(e){g.errare("updateAPISetting => self.updAPISetParams.sectionInjectPromise failed",e)})}}()}),u.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=""})},_getApiSingleSectionData:function(t){var e,i=h.Deferred();return _.isEmpty(g.nimble_ApiSections[t])?(_.isUndefined(g.nimble_fetchingApiSection)||"pending"!=g.nimble_fetchingApiSection.state()?(e=wp.ajax.post("sek_get_single_api_section_data",{nonce:g.settings.nonce.save,api_section_id:t}),g.nimble_fetchingApiSection=e):e=g.nimble_fetchingApiSection,e.done(function(e){g.nimble_ApiSections[t]=e,i.resolve(e)}).fail(function(e){g.errorLog("ajax sek_get_single_api_section_data => error",e);var t="Error when fetching the section";_.isString(e)&&!_.isEmpty(e)&&(t=e),g.previewer.trigger("sek-notify",{type:"error",duration:6e4,is_pro_notif:!0,notif_id:"pro_section_error",message:['<span style="font-size:0.95em">',"<strong>"+t+"</strong>","</span>"].join("")})})):i.resolve(g.nimble_ApiSections[t]),i.promise()},getPresetSectionCollectionData:function(i){var n=this,o=h.Deferred();if(i.is_user_section)wp.ajax.post("sek_get_user_section_json",{nonce:g.settings.nonce.save,section_post_name:i.presetSectionId}).done(function(e){if(!_.isObject(e)||_.isEmpty(e)||_.isUndefined(e.data))throw g.errare("getPresetSectionCollectionData => preset section type not found or empty : "+i.presetSectionId,e),new Error("getPresetSectionCollectionData => preset section type not found or empty");var t=h.extend({},!0,e.data);t.id=sektionsLocalizedData.prefixForSettingsNotSaved+n.guid(),t.collection=n.setPresetOrUserSectionIds(t.collection),t.ver_ini=sektionsLocalizedData.nimbleVersion,t.collection=n.setPresetSectionVersion(t.collection),o.resolve(t)}).fail(function(e){o.reject(e)});else{g.nimble_ApiSections=g.nimble_ApiSections||{};var e=function(e){if(_.isEmpty(e)||!_.isObject(e))throw new Error("getPresetSectionCollectionData => Invalid collection");var t=h.extend(!0,{},e);t.collection=n.setPresetOrUserSectionIds(t.collection),t.ver_ini=sektionsLocalizedData.nimbleVersion,t.collection=n.setPresetSectionVersion(t.collection),o.resolve(t)};switch(i.presetSectionId){case"two_columns":e(JSON.parse('{"collection":[{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]}]}'));break;case"three_columns":e(JSON.parse('{"collection":[{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]}]}'));break;case"four_columns":e(JSON.parse('{"collection":[{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]}]}'));break;default:n._getApiSingleSectionData(i.presetSectionId).fail(function(e){o.reject(e)}).done(e)}}return o.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=h.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.getPresetSectionCollectionData({is_user_section:r.is_user_section,presetSectionId:r.content_id}).fail(function(e){c.errare("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollectionData()",e),l.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollectionData()")}).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.getPresetSectionCollectionData({is_user_section:n.is_user_section,presetSectionId:n.content_id}).fail(function(){c.errare("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollectionData()",_er_),r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollectionData()")}).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 e=n.imported_content.metas.active_locations,t=m.czr_sektions.activeLocations(),r=[];_.each(t,function(e){o.isHeaderLocation(e)||o.isFooterLocation(e)||r.push(e)});var s=_.first(r);if(!_.isEmpty(s)&&!_.isEmpty(e)&&_.isArray(e)){var a=f(e).not(r).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(I,w){w.extend(CZRSeksPrototype,{_updAPISet_sek_inject_tmpl_from_gallery:function(){var t,i=this;if(t=i.updAPISetParams.params,_.isUndefined(t.injected_content.data)||_.isUndefined(t.injected_content.metas))I.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(I.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){I.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}if("no_match"===(u=i.getLevelModel(v,g))){I.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 I.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):I.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):I.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){I.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 I.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):I.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){I.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 I.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 z=i.updAPISetParams.newSetValue.fonts;z=w.extend(!0,[],_.isArray(z)?z:[]),i.updAPISetParams.newSetValue.fonts=_.uniq(_.union(d,z))}else i.updAPISetParams.newSetValue.fonts=d}else I.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)})},cleanRegisteredLocalOptionSettingsAndControls: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)&&n.control.has(e.id)&&o.when(n.control(e.id).container.remove()).done(function(){n.control.remove(e.id)}),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettings: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(),p.czr_sektions.levelTreeExpanded(!1),p.czr_sektions.templateGalleryExpanded(!1),p.czr_sektions.saveSectionDialogVisible(!1),p.czr_sektions.tmplDialogVisible(!1),p.czr_sektions.tmplInjectDialogVisible(!1);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;_.isFunction(i)&&!_.isEmpty(t)?n.czr_Input.has(t)?(n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})):p.errare("::scheduleVisibilityOfInputId => missing input id : "+t):p.errare("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id)},hasCurrentPageNBSectionsNotHeaderFooter:function(){var e,t=this,i=!1,n=this.localSectionsSettingId(),o=p(n)();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},hasLocalSettingBeenCustomized:function(){var e=this.localSectionsSettingId(),t=p(e)();return!((t=_.isObject(t)?t:{})&&t.__inherits_group_skope_tmpl_when_exists__)},getGroupSkopeForSiteTemplate:function(){var e,t,i=p.czr_skopeBase.getSkopeProperty("skope_id","group");if("_skope_not_set_"===i){e=p.czr_skopeBase.getSkopeProperty("skope_id","local"),t=e,(FlatSkopeLocalizedData&&_.isArray(FlatSkopeLocalizedData.noGroupSkopeList)?(t=(t=_.isString(e)?e:"_skope_not_set_").replace("skp__",""),_.contains(FlatSkopeLocalizedData.noGroupSkopeList,t)):(p.errare(":getGroupSkopeForSiteTemplate => missing localized data FlatSkopeLocalizedData.noGroupSkopeList"),0))?i=e+"_for_site_tmpl":p.errare("::getGroupSkopeForSiteTemplate => group skope could not be set")}return 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)})}),e.find('[draggable="false"][data-sek-is-pro-section="yes"], [draggable="false"][data-sek-is-pro-module="yes"]').each(function(){m(this).on("mousedown",function(e){n.lastClickedTargetInPreview({}),c.previewer.trigger("sek-notify",{type:"info",duration:6e4,notif_id:"go_pro",message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Go pro link when click on pro tmpl or section"]+"</strong>","</span>"].join("")})})})},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),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: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,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){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,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();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":var a=m.extend(!0,{},e);c.previewer.trigger("sek-add-content-in-new-sektion",{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:a.before_module_or_nested_section,after_module_or_nested_section:a.after_module_or_nested_section,content_type:a.content_type,content_id:a.content_id,is_user_section:a.is_user_section,after_section:a.after_section,before_section:a.before_section,location:a.location,sektion_to_replace:a.sektion_to_replace});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 l=m.extend(!0,{},e);l=m.extend(l,{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",l);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(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){try{!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()}))}()}catch(e){window.console&&console.log("Error in mayBeAwakeTinyMceEditor ",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-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){e&&e.module_type&&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(){if("local"===i){var e=function(){d.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings_and_controls_first:!0}),d.previewer.unbind("czr-new-skopes-synced",e)};d.previewer.bind("czr-new-skopes-synced",e)}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(l,d){d.extend(CZRSeksPrototype,{setupTemplateGallery:function(){var i=this;i.templateGalleryExpanded=new l.Value(!1),i.tmplInjectDialogVisible=new l.Value(!1),sektionsLocalizedData.isTemplateGalleryEnabled&&(i.tmplSearchFieldVisible=new l.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",""),l.trigger("nb-template-gallery-closed"),i._site_tmpl_scope=null,d('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active"))}),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))}),l.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 l.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(t){return n.getTemplateGalleryHtml(t).done(function(e){(i=d("#nimble-tmpl-gallery")).find(".sek-tmpl-gallery-inner").html(e),i.removeClass("sek-is-site-tmpl-mode"),"api_tmpl"===t.tmpl_source&&n._site_tmpl_scope&&!_.isEmpty(n._site_tmpl_scope)&&i.addClass("sek-is-site-tmpl-mode")})};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 templates 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+'" data-sek-api-site-tmpl="'+(e.is_site_tmpl?"true":"false")+'" data-sek-is-pro-tmpl="'+(e.is_pro_tmpl?"yes":"no")+'">',s+='<div class="tmpl-top-title"><h3>'+e.title+"</h3></div>",s+='<div class="tmpl-thumb-and-info-wrap">',s+='<div class="sek-tmpl-thumb" style="background-image:url('+r+')"></div>',s+='<div class="sek-tmpl-info" title="'+o+'">',s+='<p class="tmpl-desc tmpl-api-hide">'+e.description+"</p>",s+='<p class="tmpl-date tmpl-api-hide"><i>'+[sektionsLocalizedData.i18n["Last modified"]," : ",e.last_modified_date].join(" ")+"</i></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>'),e.is_pro_tmpl&&(s+='<div class="sek-is-pro-template"><img src="'+sektionsLocalizedData.czrAssetsPath+'sek/img/pro_orange.svg" alt="Pro feature"/></div>'),"api_tmpl"===n.tmpl_source&&(e.demo_url&&-1!=e.demo_url.indexOf("http")&&(s+='<div class="sek-tmpl-demo-link tmpl-api-hide"><a href="'+e.demo_url+'?utm_source=usersite&amp;utm_medium=link&amp;utm_campaign=tmpl_demos" target="_blank" rel="noopener noreferrer">'+sektionsLocalizedData.i18n["Live demo"]+' <i class="fas fa-external-link-alt"></i></a></div>'),e.is_site_tmpl&&(s+='<div class="sek-is-site-template" title="Site templates include dynamic template tags.">Site Template</div>')),s+="</div>",s+="</div>",s+="</div>"}),"api_tmpl"!==n.tmpl_source||_.isEmpty(s)||(s+='<div class="sek-tmpl-coming-soon">',s+="<p>"+sektionsLocalizedData.i18n["🍥 More templates coming..."]+"</p>",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"),a=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"),n=d(this).closest(".sek-tmpl-item").find(".tmpl-top-title h3").html(),o="yes"===d(this).closest(".sek-tmpl-item").data("sek-is-pro-tmpl");if(_.isEmpty(t))l.errare("::setupTmplGalleryDOMEvents => error => invalid template id");else{if(o){var r;if(!sektionsLocalizedData.isPro)return void l.previewer.trigger("sek-notify",{type:"info",duration:6e4,notif_id:"go_pro",message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Go pro link when click on pro tmpl or section"]+"</strong>","</span>"].join("")});if(_.isEmpty(sektionsLocalizedData.pro_license_key)?r=sektionsLocalizedData.i18n["Missing license key"]:"valid"!==sektionsLocalizedData.pro_license_status&&(r=sektionsLocalizedData.i18n["Pro license problem"]),!_.isEmpty(r))return void l.previewer.trigger("sek-notify",{type:"error",duration:6e4,is_pro_notif:!0,notif_id:"pro_tmpl_error",message:['<span style="font-size:0.95em">',"<strong>"+r+"</strong>","</span>"].join("")})}if(!a._site_tmpl_scope||_.isEmpty(a._site_tmpl_scope))a.hasCurrentPageNBSectionsNotHeaderFooter()?(a._tmplNameWhileImportDialog=t,a._tmplSourceWhileImportDialog=i,a._tmplIsProWhileImportDialog=o,a.tmplInjectDialogVisible(!0)):(l.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),l.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:t,tmpl_source:i,tmpl_is_pro:o}).always(function(){l.previewer.send("sek-clean-loader")}),a.templateGalleryExpanded(!1));else{var s=d('[data-czrtype="'+a._site_tmpl_scope+'"]');if(0<s.length){if(!_.contains(["user_tmpl","api_tmpl"],i))return void l.errare("Error when picking site template => invalid tmpl source");s.trigger("nb-set-site-tmpl",{site_tmpl_id:t,site_tmpl_source:i,site_tmpl_title:n})}}}}).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)?(l.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),l.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:a._tmplNameWhileImportDialog,tmpl_source:a._tmplSourceWhileImportDialog,tmpl_is_pro:a._tmplIsProWhileImportDialog,tmpl_inject_mode:t}).always(function(){l.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}),a.templateGalleryExpanded(!1)):l.errare("::setupTmplGalleryDOMEvents => error => invalid import mode"):a.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){a.tmplDialogMode("edit"),a.tmplDialogMode.unbind(t)};a.tmplToEdit=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),a.tmplDialogMode.bind(t),a.tmplDialogVisible(!0)}).on("click",".sek-tmpl-info .remove-tmpl",function(e){e.preventDefault();var t=function(e){a.tmplDialogMode("remove"),a.tmplDialogMode.unbind(t)};a.tmplToRemove=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),a.tmplDialogMode.bind(t),a.tmplDialogVisible(!0)}).on("click",".sek-close-dialog",function(e){e.preventDefault(),a.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"),a.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),self._site_tmpl_scope=null,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 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={},l=[];s.forEach(function(e){a[e]=(a[e]||0)+1});var c=h.sortBy(a,function(e){return e});h.each(c,function(i){h.each(a,function(e,t){i!==e||h.contains(l,t)||l.unshift(t)})}),h.each(l,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,l){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),e=n();r.append(a("<option>",{value:e,html:e,selected:"selected"})),n.container.on("click",function(){!0!==n.iconCollectionSet&&(a.when(a.Deferred(function(t){l.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){l.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">&nbsp;&nbsp;'+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),l.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"),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.previewer.trigger("sek-reset-collection",{scope:i}):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(p,u,_){p.czrInputMap=p.czrInputMap||{},u.extend(p.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(_.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=function(){return n&&n.editor_params&&!0===n.editor_params.autop},s={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&_.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=_.filter(e,function(e){return!_.contains(t,e)})}if(n.editor_params&&_.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;_.isEmpty(i)||!_.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=_.filter(e,function(e){return _.contains(i,e)}))}return e.join(",")}(),content_css:function(){var e=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl];if(!wp.oldEditor.getDefaultSetting)return e;var t=wp.oldEditor.getDefaultSettings();return t&&t.tinymce&&t.tinymce.content_css&&(e=_.union(t.tinymce.content_css.split(","),e)),e.join(",")}(),min_height:40,height:n.editor_params&&_.isNumber(n.editor_params.height)?n.editor_params.height:p.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};s.tinymce.wpautop=r(),r()||(s.tinymce.forced_root_block=""),wp.oldEditor.initialize(i,s);var a=tinyMCE.get(i);if(!a)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var l=u.extend(!0,[],p.czrActiveWPEditors);l.push(i),p.czrActiveWPEditors=l;var c,d=function(){c=t(),p.czr_sektions.isJsonString(c)&&(c=JSON.parse(c)),e.html(c),a.setContent(c)};a.initialized?d():a.on("init",d),a.on("input change keyup",function(e){t(a.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=u("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=p.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=nimbleTinyMCEPreInit.mceInit[e];o.content_css=function(){var e=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl];if(!wp.oldEditor.getDefaultSetting)return e;var t=wp.oldEditor.getDefaultSettings();return t&&t.tinymce&&t.tinymce.content_css&&(e=_.union(t.tinymce.content_css.split(","),e)),e.join(",")}();var r,s=t.input_parent,a=function(){var e=s();return _.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};o.wpautop=a(),a()||(o.forced_root_block=""),o.toolbar1=sektionsLocalizedData.defaultToolbarBtns,o.toolbar2="",window.tinymce?(window.tinymce.init(o),window.QTags.getInstance(e)):window.console&&console.log("Error in ::detached_tinymce_editor => window.tinymce not defined "),window.tinyMCE?r=tinyMCE.get(e):window.console&&console.log("Error in ::detached_tinymce_editor => window.tinyMCE not defined ");var l,c=function(){l=t(),p.czr_sektions.isJsonString(l)&&(l=JSON.parse(l)),r.setContent(l),p.sekEditorExpanded(!0),u(window).trigger("resize")};r&&(r.initialized?c():r.on("init",c),r.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(a()?r.getContent():wp.oldEditor.removep(r.getContent()))})),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(u(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(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{site_tmpl_picker:function(n){var o,i,r,s,a,l,c=this,d=m("[data-czrtype]",c.container),p={site_tmpl_id:"_no_site_tmpl_",site_tmpl_source:"user_tmpl",site_tmpl_title:""};c.container.one("site-tmpl-input-rendered",function(){_.czr_sektions.allSavedTemplates.bind(function(e){var t=c();if(r=m.extend(!0,{},f.isObject(t)?t:{}),f.isObject(r)&&!f.isArray(r)||(r=m.extend(!0,{},p)),s=r.site_tmpl_id,a=r.site_tmpl_source,l=r.site_tmpl_title,!f.isEmpty(s)&&f.isString(s)&&f.isObject(e)&&"user_tmpl"==a)if(e[s])try{u()}catch(e){_.errare("Error when printing template val",e)}else d.trigger("nb-set-site-tmpl",p)})});var u=function(i){i=m.extend({see_me:!1},i||{});var t=function(e,t){o='<span class="sek-current-site-tmpl">',"_no_site_tmpl_"===e||f.isEmpty(e)?(o+=sektionsLocalizedData.i18n["No template set."],c.container.removeClass("sek-has-site-tmpl"),c.container.removeClass("sek-site-tmpl-not-found")):"_tmpl_not_found_"===e||f.isEmpty(e)?(o+=sektionsLocalizedData.i18n["Template not found : reset or pick another one."],c.container.removeClass("sek-has-site-tmpl"),c.container.addClass("sek-site-tmpl-not-found")):(o+=sektionsLocalizedData.i18n["Active template : "]+(f.isEmpty(t)?e:t),c.container.addClass("sek-has-site-tmpl"),c.container.removeClass("sek-site-tmpl-not-found")),o+="</span>",c.container.find(".sek-current-site-tmpl").remove(),c.container.find(".czr-input").prepend(o),i.see_me&&"_no_site_tmpl_"!=e&&(c.container.addClass("button-see-me"),f.delay(function(){c.container.removeClass("button-see-me")},800)),c.container.trigger("site-tmpl-input-rendered")},e=c();r=m.extend(!0,{},f.isObject(e)?e:{}),f.isObject(r)&&!f.isArray(r)||(r=m.extend(!0,{},p)),s=r.site_tmpl_id,a=r.site_tmpl_source,l=r.site_tmpl_title,f.isString(s)&&!f.isEmpty(s)||(_.errare("printCurrentTemplateName : Error => site template must be a string"),s="_no_site_tmpl_"),"_no_site_tmpl_"===s?t(r.site_tmpl_id,l):(_tmpl_collection_promise="user_tmpl"===a?_.czr_sektions.setSavedTmplCollection:_.czr_sektions.getApiTmplCollection,_tmpl_collection_promise.call(_.czr_sektions).done(function(e){f.isObject(e)&&e[s]&&e[s].title?l=e[s].title:"user_tmpl"===a&&(_.errare("::printCurrentTemplateName => site template not found in collection => previously removed => id : "+s+" | source : "+a),s="_tmpl_not_found_"),t(s,l)}).fail(function(){_.errare("printCurrentTemplateName error when getting collection promise failed",n),_dfd_.resolve("")}))};c.container.on("click","[data-sek-group-scope]",function(e,t){e.stopPropagation();var i=m(this).data("sek-group-scope");f.isEmpty(i)?_.errare("site_tmpl_picker input => invalid scope provided.",i):c.container.hasClass("sek-site-tmpl-picking-active")?(_.czr_sektions._site_tmpl_scope=null,_.czr_sektions.templateGalleryExpanded(!1),m('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active")):(_.czr_sektions._site_tmpl_scope=c.id,_.czr_sektions.templateGalleryExpanded(!0),m('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active"),c.container.addClass("sek-site-tmpl-picking-active"))}),c.container.on("click",".sek-remove-site-tmpl",function(e,t){e.stopPropagation(),d.trigger("nb-set-site-tmpl",p)}),d.on("nb-set-site-tmpl",function(e,t){if(f.isObject(t))if(f.isUndefined(t.site_tmpl_id)||f.isUndefined(t.site_tmpl_source)||f.isUndefined(t.site_tmpl_title))_.errare("site_tmpl_picker => error => invalid args passed on tmpl pick",t);else{i=m.extend(!0,{},p),i=m.extend(i,t),c(i);try{u({see_me:!0})}catch(e){_.errare("Error when printing template val",e)}"_no_site_tmpl_"!==i.site_tmpl_id&&(_.czr_sektions.templateGalleryExpanded(!1),m('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active"))}else _.errare("site_tmpl_picker => error => wrong args on tmpl pick",t)});try{u()}catch(e){_.errare("Error when printing template val",e)}}})}(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_spacing_module_for_columns:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module_for_columns","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_for_columns"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_cust_css_level:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_cust_css_level","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_cust_css_level"))}})}(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(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 r=this;r.module;r.czr_Input.each(function(o){switch(o.id){case"use_current_query":n.each(["replace_query","post_number","posts_per_page","include_sticky","categories","must_have_all_cats","order_by"],function(t){i.czr_sektions.scheduleVisibilityOfInputId.call(o,t,function(){var e=!1;switch(_replace_query=r.czr_Input("replace_query")(),_display_pagination=r.czr_Input("display_pagination")(),t){case"replace_query":e=o();break;case"post_number":e=!o()&&!_display_pagination||o()&&_replace_query&&!_display_pagination;break;case"posts_per_page":e=!o()&&_display_pagination||o()&&_replace_query&&_display_pagination;break;case"include_sticky":case"categories":case"must_have_all_cats":case"order_by":e=!o()||o()&&r.czr_Input("replace_query")()}return e})});break;case"replace_query":n.each(["post_number","posts_per_page","include_sticky","categories","must_have_all_cats","order_by"],function(n){i.czr_sektions.scheduleVisibilityOfInputId.call(o,n,function(){var e=r.czr_Input("use_current_query")(),t=r.czr_Input("display_pagination")(),i=!1;switch(n){case"post_number":i=!e&&!t||o()&&!t;break;case"posts_per_page":i=!e&&t||o()&&t;break;case"include_sticky":case"categories":case"must_have_all_cats":case"order_by":i=!e||o()}return i})});break;case"layout":n.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){i.czr_sektions.scheduleVisibilityOfInputId.call(o,t,function(){var e=!1;switch(t){case"columns":e="grid"===o();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===o()}return e})});break;case"categories":n.each(["must_have_all_cats"],function(e){i.czr_sektions.scheduleVisibilityOfInputId.call(o,e,function(){var e=o();return n.isArray(e)&&1<e.length})});break;case"display_pagination":n.each(["posts_per_page","post_number"],function(n){i.czr_sektions.scheduleVisibilityOfInputId.call(o,n,function(){var e=r.czr_Input("replace_query")(),t=r.czr_Input("use_current_query")(),i=!1;switch(n){case"posts_per_page":i=o()&&!t||o()&&t&&e;break;case"post_number":i=!o()&&!t||!o()&&t&&e}return i})});break;case"custom_grid_spaces":n.each(["column_gap","row_gap"],function(e){i.czr_sektions.scheduleVisibilityOfInputId.call(o,e,function(){return o()})});break;case"show_excerpt":n.each(["excerpt_length"],function(e){i.czr_sektions.scheduleVisibilityOfInputId.call(o,e,function(){return o()})})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_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;n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":r.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){o.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})});break;case"img_has_custom_height":r.each(["img_height"],function(e){o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:o.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:o.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"),items_are_clonable:!0}})}(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),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},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"),items_are_clonable:!0}})}(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"),items_are_clonable:!0}})}(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,_),function(m,f,g){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=m.CZRItem.extend(i.CZRItemConstructor||{}),m.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return m.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&f.fn.sortable){var i=this;f("."+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(){g.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},getPreItem:function(){var e=m.czr_sektions.getRegisteredModuleProperty("czr_gallery_collection_child","starting_value"),t=f.extend(!0,{},this.preItem());if(g.isObject(e)){var i=f.extend(!0,{},e);return f.extend(t,i)}return this.preItem()},CZRItemConstructor:{ready:function(){var e=this;m.CZRItem.prototype.ready.call(e);var i=function(){m.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)},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="",s="",a="not_set",l=!g.isUndefined(t)&&g.isObject(t);if(!l||!t.input_changed||g.contains(["img"],t.input_changed)){if(g.isEmpty(o.title)){var c=g.findIndex(n.itemCollection(),function(e){return e.id===i.id});c=g.isUndefined(c)?1:c+1}else r=o.title;r=m.CZR_Helpers.truncate(r,25),o.img&&(s=o.img,g.isString(o.img)&&(s=-1!==o.img.indexOf("http")?o.img:parseInt(o.img,10)));var d=function(){return f.Deferred(function(){var e=this;g.isUndefined(s)||g.isEmpty(""+s)?e.resolve(""):g.isString(s)&&-1!==s.indexOf("http")?e.resolve(s):wp.media.attachment(s).fetch().always(function(){if(g.isObject(this)&&g.has(this,"attributes")&&g.has(this.attributes,"sizes")){var i=this.get("sizes");i&&g.isObject(i)&&g.each(["thumbnail","medium","large","full"],function(e,t){"not_set"===a&&i[e]&&g.isObject(i[e])&&i[e].url&&(a=i[e].url)}),e.resolve(a)}})}).promise()},p=f("."+n.control.css_attr.item_title,i.container).find(".sek-slide-thumb"),u=l&&t.input_changed&&"img"===t.input_changed,_=function(e){return g.isEmpty(""+e)||"not_set"===e?"":'<img src="'+e+'" width="32" alt="'+r+'" />'};f("."+n.control.css_attr.item_title,i.container).css("padding","0 4px"),p.length<1?d().done(function(e){f("."+n.control.css_attr.item_title,i.container).prepend(f("<div/>",{class:"sek-slide-thumb",html:_(e)}))}):!u&&l||d().done(function(e){p.html(_(e))})}},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=g.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=g.without(n,g.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=f.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=m(i.control.id).transport||!g.has(e,"dom_event")||g.has(e.dom_event,"isTrigger")||m.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){m.previewer.unbind("ready",r),i.trigger("item-removed",o)};m.previewer.bind("ready",r)}}}};m.czrModuleMap=m.czrModuleMap||{},f.extend(m.czrModuleMap,{czr_gallery_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:m.czr_sektions.getRegisteredModuleProperty("czr_gallery_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:m.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_gallery_collection_child"),items_are_clonable:!0}})}(wp.customize,jQuery,_),function(s,e,i){var t={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)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var r=this;r.module;r.czr_Input.each(function(o){switch(o.id){case"link-to":i.each(["link-target"],function(t){s.czr_sektions.scheduleVisibilityOfInputId.call(o,t,function(){var e=!1;switch(t){case"link-target":e=!i.contains(["no-link","img-lightbox"],o())}return e})});break;case"custom-rows-columns":i.each(["column_width","raw_height"],function(n){s.czr_sektions.scheduleVisibilityOfInputId.call(o,n,function(){var e=r.czr_Input.has("masonry_on")&&r.czr_Input("masonry_on")(),t=r.czr_Input.has("auto_fill")&&r.czr_Input("auto_fill")(),i=!1;switch(n){case"column_width":i=o()&&!e&&!t;break;case"raw_height":i=o()&&!e}return i})})}})}}};s.czrModuleMap=s.czrModuleMap||{},e.extend(s.czrModuleMap,{czr_gallery_opts_child:{mthds:t,crud:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_gallery_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_gallery_opts_child")}})}(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,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.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(),inherit_group_template:!0})});var t=function(){_.isArray(r.czrActiveWPEditors)&&(_.each(r.czrActiveWPEditors,function(e){wp.oldEditor.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"})}))})}),r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0,e.expanded.bind(function(){o.templateGalleryExpanded&&o.templateGalleryExpanded(!1)}))}),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(),r.previewer.bind("czr-new-skopes-synced",function(e){var t=r.czr_skopeBase.getSkopeProperty("sektions","local");sektionsLocalizedData.isDevMode&&r.infoLog("::czr-new-skopes-synced => SEKTIONS DATA ? ",t),_.isEmpty(t)&&r.errare("::czr-new-skopes-synced => no sektionsData"),_.isEmpty(t.setting_id)&&r.errare("::czr-new-skopes-synced => missing setting_id")})},registerAndSetupDefaultPanelSectionOptions:function(){var n=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:n.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(n.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>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.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(n.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>'),n.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:"section",id:n.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(n.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})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&(!_.isUndefined(r._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate)&&r._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate||r.previewer.trigger("sek-pick-content")),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&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(d,p){p.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new d.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new d.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)),d.previewer.bind("ready",function(){p(d.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?p.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){i.cachedElements.$body.addClass("nimble-top-bar-visible")},200)}):(t=p.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,c=this;if(0<p(c.topBarId).length)return p(c.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return d.errare("Error when parsing the the top note template",e),!1}p("#customize-preview").after(p(t)),p("#customize-preview").trigger("nimble-top-bar-rendered"),p(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{c.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){d.errare("Error when firing self.navigateHistory",e)}}),p(".sek-add-content",c.topBarId).on("click",function(e){e.preventDefault(),d.previewer.trigger("sek-pick-content",{content_type:"module"})}),p(".sek-level-tree",c.topBarId).on("click",function(e){e.preventDefault(),c.levelTreeExpanded(!c.levelTreeExpanded())}),p("[data-nimble-history]",c.topBarId).on("click",function(e){try{c.navigateHistory(p(this).data("nimble-history"))}catch(e){d.errare("Error when firing self.navigateHistory",e)}}),p(".sek-settings",c.topBarId).on("click",function(e){d.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.rootPanelFocus(),e.focus()})}),p(".sek-nimble-doc, .sek-notifications",c.topBarId).on("click",function(e){e.preventDefault(),p(this).data("doc-href")&&window.open(p(this).data("doc-href"),"_blank")}),p(".sek-tmpl-saving",c.topBarId).on("click",function(e){e.preventDefault(),c.tmplDialogVisible(!c.tmplDialogVisible())}),p(c.topBarId).on("click",".sek-reset-local-sektions",function(e){d.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.rootPanelFocus(),e.focus(),d.section(c.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.focus(),setTimeout(function(){d.control(c.getLocalSkopeOptionId()+"__local_reset",function(e){e.focus(),e.container.find(".customize-control-title").trigger("click"),e.container.addClass("button-see-me"),_.delay(function(){e.container.removeClass("button-see-me")},800)})},500)})})}),p(c.topBarId).on("click",".sek-goto-site-tmpl-options",function(e){d.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.rootPanelFocus(),e.focus(),d.section(c.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){e.focus(),setTimeout(function(){d.control(sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForGlobalOptions+"__site_templates",function(e){e.focus(),e.container.find(".customize-control-title").trigger("click")})},500)})})});var i=function(e){if(!(p(c.topBarId).length<1||sektionsLocalizedData.isDebugMode)){var t=!1;t=e&&e.on_init?d.czr_skopeBase.getSkopeProperty("has_local_nimble_customizations","local"):(!e||!e.after_reset)&&c.hasLocalSettingBeenCustomized();var i,n=c.getGroupSkopeForSiteTemplate(),o=!1,r=d(sektionsLocalizedData.optNameForGlobalOptions)(),s=!0,a=d(c.localSectionsSettingId())().local_options;a&&_.isObject(a)&&a.local_reset&&!_.isUndefined(a.local_reset.inherit_group_scope)&&(s=a.local_reset.inherit_group_scope),_.isObject(r)&&r.site_templates&&_.isObject(r.site_templates)&&_.each(r.site_templates,function(e,t){o||(o=n===t)}),i=o&&!t&&s;var l=sektionsLocalizedData.i18n["This page is not customized with NB"];i?l='<span class="sek-goto-site-tmpl-options">'+sektionsLocalizedData.i18n["This page inherits a NB site template"]+"</span>":t&&(l=sektionsLocalizedData.i18n["This page is customized with NB"],l+='<button type="button" class="far fa-trash-alt sek-reset-local-sektions" title="'+sektionsLocalizedData.i18n["Remove all sections and options of this page"]+'" data-nimble-state="enabled"><span class="screen-reader-text">'+sektionsLocalizedData.i18n["Remove all sections and options of this page"]+"</span></button>"),p(c.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',l].join(" "))}};d.bind("nimble-update-topbar-skope-status",i);var n=function(){d(c.localSectionsSettingId(),function(e){i({on_init:!0})})};return n(),d.bind("nimble-ready-for-current-skope",function(){n()}),p(c.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_and_controls_first:!0})),_.isEmpty(r.global)||c(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});c.previewer.refresh(),c.previewer.trigger("sek-pick-content",{}),e.cleanRegisteredAndLargeSelectInput(),e.cleanRegisteredLevelSettings()}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,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var t,i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(e){i.levelTreeExpanded()&&i.renderOrRefreshTree()});var n=function(e){try{t=JSON.stringify(e)}catch(e){b.errorLog("::setupLevelTree => error when JSON.stringify Level Tree")}_.isString(t)&&(-1!==t.indexOf("__nimble__")?z(".sek-level-tree button",i.topBarId).css("color","#46d2ff"):z(".sek-level-tree button",i.topBarId).css("color",""))};i.levelTree.bind(_.debounce(function(e){n(e)},1e3)),z("#customize-preview").one("nimble-top-bar-rendered",function(){n(i.setLevelTreeValue())}),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);z("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<z("#nimble-level-tree").length&&_.delay(function(){z("#nimble-level-tree").remove(),z("#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=z(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=z(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)?z.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(s)(),t=_.isObject(t)?t:{},n=z.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=z.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=[];return _.isEmpty(k)?y=g:_.each(k,function(e){v=_.findWhere(g,{id:e}),_.isUndefined(v)||y.push(v)}),this.levelTree(y),y}b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(z("#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}z("#customize-preview").after(z(e))}z("#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,t){var i=r.Deferred();return wp.ajax.post("sek_get_api_tmpl_json",{nonce:o.settings.nonce.save,api_tmpl_name:e,api_tmpl_is_pro:t?"yes":"no"}).done(function(e){i.resolve({success:!0,tmpl_json:e})}).fail(function(e){i.resolve({success:!1}),o.errorLog("ajax getTmplJsonFromApiTmpl => error",e);var t="Error when fetching the template";_.isString(e)&&!_.isEmpty(e)&&(t=e),o.previewer.trigger("sek-notify",{type:"error",duration:6e4,is_pro_notif:!0,notif_id:"pro_tmpl_error",message:['<span style="font-size:0.95em">',"<strong>"+t+"</strong>","</span>"].join("")})}),i},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",tmpl_is_pro:!1},t||{})).tmpl_name;return!_.isEmpty(n)&&_.isString(n)||o.errare("::tmpl inject => error => invalid template name"),(e="api_tmpl"===t.tmpl_source?i.getTmplJsonFromApi(n,t.tmpl_is_pro):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,tmpl_is_pro:t.tmpl_is_pro}):o.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}).fail(function(){o.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}),_.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),e},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.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(){var e=function(){o.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings_and_controls_first:!0}),o.previewer.unbind("czr-new-skopes-synced",e)};o.previewer.bind("czr-new-skopes-synced",e),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,d){d.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(i){var n,r=this;i=i||{dirty:!1,is_group_inheritance_enabled:!0};var e={local:{collectionSettingId:r.localSectionsSettingId()},global:{collectionSettingId:r.getGlobalSectionsSettingId()}};_.each(e,function(e,o){if(n=c.czr_skopeBase.getSkopeProperty("sektions",o).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){var t=_.isObject(n)?n:r.getDefaultSektionSettingValue(o);"local"!=o||i.is_group_inheritance_enabled||(t.local_options.local_reset=_.isObject(t.local_options.local_reset)?t.local_options.local_reset:{},t.local_options.local_reset.inherit_group_scope=!1);c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:r.validateSettingValue(t,o),transport:"postMessage",type:"option",track:!1,origin:"nimble",dirty:i.dirty});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{r.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}"local"===o&&c.trigger("nimble-update-topbar-skope-status")},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=["collection","local_options","fonts","__inherits_group_skope_tmpl_when_exists__"],a=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},l=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=d.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void a("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void a('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(s,t))return void a("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void a("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,l(e)})}}else{if(_.isUndefined(t)||!_.isObject(t))return void a("validation error => a level is invalid");if(_.isEmpty(t.id)||!_.isString(t.id))return void a("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void a("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void a("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void a('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void a("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void a("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 a("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 a("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void a("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void a("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void a("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=d.extend(!0,{},t),_.isUndefined(e)?a("validation error => undefined level "):l(e)})}};return l(),r?(c.infoLog("error in ::validateSettingValue",i),null):i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e,t){var i;if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);var n=!0;return"local"===e&&t&&_.isObject(t)&&t.local_reset&&!_.isUndefined(t.local_reset.inherit_group_scope)&&(n=t.local_reset.inherit_group_scope),i=d.extend(!0,{},this.getDefaultSektionSettingValue(e)),n||(i.local_options.local_reset={inherit_group_scope:!1}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,o){o.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var r=this,s={},a={},l=!0,e={"sek-add-section":{callback:function(e){return c.previewedDevice("desktop"),l=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},s={action:"sek-add-section",id:sektionsLocalizedData.prefixForSettingsNotSaved+r.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},r.updateAPISetting(s)},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 l=!0,a={},s={id:sektionsLocalizedData.prefixForSettingsNotSaved+r.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},r.updateAPISetting(s)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return l=!0,a={},s={id:sektionsLocalizedData.prefixForSettingsNotSaved+r.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},r.updateAPISetting(s)},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}),r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.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(l=!0,a={},e.level){case"section":var t=r.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}s={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":s={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":s={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 r.updateAPISetting(s)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(e.apiParams)}),"sek-remove-section"===e.apiParams.action){var t=r.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(l=!0,a={},e.level){case"section":s={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":s={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":s={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 r.updateAPISetting(s)},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 l=!1,a={},s={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},r.updateAPISetting(s)},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 l=!1,a={},s={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},r.updateAPISetting(s)},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(l=!0,a={},e.level){case"section":s={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":s={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":s={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return r.updateAPISetting(s)},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 l=!0,a={},s=e,r.updateAPISetting(s)},"sek-add-content-in-new-sektion":{callback:function(e){switch(l=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(s=e).action="sek-add-content-in-new-sektion",s.id=sektionsLocalizedData.prefixForSettingsNotSaved+r.guid(),e.content_type){case"module":s.droppedModuleId=sektionsLocalizedData.prefixForSettingsNotSaved+r.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 r.updateAPISetting(s)},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})}r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.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:r.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 l=!1,a={},(s=e).action="sek-add-preset-section-in-new-nested-sektion",c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),r.updateAPISetting(s)},complete:function(e){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.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&&r.lastClickedTargetInPreview({id:e.id}),l=!0,s={},a={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},r.generateUI(a)},"sek-edit-options":function(e){return l=!0,s={},_.isEmpty(e.id)?o.Deferred(function(){this.reject("missing id")}):(a={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||[]},r.generateUI(a))},"sek-edit-module":function(e){return l=!0,s={},a={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},r.generateUI(a)},"sek-notify":function(i){l=!1;var n=i.notif_id||"sek-notify";return i.button_see_me=!!_.isUndefined(i.button_see_me)||i.button_see_me,r.lastNimbleNotificationId&&c.notifications.remove(r.lastNimbleNotificationId),o.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(n,{type:i.type||"info",message:i.message,dismissible:!0})),r.lastNimbleNotificationId=n;var t=function(){i.is_pro_notif&&c.notifications(n).container.css("background","#ffff88"),i.button_see_me&&(c.notifications(n).container.addClass("button-see-me-twice"),_.delay(function(){c.notifications.container.removeClass("button-see-me-twice")},2e3)),c.notifications.unbind("rendered",t)};c.notifications.has(n)&&c.notifications.bind("rendered",t),_.delay(function(){c.notifications.remove(n)},i.duration||5e3)}),this.resolve({is_global_location:r.isGlobalLocation(i)})})},"sek-refresh-level":function(t){return l=!0,o.Deferred(function(e){s={action:"sek-refresh-level",level:t.level,id:t.id,original_action:t.original_action,moved_level_id:t.moved_level_id},a={},e.resolve({is_global_location:r.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return l=!0,t=t||{},o.Deferred(function(e){s={id:t.id},a={},e.resolve({is_global_location:r.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return l=!1,r.idOfSectionToSave=t.id,r.saveSectionDialogVisible(!0),o.Deferred(function(e){s={},a={},e.resolve({is_global_location:r.isGlobalLocation(t)})})},"sek-reset-collection":{callback:function(t){return l=!1,a={},(s=t).action="sek-reset-collection",s.scope=t.scope,r.updateAPISetting(s).done(function(e){if(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("")}),"local"===t.scope){var i=function(){var e=!0,t=c(r.localSectionsSettingId())().local_options;t&&_.isObject(t)&&t.local_reset&&!_.isUndefined(t.local_reset.inherit_group_scope)&&(e=t.local_reset.inherit_group_scope),r.cleanRegisteredLevelSettings(),c.remove(r.localSectionsSettingId());try{r.setupSettingsToBeSaved({dirty:!0,is_group_inheritance_enabled:e})}catch(e){c.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}c.trigger("nimble-update-topbar-skope-status",{after_reset:!0}),r.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings_and_controls_first:!0}),c.previewer.unbind("czr-new-skopes-synced",i)};c.previewer.bind("czr-new-skopes-synced",i)}}).fail(function(e){c.errare("reset_button input => error when firing ::updateAPISetting",e),c.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("")})})},complete:function(e){}}};_.each(e,function(t,o){c.previewer.bind(o,function(n){var e;if(_.isFunction(t))e=t;else{if(!_.isFunction(t.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+o);e=t.callback}"sek-notify"!==o&&(r.templateGalleryExpanded(!1),r.tmplDialogVisible(!1));try{e(n).done(function(e){if(e=e||{},l){var t={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:s,uiParams:a,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId},i=!1;try{JSON.stringify(t)}catch(e){c.errare("JSON.stringify problem when executing the callback of "+o,t),i=!0}i||c.previewer.send(o,t)}else c.previewer.trigger([o,"done"].join("_"),{apiParams:s,uiParams:a});r.trigger([o,"done"].join("_"),n)}).fail(function(e){c.errare("reactToPreviewMsg => problem or error when running action "+o,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 "+o,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=o.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(y,b){b.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=b.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){y.errare("::generateUI() => error",e),i=b.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=b.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforDraggableContent(e,i)}catch(e){y.errare("::generateUI() => error",e),i=b.Deferred()}y.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){y.errare("::generateUI() => error",e),i=b.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegisteredAndLargeSelectInput();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=b.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(r){if(!_.isEmpty(r.settingParams)&&_.has(r.settingParams,"to")){var o,s=this,e=r.settingParams.to,t=null,a=!1;if(!_.isEmpty(r.settingParams.args)&&_.has(r.settingParams.args,"moduleRegistrationParams")){var l=r.settingParams.args.moduleRegistrationParams.control,i=r.settingParams.args.moduleRegistrationParams.id,n=l.czr_Module(i);if(_.isEmpty(n)?y.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",r):(t=n.module_type,a=n.isMultiItem()),!a&&_.isObject(e)?o=s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!1}):(o=[],_.each(e,function(e){o.push(s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!0}))})),_.isEmpty(r.defaultPreviewAction))y.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",r);else{var c,d="refresh_stylesheet"===r.defaultPreviewAction,p="refresh_markup"===r.defaultPreviewAction,u="refresh_fonts"===r.defaultPreviewAction,m="refresh_preview"===r.defaultPreviewAction,f=!1,g=r.settingParams.args.input_changed,h=function(){return c&&_.isString(c.refresh_markup)&&"true"!==c.refresh_markup&&"false"!==c.refresh_markup};_.isUndefined(g)||(c=s.getInputRegistrationParams(g,t),_.isUndefined(c.refresh_stylesheet)||(d=Boolean(c.refresh_stylesheet)),_.isUndefined(c.refresh_markup)||(p=h()?c.refresh_markup:Boolean(c.refresh_markup)),_.isUndefined(c.refresh_fonts)||(u=Boolean(c.refresh_fonts)),_.isUndefined(c.refresh_preview)||(m=Boolean(c.refresh_preview)),_.isUndefined(c.refresh_css_via_post_message)||(f=Boolean(c.refresh_css_via_post_message)));var v=function(){if(!0!==r.isGlobalOptions)return s.updateAPISetting({action:r.uiParams.action,id:r.uiParams.id,value:o,in_column:r.uiParams.in_column,in_sektion:r.uiParams.in_sektion,options_type:r.options_type,settingParams:r.settingParams}).done(function(e){var t;!0===d&&y.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:r.uiParams.id,level:r.uiParams.level}}),a&&r.settingParams.args.inputRegistrationParams&&_.isFunction(r.settingParams.args.inputRegistrationParams.input_parent)&&(t=r.settingParams.args.inputRegistrationParams.input_parent.id);var i=function(){y.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:r.uiParams.id,level:r.uiParams.level,changed_item_id:t,control_id:l.id,is_multi_items:a},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===p&&i(),h()){var n=r.settingParams.args.input_value;if(!_.isString(n))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");s.htmlIncludesElementsThatNeedAnAjaxRefresh(n)?i():y.previewer.send("sek-update-html-in-selector",{selector:c.refresh_markup,changed_item_id:t,is_multi_items:a,html:n,id:r.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:r.uiParams.id,level:r.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}if(!0===f){var o=r.settingParams.args.input_value;if(!_.isString(o))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refresh css with post message => css content is not a string.");y.previewer.send("sek-update-css-with-postmessage",{changed_item_id:t,is_multi_items:a,css_content:o,id:r.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-css-with-postmessage",id:r.uiParams.id,level:r.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),is_current_page_custom_css:"local_custom_css"===g})}!0===m&&y.previewer.refresh()}).fail(function(e){y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated",e),y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ",r)});if(_.isEmpty(r.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(sektionsLocalizedData.optNameForGlobalOptions)(),t=b.extend(!0,{},_.isObject(e)?e:{}),i={};if(_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[r.options_type]=i,y(sektionsLocalizedData.optNameForGlobalOptions)(t),!1!==m&&y.previewer.refresh(),!0===u){var n=r.settingParams.args.input_value;if(!_.isString(n))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",n);s.updateGlobalGFonts(n)}!0===d&&y.previewer.send("sek-refresh-stylesheet",{local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),location_skope_id:sektionsLocalizedData.globalSkopeId})}};if(!0===u){var k=r.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);!0===r.isGlobalOptions?v():s.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:s.isGlobalLocation(r.uiParams)}).always(function(){v().then(function(){s.updateAPISetting({action:"sek-update-fonts",is_global_location:s.isGlobalLocation(r.uiParams)})})})}else v()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",r)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",r)},updateGlobalGFonts:function(e){var t=y(sektionsLocalizedData.optNameForGlobalOptions)(),i=b.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,y(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))&&y.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=y.control.has(t):(i=!0,1<e.length&&y.errare("isUIControlAlreadyRegistered => why is this control registered more than once ? => "+t)),i},htmlIncludesElementsThatNeedAnAjaxRefresh:function(e){if(!_.isString(e))return!1;var t=(e=e.replace(/\s+/g,"")).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:!1}}),_.each(["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_post_grids_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>',is_new:"sek_post_grids_sec_picker_module"===e}});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.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(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:"column"===s.level?"sek_level_spacing_module_for_columns":"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>'}})),"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>'}}),(sektionsLocalizedData.isUpsellEnabled||sektionsLocalizedData.isPro)&&d.extend(t,{level_cust_css:{settingControlId:s.id+"__level_custom_css",module_type:"sek_level_cust_css_level",controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>',isPro:!0}});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.cleanRegisteredAndLargeSelectInput(),_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("::_do_register_ => 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&&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_and_controls_first&&a.cleanRegisteredLocalOptionSettingsAndControls(),_.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["Remove all sections and options of this page"],icon:'<i class="material-icons sek-level-option-icon">delete</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.control.has(n.settingControlId)||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},track:!0}).done(function(){c.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title").first(),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(d,p){p.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(a,e){var l=this,i=sektionsLocalizedData.prefixForSettingsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(l.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return d.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"site_templates":n[t]={settingControlId:i+"__site_templates",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site templates"],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"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"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["Remove the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">delete</i>'};break;case"beta_features":break;default:d.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("site_templates"===o)var r=function(){d.trigger("nimble-update-topbar-skope-status"),d.previewer.trigger("sek-notify",{type:"info",duration:2e4,message:['<span style="">',sektionsLocalizedData.i18n["Refreshed to home page : site templates must be set when previewing home"],"</span>"].join("")}),d.previewer.unbind("czr-new-skopes-synced",r),setTimeout(function(){d._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate=!1},1e3)};if(!d.has(n.settingControlId)){var t=function(e,t,i){try{l.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){"site_templates"===o&&e.bind(function(e){d._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate=!0,d.previewer.bind("czr-new-skopes-synced",r),d.previewer.previewUrl(d.settings.url.home),d.trigger("nimble-update-topbar-skope-status")}),e.bind(_.debounce(t,l.SETTING_UPDATE_BUFFER))});var e=l.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var s=p.extend(!0,{},e);i=p.extend(s,i)}d.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:l.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){d.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"),"site_templates"===o&&e.container.one("click",".customize-control-title",function(){d._nimbleRefreshingPreviewHomeWhenSettingSiteTemplate=!0,d.previewer.bind("czr-new-skopes-synced",r),d.previewer.previewUrl(d.settings.url.home),d.trigger("nimble-update-topbar-skope-status")})})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(g,h){h.extend(CZRSeksPrototype,{updateAPISetting:function(p){var u=this;(p=p||{}).is_global_location="global"===p.scope||u.isGlobalLocation(p);var m=p.is_global_location?u.getGlobalSectionsSettingId():u.localSectionsSettingId(),f=g(m)();u.updAPISetParams={params:p,promise:h.Deferred(),newSetValue:_.isObject(f)?h.extend(!0,{},f):u.getDefaultSektionSettingValue(p.is_global_location?"global":"local"),cloneId:"",sectionInjectPromise:"_not_injection_scenario_"};return g(m,function(e){!function(){switch(u.updAPISetParams.newSetValue.collection=_.isArray(u.updAPISetParams.newSetValue.collection)?u.updAPISetParams.newSetValue.collection:u.getDefaultSektionSettingValue(p.is_global_location?"global":"local").collection,p.action){case"sek-maybe-add-missing-locations":var t,i,e=u.activeLocations();h.extend(!0,[],u.updAPISetParams.newSetValue.collection),_.each(e,function(e){t=_.findWhere(u.updAPISetParams.newSetValue.collection,{id:e}),_.isUndefined(t)&&((i=h.extend(!0,{},sektionsLocalizedData.defaultLocationModel)).id=e,g.infoLog("=> need to add missing location to api setting value",i),u.updAPISetParams.newSetValue.collection.push(i))});break;case"sek-add-section":u._updAPISet_sek_add_sektion();break;case"sek-duplicate-section":u._updAPISet_sek_duplicate_sektion();break;case"sek-remove-section":u._updAPISet_sek_remove_sektion();break;case"sek-move-section":u._updAPISet_sek_move_sektion();break;case"sek-move-section-up-down":u._updAPISet_sek_move_sektion_up_down();break;case"sek-add-column":u._updAPISet_sek_add_column();break;case"sek-remove-column":u._updAPISet_sek_remove_column();break;case"sek-duplicate-column":u._updAPISet_sek_duplicate_column();break;case"sek-resize-columns":u._updAPISet_sek_resize_column();break;case"sek-move-column":u._updAPISet_sek_move_column();break;case"sek-add-module":u._updAPISet_sek_add_module();break;case"sek-duplicate-module":u._updAPISet_sek_duplicate_module();break;case"sek-remove-module":u._updAPISet_sek_remove_module();break;case"sek-move-module":u._updAPISet_sek_move_module();break;case"sek-set-module-value":u._updAPISet_sek_set_module_value();break;case"sek-add-content-in-new-sektion":u._updAPISet_sek_add_content_in_new_sektion();break;case"sek-add-preset-section-in-new-nested-sektion":u._updAPISet_sek_add_preset_sektion_in_new_nested_sektion();break;case"sek-import-from-file":u._updAPISet_sek_import_from_file();break;case"sek-inject-tmpl-from-gallery":u._updAPISet_sek_inject_tmpl_from_gallery();break;case"sek-generate-level-options-ui":var n=u.getLevelModel(p.id,u.updAPISetParams.newSetValue.collection),o={};if("no_match"===n){g.errare("updateAPISetting => "+p.action+" => no parent sektion matched"),u.updAPISetParams.promise.reject("updateAPISetting => "+p.action+" => no parent sektion matched");break}var r=h.extend(!0,{},n.options||{});_.each(p.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(p.options_type)&&g.errare("updateAPISetting => "+p.action+" => missing options_type"),r[p.options_type]=o,n.options=r;break;case"sek-generate-local-skope-options-ui":o={};var s=h.extend(!0,{},_.isObject(u.updAPISetParams.newSetValue.local_options)?u.updAPISetParams.newSetValue.local_options:{});if(_.each(p.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(o[t]=e)}),_.isEmpty(p.options_type)||!_.isString(p.options_type))g.errare("updateAPISetting => "+p.action+" => missing options_type");else{var a={};a[p.options_type]=o,u.updAPISetParams.newSetValue.local_options=h.extend(s,a)}break;case"sek-update-fonts":var l=u.sniffGFonts({is_global_location:p&&!0===p.is_global_location});!_.isEmpty(p.font_family)&&_.isString(p.font_family)&&-1<p.font_family.indexOf("gfont")&&!_.contains(l,p.font_family)&&l.push(p.font_family),u.updAPISetParams.newSetValue.fonts=l;break;case"sek-restore-revision":u.updAPISetParams.newSetValue=p.revision_value;break;case"sek-reset-collection":var c;"local"===p.scope&&(c=h.extend(!0,{},_.isObject(u.updAPISetParams.newSetValue.local_options)?u.updAPISetParams.newSetValue.local_options:{}));try{u.updAPISetParams.newSetValue=g.czr_sektions.resetCollectionSetting(p.scope,c)}catch(e){g.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==u.updAPISetParams.promise.state()){var d=function(){var e=p.settingParams&&p.settingParams.from&&p.settingParams.to;if(e&&_.isEqual(p.settingParams.from,p.settingParams.to))u.updAPISetParams.promise.reject("updateAPISetting => main sektion setting change => the new setting value is unchanged when firing action : "+p.action);else if(!e&&_.isEqual(f,u.updAPISetParams.newSetValue))u.updAPISetParams.promise.reject("updateAPISetting => the new setting value is unchanged when firing action : "+p.action);else{var t=u.validateSettingValue(u.updAPISetParams.newSetValue,p.is_global_location?"global":"local");if(null===t||_.isUndefined(t))u.updAPISetParams.promise.reject("Validation problem for action "+p.action);else{if(!p.is_global_location){var i=!0,n=u.updAPISetParams.newSetValue;n.local_options&&n.local_options.local_reset&&!_.isUndefined(n.local_options.local_reset.inherit_group_scope)&&(i=n.local_options.local_reset.inherit_group_scope),u.updAPISetParams.newSetValue.__inherits_group_skope_tmpl_when_exists__="sek-reset-collection"===p.action&&i}g(m)(u.updAPISetParams.newSetValue,p),p.is_global_location||g.trigger("nimble-update-topbar-skope-status"),p.cloneId=u.updAPISetParams.cloneId,u.updAPISetParams.promise.resolve(p)}}};"_not_injection_scenario_"===u.updAPISetParams.sectionInjectPromise?(d(),"pending"===u.updAPISetParams.promise.state()&&g.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")):u.updAPISetParams.sectionInjectPromise.done(function(){d(),"pending"===u.updAPISetParams.promise.state()&&g.errare("::updateAPISetting => The self.updAPISetParams.promise has not been resolved properly.")}).fail(function(e){g.errare("updateAPISetting => self.updAPISetParams.sectionInjectPromise failed",e)})}}()}),u.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=""})},_getApiSingleSectionData:function(t){var e,i=h.Deferred();return _.isEmpty(g.nimble_ApiSections[t])?(_.isUndefined(g.nimble_fetchingApiSection)||"pending"!=g.nimble_fetchingApiSection.state()?(e=wp.ajax.post("sek_get_single_api_section_data",{nonce:g.settings.nonce.save,api_section_id:t}),g.nimble_fetchingApiSection=e):e=g.nimble_fetchingApiSection,e.done(function(e){g.nimble_ApiSections[t]=e,i.resolve(e)}).fail(function(e){g.errorLog("ajax sek_get_single_api_section_data => error",e);var t="Error when fetching the section";_.isString(e)&&!_.isEmpty(e)&&(t=e),g.previewer.trigger("sek-notify",{type:"error",duration:6e4,is_pro_notif:!0,notif_id:"pro_section_error",message:['<span style="font-size:0.95em">',"<strong>"+t+"</strong>","</span>"].join("")})})):i.resolve(g.nimble_ApiSections[t]),i.promise()},getPresetSectionCollectionData:function(i){var n=this,o=h.Deferred();if(i.is_user_section)wp.ajax.post("sek_get_user_section_json",{nonce:g.settings.nonce.save,section_post_name:i.presetSectionId}).done(function(e){if(!_.isObject(e)||_.isEmpty(e)||_.isUndefined(e.data))throw g.errare("getPresetSectionCollectionData => preset section type not found or empty : "+i.presetSectionId,e),new Error("getPresetSectionCollectionData => preset section type not found or empty");var t=h.extend({},!0,e.data);t.id=sektionsLocalizedData.prefixForSettingsNotSaved+n.guid(),t.collection=n.setPresetOrUserSectionIds(t.collection),t.ver_ini=sektionsLocalizedData.nimbleVersion,t.collection=n.setPresetSectionVersion(t.collection),o.resolve(t)}).fail(function(e){o.reject(e)});else{g.nimble_ApiSections=g.nimble_ApiSections||{};var e=function(e){if(_.isEmpty(e)||!_.isObject(e))throw new Error("getPresetSectionCollectionData => Invalid collection");var t=h.extend(!0,{},e);t.collection=n.setPresetOrUserSectionIds(t.collection),t.ver_ini=sektionsLocalizedData.nimbleVersion,t.collection=n.setPresetSectionVersion(t.collection),o.resolve(t)};switch(i.presetSectionId){case"two_columns":e(JSON.parse('{"collection":[{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]}]}'));break;case"three_columns":e(JSON.parse('{"collection":[{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]}]}'));break;case"four_columns":e(JSON.parse('{"collection":[{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]},{"id":"","level":"column","collection":[]}]}'));break;default:n._getApiSingleSectionData(i.presetSectionId).fail(function(e){o.reject(e)}).done(e)}}return o.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=h.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.getPresetSectionCollectionData({is_user_section:r.is_user_section,presetSectionId:r.content_id}).fail(function(e){c.errare("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollectionData()",e),l.updAPISetParams.promise.reject("updateAPISetting => "+r.action+" => Error with self.getPresetSectionCollectionData()")}).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.getPresetSectionCollectionData({is_user_section:n.is_user_section,presetSectionId:n.content_id}).fail(function(){c.errare("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollectionData()",_er_),r.updAPISetParams.promise.reject("updateAPISetting => "+n.action+" => Error with self.getPresetSectionCollectionData()")}).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 e=n.imported_content.metas.active_locations,t=m.czr_sektions.activeLocations(),r=[];_.each(t,function(e){o.isHeaderLocation(e)||o.isFooterLocation(e)||r.push(e)});var s=_.first(r);if(!_.isEmpty(s)&&!_.isEmpty(e)&&_.isArray(e)){var a=f(e).not(r).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(I,w){w.extend(CZRSeksPrototype,{_updAPISet_sek_inject_tmpl_from_gallery:function(){var t,i=this;if(t=i.updAPISetParams.params,_.isUndefined(t.injected_content.data)||_.isUndefined(t.injected_content.metas))I.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(I.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){I.errare("updateAPISetting::sek-inject-tmpl-from-gallery => target location id is empty");break}if("no_match"===(u=i.getLevelModel(v,g))){I.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 I.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):I.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):I.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){I.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 I.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):I.errare("::_updAPISet_sek_inject_tmpl_from_gallery => error => location id not found"+e))}),"__not_set__"===v){I.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 I.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 z=i.updAPISetParams.newSetValue.fonts;z=w.extend(!0,[],_.isArray(z)?z:[]),i.updAPISetParams.newSetValue.fonts=_.uniq(_.union(d,z))}else i.updAPISetParams.newSetValue.fonts=d}else I.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)})},cleanRegisteredLocalOptionSettingsAndControls: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)&&n.control.has(e.id)&&o.when(n.control(e.id).container.remove()).done(function(){n.control.remove(e.id)}),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettings: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(),p.czr_sektions.levelTreeExpanded(!1),p.czr_sektions.templateGalleryExpanded(!1),p.czr_sektions.saveSectionDialogVisible(!1),p.czr_sektions.tmplDialogVisible(!1),p.czr_sektions.tmplInjectDialogVisible(!1);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;_.isFunction(i)&&!_.isEmpty(t)?n.czr_Input.has(t)?(n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})):p.errare("::scheduleVisibilityOfInputId => missing input id : "+t):p.errare("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id)},hasCurrentPageNBSectionsNotHeaderFooter:function(){var e,t=this,i=!1,n=this.localSectionsSettingId(),o=p(n)();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},hasLocalSettingBeenCustomized:function(){var e=this.localSectionsSettingId(),t=p(e)();return!((t=_.isObject(t)?t:{})&&t.__inherits_group_skope_tmpl_when_exists__)},getGroupSkopeForSiteTemplate:function(){var e,t,i=p.czr_skopeBase.getSkopeProperty("skope_id","group");if("_skope_not_set_"===i){e=p.czr_skopeBase.getSkopeProperty("skope_id","local"),t=e,(FlatSkopeLocalizedData&&_.isArray(FlatSkopeLocalizedData.noGroupSkopeList)?(t=(t=_.isString(e)?e:"_skope_not_set_").replace("skp__",""),_.contains(FlatSkopeLocalizedData.noGroupSkopeList,t)):(p.errare(":getGroupSkopeForSiteTemplate => missing localized data FlatSkopeLocalizedData.noGroupSkopeList"),0))?i=e+"_for_site_tmpl":p.errare("::getGroupSkopeForSiteTemplate => group skope could not be set")}return 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)})}),e.find('[draggable="false"][data-sek-is-pro-section="yes"], [draggable="false"][data-sek-is-pro-module="yes"]').each(function(){m(this).on("mousedown",function(e){n.lastClickedTargetInPreview({}),c.previewer.trigger("sek-notify",{type:"info",duration:6e4,notif_id:"go_pro",message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Go pro link when click on pro tmpl or section"]+"</strong>","</span>"].join("")})})})},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),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: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,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){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,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();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":var a=m.extend(!0,{},e);c.previewer.trigger("sek-add-content-in-new-sektion",{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:a.before_module_or_nested_section,after_module_or_nested_section:a.after_module_or_nested_section,content_type:a.content_type,content_id:a.content_id,is_user_section:a.is_user_section,after_section:a.after_section,before_section:a.before_section,location:a.location,sektion_to_replace:a.sektion_to_replace});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 l=m.extend(!0,{},e);l=m.extend(l,{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",l);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(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){try{!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()}))}()}catch(e){window.console&&console.log("Error in mayBeAwakeTinyMceEditor ",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-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){e&&e.module_type&&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(){if("local"===i){var e=function(){d.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings_and_controls_first:!0}),d.previewer.unbind("czr-new-skopes-synced",e)};d.previewer.bind("czr-new-skopes-synced",e)}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(l,d){d.extend(CZRSeksPrototype,{setupTemplateGallery:function(){var i=this;i.templateGalleryExpanded=new l.Value(!1),i.tmplInjectDialogVisible=new l.Value(!1),sektionsLocalizedData.isTemplateGalleryEnabled&&(i.tmplSearchFieldVisible=new l.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",""),l.trigger("nb-template-gallery-closed"),i._site_tmpl_scope=null,d('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active"))}),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))}),l.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 l.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(t){return n.getTemplateGalleryHtml(t).done(function(e){(i=d("#nimble-tmpl-gallery")).find(".sek-tmpl-gallery-inner").html(e),i.removeClass("sek-is-site-tmpl-mode"),"api_tmpl"===t.tmpl_source&&n._site_tmpl_scope&&!_.isEmpty(n._site_tmpl_scope)&&i.addClass("sek-is-site-tmpl-mode")})};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 templates 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+'" data-sek-api-site-tmpl="'+(e.is_site_tmpl?"true":"false")+'" data-sek-is-pro-tmpl="'+(e.is_pro_tmpl?"yes":"no")+'">',s+='<div class="tmpl-top-title"><h3>'+e.title+"</h3></div>",s+='<div class="tmpl-thumb-and-info-wrap">',s+='<div class="sek-tmpl-thumb" style="background-image:url('+r+')"></div>',s+='<div class="sek-tmpl-info" title="'+o+'">',s+='<p class="tmpl-desc tmpl-api-hide">'+e.description+"</p>",s+='<p class="tmpl-date tmpl-api-hide"><i>'+[sektionsLocalizedData.i18n["Last modified"]," : ",e.last_modified_date].join(" ")+"</i></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>'),e.is_pro_tmpl&&(s+='<div class="sek-is-pro-template"><img src="'+sektionsLocalizedData.czrAssetsPath+'sek/img/pro_orange.svg" alt="Pro feature"/></div>'),"api_tmpl"===n.tmpl_source&&(e.demo_url&&-1!=e.demo_url.indexOf("http")&&(s+='<div class="sek-tmpl-demo-link tmpl-api-hide"><a href="'+e.demo_url+'?utm_source=usersite&amp;utm_medium=link&amp;utm_campaign=tmpl_demos" target="_blank" rel="noopener noreferrer">'+sektionsLocalizedData.i18n["Live demo"]+' <i class="fas fa-external-link-alt"></i></a></div>'),e.is_site_tmpl&&(s+='<div class="sek-is-site-template" title="Site templates include dynamic template tags.">Site Template</div>')),s+="</div>",s+="</div>",s+="</div>"}),"api_tmpl"!==n.tmpl_source||_.isEmpty(s)||(s+='<div class="sek-tmpl-coming-soon">',s+="<p>"+sektionsLocalizedData.i18n["🍥 More templates coming..."]+"</p>",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"),a=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"),n=d(this).closest(".sek-tmpl-item").find(".tmpl-top-title h3").html(),o="yes"===d(this).closest(".sek-tmpl-item").data("sek-is-pro-tmpl");if(_.isEmpty(t))l.errare("::setupTmplGalleryDOMEvents => error => invalid template id");else{if(o){var r;if(!sektionsLocalizedData.isPro)return void l.previewer.trigger("sek-notify",{type:"info",duration:6e4,notif_id:"go_pro",message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["Go pro link when click on pro tmpl or section"]+"</strong>","</span>"].join("")});if(_.isEmpty(sektionsLocalizedData.pro_license_key)?r=sektionsLocalizedData.i18n["Missing license key"]:"valid"!==sektionsLocalizedData.pro_license_status&&(r=sektionsLocalizedData.i18n["Pro license problem"]),!_.isEmpty(r))return void l.previewer.trigger("sek-notify",{type:"error",duration:6e4,is_pro_notif:!0,notif_id:"pro_tmpl_error",message:['<span style="font-size:0.95em">',"<strong>"+r+"</strong>","</span>"].join("")})}if(!a._site_tmpl_scope||_.isEmpty(a._site_tmpl_scope))a.hasCurrentPageNBSectionsNotHeaderFooter()?(a._tmplNameWhileImportDialog=t,a._tmplSourceWhileImportDialog=i,a._tmplIsProWhileImportDialog=o,a.tmplInjectDialogVisible(!0)):(l.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),l.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:t,tmpl_source:i,tmpl_is_pro:o}).always(function(){l.previewer.send("sek-clean-loader")}),a.templateGalleryExpanded(!1));else{var s=d('[data-czrtype="'+a._site_tmpl_scope+'"]');if(0<s.length){if(!_.contains(["user_tmpl","api_tmpl"],i))return void l.errare("Error when picking site template => invalid tmpl source");s.trigger("nb-set-site-tmpl",{site_tmpl_id:t,site_tmpl_source:i,site_tmpl_title:n})}}}}).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)?(l.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0,duration:3e4}),l.czr_sektions.get_gallery_tmpl_json_and_inject({tmpl_name:a._tmplNameWhileImportDialog,tmpl_source:a._tmplSourceWhileImportDialog,tmpl_is_pro:a._tmplIsProWhileImportDialog,tmpl_inject_mode:t}).always(function(){l.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}),a.templateGalleryExpanded(!1)):l.errare("::setupTmplGalleryDOMEvents => error => invalid import mode"):a.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){a.tmplDialogMode("edit"),a.tmplDialogMode.unbind(t)};a.tmplToEdit=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),a.tmplDialogMode.bind(t),a.tmplDialogVisible(!0)}).on("click",".sek-tmpl-info .remove-tmpl",function(e){e.preventDefault();var t=function(e){a.tmplDialogMode("remove"),a.tmplDialogMode.unbind(t)};a.tmplToRemove=d(this).closest("[data-sek-tmpl-item-id]").data("sek-tmpl-item-id"),a.tmplDialogMode.bind(t),a.tmplDialogVisible(!0)}).on("click",".sek-close-dialog",function(e){e.preventDefault(),a.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"),a.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),self._site_tmpl_scope=null,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 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={},l=[];s.forEach(function(e){a[e]=(a[e]||0)+1});var c=h.sortBy(a,function(e){return e});h.each(c,function(i){h.each(a,function(e,t){i!==e||h.contains(l,t)||l.unshift(t)})}),h.each(l,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,l){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),e=n();r.append(a("<option>",{value:e,html:e,selected:"selected"})),n.container.on("click",function(){!0!==n.iconCollectionSet&&(a.when(a.Deferred(function(t){l.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){l.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">&nbsp;&nbsp;'+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),l.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"),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.previewer.trigger("sek-reset-collection",{scope:i}):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(p,u,_){p.czrInputMap=p.czrInputMap||{},u.extend(p.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(_.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=function(){return n&&n.editor_params&&!0===n.editor_params.autop},s={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&_.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=_.filter(e,function(e){return!_.contains(t,e)})}if(n.editor_params&&_.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;_.isEmpty(i)||!_.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=_.filter(e,function(e){return _.contains(i,e)}))}return e.join(",")}(),content_css:function(){var e=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl];if(!wp.oldEditor.getDefaultSetting)return e;var t=wp.oldEditor.getDefaultSettings();return t&&t.tinymce&&t.tinymce.content_css&&(e=_.union(t.tinymce.content_css.split(","),e)),e.join(",")}(),min_height:40,height:n.editor_params&&_.isNumber(n.editor_params.height)?n.editor_params.height:p.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};s.tinymce.wpautop=r(),r()||(s.tinymce.forced_root_block=""),wp.oldEditor.initialize(i,s);var a=tinyMCE.get(i);if(!a)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var l=u.extend(!0,[],p.czrActiveWPEditors);l.push(i),p.czrActiveWPEditors=l;var c,d=function(){c=t(),p.czr_sektions.isJsonString(c)&&(c=JSON.parse(c)),e.html(c),a.setContent(c)};a.initialized?d():a.on("init",d),a.on("input change keyup",function(e){t(a.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=u("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=p.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=nimbleTinyMCEPreInit.mceInit[e];o.content_css=function(){var e=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl];if(!wp.oldEditor.getDefaultSetting)return e;var t=wp.oldEditor.getDefaultSettings();return t&&t.tinymce&&t.tinymce.content_css&&(e=_.union(t.tinymce.content_css.split(","),e)),e.join(",")}();var r,s=t.input_parent,a=function(){var e=s();return _.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};o.wpautop=a(),a()||(o.forced_root_block=""),o.toolbar1=sektionsLocalizedData.defaultToolbarBtns,o.toolbar2="",window.tinymce?(window.tinymce.init(o),window.QTags.getInstance(e)):window.console&&console.log("Error in ::detached_tinymce_editor => window.tinymce not defined "),window.tinyMCE?r=tinyMCE.get(e):window.console&&console.log("Error in ::detached_tinymce_editor => window.tinyMCE not defined ");var l,c=function(){l=t.input_value,p.czr_sektions.isJsonString(l)&&(l=JSON.parse(l)),r.setContent(l),p.sekEditorExpanded(!0),u(window).trigger("resize")};r&&(r.initialized?c():r.on("init",c),r.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(a()?r.getContent():wp.oldEditor.removep(r.getContent()))})),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(u(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(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{site_tmpl_picker:function(n){var o,i,r,s,a,l,c=this,d=m("[data-czrtype]",c.container),p={site_tmpl_id:"_no_site_tmpl_",site_tmpl_source:"user_tmpl",site_tmpl_title:""};c.container.one("site-tmpl-input-rendered",function(){_.czr_sektions.allSavedTemplates.bind(function(e){var t=c();if(r=m.extend(!0,{},f.isObject(t)?t:{}),f.isObject(r)&&!f.isArray(r)||(r=m.extend(!0,{},p)),s=r.site_tmpl_id,a=r.site_tmpl_source,l=r.site_tmpl_title,!f.isEmpty(s)&&f.isString(s)&&f.isObject(e)&&"user_tmpl"==a)if(e[s])try{u()}catch(e){_.errare("Error when printing template val",e)}else d.trigger("nb-set-site-tmpl",p)})});var u=function(i){i=m.extend({see_me:!1},i||{});var t=function(e,t){o='<span class="sek-current-site-tmpl">',"_no_site_tmpl_"===e||f.isEmpty(e)?(o+=sektionsLocalizedData.i18n["No template set."],c.container.removeClass("sek-has-site-tmpl"),c.container.removeClass("sek-site-tmpl-not-found")):"_tmpl_not_found_"===e||f.isEmpty(e)?(o+=sektionsLocalizedData.i18n["Template not found : reset or pick another one."],c.container.removeClass("sek-has-site-tmpl"),c.container.addClass("sek-site-tmpl-not-found")):(o+=sektionsLocalizedData.i18n["Active template : "]+(f.isEmpty(t)?e:t),c.container.addClass("sek-has-site-tmpl"),c.container.removeClass("sek-site-tmpl-not-found")),o+="</span>",c.container.find(".sek-current-site-tmpl").remove(),c.container.find(".czr-input").prepend(o),i.see_me&&"_no_site_tmpl_"!=e&&(c.container.addClass("button-see-me"),f.delay(function(){c.container.removeClass("button-see-me")},800)),c.container.trigger("site-tmpl-input-rendered")},e=c();r=m.extend(!0,{},f.isObject(e)?e:{}),f.isObject(r)&&!f.isArray(r)||(r=m.extend(!0,{},p)),s=r.site_tmpl_id,a=r.site_tmpl_source,l=r.site_tmpl_title,f.isString(s)&&!f.isEmpty(s)||(_.errare("printCurrentTemplateName : Error => site template must be a string"),s="_no_site_tmpl_"),"_no_site_tmpl_"===s?t(r.site_tmpl_id,l):(_tmpl_collection_promise="user_tmpl"===a?_.czr_sektions.setSavedTmplCollection:_.czr_sektions.getApiTmplCollection,_tmpl_collection_promise.call(_.czr_sektions).done(function(e){f.isObject(e)&&e[s]&&e[s].title?l=e[s].title:"user_tmpl"===a&&(_.errare("::printCurrentTemplateName => site template not found in collection => previously removed => id : "+s+" | source : "+a),s="_tmpl_not_found_"),t(s,l)}).fail(function(){_.errare("printCurrentTemplateName error when getting collection promise failed",n),_dfd_.resolve("")}))};c.container.on("click","[data-sek-group-scope]",function(e,t){e.stopPropagation();var i=m(this).data("sek-group-scope");f.isEmpty(i)?_.errare("site_tmpl_picker input => invalid scope provided.",i):c.container.hasClass("sek-site-tmpl-picking-active")?(_.czr_sektions._site_tmpl_scope=null,_.czr_sektions.templateGalleryExpanded(!1),m('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active")):(_.czr_sektions._site_tmpl_scope=c.id,_.czr_sektions.templateGalleryExpanded(!0),m('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active"),c.container.addClass("sek-site-tmpl-picking-active"))}),c.container.on("click",".sek-remove-site-tmpl",function(e,t){e.stopPropagation(),d.trigger("nb-set-site-tmpl",p)}),d.on("nb-set-site-tmpl",function(e,t){if(f.isObject(t))if(f.isUndefined(t.site_tmpl_id)||f.isUndefined(t.site_tmpl_source)||f.isUndefined(t.site_tmpl_title))_.errare("site_tmpl_picker => error => invalid args passed on tmpl pick",t);else{i=m.extend(!0,{},p),i=m.extend(i,t),c(i);try{u({see_me:!0})}catch(e){_.errare("Error when printing template val",e)}"_no_site_tmpl_"!==i.site_tmpl_id&&(_.czr_sektions.templateGalleryExpanded(!1),m('[data-input-type="site_tmpl_picker"]').removeClass("sek-site-tmpl-picking-active"))}else _.errare("site_tmpl_picker => error => wrong args on tmpl pick",t)});try{u()}catch(e){_.errare("Error when printing template val",e)}}})}(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_spacing_module_for_columns:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module_for_columns","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_for_columns"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_cust_css_level:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_cust_css_level","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_cust_css_level"))}})}(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(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(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 r=this;r.module;r.czr_Input.each(function(o){switch(o.id){case"use_current_query":n.each(["replace_query","post_number","posts_per_page","include_sticky","categories","must_have_all_cats","order_by"],function(t){i.czr_sektions.scheduleVisibilityOfInputId.call(o,t,function(){var e=!1;switch(_replace_query=r.czr_Input("replace_query")(),_display_pagination=r.czr_Input("display_pagination")(),t){case"replace_query":e=o();break;case"post_number":e=!o()&&!_display_pagination||o()&&_replace_query&&!_display_pagination;break;case"posts_per_page":e=!o()&&_display_pagination||o()&&_replace_query&&_display_pagination;break;case"include_sticky":case"categories":case"must_have_all_cats":case"order_by":e=!o()||o()&&r.czr_Input("replace_query")()}return e})});break;case"replace_query":n.each(["post_number","posts_per_page","include_sticky","categories","must_have_all_cats","order_by"],function(n){i.czr_sektions.scheduleVisibilityOfInputId.call(o,n,function(){var e=r.czr_Input("use_current_query")(),t=r.czr_Input("display_pagination")(),i=!1;switch(n){case"post_number":i=!e&&!t||o()&&!t;break;case"posts_per_page":i=!e&&t||o()&&t;break;case"include_sticky":case"categories":case"must_have_all_cats":case"order_by":i=!e||o()}return i})});break;case"layout":n.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){i.czr_sektions.scheduleVisibilityOfInputId.call(o,t,function(){var e=!1;switch(t){case"columns":e="grid"===o();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===o()}return e})});break;case"categories":n.each(["must_have_all_cats"],function(e){i.czr_sektions.scheduleVisibilityOfInputId.call(o,e,function(){var e=o();return n.isArray(e)&&1<e.length})});break;case"display_pagination":n.each(["posts_per_page","post_number"],function(n){i.czr_sektions.scheduleVisibilityOfInputId.call(o,n,function(){var e=r.czr_Input("replace_query")(),t=r.czr_Input("use_current_query")(),i=!1;switch(n){case"posts_per_page":i=o()&&!t||o()&&t&&e;break;case"post_number":i=!o()&&!t||!o()&&t&&e}return i})});break;case"custom_grid_spaces":n.each(["column_gap","row_gap"],function(e){i.czr_sektions.scheduleVisibilityOfInputId.call(o,e,function(){return o()})});break;case"show_excerpt":n.each(["excerpt_length"],function(e){i.czr_sektions.scheduleVisibilityOfInputId.call(o,e,function(){return o()})})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_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;n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":r.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){o.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})});break;case"img_has_custom_height":r.each(["img_height"],function(e){o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:o.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:o.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"),items_are_clonable:!0}})}(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),i.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},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"),items_are_clonable:!0}})}(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"),items_are_clonable:!0}})}(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,_),function(m,f,g){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=m.CZRItem.extend(i.CZRItemConstructor||{}),m.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return m.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&f.fn.sortable){var i=this;f("."+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(){g.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},getPreItem:function(){var e=m.czr_sektions.getRegisteredModuleProperty("czr_gallery_collection_child","starting_value"),t=f.extend(!0,{},this.preItem());if(g.isObject(e)){var i=f.extend(!0,{},e);return f.extend(t,i)}return this.preItem()},CZRItemConstructor:{ready:function(){var e=this;m.CZRItem.prototype.ready.call(e);var i=function(){m.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)},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="",s="",a="not_set",l=!g.isUndefined(t)&&g.isObject(t);if(!l||!t.input_changed||g.contains(["img"],t.input_changed)){if(g.isEmpty(o.title)){var c=g.findIndex(n.itemCollection(),function(e){return e.id===i.id});c=g.isUndefined(c)?1:c+1}else r=o.title;r=m.CZR_Helpers.truncate(r,25),o.img&&(s=o.img,g.isString(o.img)&&(s=-1!==o.img.indexOf("http")?o.img:parseInt(o.img,10)));var d=function(){return f.Deferred(function(){var e=this;g.isUndefined(s)||g.isEmpty(""+s)?e.resolve(""):g.isString(s)&&-1!==s.indexOf("http")?e.resolve(s):wp.media.attachment(s).fetch().always(function(){if(g.isObject(this)&&g.has(this,"attributes")&&g.has(this.attributes,"sizes")){var i=this.get("sizes");i&&g.isObject(i)&&g.each(["thumbnail","medium","large","full"],function(e,t){"not_set"===a&&i[e]&&g.isObject(i[e])&&i[e].url&&(a=i[e].url)}),e.resolve(a)}})}).promise()},p=f("."+n.control.css_attr.item_title,i.container).find(".sek-slide-thumb"),u=l&&t.input_changed&&"img"===t.input_changed,_=function(e){return g.isEmpty(""+e)||"not_set"===e?"":'<img src="'+e+'" width="32" alt="'+r+'" />'};f("."+n.control.css_attr.item_title,i.container).css("padding","0 4px"),p.length<1?d().done(function(e){f("."+n.control.css_attr.item_title,i.container).prepend(f("<div/>",{class:"sek-slide-thumb",html:_(e)}))}):!u&&l||d().done(function(e){p.html(_(e))})}},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=g.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=g.without(n,g.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=f.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=m(i.control.id).transport||!g.has(e,"dom_event")||g.has(e.dom_event,"isTrigger")||m.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){m.previewer.unbind("ready",r),i.trigger("item-removed",o)};m.previewer.bind("ready",r)}}}};m.czrModuleMap=m.czrModuleMap||{},f.extend(m.czrModuleMap,{czr_gallery_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:m.czr_sektions.getRegisteredModuleProperty("czr_gallery_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:m.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_gallery_collection_child"),items_are_clonable:!0}})}(wp.customize,jQuery,_),function(s,e,i){var t={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)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var r=this;r.module;r.czr_Input.each(function(o){switch(o.id){case"link-to":i.each(["link-target"],function(t){s.czr_sektions.scheduleVisibilityOfInputId.call(o,t,function(){var e=!1;switch(t){case"link-target":e=!i.contains(["no-link","img-lightbox"],o())}return e})});break;case"custom-rows-columns":i.each(["column_width","raw_height"],function(n){s.czr_sektions.scheduleVisibilityOfInputId.call(o,n,function(){var e=r.czr_Input.has("masonry_on")&&r.czr_Input("masonry_on")(),t=r.czr_Input.has("auto_fill")&&r.czr_Input("auto_fill")(),i=!1;switch(n){case"column_width":i=o()&&!e&&!t;break;case"raw_height":i=o()&&!e}return i})})}})}}};s.czrModuleMap=s.czrModuleMap||{},e.extend(s.czrModuleMap,{czr_gallery_opts_child:{mthds:t,crud:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_gallery_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_gallery_opts_child")}})}(wp.customize,jQuery,_);
assets/front/css/libs/magnific-popup.css DELETED
@@ -1,353 +0,0 @@
1
- /* Magnific Popup CSS */
2
- .mfp-bg {
3
- top: 0;
4
- left: 0;
5
- width: 100%;
6
- height: 100%;
7
- z-index: 1042;
8
- overflow: hidden;
9
- position: fixed;
10
- background: #0b0b0b;
11
- opacity: 0.8; }
12
-
13
- .mfp-wrap {
14
- top: 0;
15
- left: 0;
16
- width: 100%;
17
- height: 100%;
18
- z-index: 1043;
19
- position: fixed;
20
- outline: none !important;
21
- -webkit-backface-visibility: hidden; }
22
-
23
- .mfp-container {
24
- text-align: center;
25
- position: absolute;
26
- width: 100%;
27
- height: 100%;
28
- left: 0;
29
- top: 0;
30
- padding: 0 8px;
31
- box-sizing: border-box; }
32
-
33
- .mfp-container:before {
34
- content: '';
35
- display: inline-block;
36
- height: 100%;
37
- vertical-align: middle; }
38
-
39
- .mfp-align-top .mfp-container:before {
40
- display: none; }
41
-
42
- .mfp-content {
43
- position: relative;
44
- display: inline-block;
45
- vertical-align: middle;
46
- margin: 0 auto;
47
- text-align: left;
48
- z-index: 1045; }
49
-
50
- .mfp-inline-holder .mfp-content,
51
- .mfp-ajax-holder .mfp-content {
52
- width: 100%;
53
- cursor: auto; }
54
-
55
- .mfp-ajax-cur {
56
- cursor: progress; }
57
-
58
- .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
59
- cursor: -moz-zoom-out;
60
- cursor: -webkit-zoom-out;
61
- cursor: zoom-out; }
62
-
63
- .mfp-zoom {
64
- cursor: pointer;
65
- cursor: -webkit-zoom-in;
66
- cursor: -moz-zoom-in;
67
- cursor: zoom-in; }
68
-
69
- .mfp-auto-cursor .mfp-content {
70
- cursor: auto; }
71
-
72
- .mfp-close,
73
- .mfp-arrow,
74
- .mfp-preloader,
75
- .mfp-counter {
76
- -webkit-user-select: none;
77
- -moz-user-select: none;
78
- user-select: none; }
79
-
80
- .mfp-loading.mfp-figure {
81
- display: none; }
82
-
83
- .mfp-hide {
84
- display: none !important; }
85
-
86
- .mfp-preloader {
87
- color: #CCC;
88
- position: absolute;
89
- top: 50%;
90
- width: auto;
91
- text-align: center;
92
- margin-top: -0.8em;
93
- left: 8px;
94
- right: 8px;
95
- z-index: 1044; }
96
- .mfp-preloader a {
97
- color: #CCC; }
98
- .mfp-preloader a:hover {
99
- color: #FFF; }
100
-
101
- .mfp-s-ready .mfp-preloader {
102
- display: none; }
103
-
104
- .mfp-s-error .mfp-content {
105
- display: none; }
106
-
107
- button.mfp-close,
108
- button.mfp-arrow {
109
- overflow: visible;
110
- cursor: pointer;
111
- background: transparent;
112
- border: 0;
113
- -webkit-appearance: none;
114
- display: block;
115
- outline: none;
116
- padding: 0;
117
- z-index: 1046;
118
- box-shadow: none;
119
- touch-action: manipulation; }
120
-
121
- button::-moz-focus-inner {
122
- padding: 0;
123
- border: 0; }
124
-
125
- .mfp-close {
126
- width: 44px;
127
- height: 44px;
128
- line-height: 44px;
129
- position: absolute;
130
- right: 0;
131
- top: 0;
132
- text-decoration: none;
133
- text-align: center;
134
- opacity: 0.65;
135
- padding: 0 0 18px 10px;
136
- color: #FFF;
137
- font-style: normal;
138
- font-size: 28px;
139
- font-family: Arial, Baskerville, monospace; }
140
- .mfp-close:hover,
141
- .mfp-close:focus {
142
- opacity: 1; }
143
- .mfp-close:active {
144
- top: 1px; }
145
-
146
- .mfp-close-btn-in .mfp-close {
147
- color: #333; }
148
-
149
- .mfp-image-holder .mfp-close,
150
- .mfp-iframe-holder .mfp-close {
151
- color: #FFF;
152
- right: -6px;
153
- text-align: right;
154
- padding-right: 6px;
155
- width: 100%;
156
- background: none;
157
- }
158
-
159
- .mfp-counter {
160
- position: absolute;
161
- top: 0;
162
- right: 0;
163
- color: #CCC;
164
- font-size: 12px;
165
- line-height: 18px;
166
- white-space: nowrap; }
167
-
168
- .mfp-arrow {
169
- position: absolute;
170
- opacity: 0.65;
171
- margin: 0;
172
- top: 50%;
173
- margin-top: -55px;
174
- padding: 0;
175
- width: 90px;
176
- height: 110px;
177
- -webkit-tap-highlight-color: transparent; }
178
- .mfp-arrow:active {
179
- margin-top: -54px; }
180
- .mfp-arrow:hover,
181
- .mfp-arrow:focus {
182
- opacity: 1; }
183
- .mfp-arrow:before,
184
- .mfp-arrow:after {
185
- content: '';
186
- display: block;
187
- width: 0;
188
- height: 0;
189
- position: absolute;
190
- left: 0;
191
- top: 0;
192
- margin-top: 35px;
193
- margin-left: 35px;
194
- border: medium inset transparent; }
195
- .mfp-arrow:after {
196
- border-top-width: 13px;
197
- border-bottom-width: 13px;
198
- top: 8px; }
199
- .mfp-arrow:before {
200
- border-top-width: 21px;
201
- border-bottom-width: 21px;
202
- opacity: 0.7; }
203
-
204
- .mfp-arrow-left {
205
- left: 0; }
206
- .mfp-arrow-left:after {
207
- border-right: 17px solid #FFF;
208
- margin-left: 31px; }
209
- .mfp-arrow-left:before {
210
- margin-left: 25px;
211
- border-right: 27px solid #3F3F3F; }
212
-
213
- .mfp-arrow-right {
214
- right: 0; }
215
- .mfp-arrow-right:after {
216
- border-left: 17px solid #FFF;
217
- margin-left: 39px; }
218
- .mfp-arrow-right:before {
219
- border-left: 27px solid #3F3F3F; }
220
-
221
- .mfp-iframe-holder {
222
- padding-top: 40px;
223
- padding-bottom: 40px; }
224
- .mfp-iframe-holder .mfp-content {
225
- line-height: 0;
226
- width: 100%;
227
- max-width: 900px; }
228
- .mfp-iframe-holder .mfp-close {
229
- top: -40px; }
230
-
231
- .mfp-iframe-scaler {
232
- width: 100%;
233
- height: 0;
234
- overflow: hidden;
235
- padding-top: 56.25%; }
236
- .mfp-iframe-scaler iframe {
237
- position: absolute;
238
- display: block;
239
- top: 0;
240
- left: 0;
241
- width: 100%;
242
- height: 100%;
243
- box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
244
- background: #000; }
245
-
246
- /* Main image in popup */
247
- img.mfp-img {
248
- width: auto;
249
- max-width: 100%;
250
- height: auto;
251
- display: block;
252
- line-height: 0;
253
- box-sizing: border-box;
254
- padding: 40px 0 40px;
255
- margin: 0 auto; }
256
-
257
- /* The shadow behind the image */
258
- .mfp-figure {
259
- line-height: 0; }
260
- .mfp-figure:after {
261
- content: '';
262
- position: absolute;
263
- left: 0;
264
- top: 40px;
265
- bottom: 40px;
266
- display: block;
267
- right: 0;
268
- width: auto;
269
- height: auto;
270
- z-index: -1;
271
- box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
272
- background: #444; }
273
- .mfp-figure small {
274
- color: #BDBDBD;
275
- display: block;
276
- font-size: 12px;
277
- line-height: 14px; }
278
- .mfp-figure figure {
279
- margin: 0; }
280
-
281
- .mfp-bottom-bar {
282
- margin-top: -36px;
283
- position: absolute;
284
- top: 100%;
285
- left: 0;
286
- width: 100%;
287
- cursor: auto; }
288
-
289
- .mfp-title {
290
- text-align: left;
291
- line-height: 18px;
292
- color: #F3F3F3;
293
- word-wrap: break-word;
294
- padding-right: 36px; }
295
-
296
- .mfp-image-holder .mfp-content {
297
- max-width: 100%; }
298
-
299
- .mfp-gallery .mfp-image-holder .mfp-figure {
300
- cursor: pointer; }
301
-
302
- @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
303
- /**
304
- * Remove all paddings around the image on small screen
305
- */
306
- .mfp-img-mobile .mfp-image-holder {
307
- padding-left: 0;
308
- padding-right: 0; }
309
- .mfp-img-mobile img.mfp-img {
310
- padding: 0; }
311
- .mfp-img-mobile .mfp-figure:after {
312
- top: 0;
313
- bottom: 0; }
314
- .mfp-img-mobile .mfp-figure small {
315
- display: inline;
316
- margin-left: 5px; }
317
- .mfp-img-mobile .mfp-bottom-bar {
318
- background: rgba(0, 0, 0, 0.6);
319
- bottom: 0;
320
- margin: 0;
321
- top: auto;
322
- padding: 3px 5px;
323
- position: fixed;
324
- box-sizing: border-box; }
325
- .mfp-img-mobile .mfp-bottom-bar:empty {
326
- padding: 0; }
327
- .mfp-img-mobile .mfp-counter {
328
- right: 5px;
329
- top: 3px; }
330
- .mfp-img-mobile .mfp-close {
331
- top: 0;
332
- right: 0;
333
- width: 35px;
334
- height: 35px;
335
- line-height: 35px;
336
- background: rgba(0, 0, 0, 0.6);
337
- position: fixed;
338
- text-align: center;
339
- padding: 0; } }
340
-
341
- @media all and (max-width: 900px) {
342
- .mfp-arrow {
343
- -webkit-transform: scale(0.75);
344
- transform: scale(0.75); }
345
- .mfp-arrow-left {
346
- -webkit-transform-origin: 0;
347
- transform-origin: 0; }
348
- .mfp-arrow-right {
349
- -webkit-transform-origin: 100%;
350
- transform-origin: 100%; }
351
- .mfp-container {
352
- padding-left: 6px;
353
- padding-right: 6px; } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/front/css/libs/magnific-popup.min.css DELETED
@@ -1 +0,0 @@
1
- .mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:0.8}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:1043;position:fixed;outline:none !important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none !important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-0.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-preloader a:hover{color:#FFF}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;display:block;outline:none;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:0.65;padding:0 0 18px 10px;color:#FFF;font-style:normal;font-size:28px;font-family:Arial, Baskerville, monospace}.mfp-close:focus,.mfp-close:hover{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%;background:none}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:0.65;margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1}.mfp-arrow:after,.mfp-arrow:before{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:0.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0, 0, 0, 0.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0, 0, 0, 0.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0, 0, 0, 0.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0, 0, 0, 0.6);position:fixed;text-align:center;padding:0}}@media all and (max-width: 900px){.mfp-arrow{-webkit-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}
 
assets/front/css/libs/swipebox-img/icons.png ADDED
Binary file
assets/front/css/libs/swipebox-img/icons.svg ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8"?> <!-- Generator: IcoMoon.io --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="120" height="24" viewBox="0 0 120 24" fill="#ffffff" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M 17.384,17.705q0.00,0.536 -0.375,0.911l-1.821,1.821q-0.375,0.375 -0.911,0.375t-0.911-0.375l-3.938-3.938l-3.938,3.938q-0.375,0.375 -0.911,0.375t-0.911-0.375l-1.821-1.821q-0.375-0.375 -0.375-0.911t 0.375-0.911l 3.938-3.938l-3.938-3.938q-0.375-0.375 -0.375-0.911t 0.375-0.911l 1.821-1.821q 0.375-0.375 0.911-0.375t 0.911,0.375l 3.938,3.938l 3.938-3.938q 0.375-0.375 0.911-0.375t 0.911,0.375l 1.821,1.821q 0.375,0.375 0.375,0.911 t-0.375,0.911l-3.938,3.938l 3.938,3.938q 0.375,0.375 0.375,0.911zM 57.938,21.067l-8.732-8.719q-0.496-0.496 -0.496-1.212t 0.496-1.212l 8.732-8.719q 0.496-0.496 1.212-0.496t 1.212,0.496l 1.004,1.004q 0.496,0.496 0.496,1.212t-0.496,1.212l-6.509,6.509l 6.509,6.496q 0.496,0.509 0.496,1.219t-0.496,1.205l-1.004,1.004q-0.496,0.496 -1.212,0.496t-1.212-0.496zM 110.719,11.143q0.00,0.696 -0.496,1.219l-8.732,8.719q-0.496,0.496 -1.205,0.496t-1.205-0.496l-1.018-1.004q-0.496-0.522 -0.496-1.219q0.00-0.71 0.496-1.205l 6.509-6.509l-6.509-6.496q-0.496-0.522 -0.496-1.219q0.00-0.71 0.496-1.205l 1.018-1.004q 0.482-0.509 1.205-0.509t 1.205,0.509l 8.732,8.719q 0.496,0.496 0.496,1.205z"></path></svg>
assets/front/css/libs/swipebox-img/loader.gif ADDED
Binary file
assets/front/css/libs/swipebox.css ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
2
+ html.swipebox-html.swipebox-touch {
3
+ overflow: hidden !important;
4
+ }
5
+
6
+ #swipebox-overlay img {
7
+ border: none !important;
8
+ }
9
+
10
+ #swipebox-overlay {
11
+ width: 100%;
12
+ height: 100%;
13
+ position: fixed;
14
+ top: 0;
15
+ left: 0;
16
+ z-index: 99999 !important;
17
+ overflow: hidden;
18
+ -webkit-user-select: none;
19
+ -moz-user-select: none;
20
+ -ms-user-select: none;
21
+ user-select: none;
22
+ }
23
+
24
+ #swipebox-container {
25
+ position: relative;
26
+ width: 100%;
27
+ height: 100%;
28
+ }
29
+
30
+ #swipebox-slider {
31
+ -webkit-transition: -webkit-transform 0.4s ease;
32
+ transition: transform 0.4s ease;
33
+ height: 100%;
34
+ left: 0;
35
+ top: 0;
36
+ width: 100%;
37
+ white-space: nowrap;
38
+ position: absolute;
39
+ display: none;
40
+ cursor: pointer;
41
+ }
42
+ #swipebox-slider .slide {
43
+ height: 100%;
44
+ width: 100%;
45
+ line-height: 1px;
46
+ text-align: center;
47
+ display: inline-block;
48
+ }
49
+ #swipebox-slider .slide:before {
50
+ content: "";
51
+ display: inline-block;
52
+ height: 50%;
53
+ width: 1px;
54
+ margin-right: -1px;
55
+ }
56
+ #swipebox-slider .slide img,
57
+ #swipebox-slider .slide .swipebox-video-container,
58
+ #swipebox-slider .slide .swipebox-inline-container {
59
+ display: inline-block;
60
+ max-height: 100%;
61
+ max-width: 100%;
62
+ margin: 0;
63
+ padding: 0;
64
+ width: auto;
65
+ height: auto;
66
+ vertical-align: middle;
67
+ }
68
+ #swipebox-slider .slide .swipebox-video-container {
69
+ background: none;
70
+ max-width: 1140px;
71
+ max-height: 100%;
72
+ width: 100%;
73
+ padding: 5%;
74
+ -webkit-box-sizing: border-box;
75
+ box-sizing: border-box;
76
+ }
77
+ #swipebox-slider .slide .swipebox-video-container .swipebox-video {
78
+ width: 100%;
79
+ height: 0;
80
+ padding-bottom: 56.25%;
81
+ overflow: hidden;
82
+ position: relative;
83
+ }
84
+ #swipebox-slider .slide .swipebox-video-container .swipebox-video iframe {
85
+ width: 100% !important;
86
+ height: 100% !important;
87
+ position: absolute;
88
+ top: 0;
89
+ left: 0;
90
+ }
91
+ #swipebox-slider .slide-loading {
92
+ background: url(swipebox-img/loader.gif) no-repeat center center;
93
+ }
94
+
95
+ #swipebox-bottom-bar,
96
+ #swipebox-top-bar {
97
+ -webkit-transition: 0.5s;
98
+ transition: 0.5s;
99
+ position: absolute;
100
+ left: 0;
101
+ z-index: 999;
102
+ height: 50px;
103
+ width: 100%;
104
+ }
105
+
106
+ #swipebox-bottom-bar {
107
+ bottom: -50px;
108
+ }
109
+ #swipebox-bottom-bar.visible-bars {
110
+ -webkit-transform: translate3d(0, -50px, 0);
111
+ transform: translate3d(0, -50px, 0);
112
+ }
113
+
114
+ #swipebox-top-bar {
115
+ top: -50px;
116
+ }
117
+ #swipebox-top-bar.visible-bars {
118
+ -webkit-transform: translate3d(0, 50px, 0);
119
+ transform: translate3d(0, 50px, 0);
120
+ }
121
+
122
+ #swipebox-title {
123
+ display: block;
124
+ width: 100%;
125
+ text-align: center;
126
+ }
127
+
128
+ #swipebox-prev,
129
+ #swipebox-next,
130
+ #swipebox-close {
131
+ background-image: url(swipebox-img/icons.png);
132
+ background-repeat: no-repeat;
133
+ border: none !important;
134
+ text-decoration: none !important;
135
+ cursor: pointer;
136
+ width: 50px;
137
+ height: 50px;
138
+ top: 0;
139
+ }
140
+
141
+ #swipebox-arrows {
142
+ display: block;
143
+ margin: 0 auto;
144
+ width: 100%;
145
+ height: 50px;
146
+ }
147
+
148
+ #swipebox-prev {
149
+ background-position: -32px 13px;
150
+ float: left;
151
+ }
152
+
153
+ #swipebox-next {
154
+ background-position: -78px 13px;
155
+ float: right;
156
+ }
157
+
158
+ #swipebox-close {
159
+ top: 0;
160
+ right: 0;
161
+ position: absolute;
162
+ z-index: 9999;
163
+ background-position: 15px 12px;
164
+ }
165
+
166
+ .swipebox-no-close-button #swipebox-close {
167
+ display: none;
168
+ }
169
+
170
+ #swipebox-prev.disabled,
171
+ #swipebox-next.disabled {
172
+ opacity: 0.3;
173
+ }
174
+
175
+ .swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider {
176
+ -webkit-animation: rightSpring 0.3s;
177
+ animation: rightSpring 0.3s;
178
+ }
179
+ .swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider {
180
+ -webkit-animation: leftSpring 0.3s;
181
+ animation: leftSpring 0.3s;
182
+ }
183
+
184
+ .swipebox-touch #swipebox-container:before, .swipebox-touch #swipebox-container:after {
185
+ -webkit-backface-visibility: hidden;
186
+ backface-visibility: hidden;
187
+ -webkit-transition: all .3s ease;
188
+ transition: all .3s ease;
189
+ content: ' ';
190
+ position: absolute;
191
+ z-index: 999;
192
+ top: 0;
193
+ height: 100%;
194
+ width: 20px;
195
+ opacity: 0;
196
+ }
197
+ .swipebox-touch #swipebox-container:before {
198
+ left: 0;
199
+ -webkit-box-shadow: inset 10px 0px 10px -8px #656565;
200
+ box-shadow: inset 10px 0px 10px -8px #656565;
201
+ }
202
+ .swipebox-touch #swipebox-container:after {
203
+ right: 0;
204
+ -webkit-box-shadow: inset -10px 0px 10px -8px #656565;
205
+ box-shadow: inset -10px 0px 10px -8px #656565;
206
+ }
207
+ .swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before {
208
+ opacity: 1;
209
+ }
210
+ .swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after {
211
+ opacity: 1;
212
+ }
213
+
214
+ @-webkit-keyframes rightSpring {
215
+ 0% {
216
+ left: 0;
217
+ }
218
+
219
+ 50% {
220
+ left: -30px;
221
+ }
222
+
223
+ 100% {
224
+ left: 0;
225
+ }
226
+ }
227
+
228
+ @keyframes rightSpring {
229
+ 0% {
230
+ left: 0;
231
+ }
232
+
233
+ 50% {
234
+ left: -30px;
235
+ }
236
+
237
+ 100% {
238
+ left: 0;
239
+ }
240
+ }
241
+ @-webkit-keyframes leftSpring {
242
+ 0% {
243
+ left: 0;
244
+ }
245
+
246
+ 50% {
247
+ left: 30px;
248
+ }
249
+
250
+ 100% {
251
+ left: 0;
252
+ }
253
+ }
254
+ @keyframes leftSpring {
255
+ 0% {
256
+ left: 0;
257
+ }
258
+
259
+ 50% {
260
+ left: 30px;
261
+ }
262
+
263
+ 100% {
264
+ left: 0;
265
+ }
266
+ }
267
+ @media screen and (min-width: 800px) {
268
+ #swipebox-close {
269
+ right: 10px;
270
+ }
271
+
272
+ #swipebox-arrows {
273
+ width: 92%;
274
+ max-width: 800px;
275
+ }
276
+ }
277
+ /* Skin
278
+ --------------------------*/
279
+ #swipebox-overlay {
280
+ background: #0d0d0d;
281
+ }
282
+
283
+ #swipebox-bottom-bar,
284
+ #swipebox-top-bar {
285
+ text-shadow: 1px 1px 1px black;
286
+ background: #000;
287
+ opacity: 0.95;
288
+ }
289
+
290
+ #swipebox-top-bar {
291
+ color: white !important;
292
+ font-size: 15px;
293
+ line-height: 43px;
294
+ font-family: Helvetica, Arial, sans-serif;
295
+ }
296
+
assets/front/css/libs/swipebox.min.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ html.swipebox-html.swipebox-touch{overflow:hidden !important}#swipebox-overlay img{border:none !important}#swipebox-overlay{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999 !important;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#swipebox-container{position:relative;width:100%;height:100%}#swipebox-slider{-webkit-transition:-webkit-transform .4s ease;transition:transform .4s ease;height:100%;left:0;top:0;width:100%;white-space:nowrap;position:absolute;display:none;cursor:pointer}#swipebox-slider .slide{height:100%;width:100%;line-height:1px;text-align:center;display:inline-block}#swipebox-slider .slide:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#swipebox-slider .slide img,#swipebox-slider .slide .swipebox-video-container,#swipebox-slider .slide .swipebox-inline-container{display:inline-block;max-height:100%;max-width:100%;margin:0;padding:0;width:auto;height:auto;vertical-align:middle}
2
+ #swipebox-slider .slide .swipebox-video-container{background:0 0;max-width:1140px;max-height:100%;width:100%;padding:5%;-webkit-box-sizing:border-box;box-sizing:border-box}#swipebox-slider .slide .swipebox-video-container .swipebox-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe{width:100% !important;height:100% !important;position:absolute;top:0;left:0}#swipebox-slider .slide-loading{background:url(swipebox-img/loader.gif) no-repeat center center}#swipebox-bottom-bar,#swipebox-top-bar{-webkit-transition:.5s;transition:.5s;position:absolute;left:0;z-index:999;height:50px;width:100%}#swipebox-bottom-bar{bottom:-50px}#swipebox-bottom-bar.visible-bars{-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}#swipebox-top-bar{top:-50px}#swipebox-top-bar.visible-bars{-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}#swipebox-title{display:block;width:100%;text-align:center}
3
+ #swipebox-prev,#swipebox-next,#swipebox-close{background-image:url(swipebox-img/icons.png);background-repeat:no-repeat;border:none !important;text-decoration:none !important;cursor:pointer;width:50px;height:50px;top:0}#swipebox-arrows{display:block;margin:0 auto;width:100%;height:50px}#swipebox-prev{background-position:-32px 13px;float:left}#swipebox-next{background-position:-78px 13px;float:right}#swipebox-close{top:0;right:0;position:absolute;z-index:9999;background-position:15px 12px}.swipebox-no-close-button #swipebox-close{display:none}#swipebox-prev.disabled,#swipebox-next.disabled{opacity:.3}.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider{-webkit-animation:rightSpring .3s;animation:rightSpring .3s}.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider{-webkit-animation:leftSpring .3s;animation:leftSpring .3s}.swipebox-touch #swipebox-container:before,.swipebox-touch #swipebox-container:after{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;content:' ';position:absolute;z-index:999;top:0;height:100%;width:20px;opacity:0}
4
+ .swipebox-touch #swipebox-container:before{left:0;-webkit-box-shadow:inset 10px 0px 10px -8px #656565;box-shadow:inset 10px 0px 10px -8px #656565}.swipebox-touch #swipebox-container:after{right:0;-webkit-box-shadow:inset -10px 0px 10px -8px #656565;box-shadow:inset -10px 0px 10px -8px #656565}.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before{opacity:1}.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after{opacity:1}@-webkit-keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@media screen and (min-width:800px){#swipebox-close{right:10px}#swipebox-arrows{width:92%;max-width:800px}}#swipebox-overlay{background:#0d0d0d}#swipebox-bottom-bar,#swipebox-top-bar{text-shadow:1px 1px 1px #000;background:#000;opacity:.95}#swipebox-top-bar{color:#fff !important;font-size:15px;line-height:43px;font-family:Helvetica,Arial,sans-serif}
assets/front/js/ccat-nimble-front.js CHANGED
@@ -741,7 +741,7 @@ window.nb_.getQueryVariable = function(variable) {
741
  return true;//<=> continue see https://api.jquery.com/jquery.each/
742
 
743
  // do nothing if dynamic asset loading is not enabled for js and css AND the assets in not in "force" mode
744
- var load_authorized = sekFrontLocalized.load_front_assets_on_scroll;
745
  if ( true === handlerParams.force_loading ) {
746
  load_authorized = true;
747
  }
@@ -826,42 +826,42 @@ window.nb_.getQueryVariable = function(variable) {
826
 
827
 
828
  /* ------------------------------------------------------------------------- *
829
- * LOAD MAGNIFIC POPUP
830
- /* ------------------------------------------------------------------------- */
831
  (function(w, d){
832
  var callbackFunc = function() {
833
  jQuery(function($){
834
- if ( !sekFrontLocalized.load_front_assets_on_scroll )
835
  return;
836
 
837
  var $linkCandidates = $('[data-sek-module-type="czr_image_module"]').find('.sek-link-to-img-lightbox');
838
- $linkCandidates = $linkCandidates.add($('[data-sek-level="module"]').find('.sek-gallery-lightbox'));
839
  // Abort if no link candidate, or if the link href looks like :javascript:void(0) <= this can occur with the default image for example.
840
  if ( $linkCandidates.length < 1 )
841
  return;
842
  var doLoad = function() {
843
  //Load the style
844
- if ( $('head').find( '#czr-magnific-popup' ).length < 1 ) {
845
  $('head').append( $('<link/>' , {
846
  rel : 'stylesheet',
847
- id : 'czr-magnific-popup',
848
  type : 'text/css',
849
- href : sekFrontLocalized.frontAssetsPath + 'css/libs/magnific-popup.min.css?' + sekFrontLocalized.assetVersion
850
  }) );
851
  }
852
 
853
- if ( !nb_.isFunction( $.fn.magnificPopup ) && sekFrontLocalized.load_front_assets_on_scroll ) {
854
  nb_.ajaxLoadScript({
855
- path : 'js/libs/jquery-magnific-popup.min.js',
856
- loadcheck : function() { return nb_.isFunction( $.fn.magnificPopup ); }
857
  });
858
  }
859
  };// doLoad
860
 
861
  // Load js plugin if needed
862
- // when the plugin is loaded => it emits 'nb-jmp-parsed' listened to by nb_.listenTo()
863
  nb_.maybeLoadAssetsWhenSelectorInScreen( {
864
- id : 'magnific-popup',
865
  elements : $linkCandidates,
866
  func : doLoad
867
  });
@@ -870,22 +870,19 @@ window.nb_.getQueryVariable = function(variable) {
870
 
871
  //When loaded with defer, we can not be sure that jQuery will be loaded before
872
  nb_.listenTo( 'nb-app-ready', function() {
873
- nb_.listenTo( 'nb-needs-magnific-popup', callbackFunc );
874
  });
875
  }(window, document));
876
 
877
 
878
 
879
-
880
-
881
-
882
  /* ------------------------------------------------------------------------- *
883
  * MAYBE LOAD SWIPER ON SCROLL
884
  /* ------------------------------------------------------------------------- */
885
  (function(w, d){
886
  var callbackFunc = function() {
887
  jQuery(function($){
888
- if ( !sekFrontLocalized.load_front_assets_on_scroll )
889
  return;
890
  // Load js plugin if needed
891
  // // when the plugin is loaded => it emits 'nimble-swiper-ready' listened to by nb_.listenTo()
@@ -943,7 +940,7 @@ window.nb_.getQueryVariable = function(variable) {
943
  (function(w, d){
944
  var callbackFunc = function() {
945
  jQuery(function($){
946
- if ( !sekFrontLocalized.load_front_assets_on_scroll )
947
  return;
948
  var $candidates = $('[data-sek-video-bg-src]');
949
  // Abort if no link candidate, or if the link href looks like :javascript:void(0) <= this can occur with the default image for example.
@@ -951,7 +948,7 @@ window.nb_.getQueryVariable = function(variable) {
951
  return;
952
 
953
  // Load js plugin if needed
954
- // when the plugin is loaded => it emits 'nb-jmp-parsed' listened to by nb_.listenTo()
955
  nb_.maybeLoadAssetsWhenSelectorInScreen( {
956
  id : 'nb-video-bg',
957
  elements : $candidates,
@@ -982,7 +979,7 @@ window.nb_.getQueryVariable = function(variable) {
982
  // we don't need to inject font awesome if already enqueued by a theme
983
  if ( sekFrontLocalized.fontAwesomeAlreadyEnqueued )
984
  return;
985
- if ( !sekFrontLocalized.load_front_assets_on_scroll )
986
  return;
987
  var $candidates = $('i[class*=fa-]');
988
 
@@ -1010,7 +1007,7 @@ window.nb_.getQueryVariable = function(variable) {
1010
  }
1011
  };// doLoad
1012
  // Load js plugin if needed
1013
- // when the plugin is loaded => it emits 'nb-jmp-parsed' listened to by nb_.listenTo()
1014
  nb_.maybeLoadAssetsWhenSelectorInScreen({
1015
  id : 'font-awesome',
1016
  elements : $candidates,
@@ -1026,73 +1023,49 @@ window.nb_.getQueryVariable = function(variable) {
1026
  });
1027
  }(window, document));// global sekFrontLocalized, nimbleListenTo
1028
  /* ------------------------------------------------------------------------- *
1029
- * LIGHT BOX WITH MAGNIFIC POPUP
1030
  /* ------------------------------------------------------------------------- */
1031
- (function(w, d){
1032
- nb_.listenTo('nb-jmp-parsed', function() {
1033
- jQuery(function($){
1034
- if ( nb_.isCustomizing() )
1035
- return;
1036
-
1037
- var $linkCandidates = [
1038
- $('[data-sek-level="module"]').find('.sek-link-to-img-lightbox'),// image module
1039
- $('[data-sek-level="module"]').find('.sek-gallery-lightbox')// gallery module
1040
- ];
1041
-
1042
- var _params = {
1043
- type: 'image',
1044
- closeOnContentClick: true,
1045
- closeBtnInside: true,
1046
- fixedContentPos: true,
1047
- mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
1048
- image: {
1049
- verticalFit: true
1050
- // titleSrc: function(item) {
1051
- // return item.el.attr('title');
1052
- // }
1053
- },
1054
- zoom: {
1055
- enabled: true,
1056
- duration: 300 // don't foget to change the duration also in CSS
1057
- }
1058
- };
1059
- //var $linkCand;
1060
- $.each( $linkCandidates, function(_k, $linkCand) {
1061
- // Abort if no link candidate
1062
- if ( $linkCand.length < 1 )
1063
  return;
1064
- //$linkCand = $(this);
1065
- if ( $linkCand.hasClass('sek-gallery-lightbox') ) {
1066
- _params.delegate = 'figure .sek-gal-img-has-link';
1067
- _params.gallery = {
1068
- enabled: true,
1069
- navigateByImgClick: true
1070
- //preload: [0,1] // Will preload 0 - before current, and 1 after the current image
1071
- };
1072
- _params.image = {
1073
- verticalFit: true,
1074
- titleSrc: function(item) {
1075
- return item.el.attr('title');
1076
- }
1077
- };
1078
- }
1079
- // Abort if candidate already setup
1080
- if ( $linkCand.data('nimble-mfp-done') )
1081
- return;
1082
- try { $linkCand.magnificPopup( _params ); } catch( er ) {
1083
- nb_.errorLog( 'error in callback of nimble-magnific-popup-loaded => ', er );
1084
- }
1085
- $linkCand.data('nimble-mfp-done', true );
1086
- });
 
 
 
 
 
 
 
 
 
 
 
1087
 
1088
- // July 2021, prevent gallery images to be clicked when no link is specified
1089
- $('.sek-gallery-lightbox').on('click', '.sek-no-img-link', function(evt) {
1090
- evt.preventDefault();
1091
- });
1092
 
1093
- });//jQuery(function($){})
1094
- });
1095
- }(window, document));
1096
 
1097
 
1098
 
@@ -1230,7 +1203,7 @@ nb_.listenTo('nb-docready', function() {
1230
 
1231
  // September 2021 => Solves the problem of CSS loaders not cleaned
1232
  // see https://github.com/presscustomizr/nimble-builder/issues/874
1233
- nb_.listenTo('nb-docready', function() {
1234
  jQuery(function($){
1235
  var $cssLoaders = $('.sek-css-loader');
1236
  if ( $cssLoaders.length < 1 )
741
  return true;//<=> continue see https://api.jquery.com/jquery.each/
742
 
743
  // do nothing if dynamic asset loading is not enabled for js and css AND the assets in not in "force" mode
744
+ var load_authorized = sekFrontLocalized.load_front_assets_on_dynamically;
745
  if ( true === handlerParams.force_loading ) {
746
  load_authorized = true;
747
  }
826
 
827
 
828
  /* ------------------------------------------------------------------------- *
829
+ * LOAD SWIPEBOX
830
+ /* ------------------------------------------------------------------------- */
831
  (function(w, d){
832
  var callbackFunc = function() {
833
  jQuery(function($){
834
+ if ( !sekFrontLocalized.load_front_assets_on_dynamically )
835
  return;
836
 
837
  var $linkCandidates = $('[data-sek-module-type="czr_image_module"]').find('.sek-link-to-img-lightbox');
838
+ $linkCandidates = $linkCandidates.add($('[data-sek-level="module"]').find('.sek-gal-link-to-img-lightbox'));
839
  // Abort if no link candidate, or if the link href looks like :javascript:void(0) <= this can occur with the default image for example.
840
  if ( $linkCandidates.length < 1 )
841
  return;
842
  var doLoad = function() {
843
  //Load the style
844
+ if ( $('head').find( '#nb-swipebox' ).length < 1 ) {
845
  $('head').append( $('<link/>' , {
846
  rel : 'stylesheet',
847
+ id : 'nb-swipebox',
848
  type : 'text/css',
849
+ href : sekFrontLocalized.frontAssetsPath + 'css/libs/swipebox.min.css?' + sekFrontLocalized.assetVersion
850
  }) );
851
  }
852
 
853
+ if ( !nb_.isFunction( $.fn.swipebox ) && sekFrontLocalized.load_front_assets_on_dynamically ) {
854
  nb_.ajaxLoadScript({
855
+ path : 'js/libs/jquery-swipebox.min.js',
856
+ loadcheck : function() { return nb_.isFunction( $.fn.swipebox ); }
857
  });
858
  }
859
  };// doLoad
860
 
861
  // Load js plugin if needed
862
+ // when the plugin is loaded => it emits 'nb-swipebox-parsed' listened to by nb_.listenTo()
863
  nb_.maybeLoadAssetsWhenSelectorInScreen( {
864
+ id : 'swipebox',
865
  elements : $linkCandidates,
866
  func : doLoad
867
  });
870
 
871
  //When loaded with defer, we can not be sure that jQuery will be loaded before
872
  nb_.listenTo( 'nb-app-ready', function() {
873
+ nb_.listenTo( 'nb-needs-swipebox', callbackFunc );
874
  });
875
  }(window, document));
876
 
877
 
878
 
 
 
 
879
  /* ------------------------------------------------------------------------- *
880
  * MAYBE LOAD SWIPER ON SCROLL
881
  /* ------------------------------------------------------------------------- */
882
  (function(w, d){
883
  var callbackFunc = function() {
884
  jQuery(function($){
885
+ if ( !sekFrontLocalized.load_front_assets_on_dynamically )
886
  return;
887
  // Load js plugin if needed
888
  // // when the plugin is loaded => it emits 'nimble-swiper-ready' listened to by nb_.listenTo()
940
  (function(w, d){
941
  var callbackFunc = function() {
942
  jQuery(function($){
943
+ if ( !sekFrontLocalized.load_front_assets_on_dynamically )
944
  return;
945
  var $candidates = $('[data-sek-video-bg-src]');
946
  // Abort if no link candidate, or if the link href looks like :javascript:void(0) <= this can occur with the default image for example.
948
  return;
949
 
950
  // Load js plugin if needed
951
+ // when the plugin is loaded => it emits 'nb-..-parsed' listened to by nb_.listenTo()
952
  nb_.maybeLoadAssetsWhenSelectorInScreen( {
953
  id : 'nb-video-bg',
954
  elements : $candidates,
979
  // we don't need to inject font awesome if already enqueued by a theme
980
  if ( sekFrontLocalized.fontAwesomeAlreadyEnqueued )
981
  return;
982
+ if ( !sekFrontLocalized.load_front_assets_on_dynamically )
983
  return;
984
  var $candidates = $('i[class*=fa-]');
985
 
1007
  }
1008
  };// doLoad
1009
  // Load js plugin if needed
1010
+ // when the plugin is loaded => it emits 'nb-...-parsed' listened to by nb_.listenTo()
1011
  nb_.maybeLoadAssetsWhenSelectorInScreen({
1012
  id : 'font-awesome',
1013
  elements : $candidates,
1023
  });
1024
  }(window, document));// global sekFrontLocalized, nimbleListenTo
1025
  /* ------------------------------------------------------------------------- *
1026
+ * LIGHT BOX SWIPEBOX ( April 2022 for #886)
1027
  /* ------------------------------------------------------------------------- */
1028
+ (function(w, d){
1029
+ nb_.listenTo('nb-swipebox-parsed', function() {
1030
+ jQuery(function($){
1031
+ if ( nb_.isCustomizing() )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1032
  return;
1033
+
1034
+ var $linkCandidates = [
1035
+ $('[data-sek-level="module"]').find('.sek-link-to-img-lightbox'),// image module
1036
+ $('[data-sek-level="module"]').find('.sek-gal-link-to-img-lightbox')// gallery module
1037
+ ];
1038
+
1039
+ //https://github.com/brutaldesign/swipebox
1040
+ var _params = {
1041
+ loopAtEnd: true
1042
+ };
1043
+ //var $linkCand;
1044
+ $.each( $linkCandidates, function(_k, $linkCand) {
1045
+ // Abort if no link candidate
1046
+ if ( $linkCand.length < 1 ) {
1047
+ return;
1048
+ }
1049
+ // Abort if candidate already setup
1050
+ if ( $linkCand.data('nimble-swiperbox-done') )
1051
+ return;
1052
+ try { $linkCand.swipebox( _params ); } catch( er ) {
1053
+ nb_.errorLog( 'error in callback of nb-swipebox-parsed => ', er );
1054
+ }
1055
+ $linkCand.data('nimble-swiperbox-done', true );
1056
+ });
1057
+
1058
+ // July 2021, prevent gallery images to be clicked when no link is specified
1059
+ $('.sek-gallery-lightbox').on('click', '.sek-no-img-link', function(evt) {
1060
+ evt.preventDefault();
1061
+ });
1062
+
1063
+ });//jQuery(function($){})
1064
+ });
1065
+ }(window, document));
1066
+
1067
 
 
 
 
 
1068
 
 
 
 
1069
 
1070
 
1071
 
1203
 
1204
  // September 2021 => Solves the problem of CSS loaders not cleaned
1205
  // see https://github.com/presscustomizr/nimble-builder/issues/874
1206
+ nb_.listenTo('nb-app-ready', function() {
1207
  jQuery(function($){
1208
  var $cssLoaders = $('.sek-css-loader');
1209
  if ( $cssLoaders.length < 1 )
assets/front/js/ccat-nimble-front.min.js CHANGED
@@ -1 +1 @@
1
- void 0===window.nb_&&window.console&&window.console.log&&console.log("Nimble error => window.nb_ global not instantiated"),window.nb_.getQueryVariable=function(e){for(var n=window.location.search.substring(1).split("&"),t=0;t<n.length;t++){var o=n[t].split("=");if(o[0]==e)return o[1]}return!1},window,document,nb_.listenTo("nb-jquery-loaded",function(){jQuery(function(d){jQuery.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e,n){window.nb_["is"+n]=function(e){return Object.prototype.toString.call(e)==="[object "+n+"]"}});var a,i,u=function(){return Date.now||(new Date).getTime()};d.extend(nb_,{cachedElements:{$window:d(window),$body:d("body")},isMobile:function(){return nb_.isFunction(window.matchMedia)&&matchMedia("only screen and (max-width: 768px)").matches||this.isCustomizing()&&"desktop"!=this.previewedDevice},isCustomizing:function(){return this.cachedElements.$body.hasClass("is-customizing")||"undefined"!=typeof wp&&void 0!==wp.customize},previewedDevice:"desktop",elOrFirstVisibleParentIsInWindow:function(e,n){var t=e instanceof d?e:d(e);if(t instanceof d){if(!n||nb_.isNumber(n)){var o=function(e){if(0<e.length&&e.is(":visible"))return e;var n=e.prev();if(0<n.length&&n.is(":visible"))return n;if(0<n.length&&!n.is(":visible"))return o(n);var t=e.parent();return 0<t.length?o(t):null},a=o(t);if(!a||a.length<1)return!1;var i=this.cachedElements.$window.scrollTop(),l=i+this.cachedElements.$window.height(),r=a.offset().top,s=n||0;return i-s<=r+a.height()&&r<=l+s}nb_.errorLog("invalid threshold in nb_.elOrFirstVisibleParentIsInWindow")}else nb_.errorLog("invalid element in nb_.elOrFirstVisibleParentIsInWindow",t)},has:function(e,n){if(!_.isArray(n))return null!=e&&hasOwnProperty.call(e,n);for(var t=n.length,o=0;o<t;o++){var a=n[o];if(null==e||!Object.prototype.hasOwnProperty.call(e,a))return!1;e=e[a]}return!!t},debounce:function(o,a,i){var l;return function(){var e=this,n=arguments,t=i&&!l;clearTimeout(l),l=setTimeout(function(){l=null,i||o.apply(e,n)},a),t&&o.apply(e,n)}},throttle:function(t,o,a){var i,l,r,s,d=0;a||(a={});var c=function(){d=!1===a.leading?0:u(),i=null,s=t.apply(l,r),i||(l=r=null)},e=function(){var e=u();d||!1!==a.leading||(d=e);var n=o-(e-d);return l=this,r=arguments,n<=0||o<n?(i&&(clearTimeout(i),i=null),d=e,s=t.apply(l,r),i||(l=r=null)):i||!1===a.trailing||(i=setTimeout(c,n)),s};return e.cancel=function(){clearTimeout(i),d=0,i=l=r=null},e},delay:(a=function(e,n,t){return setTimeout(function(){return e.apply(null,t)},n)},i=null==i?a.length-1:+i,function(){for(var e=Math.max(arguments.length-i,0),n=Array(e),t=0;t<e;t++)n[t]=arguments[t+i];switch(i){case 0:return a.call(this,n);case 1:return a.call(this,arguments[0],n);case 2:return a.call(this,arguments[0],arguments[1],n)}var o=Array(i+1);for(t=0;t<i;t++)o[t]=arguments[t];return o[i]=n,a.apply(this,o)})}),nb_.emit("nb-app-ready")})}),window,document,nb_.listenTo("nb-app-ready",function(){var a;(a=jQuery).fn.fitText=function(e,n){var t=e||1,o=a.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},n);return this.each(function(){var e=a(this),n=function(){e.css("font-size",Math.max(Math.min(e.width()/(10*t),parseFloat(o.maxFontSize)),parseFloat(o.minFontSize))+"px")};n(),nb_.cachedElements.$window.on("resize.fittext orientationchange.fittext",n)})}}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(i){var l=function(e){var n=document.createElement("a");n.href=e,n.href=n.href;for(var t=["host","hostname","hash","href","port","protocol","search"],o=0,a=t.length;o<a;o++)this[t[o]]=n[t[o]];this.pathname=("/"!==n.pathname.charAt(0)?"/":"")+n.pathname},n=i("html, body");window.nb_allImagesLazyLoadedForScrollToAnchor=!1;var r=function(){var e=i(this);"scrollBehavior"in document.documentElement.style?e[0].scrollIntoView({behavior:"smooth"}):n.animate({scrollTop:e.offset().top-150},400)},t=0,s=function(){var e=i(this);i("img[data-sek-src]").not(".sek-lazy-load-error").length<1?(window.nb_allImagesLazyLoadedForScrollToAnchor=!0,r.call(e)):t<20?(t++,nb_.delay(function(){s.call(e)},100),nb_.delay(function(){r.call(e)},200)):r.call(e)},e=function(e){var n=i(this).attr("href");if(""!==n&&null!==n&&"string"==typeof n&&-1!==n.indexOf("#")){var t=new l(n),o=new l(window.document.location.href);if(t.pathname===o.pathname&&"string"==typeof t.hash&&""!==t.hash){var a=i('[data-sek-level="location"]').find('[id="'+t.hash.replace("#","")+'"]');1===a.length&&(e.preventDefault(),sekFrontLocalized.lazyload_enabled&&!1===window.nb_allImagesLazyLoadedForScrollToAnchor&&0<i("img[data-sek-src]").not(".sek-lazy-load-error").length?(i("body").one("smartload","img",function(){s.call(a)}),i("img[data-sek-src]").trigger("sek_load_img")):r.call(a))}}};nb_.cachedElements.$body.find(".menu-item").on("click","a",e),i('[data-sek-level="location"]').on("click","a",e)})}),window,document,nb_.listenTo("nb-app-ready",function(){!function(r,t){var a="nimbleLazyLoad",i={load_all_images_on_first_scroll:!1,threshold:100,fadeIn_options:{duration:400},delaySmartLoadEvent:0,candidateSelectors:"[data-sek-src], [data-sek-iframe-src]",force:!1},s="sek-lazy-loaded";function n(e,n){this.element=e,this.options=r.extend({},i,n);var t=sekFrontLocalized.lazyload_enabled;if(this.options.force&&(t=!0),t)if(r(this.element).data("nimbleLazyLoadDone"))r(this.element).trigger("nb-trigger-lazyload");else{this._defaults=i,this._name=a;var o=this;r(this.element).on("nb-trigger-lazyload",function(){o._maybe_trigger_load("nb-trigger-lazyload")}),this.init()}}n.prototype._getCandidateEls=function(){return r(this.options.candidateSelectors,this.element)},n.prototype.init=function(){var n=this;r("body").on("sek_load_img sek_load_iframe",n.options.candidateSelectors,function(e){!0!==r(this).data("sek-lazy-loaded")&&("sek_load_img"===e.type?n._load_img(this):"sek_load_iframe"===e.type&&n._load_iframe(this))}),nb_.cachedElements.$window.on("scroll",function(e){n._better_scroll_event_handler(e)}),nb_.cachedElements.$window.on("resize",nb_.debounce(function(e){n._maybe_trigger_load(e)},100)),this._maybe_trigger_load("dom-ready"),setTimeout(function(){n._maybe_trigger_load("dom-ready")},1e3),r(this.element).data("nimbleLazyLoadDone",!0)},n.prototype._better_scroll_event_handler=function(e){var n=this;this.doingAnimation||(this.doingAnimation=!0,t.requestAnimationFrame(function(){n._maybe_trigger_load(e),n.doingAnimation=!1}))},n.prototype._maybe_trigger_load=function(t){var o=this,e=o._getCandidateEls(),a=t&&"scroll"===t.type?this.options.threshold:0;_visible_list=e.filter(function(e,n){return!(!t||"scroll"!=t.type||!o.options.load_all_images_on_first_scroll)||nb_.elOrFirstVisibleParentIsInWindow(n,a)}),_visible_list.map(function(e,n){!0!==r(n).data("sek-lazy-loaded")&&("IFRAME"===r(n).prop("tagName")?r(n).trigger("sek_load_iframe"):r(n).trigger("sek_load_img"))})},n.prototype._load_img=function(e){var t=r(e);if(t.attr("data-sek-src")&&!t.hasClass(s)&&!t.hasClass("lazy-loading")){var n=t.attr("data-sek-src"),o=t.attr("data-sek-srcset"),a=t.attr("data-sek-sizes"),i=this,l=r("<img />",{src:n});t.addClass("lazy-loading"),t.off("sek_load_img"),l.on("load",function(){t.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),t.data("sek-lazy-bg")?t.css("backgroundImage","url("+n+")"):(t.attr("src",n),o&&t.attr("srcset",o),a&&t.attr("sizes",a)),t.hasClass(s)||t.addClass(s),t.trigger("smartload"),t.data("sek-lazy-loaded",!0),i._clean_css_loader(t)}).on("error",function(e,n){t.addClass("sek-lazy-load-error")}),l[0].complete&&l.trigger("load"),t.removeClass("lazy-loading")}},n.prototype._clean_css_loader=function(e){r.each([e.find(".sek-css-loader"),e.parent().find(".sek-css-loader")],function(e,n){0<n.length&&n.remove()})},n.prototype._load_iframe=function(e){var n=r(e);n.off("sek_load_iframe"),n.attr("src",function(){var e=r(this).attr("data-sek-iframe-src");return r(this).removeAttr("data-sek-iframe-src"),n.data("sek-lazy-loaded",!0),n.trigger("smartload"),n.hasClass(s)||n.addClass(s),e})},r.fn[a]=function(e){return this.each(function(){r.data(this,"plugin_"+a)||r.data(this,"plugin_"+a,new n(this,e))})}}(jQuery,window),(sekFrontLocalized.lazyload_enabled||nb_.isCustomizing())&&nb_.emit("nb-lazyload-parsed")}),window,document,nb_.loadAssetWhenElementVisible=function(a,n){jQuery(function(t){if(!nb_.scrollHandlers[a].loaded){nb_.scrollHandlers[a].loaded=!1;var e=n.elements,o=n.func;t.each(e,function(e,n){!nb_.scrollHandlers[a].loaded&&nb_.elOrFirstVisibleParentIsInWindow(t(n))&&(o(),nb_.scrollHandlers[a].loaded=!0)}),n.scrollHandler&&nb_.scrollHandlers[a].loaded&&nb_.cachedElements.$window.off("scroll",n.scrollHandler)}})},nb_.loopOnScrollHandlers=function(){jQuery(function(e){e.each(nb_.scrollHandlers,function(e,n){if(n.loaded)return!0;var t=sekFrontLocalized.load_front_assets_on_scroll;if(!0===n.force_loading&&(t=!0),t){if(n.elements.length<1)return!0;try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}nb_.isFunction(n.func)&&nb_.isUndefined(n.scrollHandler)?(n.scrollHandler=nb_.throttle(function(){try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}},100),nb_.cachedElements.$window.on("scroll",n.scrollHandler)):nb_.isFunction(n.func)||nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers => wrong callback func param",n)}})})},nb_.listenTo("nb-app-ready",function(){jQuery(function(e){nb_.listenTo("nimble-new-scroll-handler-added",nb_.loopOnScrollHandlers)})}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(t){nb_.maybeLoadAssetsWhenSelectorInScreen=function(e){if((e=t.extend({id:"",elements:"",func:""},e)).id.length<1)nb_.errorLog("Nimble error => maybeLoadAssetsWhenSelectorInScreen => missing id",e);else if(!(t(e.elements).length<1)&&nb_.isFunction(e.func)){nb_.scrollHandlers=nb_.scrollHandlers||{};var n={elements:e.elements,func:e.func,force_loading:e.force_loading};nb_.scrollHandlers[e.id]=n,nb_.emit("nimble-new-scroll-handler-added",{fire_once:!1})}},nb_.emit("nimble-ready-to-load-assets-on-scroll")})}),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){var n=e('[data-sek-module-type="czr_image_module"]').find(".sek-link-to-img-lightbox");if(!((n=n.add(e('[data-sek-level="module"]').find(".sek-gallery-lightbox"))).length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"magnific-popup",elements:n,func:function(){e("head").find("#czr-magnific-popup").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"czr-magnific-popup",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/magnific-popup.min.css?"+sekFrontLocalized.assetVersion})),!nb_.isFunction(e.fn.magnificPopup)&&sekFrontLocalized.load_front_assets_on_scroll&&nb_.ajaxLoadScript({path:"js/libs/jquery-magnific-popup.min.js",loadcheck:function(){return nb_.isFunction(e.fn.magnificPopup)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-magnific-popup",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){if(!nb_.isFunction(window.Swiper)){var n=e('[data-sek-module-type="czr_img_slider_module"]');n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"swiper",elements:n,func:function(){e("head").find("#czr-swiper").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"czr-swiper",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/swiper-bundle.min.css?"+sekFrontLocalized.assetVersion})),nb_.ajaxLoadScript({path:"js/libs/swiper-bundle.min.js?"+sekFrontLocalized.assetVersion,loadcheck:function(){return nb_.isFunction(window.Swiper)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-swiper",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){var n=e("[data-sek-video-bg-src]");n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"nb-video-bg",elements:n,func:function(){nb_.ajaxLoadScript({path:"js/libs/nimble-video-bg.min.js?"+sekFrontLocalized.assetVersion})}})}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-videobg-js",t)})}(window,document),function(e,n){var t=function(){jQuery(function(n){if(!sekFrontLocalized.fontAwesomeAlreadyEnqueued&&sekFrontLocalized.load_front_assets_on_scroll){var e=n("i[class*=fa-]");if(!(e.length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"font-awesome",elements:e,func:function(){if(n("head").find("#nb-font-awesome").length<1){var e=document.createElement("link");e.setAttribute("href",sekFrontLocalized.frontAssetsPath+"fonts/css/fontawesome-all.min.css?"+sekFrontLocalized.assetVersion),e.setAttribute("id","nb-font-awesome"),e.setAttribute("data-sek-injected-dynamically","yes"),e.setAttribute("rel",nb_.hasPreloadSupport()?"preload":"stylesheet"),e.setAttribute("as","style"),e.onload=function(){this.onload=null,nb_.hasPreloadSupport()&&(this.rel="stylesheet")},document.getElementsByTagName("head")[0].appendChild(e)}}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-fa",t)})}(window,document),window,document,nb_.listenTo("nb-jmp-parsed",function(){jQuery(function(e){if(!nb_.isCustomizing()){var n=[e('[data-sek-level="module"]').find(".sek-link-to-img-lightbox"),e('[data-sek-level="module"]').find(".sek-gallery-lightbox")],t={type:"image",closeOnContentClick:!0,closeBtnInside:!0,fixedContentPos:!0,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!0,duration:300}};e.each(n,function(e,n){if(!(n.length<1||(n.hasClass("sek-gallery-lightbox")&&(t.delegate="figure .sek-gal-img-has-link",t.gallery={enabled:!0,navigateByImgClick:!0},t.image={verticalFit:!0,titleSrc:function(e){return e.el.attr("title")}}),n.data("nimble-mfp-done")))){try{n.magnificPopup(t)}catch(e){nb_.errorLog("error in callback of nimble-magnific-popup-loaded => ",e)}n.data("nimble-mfp-done",!0)}}),e(".sek-gallery-lightbox").on("click",".sek-no-img-link",function(e){e.preventDefault()})}})}),window,document,nb_.listenTo("nb-lazyload-parsed",function(){jQuery(function(n){var t=function(e){n(this).each(function(){try{(function(){n(this).data("nimbleLazyLoadDone")?n(this).trigger("nb-trigger-lazyload"):n(this).nimbleLazyLoad({force:nb_.isCustomizing()})}).call(n(this))}catch(e){nb_.errorLog("error with nimbleLazyLoad => ",e)}})};t.call(n(".sektion-wrapper")),nb_.cachedElements.$body.on("sek-section-added sek-level-refreshed sek-location-refreshed sek-columns-refreshed sek-modules-refreshed",'[data-sek-level="location"]',function(e){t.call(n(this),e),_.delay(function(){nb_.cachedElements.$window.trigger("resize")},200)})})}),window,document,nb_.listenTo("nb-parallax-parsed",function(){jQuery(function(n){n('[data-sek-bg-parallax="true"]').each(function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")})});var t=function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")}),setTimeout(function(){nb_.cachedElements.$body.trigger("resize")},500)};nb_.cachedElements.$body.on("sek-level-refreshed sek-section-added",function(e){"true"===n(this).data("sek-bg-parallax")?t.call(this):n(this).find('[data-sek-bg-parallax="true"]').each(function(){t.call(this)})})})}),nb_.listenTo("nb-docready",function(){if(window.nb_&&window.nb_.getQueryVariable){var e=window.nb_.getQueryVariable("nb_grid_module_go_to"),n=document.getElementById(e);if(e&&n){setTimeout(function(){n.scrollIntoView()},200);try{t=window.location.pathname.split("?go_to")[0],window.history.replaceState({},document.title,t)}catch(e){window.console&&window.console.log&&console.log('NB => error when cleaning url "go_to" param')}}}var t}),nb_.listenTo("nb-docready",function(){jQuery(function(e){var n=e(".sek-css-loader");if(!(n.length<1)){var t,o=nb_.throttle(function(){n=e(".sek-css-loader"),e.each(n,function(){t=e(this),nb_.elOrFirstVisibleParentIsInWindow(t)&&nb_.delay(function(){0<t.length&&t.remove()},1e3)}),n.length<1&&nb_.cachedElements.$window.off("scroll",o)},200);nb_.cachedElements.$window.on("scroll",o)}})});
1
+ void 0===window.nb_&&window.console&&window.console.log&&console.log("Nimble error => window.nb_ global not instantiated"),window.nb_.getQueryVariable=function(e){for(var n=window.location.search.substring(1).split("&"),t=0;t<n.length;t++){var o=n[t].split("=");if(o[0]==e)return o[1]}return!1},window,document,nb_.listenTo("nb-jquery-loaded",function(){jQuery(function(d){jQuery.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e,n){window.nb_["is"+n]=function(e){return Object.prototype.toString.call(e)==="[object "+n+"]"}});var a,i,u=function(){return Date.now||(new Date).getTime()};d.extend(nb_,{cachedElements:{$window:d(window),$body:d("body")},isMobile:function(){return nb_.isFunction(window.matchMedia)&&matchMedia("only screen and (max-width: 768px)").matches||this.isCustomizing()&&"desktop"!=this.previewedDevice},isCustomizing:function(){return this.cachedElements.$body.hasClass("is-customizing")||"undefined"!=typeof wp&&void 0!==wp.customize},previewedDevice:"desktop",elOrFirstVisibleParentIsInWindow:function(e,n){var t=e instanceof d?e:d(e);if(t instanceof d){if(!n||nb_.isNumber(n)){var o=function(e){if(0<e.length&&e.is(":visible"))return e;var n=e.prev();if(0<n.length&&n.is(":visible"))return n;if(0<n.length&&!n.is(":visible"))return o(n);var t=e.parent();return 0<t.length?o(t):null},a=o(t);if(!a||a.length<1)return!1;var i=this.cachedElements.$window.scrollTop(),l=i+this.cachedElements.$window.height(),r=a.offset().top,s=n||0;return i-s<=r+a.height()&&r<=l+s}nb_.errorLog("invalid threshold in nb_.elOrFirstVisibleParentIsInWindow")}else nb_.errorLog("invalid element in nb_.elOrFirstVisibleParentIsInWindow",t)},has:function(e,n){if(!_.isArray(n))return null!=e&&hasOwnProperty.call(e,n);for(var t=n.length,o=0;o<t;o++){var a=n[o];if(null==e||!Object.prototype.hasOwnProperty.call(e,a))return!1;e=e[a]}return!!t},debounce:function(o,a,i){var l;return function(){var e=this,n=arguments,t=i&&!l;clearTimeout(l),l=setTimeout(function(){l=null,i||o.apply(e,n)},a),t&&o.apply(e,n)}},throttle:function(t,o,a){var i,l,r,s,d=0;a||(a={});var c=function(){d=!1===a.leading?0:u(),i=null,s=t.apply(l,r),i||(l=r=null)},e=function(){var e=u();d||!1!==a.leading||(d=e);var n=o-(e-d);return l=this,r=arguments,n<=0||o<n?(i&&(clearTimeout(i),i=null),d=e,s=t.apply(l,r),i||(l=r=null)):i||!1===a.trailing||(i=setTimeout(c,n)),s};return e.cancel=function(){clearTimeout(i),d=0,i=l=r=null},e},delay:(a=function(e,n,t){return setTimeout(function(){return e.apply(null,t)},n)},i=null==i?a.length-1:+i,function(){for(var e=Math.max(arguments.length-i,0),n=Array(e),t=0;t<e;t++)n[t]=arguments[t+i];switch(i){case 0:return a.call(this,n);case 1:return a.call(this,arguments[0],n);case 2:return a.call(this,arguments[0],arguments[1],n)}var o=Array(i+1);for(t=0;t<i;t++)o[t]=arguments[t];return o[i]=n,a.apply(this,o)})}),nb_.emit("nb-app-ready")})}),window,document,nb_.listenTo("nb-app-ready",function(){var a;(a=jQuery).fn.fitText=function(e,n){var t=e||1,o=a.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},n);return this.each(function(){var e=a(this),n=function(){e.css("font-size",Math.max(Math.min(e.width()/(10*t),parseFloat(o.maxFontSize)),parseFloat(o.minFontSize))+"px")};n(),nb_.cachedElements.$window.on("resize.fittext orientationchange.fittext",n)})}}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(i){var l=function(e){var n=document.createElement("a");n.href=e,n.href=n.href;for(var t=["host","hostname","hash","href","port","protocol","search"],o=0,a=t.length;o<a;o++)this[t[o]]=n[t[o]];this.pathname=("/"!==n.pathname.charAt(0)?"/":"")+n.pathname},n=i("html, body");window.nb_allImagesLazyLoadedForScrollToAnchor=!1;var r=function(){var e=i(this);"scrollBehavior"in document.documentElement.style?e[0].scrollIntoView({behavior:"smooth"}):n.animate({scrollTop:e.offset().top-150},400)},t=0,s=function(){var e=i(this);i("img[data-sek-src]").not(".sek-lazy-load-error").length<1?(window.nb_allImagesLazyLoadedForScrollToAnchor=!0,r.call(e)):t<20?(t++,nb_.delay(function(){s.call(e)},100),nb_.delay(function(){r.call(e)},200)):r.call(e)},e=function(e){var n=i(this).attr("href");if(""!==n&&null!==n&&"string"==typeof n&&-1!==n.indexOf("#")){var t=new l(n),o=new l(window.document.location.href);if(t.pathname===o.pathname&&"string"==typeof t.hash&&""!==t.hash){var a=i('[data-sek-level="location"]').find('[id="'+t.hash.replace("#","")+'"]');1===a.length&&(e.preventDefault(),sekFrontLocalized.lazyload_enabled&&!1===window.nb_allImagesLazyLoadedForScrollToAnchor&&0<i("img[data-sek-src]").not(".sek-lazy-load-error").length?(i("body").one("smartload","img",function(){s.call(a)}),i("img[data-sek-src]").trigger("sek_load_img")):r.call(a))}}};nb_.cachedElements.$body.find(".menu-item").on("click","a",e),i('[data-sek-level="location"]').on("click","a",e)})}),window,document,nb_.listenTo("nb-app-ready",function(){!function(r,t){var a="nimbleLazyLoad",i={load_all_images_on_first_scroll:!1,threshold:100,fadeIn_options:{duration:400},delaySmartLoadEvent:0,candidateSelectors:"[data-sek-src], [data-sek-iframe-src]",force:!1},s="sek-lazy-loaded";function n(e,n){this.element=e,this.options=r.extend({},i,n);var t=sekFrontLocalized.lazyload_enabled;if(this.options.force&&(t=!0),t)if(r(this.element).data("nimbleLazyLoadDone"))r(this.element).trigger("nb-trigger-lazyload");else{this._defaults=i,this._name=a;var o=this;r(this.element).on("nb-trigger-lazyload",function(){o._maybe_trigger_load("nb-trigger-lazyload")}),this.init()}}n.prototype._getCandidateEls=function(){return r(this.options.candidateSelectors,this.element)},n.prototype.init=function(){var n=this;r("body").on("sek_load_img sek_load_iframe",n.options.candidateSelectors,function(e){!0!==r(this).data("sek-lazy-loaded")&&("sek_load_img"===e.type?n._load_img(this):"sek_load_iframe"===e.type&&n._load_iframe(this))}),nb_.cachedElements.$window.on("scroll",function(e){n._better_scroll_event_handler(e)}),nb_.cachedElements.$window.on("resize",nb_.debounce(function(e){n._maybe_trigger_load(e)},100)),this._maybe_trigger_load("dom-ready"),setTimeout(function(){n._maybe_trigger_load("dom-ready")},1e3),r(this.element).data("nimbleLazyLoadDone",!0)},n.prototype._better_scroll_event_handler=function(e){var n=this;this.doingAnimation||(this.doingAnimation=!0,t.requestAnimationFrame(function(){n._maybe_trigger_load(e),n.doingAnimation=!1}))},n.prototype._maybe_trigger_load=function(t){var o=this,e=o._getCandidateEls(),a=t&&"scroll"===t.type?this.options.threshold:0;_visible_list=e.filter(function(e,n){return!(!t||"scroll"!=t.type||!o.options.load_all_images_on_first_scroll)||nb_.elOrFirstVisibleParentIsInWindow(n,a)}),_visible_list.map(function(e,n){!0!==r(n).data("sek-lazy-loaded")&&("IFRAME"===r(n).prop("tagName")?r(n).trigger("sek_load_iframe"):r(n).trigger("sek_load_img"))})},n.prototype._load_img=function(e){var t=r(e);if(t.attr("data-sek-src")&&!t.hasClass(s)&&!t.hasClass("lazy-loading")){var n=t.attr("data-sek-src"),o=t.attr("data-sek-srcset"),a=t.attr("data-sek-sizes"),i=this,l=r("<img />",{src:n});t.addClass("lazy-loading"),t.off("sek_load_img"),l.on("load",function(){t.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),t.data("sek-lazy-bg")?t.css("backgroundImage","url("+n+")"):(t.attr("src",n),o&&t.attr("srcset",o),a&&t.attr("sizes",a)),t.hasClass(s)||t.addClass(s),t.trigger("smartload"),t.data("sek-lazy-loaded",!0),i._clean_css_loader(t)}).on("error",function(e,n){t.addClass("sek-lazy-load-error")}),l[0].complete&&l.trigger("load"),t.removeClass("lazy-loading")}},n.prototype._clean_css_loader=function(e){r.each([e.find(".sek-css-loader"),e.parent().find(".sek-css-loader")],function(e,n){0<n.length&&n.remove()})},n.prototype._load_iframe=function(e){var n=r(e);n.off("sek_load_iframe"),n.attr("src",function(){var e=r(this).attr("data-sek-iframe-src");return r(this).removeAttr("data-sek-iframe-src"),n.data("sek-lazy-loaded",!0),n.trigger("smartload"),n.hasClass(s)||n.addClass(s),e})},r.fn[a]=function(e){return this.each(function(){r.data(this,"plugin_"+a)||r.data(this,"plugin_"+a,new n(this,e))})}}(jQuery,window),(sekFrontLocalized.lazyload_enabled||nb_.isCustomizing())&&nb_.emit("nb-lazyload-parsed")}),window,document,nb_.loadAssetWhenElementVisible=function(a,n){jQuery(function(t){if(!nb_.scrollHandlers[a].loaded){nb_.scrollHandlers[a].loaded=!1;var e=n.elements,o=n.func;t.each(e,function(e,n){!nb_.scrollHandlers[a].loaded&&nb_.elOrFirstVisibleParentIsInWindow(t(n))&&(o(),nb_.scrollHandlers[a].loaded=!0)}),n.scrollHandler&&nb_.scrollHandlers[a].loaded&&nb_.cachedElements.$window.off("scroll",n.scrollHandler)}})},nb_.loopOnScrollHandlers=function(){jQuery(function(e){e.each(nb_.scrollHandlers,function(e,n){if(n.loaded)return!0;var t=sekFrontLocalized.load_front_assets_on_dynamically;if(!0===n.force_loading&&(t=!0),t){if(n.elements.length<1)return!0;try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}nb_.isFunction(n.func)&&nb_.isUndefined(n.scrollHandler)?(n.scrollHandler=nb_.throttle(function(){try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}},100),nb_.cachedElements.$window.on("scroll",n.scrollHandler)):nb_.isFunction(n.func)||nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers => wrong callback func param",n)}})})},nb_.listenTo("nb-app-ready",function(){jQuery(function(e){nb_.listenTo("nimble-new-scroll-handler-added",nb_.loopOnScrollHandlers)})}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(t){nb_.maybeLoadAssetsWhenSelectorInScreen=function(e){if((e=t.extend({id:"",elements:"",func:""},e)).id.length<1)nb_.errorLog("Nimble error => maybeLoadAssetsWhenSelectorInScreen => missing id",e);else if(!(t(e.elements).length<1)&&nb_.isFunction(e.func)){nb_.scrollHandlers=nb_.scrollHandlers||{};var n={elements:e.elements,func:e.func,force_loading:e.force_loading};nb_.scrollHandlers[e.id]=n,nb_.emit("nimble-new-scroll-handler-added",{fire_once:!1})}},nb_.emit("nimble-ready-to-load-assets-on-scroll")})}),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_dynamically){var n=e('[data-sek-module-type="czr_image_module"]').find(".sek-link-to-img-lightbox");if(!((n=n.add(e('[data-sek-level="module"]').find(".sek-gal-link-to-img-lightbox"))).length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"swipebox",elements:n,func:function(){e("head").find("#nb-swipebox").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"nb-swipebox",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/swipebox.min.css?"+sekFrontLocalized.assetVersion})),!nb_.isFunction(e.fn.swipebox)&&sekFrontLocalized.load_front_assets_on_dynamically&&nb_.ajaxLoadScript({path:"js/libs/jquery-swipebox.min.js",loadcheck:function(){return nb_.isFunction(e.fn.swipebox)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-swipebox",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_dynamically){if(!nb_.isFunction(window.Swiper)){var n=e('[data-sek-module-type="czr_img_slider_module"]');n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"swiper",elements:n,func:function(){e("head").find("#czr-swiper").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"czr-swiper",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/swiper-bundle.min.css?"+sekFrontLocalized.assetVersion})),nb_.ajaxLoadScript({path:"js/libs/swiper-bundle.min.js?"+sekFrontLocalized.assetVersion,loadcheck:function(){return nb_.isFunction(window.Swiper)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-swiper",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_dynamically){var n=e("[data-sek-video-bg-src]");n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"nb-video-bg",elements:n,func:function(){nb_.ajaxLoadScript({path:"js/libs/nimble-video-bg.min.js?"+sekFrontLocalized.assetVersion})}})}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-videobg-js",t)})}(window,document),function(e,n){var t=function(){jQuery(function(n){if(!sekFrontLocalized.fontAwesomeAlreadyEnqueued&&sekFrontLocalized.load_front_assets_on_dynamically){var e=n("i[class*=fa-]");if(!(e.length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"font-awesome",elements:e,func:function(){if(n("head").find("#nb-font-awesome").length<1){var e=document.createElement("link");e.setAttribute("href",sekFrontLocalized.frontAssetsPath+"fonts/css/fontawesome-all.min.css?"+sekFrontLocalized.assetVersion),e.setAttribute("id","nb-font-awesome"),e.setAttribute("data-sek-injected-dynamically","yes"),e.setAttribute("rel",nb_.hasPreloadSupport()?"preload":"stylesheet"),e.setAttribute("as","style"),e.onload=function(){this.onload=null,nb_.hasPreloadSupport()&&(this.rel="stylesheet")},document.getElementsByTagName("head")[0].appendChild(e)}}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-fa",t)})}(window,document),window,document,nb_.listenTo("nb-swipebox-parsed",function(){jQuery(function(e){if(!nb_.isCustomizing()){var n=[e('[data-sek-level="module"]').find(".sek-link-to-img-lightbox"),e('[data-sek-level="module"]').find(".sek-gal-link-to-img-lightbox")],t={loopAtEnd:!0};e.each(n,function(e,n){if(!(n.length<1||n.data("nimble-swiperbox-done"))){try{n.swipebox(t)}catch(e){nb_.errorLog("error in callback of nb-swipebox-parsed => ",e)}n.data("nimble-swiperbox-done",!0)}}),e(".sek-gallery-lightbox").on("click",".sek-no-img-link",function(e){e.preventDefault()})}})}),window,document,nb_.listenTo("nb-lazyload-parsed",function(){jQuery(function(n){var t=function(e){n(this).each(function(){try{(function(){n(this).data("nimbleLazyLoadDone")?n(this).trigger("nb-trigger-lazyload"):n(this).nimbleLazyLoad({force:nb_.isCustomizing()})}).call(n(this))}catch(e){nb_.errorLog("error with nimbleLazyLoad => ",e)}})};t.call(n(".sektion-wrapper")),nb_.cachedElements.$body.on("sek-section-added sek-level-refreshed sek-location-refreshed sek-columns-refreshed sek-modules-refreshed",'[data-sek-level="location"]',function(e){t.call(n(this),e),_.delay(function(){nb_.cachedElements.$window.trigger("resize")},200)})})}),window,document,nb_.listenTo("nb-parallax-parsed",function(){jQuery(function(n){n('[data-sek-bg-parallax="true"]').each(function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")})});var t=function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")}),setTimeout(function(){nb_.cachedElements.$body.trigger("resize")},500)};nb_.cachedElements.$body.on("sek-level-refreshed sek-section-added",function(e){"true"===n(this).data("sek-bg-parallax")?t.call(this):n(this).find('[data-sek-bg-parallax="true"]').each(function(){t.call(this)})})})}),nb_.listenTo("nb-docready",function(){if(window.nb_&&window.nb_.getQueryVariable){var e=window.nb_.getQueryVariable("nb_grid_module_go_to"),n=document.getElementById(e);if(e&&n){setTimeout(function(){n.scrollIntoView()},200);try{t=window.location.pathname.split("?go_to")[0],window.history.replaceState({},document.title,t)}catch(e){window.console&&window.console.log&&console.log('NB => error when cleaning url "go_to" param')}}}var t}),nb_.listenTo("nb-app-ready",function(){jQuery(function(e){var n=e(".sek-css-loader");if(!(n.length<1)){var t,o=nb_.throttle(function(){n=e(".sek-css-loader"),e.each(n,function(){t=e(this),nb_.elOrFirstVisibleParentIsInWindow(t)&&nb_.delay(function(){0<t.length&&t.remove()},1e3)}),n.length<1&&nb_.cachedElements.$window.off("scroll",o)},200);nb_.cachedElements.$window.on("scroll",o)}})});
assets/front/js/libs/jquery-magnific-popup.js DELETED
@@ -1,1872 +0,0 @@
1
- /*! Magnific Popup - v1.1.0 - 2016-02-20
2
- * http://dimsemenov.com/plugins/magnific-popup/
3
- * Copyright (c) 2016 Dmitry Semenov; */
4
- (function(w, d){
5
- var callbackFunc = function() {
6
-
7
- (function (factory) {
8
- if (typeof define === 'function' && define.amd) {
9
- // AMD. Register as an anonymous module.
10
- define(['jquery'], factory);
11
- } else if (typeof exports === 'object') {
12
- // Node/CommonJS
13
- factory(require('jquery'));
14
- } else {
15
- // Browser globals
16
- factory(window.jQuery || window.Zepto);
17
- }
18
- }(function($) {
19
-
20
- /*>>core*/
21
- /**
22
- *
23
- * Magnific Popup Core JS file
24
- *
25
- */
26
-
27
-
28
- /**
29
- * Private static constants
30
- */
31
- var CLOSE_EVENT = 'Close',
32
- BEFORE_CLOSE_EVENT = 'BeforeClose',
33
- AFTER_CLOSE_EVENT = 'AfterClose',
34
- BEFORE_APPEND_EVENT = 'BeforeAppend',
35
- MARKUP_PARSE_EVENT = 'MarkupParse',
36
- OPEN_EVENT = 'Open',
37
- CHANGE_EVENT = 'Change',
38
- NS = 'mfp',
39
- EVENT_NS = '.' + NS,
40
- READY_CLASS = 'mfp-ready',
41
- REMOVING_CLASS = 'mfp-removing',
42
- PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
43
-
44
-
45
- /**
46
- * Private vars
47
- */
48
- /*jshint -W079 */
49
- var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
50
- MagnificPopup = function(){},
51
- _isJQ = !!(window.jQuery),
52
- _prevStatus,
53
- _window = $(window),
54
- _document,
55
- _prevContentType,
56
- _wrapClasses,
57
- _currPopupType;
58
-
59
-
60
- /**
61
- * Private functions
62
- */
63
- var _mfpOn = function(name, f) {
64
- mfp.ev.on(NS + name + EVENT_NS, f);
65
- },
66
- _getEl = function(className, appendTo, html, raw) {
67
- var el = document.createElement('div');
68
- el.className = 'mfp-'+className;
69
- if(html) {
70
- el.innerHTML = html;
71
- }
72
- if(!raw) {
73
- el = $(el);
74
- if(appendTo) {
75
- el.appendTo(appendTo);
76
- }
77
- } else if(appendTo) {
78
- appendTo.appendChild(el);
79
- }
80
- return el;
81
- },
82
- _mfpTrigger = function(e, data) {
83
- mfp.ev.triggerHandler(NS + e, data);
84
-
85
- if(mfp.st.callbacks) {
86
- // converts "mfpEventName" to "eventName" callback and triggers it if it's present
87
- e = e.charAt(0).toLowerCase() + e.slice(1);
88
- if(mfp.st.callbacks[e]) {
89
- mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
90
- }
91
- }
92
- },
93
- _getCloseBtn = function(type) {
94
- if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
95
- mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
96
- _currPopupType = type;
97
- }
98
- return mfp.currTemplate.closeBtn;
99
- },
100
- // Initialize Magnific Popup only when called at least once
101
- _checkInstance = function() {
102
- if(!$.magnificPopup.instance) {
103
- /*jshint -W020 */
104
- mfp = new MagnificPopup();
105
- mfp.init();
106
- $.magnificPopup.instance = mfp;
107
- }
108
- },
109
- // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
110
- supportsTransitions = function() {
111
- var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
112
- v = ['ms','O','Moz','Webkit']; // 'v' for vendor
113
-
114
- if( s['transition'] !== undefined ) {
115
- return true;
116
- }
117
-
118
- while( v.length ) {
119
- if( v.pop() + 'Transition' in s ) {
120
- return true;
121
- }
122
- }
123
-
124
- return false;
125
- };
126
-
127
-
128
-
129
- /**
130
- * Public functions
131
- */
132
- MagnificPopup.prototype = {
133
-
134
- constructor: MagnificPopup,
135
-
136
- /**
137
- * Initializes Magnific Popup plugin.
138
- * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
139
- */
140
- init: function() {
141
- var appVersion = navigator.appVersion;
142
- mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener;
143
- mfp.isAndroid = (/android/gi).test(appVersion);
144
- mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
145
- mfp.supportsTransition = supportsTransitions();
146
-
147
- // We disable fixed positioned lightbox on devices that don't handle it nicely.
148
- // If you know a better way of detecting this - let me know.
149
- mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
150
- _document = $(document);
151
-
152
- mfp.popupsCache = {};
153
- },
154
-
155
- /**
156
- * Opens popup
157
- * @param data [description]
158
- */
159
- open: function(data) {
160
-
161
- var i;
162
-
163
- if(data.isObj === false) {
164
- // convert jQuery collection to array to avoid conflicts later
165
- mfp.items = data.items.toArray();
166
-
167
- mfp.index = 0;
168
- var items = data.items,
169
- item;
170
- for(i = 0; i < items.length; i++) {
171
- item = items[i];
172
- if(item.parsed) {
173
- item = item.el[0];
174
- }
175
- if(item === data.el[0]) {
176
- mfp.index = i;
177
- break;
178
- }
179
- }
180
- } else {
181
- mfp.items = $.isArray(data.items) ? data.items : [data.items];
182
- mfp.index = data.index || 0;
183
- }
184
-
185
- // if popup is already opened - we just update the content
186
- if(mfp.isOpen) {
187
- mfp.updateItemHTML();
188
- return;
189
- }
190
-
191
- mfp.types = [];
192
- _wrapClasses = '';
193
- if(data.mainEl && data.mainEl.length) {
194
- mfp.ev = data.mainEl.eq(0);
195
- } else {
196
- mfp.ev = _document;
197
- }
198
-
199
- if(data.key) {
200
- if(!mfp.popupsCache[data.key]) {
201
- mfp.popupsCache[data.key] = {};
202
- }
203
- mfp.currTemplate = mfp.popupsCache[data.key];
204
- } else {
205
- mfp.currTemplate = {};
206
- }
207
-
208
-
209
-
210
- mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data );
211
- mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
212
-
213
- if(mfp.st.modal) {
214
- mfp.st.closeOnContentClick = false;
215
- mfp.st.closeOnBgClick = false;
216
- mfp.st.showCloseBtn = false;
217
- mfp.st.enableEscapeKey = false;
218
- }
219
-
220
-
221
- // Building markup
222
- // main containers are created only once
223
- if(!mfp.bgOverlay) {
224
-
225
- // Dark overlay
226
- mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
227
- mfp.close();
228
- });
229
-
230
- mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
231
- if(mfp._checkIfClose(e.target)) {
232
- mfp.close();
233
- }
234
- });
235
-
236
- mfp.container = _getEl('container', mfp.wrap);
237
- }
238
-
239
- mfp.contentContainer = _getEl('content');
240
- if(mfp.st.preloader) {
241
- mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
242
- }
243
-
244
-
245
- // Initializing modules
246
- var modules = $.magnificPopup.modules;
247
- for(i = 0; i < modules.length; i++) {
248
- var n = modules[i];
249
- n = n.charAt(0).toUpperCase() + n.slice(1);
250
- mfp['init'+n].call(mfp);
251
- }
252
- _mfpTrigger('BeforeOpen');
253
-
254
-
255
- if(mfp.st.showCloseBtn) {
256
- // Close button
257
- if(!mfp.st.closeBtnInside) {
258
- mfp.wrap.append( _getCloseBtn() );
259
- } else {
260
- _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
261
- values.close_replaceWith = _getCloseBtn(item.type);
262
- });
263
- _wrapClasses += ' mfp-close-btn-in';
264
- }
265
- }
266
-
267
- if(mfp.st.alignTop) {
268
- _wrapClasses += ' mfp-align-top';
269
- }
270
-
271
-
272
-
273
- if(mfp.fixedContentPos) {
274
- mfp.wrap.css({
275
- overflow: mfp.st.overflowY,
276
- overflowX: 'hidden',
277
- overflowY: mfp.st.overflowY
278
- });
279
- } else {
280
- mfp.wrap.css({
281
- top: _window.scrollTop(),
282
- position: 'absolute'
283
- });
284
- }
285
- if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
286
- mfp.bgOverlay.css({
287
- height: _document.height(),
288
- position: 'absolute'
289
- });
290
- }
291
-
292
-
293
-
294
- if(mfp.st.enableEscapeKey) {
295
- // Close on ESC key
296
- _document.on('keyup' + EVENT_NS, function(e) {
297
- if(e.keyCode === 27) {
298
- mfp.close();
299
- }
300
- });
301
- }
302
-
303
- _window.on('resize' + EVENT_NS, function() {
304
- mfp.updateSize();
305
- });
306
-
307
-
308
- if(!mfp.st.closeOnContentClick) {
309
- _wrapClasses += ' mfp-auto-cursor';
310
- }
311
-
312
- if(_wrapClasses)
313
- mfp.wrap.addClass(_wrapClasses);
314
-
315
-
316
- // this triggers recalculation of layout, so we get it once to not to trigger twice
317
- var windowHeight = mfp.wH = _window.height();
318
-
319
-
320
- var windowStyles = {};
321
-
322
- if( mfp.fixedContentPos ) {
323
- if(mfp._hasScrollBar(windowHeight)){
324
- var s = mfp._getScrollbarSize();
325
- if(s) {
326
- windowStyles.marginRight = s;
327
- }
328
- }
329
- }
330
-
331
- if(mfp.fixedContentPos) {
332
- if(!mfp.isIE7) {
333
- windowStyles.overflow = 'hidden';
334
- } else {
335
- // ie7 double-scroll bug
336
- $('body, html').css('overflow', 'hidden');
337
- }
338
- }
339
-
340
-
341
-
342
- var classesToadd = mfp.st.mainClass;
343
- if(mfp.isIE7) {
344
- classesToadd += ' mfp-ie7';
345
- }
346
- if(classesToadd) {
347
- mfp._addClassToMFP( classesToadd );
348
- }
349
-
350
- // add content
351
- mfp.updateItemHTML();
352
-
353
- _mfpTrigger('BuildControls');
354
-
355
- // remove scrollbar, add margin e.t.c
356
- $('html').css(windowStyles);
357
-
358
- // add everything to DOM
359
- mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );
360
-
361
- // Save last focused element
362
- mfp._lastFocusedEl = document.activeElement;
363
-
364
- // Wait for next cycle to allow CSS transition
365
- setTimeout(function() {
366
-
367
- if(mfp.content) {
368
- mfp._addClassToMFP(READY_CLASS);
369
- mfp._setFocus();
370
- } else {
371
- // if content is not defined (not loaded e.t.c) we add class only for BG
372
- mfp.bgOverlay.addClass(READY_CLASS);
373
- }
374
-
375
- // Trap the focus in popup
376
- _document.on('focusin' + EVENT_NS, mfp._onFocusIn);
377
-
378
- }, 16);
379
-
380
- mfp.isOpen = true;
381
- mfp.updateSize(windowHeight);
382
- _mfpTrigger(OPEN_EVENT);
383
-
384
- return data;
385
- },
386
-
387
- /**
388
- * Closes the popup
389
- */
390
- close: function() {
391
- if(!mfp.isOpen) return;
392
- _mfpTrigger(BEFORE_CLOSE_EVENT);
393
-
394
- mfp.isOpen = false;
395
- // for CSS3 animation
396
- if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {
397
- mfp._addClassToMFP(REMOVING_CLASS);
398
- setTimeout(function() {
399
- mfp._close();
400
- }, mfp.st.removalDelay);
401
- } else {
402
- mfp._close();
403
- }
404
- },
405
-
406
- /**
407
- * Helper for close() function
408
- */
409
- _close: function() {
410
- _mfpTrigger(CLOSE_EVENT);
411
-
412
- var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
413
-
414
- mfp.bgOverlay.detach();
415
- mfp.wrap.detach();
416
- mfp.container.empty();
417
-
418
- if(mfp.st.mainClass) {
419
- classesToRemove += mfp.st.mainClass + ' ';
420
- }
421
-
422
- mfp._removeClassFromMFP(classesToRemove);
423
-
424
- if(mfp.fixedContentPos) {
425
- var windowStyles = {marginRight: ''};
426
- if(mfp.isIE7) {
427
- $('body, html').css('overflow', '');
428
- } else {
429
- windowStyles.overflow = '';
430
- }
431
- $('html').css(windowStyles);
432
- }
433
-
434
- _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
435
- mfp.ev.off(EVENT_NS);
436
-
437
- // clean up DOM elements that aren't removed
438
- mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
439
- mfp.bgOverlay.attr('class', 'mfp-bg');
440
- mfp.container.attr('class', 'mfp-container');
441
-
442
- // remove close button from target element
443
- if(mfp.st.showCloseBtn &&
444
- (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
445
- if(mfp.currTemplate.closeBtn)
446
- mfp.currTemplate.closeBtn.detach();
447
- }
448
-
449
-
450
- if(mfp.st.autoFocusLast && mfp._lastFocusedEl) {
451
- $(mfp._lastFocusedEl).focus(); // put tab focus back
452
- }
453
- mfp.currItem = null;
454
- mfp.content = null;
455
- mfp.currTemplate = null;
456
- mfp.prevHeight = 0;
457
-
458
- _mfpTrigger(AFTER_CLOSE_EVENT);
459
- },
460
-
461
- updateSize: function(winHeight) {
462
-
463
- if(mfp.isIOS) {
464
- // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
465
- var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
466
- var height = window.innerHeight * zoomLevel;
467
- mfp.wrap.css('height', height);
468
- mfp.wH = height;
469
- } else {
470
- mfp.wH = winHeight || _window.height();
471
- }
472
- // Fixes #84: popup incorrectly positioned with position:relative on body
473
- if(!mfp.fixedContentPos) {
474
- mfp.wrap.css('height', mfp.wH);
475
- }
476
-
477
- _mfpTrigger('Resize');
478
-
479
- },
480
-
481
- /**
482
- * Set content of popup based on current index
483
- */
484
- updateItemHTML: function() {
485
- var item = mfp.items[mfp.index];
486
-
487
- // Detach and perform modifications
488
- mfp.contentContainer.detach();
489
-
490
- if(mfp.content)
491
- mfp.content.detach();
492
-
493
- if(!item.parsed) {
494
- item = mfp.parseEl( mfp.index );
495
- }
496
-
497
- var type = item.type;
498
-
499
- _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
500
- // BeforeChange event works like so:
501
- // _mfpOn('BeforeChange', function(e, prevType, newType) { });
502
-
503
- mfp.currItem = item;
504
-
505
- if(!mfp.currTemplate[type]) {
506
- var markup = mfp.st[type] ? mfp.st[type].markup : false;
507
-
508
- // allows to modify markup
509
- _mfpTrigger('FirstMarkupParse', markup);
510
-
511
- if(markup) {
512
- mfp.currTemplate[type] = $(markup);
513
- } else {
514
- // if there is no markup found we just define that template is parsed
515
- mfp.currTemplate[type] = true;
516
- }
517
- }
518
-
519
- if(_prevContentType && _prevContentType !== item.type) {
520
- mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
521
- }
522
-
523
- var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
524
- mfp.appendContent(newContent, type);
525
-
526
- item.preloaded = true;
527
-
528
- _mfpTrigger(CHANGE_EVENT, item);
529
- _prevContentType = item.type;
530
-
531
- // Append container back after its content changed
532
- mfp.container.prepend(mfp.contentContainer);
533
-
534
- _mfpTrigger('AfterChange');
535
- },
536
-
537
-
538
- /**
539
- * Set HTML content of popup
540
- */
541
- appendContent: function(newContent, type) {
542
- mfp.content = newContent;
543
-
544
- if(newContent) {
545
- if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
546
- mfp.currTemplate[type] === true) {
547
- // if there is no markup, we just append close button element inside
548
- if(!mfp.content.find('.mfp-close').length) {
549
- mfp.content.append(_getCloseBtn());
550
- }
551
- } else {
552
- mfp.content = newContent;
553
- }
554
- } else {
555
- mfp.content = '';
556
- }
557
-
558
- _mfpTrigger(BEFORE_APPEND_EVENT);
559
- mfp.container.addClass('mfp-'+type+'-holder');
560
-
561
- mfp.contentContainer.append(mfp.content);
562
- },
563
-
564
-
565
- /**
566
- * Creates Magnific Popup data object based on given data
567
- * @param {int} index Index of item to parse
568
- */
569
- parseEl: function(index) {
570
- var item = mfp.items[index],
571
- type;
572
-
573
- if(item.tagName) {
574
- item = { el: $(item) };
575
- } else {
576
- type = item.type;
577
- item = { data: item, src: item.src };
578
- }
579
-
580
- if(item.el) {
581
- var types = mfp.types;
582
-
583
- // check for 'mfp-TYPE' class
584
- for(var i = 0; i < types.length; i++) {
585
- if( item.el.hasClass('mfp-'+types[i]) ) {
586
- type = types[i];
587
- break;
588
- }
589
- }
590
-
591
- item.src = item.el.attr('data-mfp-src');
592
- if(!item.src) {
593
- item.src = item.el.attr('href');
594
- }
595
- }
596
-
597
- item.type = type || mfp.st.type || 'inline';
598
- item.index = index;
599
- item.parsed = true;
600
- mfp.items[index] = item;
601
- _mfpTrigger('ElementParse', item);
602
-
603
- return mfp.items[index];
604
- },
605
-
606
-
607
- /**
608
- * Initializes single popup or a group of popups
609
- */
610
- addGroup: function(el, options) {
611
- var eHandler = function(e) {
612
- e.mfpEl = this;
613
- mfp._openClick(e, el, options);
614
- };
615
-
616
- if(!options) {
617
- options = {};
618
- }
619
-
620
- var eName = 'click.magnificPopup';
621
- options.mainEl = el;
622
-
623
- if(options.items) {
624
- options.isObj = true;
625
- el.off(eName).on(eName, eHandler);
626
- } else {
627
- options.isObj = false;
628
- if(options.delegate) {
629
- el.off(eName).on(eName, options.delegate , eHandler);
630
- } else {
631
- options.items = el;
632
- el.off(eName).on(eName, eHandler);
633
- }
634
- }
635
- },
636
- _openClick: function(e, el, options) {
637
- var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
638
-
639
-
640
- if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
641
- return;
642
- }
643
-
644
- var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
645
-
646
- if(disableOn) {
647
- if(typeof disableOn === "function") {
648
- if( !disableOn.call(mfp) ) {
649
- return true;
650
- }
651
- } else { // else it's number
652
- if( _window.width() < disableOn ) {
653
- return true;
654
- }
655
- }
656
- }
657
-
658
- if(e.type) {
659
- e.preventDefault();
660
-
661
- // This will prevent popup from closing if element is inside and popup is already opened
662
- if(mfp.isOpen) {
663
- e.stopPropagation();
664
- }
665
- }
666
-
667
- options.el = $(e.mfpEl);
668
- if(options.delegate) {
669
- options.items = el.find(options.delegate);
670
- }
671
- mfp.open(options);
672
- },
673
-
674
-
675
- /**
676
- * Updates text on preloader
677
- */
678
- updateStatus: function(status, text) {
679
-
680
- if(mfp.preloader) {
681
- if(_prevStatus !== status) {
682
- mfp.container.removeClass('mfp-s-'+_prevStatus);
683
- }
684
-
685
- if(!text && status === 'loading') {
686
- text = mfp.st.tLoading;
687
- }
688
-
689
- var data = {
690
- status: status,
691
- text: text
692
- };
693
- // allows to modify status
694
- _mfpTrigger('UpdateStatus', data);
695
-
696
- status = data.status;
697
- text = data.text;
698
-
699
- mfp.preloader.html(text);
700
-
701
- mfp.preloader.find('a').on('click', function(e) {
702
- e.stopImmediatePropagation();
703
- });
704
-
705
- mfp.container.addClass('mfp-s-'+status);
706
- _prevStatus = status;
707
- }
708
- },
709
-
710
-
711
- /*
712
- "Private" helpers that aren't private at all
713
- */
714
- // Check to close popup or not
715
- // "target" is an element that was clicked
716
- _checkIfClose: function(target) {
717
-
718
- if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
719
- return;
720
- }
721
-
722
- var closeOnContent = mfp.st.closeOnContentClick;
723
- var closeOnBg = mfp.st.closeOnBgClick;
724
-
725
- if(closeOnContent && closeOnBg) {
726
- return true;
727
- } else {
728
-
729
- // We close the popup if click is on close button or on preloader. Or if there is no content.
730
- if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
731
- return true;
732
- }
733
-
734
- // if click is outside the content
735
- if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
736
- if(closeOnBg) {
737
- // last check, if the clicked element is in DOM, (in case it's removed onclick)
738
- if( $.contains(document, target) ) {
739
- return true;
740
- }
741
- }
742
- } else if(closeOnContent) {
743
- return true;
744
- }
745
-
746
- }
747
- return false;
748
- },
749
- _addClassToMFP: function(cName) {
750
- mfp.bgOverlay.addClass(cName);
751
- mfp.wrap.addClass(cName);
752
- },
753
- _removeClassFromMFP: function(cName) {
754
- this.bgOverlay.removeClass(cName);
755
- mfp.wrap.removeClass(cName);
756
- },
757
- _hasScrollBar: function(winHeight) {
758
- return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
759
- },
760
- _setFocus: function() {
761
- (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
762
- },
763
- _onFocusIn: function(e) {
764
- if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
765
- mfp._setFocus();
766
- return false;
767
- }
768
- },
769
- _parseMarkup: function(template, values, item) {
770
- var arr;
771
- if(item.data) {
772
- values = $.extend(item.data, values);
773
- }
774
- _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
775
-
776
- $.each(values, function(key, value) {
777
- if(value === undefined || value === false) {
778
- return true;
779
- }
780
- arr = key.split('_');
781
- if(arr.length > 1) {
782
- var el = template.find(EVENT_NS + '-'+arr[0]);
783
-
784
- if(el.length > 0) {
785
- var attr = arr[1];
786
- if(attr === 'replaceWith') {
787
- if(el[0] !== value[0]) {
788
- el.replaceWith(value);
789
- }
790
- } else if(attr === 'img') {
791
- if(el.is('img')) {
792
- el.attr('src', value);
793
- } else {
794
- el.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) );
795
- }
796
- } else {
797
- el.attr(arr[1], value);
798
- }
799
- }
800
-
801
- } else {
802
- template.find(EVENT_NS + '-'+key).html(value);
803
- }
804
- });
805
- },
806
-
807
- _getScrollbarSize: function() {
808
- // thx David
809
- if(mfp.scrollbarSize === undefined) {
810
- var scrollDiv = document.createElement("div");
811
- scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
812
- document.body.appendChild(scrollDiv);
813
- mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
814
- document.body.removeChild(scrollDiv);
815
- }
816
- return mfp.scrollbarSize;
817
- }
818
-
819
- }; /* MagnificPopup core prototype end */
820
-
821
-
822
-
823
-
824
- /**
825
- * Public static functions
826
- */
827
- $.magnificPopup = {
828
- instance: null,
829
- proto: MagnificPopup.prototype,
830
- modules: [],
831
-
832
- open: function(options, index) {
833
- _checkInstance();
834
-
835
- if(!options) {
836
- options = {};
837
- } else {
838
- options = $.extend(true, {}, options);
839
- }
840
-
841
- options.isObj = true;
842
- options.index = index || 0;
843
- return this.instance.open(options);
844
- },
845
-
846
- close: function() {
847
- return $.magnificPopup.instance && $.magnificPopup.instance.close();
848
- },
849
-
850
- registerModule: function(name, module) {
851
- if(module.options) {
852
- $.magnificPopup.defaults[name] = module.options;
853
- }
854
- $.extend(this.proto, module.proto);
855
- this.modules.push(name);
856
- },
857
-
858
- defaults: {
859
-
860
- // Info about options is in docs:
861
- // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
862
-
863
- disableOn: 0,
864
-
865
- key: null,
866
-
867
- midClick: false,
868
-
869
- mainClass: '',
870
-
871
- preloader: true,
872
-
873
- focus: '', // CSS selector of input to focus after popup is opened
874
-
875
- closeOnContentClick: false,
876
-
877
- closeOnBgClick: true,
878
-
879
- closeBtnInside: true,
880
-
881
- showCloseBtn: true,
882
-
883
- enableEscapeKey: true,
884
-
885
- modal: false,
886
-
887
- alignTop: false,
888
-
889
- removalDelay: 0,
890
-
891
- prependTo: null,
892
-
893
- fixedContentPos: 'auto',
894
-
895
- fixedBgPos: 'auto',
896
-
897
- overflowY: 'auto',
898
-
899
- closeMarkup: '<button title="%title%" type="button" class="mfp-close">&#215;</button>',
900
-
901
- tClose: 'Close (Esc)',
902
-
903
- tLoading: 'Loading...',
904
-
905
- autoFocusLast: true
906
-
907
- }
908
- };
909
-
910
-
911
-
912
- $.fn.magnificPopup = function(options) {
913
- _checkInstance();
914
-
915
- var jqEl = $(this);
916
-
917
- // We call some API method of first param is a string
918
- if (typeof options === "string" ) {
919
-
920
- if(options === 'open') {
921
- var items,
922
- itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
923
- index = parseInt(arguments[1], 10) || 0;
924
-
925
- if(itemOpts.items) {
926
- items = itemOpts.items[index];
927
- } else {
928
- items = jqEl;
929
- if(itemOpts.delegate) {
930
- items = items.find(itemOpts.delegate);
931
- }
932
- items = items.eq( index );
933
- }
934
- mfp._openClick({mfpEl:items}, jqEl, itemOpts);
935
- } else {
936
- if(mfp.isOpen)
937
- mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
938
- }
939
-
940
- } else {
941
- // clone options obj
942
- options = $.extend(true, {}, options);
943
-
944
- /*
945
- * As Zepto doesn't support .data() method for objects
946
- * and it works only in normal browsers
947
- * we assign "options" object directly to the DOM element. FTW!
948
- */
949
- if(_isJQ) {
950
- jqEl.data('magnificPopup', options);
951
- } else {
952
- jqEl[0].magnificPopup = options;
953
- }
954
-
955
- mfp.addGroup(jqEl, options);
956
-
957
- }
958
- return jqEl;
959
- };
960
-
961
- /*>>core*/
962
-
963
- /*>>inline*/
964
-
965
- var INLINE_NS = 'inline',
966
- _hiddenClass,
967
- _inlinePlaceholder,
968
- _lastInlineElement,
969
- _putInlineElementsBack = function() {
970
- if(_lastInlineElement) {
971
- _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
972
- _lastInlineElement = null;
973
- }
974
- };
975
-
976
- $.magnificPopup.registerModule(INLINE_NS, {
977
- options: {
978
- hiddenClass: 'hide', // will be appended with `mfp-` prefix
979
- markup: '',
980
- tNotFound: 'Content not found'
981
- },
982
- proto: {
983
-
984
- initInline: function() {
985
- mfp.types.push(INLINE_NS);
986
-
987
- _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
988
- _putInlineElementsBack();
989
- });
990
- },
991
-
992
- getInline: function(item, template) {
993
-
994
- _putInlineElementsBack();
995
-
996
- if(item.src) {
997
- var inlineSt = mfp.st.inline,
998
- el = $(item.src);
999
-
1000
- if(el.length) {
1001
-
1002
- // If target element has parent - we replace it with placeholder and put it back after popup is closed
1003
- var parent = el[0].parentNode;
1004
- if(parent && parent.tagName) {
1005
- if(!_inlinePlaceholder) {
1006
- _hiddenClass = inlineSt.hiddenClass;
1007
- _inlinePlaceholder = _getEl(_hiddenClass);
1008
- _hiddenClass = 'mfp-'+_hiddenClass;
1009
- }
1010
- // replace target inline element with placeholder
1011
- _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
1012
- }
1013
-
1014
- mfp.updateStatus('ready');
1015
- } else {
1016
- mfp.updateStatus('error', inlineSt.tNotFound);
1017
- el = $('<div>');
1018
- }
1019
-
1020
- item.inlineElement = el;
1021
- return el;
1022
- }
1023
-
1024
- mfp.updateStatus('ready');
1025
- mfp._parseMarkup(template, {}, item);
1026
- return template;
1027
- }
1028
- }
1029
- });
1030
-
1031
- /*>>inline*/
1032
-
1033
- /*>>ajax*/
1034
- var AJAX_NS = 'ajax',
1035
- _ajaxCur,
1036
- _removeAjaxCursor = function() {
1037
- if(_ajaxCur) {
1038
- $(document.body).removeClass(_ajaxCur);
1039
- }
1040
- },
1041
- _destroyAjaxRequest = function() {
1042
- _removeAjaxCursor();
1043
- if(mfp.req) {
1044
- mfp.req.abort();
1045
- }
1046
- };
1047
-
1048
- $.magnificPopup.registerModule(AJAX_NS, {
1049
-
1050
- options: {
1051
- settings: null,
1052
- cursor: 'mfp-ajax-cur',
1053
- tError: '<a href="%url%">The content</a> could not be loaded.'
1054
- },
1055
-
1056
- proto: {
1057
- initAjax: function() {
1058
- mfp.types.push(AJAX_NS);
1059
- _ajaxCur = mfp.st.ajax.cursor;
1060
-
1061
- _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
1062
- _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
1063
- },
1064
- getAjax: function(item) {
1065
-
1066
- if(_ajaxCur) {
1067
- $(document.body).addClass(_ajaxCur);
1068
- }
1069
-
1070
- mfp.updateStatus('loading');
1071
-
1072
- var opts = $.extend({
1073
- url: item.src,
1074
- success: function(data, textStatus, jqXHR) {
1075
- var temp = {
1076
- data:data,
1077
- xhr:jqXHR
1078
- };
1079
-
1080
- _mfpTrigger('ParseAjax', temp);
1081
-
1082
- mfp.appendContent( $(temp.data), AJAX_NS );
1083
-
1084
- item.finished = true;
1085
-
1086
- _removeAjaxCursor();
1087
-
1088
- mfp._setFocus();
1089
-
1090
- setTimeout(function() {
1091
- mfp.wrap.addClass(READY_CLASS);
1092
- }, 16);
1093
-
1094
- mfp.updateStatus('ready');
1095
-
1096
- _mfpTrigger('AjaxContentAdded');
1097
- },
1098
- error: function() {
1099
- _removeAjaxCursor();
1100
- item.finished = item.loadError = true;
1101
- mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
1102
- }
1103
- }, mfp.st.ajax.settings);
1104
-
1105
- mfp.req = $.ajax(opts);
1106
-
1107
- return '';
1108
- }
1109
- }
1110
- });
1111
-
1112
- /*>>ajax*/
1113
-
1114
- /*>>image*/
1115
- var _imgInterval,
1116
- _getTitle = function(item) {
1117
- if(item.data && item.data.title !== undefined)
1118
- return item.data.title;
1119
-
1120
- var src = mfp.st.image.titleSrc;
1121
-
1122
- if(src) {
1123
- if(typeof src === "function") {
1124
- return src.call(mfp, item);
1125
- } else if(item.el) {
1126
- return item.el.attr(src) || '';
1127
- }
1128
- }
1129
- return '';
1130
- };
1131
-
1132
- $.magnificPopup.registerModule('image', {
1133
-
1134
- options: {
1135
- markup: '<div class="mfp-figure">'+
1136
- '<div class="mfp-close"></div>'+
1137
- '<figure>'+
1138
- '<div class="mfp-img"></div>'+
1139
- '<figcaption>'+
1140
- '<div class="mfp-bottom-bar">'+
1141
- '<div class="mfp-title"></div>'+
1142
- '<div class="mfp-counter"></div>'+
1143
- '</div>'+
1144
- '</figcaption>'+
1145
- '</figure>'+
1146
- '</div>',
1147
- cursor: 'mfp-zoom-out-cur',
1148
- titleSrc: 'title',
1149
- verticalFit: true,
1150
- tError: '<a href="%url%">The image</a> could not be loaded.'
1151
- },
1152
-
1153
- proto: {
1154
- initImage: function() {
1155
- var imgSt = mfp.st.image,
1156
- ns = '.image';
1157
-
1158
- mfp.types.push('image');
1159
-
1160
- _mfpOn(OPEN_EVENT+ns, function() {
1161
- if(mfp.currItem.type === 'image' && imgSt.cursor) {
1162
- $(document.body).addClass(imgSt.cursor);
1163
- }
1164
- });
1165
-
1166
- _mfpOn(CLOSE_EVENT+ns, function() {
1167
- if(imgSt.cursor) {
1168
- $(document.body).removeClass(imgSt.cursor);
1169
- }
1170
- _window.off('resize' + EVENT_NS);
1171
- });
1172
-
1173
- _mfpOn('Resize'+ns, mfp.resizeImage);
1174
- if(mfp.isLowIE) {
1175
- _mfpOn('AfterChange', mfp.resizeImage);
1176
- }
1177
- },
1178
- resizeImage: function() {
1179
- var item = mfp.currItem;
1180
- if(!item || !item.img) return;
1181
-
1182
- if(mfp.st.image.verticalFit) {
1183
- var decr = 0;
1184
- // fix box-sizing in ie7/8
1185
- if(mfp.isLowIE) {
1186
- decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
1187
- }
1188
- item.img.css('max-height', mfp.wH-decr);
1189
- }
1190
- },
1191
- _onImageHasSize: function(item) {
1192
- if(item.img) {
1193
-
1194
- item.hasSize = true;
1195
-
1196
- if(_imgInterval) {
1197
- clearInterval(_imgInterval);
1198
- }
1199
-
1200
- item.isCheckingImgSize = false;
1201
-
1202
- _mfpTrigger('ImageHasSize', item);
1203
-
1204
- if(item.imgHidden) {
1205
- if(mfp.content)
1206
- mfp.content.removeClass('mfp-loading');
1207
-
1208
- item.imgHidden = false;
1209
- }
1210
-
1211
- }
1212
- },
1213
-
1214
- /**
1215
- * Function that loops until the image has size to display elements that rely on it asap
1216
- */
1217
- findImageSize: function(item) {
1218
-
1219
- var counter = 0,
1220
- img = item.img[0],
1221
- mfpSetInterval = function(delay) {
1222
-
1223
- if(_imgInterval) {
1224
- clearInterval(_imgInterval);
1225
- }
1226
- // decelerating interval that checks for size of an image
1227
- _imgInterval = setInterval(function() {
1228
- if(img.naturalWidth > 0) {
1229
- mfp._onImageHasSize(item);
1230
- return;
1231
- }
1232
-
1233
- if(counter > 200) {
1234
- clearInterval(_imgInterval);
1235
- }
1236
-
1237
- counter++;
1238
- if(counter === 3) {
1239
- mfpSetInterval(10);
1240
- } else if(counter === 40) {
1241
- mfpSetInterval(50);
1242
- } else if(counter === 100) {
1243
- mfpSetInterval(500);
1244
- }
1245
- }, delay);
1246
- };
1247
-
1248
- mfpSetInterval(1);
1249
- },
1250
-
1251
- getImage: function(item, template) {
1252
-
1253
- var guard = 0,
1254
-
1255
- // image load complete handler
1256
- onLoadComplete = function() {
1257
- if(item) {
1258
- if (item.img[0].complete) {
1259
- item.img.off('.mfploader');
1260
-
1261
- if(item === mfp.currItem){
1262
- mfp._onImageHasSize(item);
1263
-
1264
- mfp.updateStatus('ready');
1265
- }
1266
-
1267
- item.hasSize = true;
1268
- item.loaded = true;
1269
-
1270
- _mfpTrigger('ImageLoadComplete');
1271
-
1272
- }
1273
- else {
1274
- // if image complete check fails 200 times (20 sec), we assume that there was an error.
1275
- guard++;
1276
- if(guard < 200) {
1277
- setTimeout(onLoadComplete,100);
1278
- } else {
1279
- onLoadError();
1280
- }
1281
- }
1282
- }
1283
- },
1284
-
1285
- // image error handler
1286
- onLoadError = function() {
1287
- if(item) {
1288
- item.img.off('.mfploader');
1289
- if(item === mfp.currItem){
1290
- mfp._onImageHasSize(item);
1291
- mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1292
- }
1293
-
1294
- item.hasSize = true;
1295
- item.loaded = true;
1296
- item.loadError = true;
1297
- }
1298
- },
1299
- imgSt = mfp.st.image;
1300
-
1301
-
1302
- var el = template.find('.mfp-img');
1303
- if(el.length) {
1304
- var img = document.createElement('img');
1305
- img.className = 'mfp-img';
1306
- if(item.el && item.el.find('img').length) {
1307
- img.alt = item.el.find('img').attr('alt');
1308
- }
1309
- item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
1310
- img.src = item.src;
1311
-
1312
- // without clone() "error" event is not firing when IMG is replaced by new IMG
1313
- // TODO: find a way to avoid such cloning
1314
- if(el.is('img')) {
1315
- item.img = item.img.clone();
1316
- }
1317
-
1318
- img = item.img[0];
1319
- if(img.naturalWidth > 0) {
1320
- item.hasSize = true;
1321
- } else if(!img.width) {
1322
- item.hasSize = false;
1323
- }
1324
- }
1325
-
1326
- mfp._parseMarkup(template, {
1327
- title: _getTitle(item),
1328
- img_replaceWith: item.img
1329
- }, item);
1330
-
1331
- mfp.resizeImage();
1332
-
1333
- if(item.hasSize) {
1334
- if(_imgInterval) clearInterval(_imgInterval);
1335
-
1336
- if(item.loadError) {
1337
- template.addClass('mfp-loading');
1338
- mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1339
- } else {
1340
- template.removeClass('mfp-loading');
1341
- mfp.updateStatus('ready');
1342
- }
1343
- return template;
1344
- }
1345
-
1346
- mfp.updateStatus('loading');
1347
- item.loading = true;
1348
-
1349
- if(!item.hasSize) {
1350
- item.imgHidden = true;
1351
- template.addClass('mfp-loading');
1352
- mfp.findImageSize(item);
1353
- }
1354
-
1355
- return template;
1356
- }
1357
- }
1358
- });
1359
-
1360
- /*>>image*/
1361
-
1362
- /*>>zoom*/
1363
- var hasMozTransform,
1364
- getHasMozTransform = function() {
1365
- if(hasMozTransform === undefined) {
1366
- hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
1367
- }
1368
- return hasMozTransform;
1369
- };
1370
-
1371
- $.magnificPopup.registerModule('zoom', {
1372
-
1373
- options: {
1374
- enabled: false,
1375
- easing: 'ease-in-out',
1376
- duration: 300,
1377
- opener: function(element) {
1378
- return element.is('img') ? element : element.find('img');
1379
- }
1380
- },
1381
-
1382
- proto: {
1383
-
1384
- initZoom: function() {
1385
- var zoomSt = mfp.st.zoom,
1386
- ns = '.zoom',
1387
- image;
1388
-
1389
- if(!zoomSt.enabled || !mfp.supportsTransition) {
1390
- return;
1391
- }
1392
-
1393
- var duration = zoomSt.duration,
1394
- getElToAnimate = function(image) {
1395
- var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
1396
- transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
1397
- cssObj = {
1398
- position: 'fixed',
1399
- zIndex: 9999,
1400
- left: 0,
1401
- top: 0,
1402
- '-webkit-backface-visibility': 'hidden'
1403
- },
1404
- t = 'transition';
1405
-
1406
- cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
1407
-
1408
- newImg.css(cssObj);
1409
- return newImg;
1410
- },
1411
- showMainContent = function() {
1412
- mfp.content.css('visibility', 'visible');
1413
- },
1414
- openTimeout,
1415
- animatedImg;
1416
-
1417
- _mfpOn('BuildControls'+ns, function() {
1418
- if(mfp._allowZoom()) {
1419
-
1420
- clearTimeout(openTimeout);
1421
- mfp.content.css('visibility', 'hidden');
1422
-
1423
- // Basically, all code below does is clones existing image, puts in on top of the current one and animated it
1424
-
1425
- image = mfp._getItemToZoom();
1426
-
1427
- if(!image) {
1428
- showMainContent();
1429
- return;
1430
- }
1431
-
1432
- animatedImg = getElToAnimate(image);
1433
-
1434
- animatedImg.css( mfp._getOffset() );
1435
-
1436
- mfp.wrap.append(animatedImg);
1437
-
1438
- openTimeout = setTimeout(function() {
1439
- animatedImg.css( mfp._getOffset( true ) );
1440
- openTimeout = setTimeout(function() {
1441
-
1442
- showMainContent();
1443
-
1444
- setTimeout(function() {
1445
- animatedImg.remove();
1446
- image = animatedImg = null;
1447
- _mfpTrigger('ZoomAnimationEnded');
1448
- }, 16); // avoid blink when switching images
1449
-
1450
- }, duration); // this timeout equals animation duration
1451
-
1452
- }, 16); // by adding this timeout we avoid short glitch at the beginning of animation
1453
-
1454
-
1455
- // Lots of timeouts...
1456
- }
1457
- });
1458
- _mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
1459
- if(mfp._allowZoom()) {
1460
-
1461
- clearTimeout(openTimeout);
1462
-
1463
- mfp.st.removalDelay = duration;
1464
-
1465
- if(!image) {
1466
- image = mfp._getItemToZoom();
1467
- if(!image) {
1468
- return;
1469
- }
1470
- animatedImg = getElToAnimate(image);
1471
- }
1472
-
1473
- animatedImg.css( mfp._getOffset(true) );
1474
- mfp.wrap.append(animatedImg);
1475
- mfp.content.css('visibility', 'hidden');
1476
-
1477
- setTimeout(function() {
1478
- animatedImg.css( mfp._getOffset() );
1479
- }, 16);
1480
- }
1481
-
1482
- });
1483
-
1484
- _mfpOn(CLOSE_EVENT+ns, function() {
1485
- if(mfp._allowZoom()) {
1486
- showMainContent();
1487
- if(animatedImg) {
1488
- animatedImg.remove();
1489
- }
1490
- image = null;
1491
- }
1492
- });
1493
- },
1494
-
1495
- _allowZoom: function() {
1496
- return mfp.currItem.type === 'image';
1497
- },
1498
-
1499
- _getItemToZoom: function() {
1500
- if(mfp.currItem.hasSize) {
1501
- return mfp.currItem.img;
1502
- } else {
1503
- return false;
1504
- }
1505
- },
1506
-
1507
- // Get element postion relative to viewport
1508
- _getOffset: function(isLarge) {
1509
- var el;
1510
- if(isLarge) {
1511
- el = mfp.currItem.img;
1512
- } else {
1513
- el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
1514
- }
1515
-
1516
- var offset = el.offset();
1517
- var paddingTop = parseInt(el.css('padding-top'),10);
1518
- var paddingBottom = parseInt(el.css('padding-bottom'),10);
1519
- offset.top -= ( $(window).scrollTop() - paddingTop );
1520
-
1521
-
1522
- /*
1523
-
1524
- Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
1525
-
1526
- */
1527
- var obj = {
1528
- width: el.width(),
1529
- // fix Zepto height+padding issue
1530
- height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
1531
- };
1532
-
1533
- // I hate to do this, but there is no another option
1534
- if( getHasMozTransform() ) {
1535
- obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
1536
- } else {
1537
- obj.left = offset.left;
1538
- obj.top = offset.top;
1539
- }
1540
- return obj;
1541
- }
1542
-
1543
- }
1544
- });
1545
-
1546
-
1547
-
1548
- /*>>zoom*/
1549
-
1550
- /*>>iframe*/
1551
-
1552
- var IFRAME_NS = 'iframe',
1553
- _emptyPage = '//about:blank',
1554
-
1555
- _fixIframeBugs = function(isShowing) {
1556
- if(mfp.currTemplate[IFRAME_NS]) {
1557
- var el = mfp.currTemplate[IFRAME_NS].find('iframe');
1558
- if(el.length) {
1559
- // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
1560
- if(!isShowing) {
1561
- el[0].src = _emptyPage;
1562
- }
1563
-
1564
- // IE8 black screen bug fix
1565
- if(mfp.isIE8) {
1566
- el.css('display', isShowing ? 'block' : 'none');
1567
- }
1568
- }
1569
- }
1570
- };
1571
-
1572
- $.magnificPopup.registerModule(IFRAME_NS, {
1573
-
1574
- options: {
1575
- markup: '<div class="mfp-iframe-scaler">'+
1576
- '<div class="mfp-close"></div>'+
1577
- '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
1578
- '</div>',
1579
-
1580
- srcAction: 'iframe_src',
1581
-
1582
- // we don't care and support only one default type of URL by default
1583
- patterns: {
1584
- youtube: {
1585
- index: 'youtube.com',
1586
- id: 'v=',
1587
- src: '//www.youtube.com/embed/%id%?autoplay=1'
1588
- },
1589
- vimeo: {
1590
- index: 'vimeo.com/',
1591
- id: '/',
1592
- src: '//player.vimeo.com/video/%id%?autoplay=1'
1593
- },
1594
- gmaps: {
1595
- index: '//maps.google.',
1596
- src: '%id%&output=embed'
1597
- }
1598
- }
1599
- },
1600
-
1601
- proto: {
1602
- initIframe: function() {
1603
- mfp.types.push(IFRAME_NS);
1604
-
1605
- _mfpOn('BeforeChange', function(e, prevType, newType) {
1606
- if(prevType !== newType) {
1607
- if(prevType === IFRAME_NS) {
1608
- _fixIframeBugs(); // iframe if removed
1609
- } else if(newType === IFRAME_NS) {
1610
- _fixIframeBugs(true); // iframe is showing
1611
- }
1612
- }// else {
1613
- // iframe source is switched, don't do anything
1614
- //}
1615
- });
1616
-
1617
- _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
1618
- _fixIframeBugs();
1619
- });
1620
- },
1621
-
1622
- getIframe: function(item, template) {
1623
- var embedSrc = item.src;
1624
- var iframeSt = mfp.st.iframe;
1625
-
1626
- $.each(iframeSt.patterns, function() {
1627
- if(embedSrc.indexOf( this.index ) > -1) {
1628
- if(this.id) {
1629
- if(typeof this.id === 'string') {
1630
- embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
1631
- } else {
1632
- embedSrc = this.id.call( this, embedSrc );
1633
- }
1634
- }
1635
- embedSrc = this.src.replace('%id%', embedSrc );
1636
- return false; // break;
1637
- }
1638
- });
1639
-
1640
- var dataObj = {};
1641
- if(iframeSt.srcAction) {
1642
- dataObj[iframeSt.srcAction] = embedSrc;
1643
- }
1644
- mfp._parseMarkup(template, dataObj, item);
1645
-
1646
- mfp.updateStatus('ready');
1647
-
1648
- return template;
1649
- }
1650
- }
1651
- });
1652
-
1653
-
1654
-
1655
- /*>>iframe*/
1656
-
1657
- /*>>gallery*/
1658
- /**
1659
- * Get looped index depending on number of slides
1660
- */
1661
- var _getLoopedId = function(index) {
1662
- var numSlides = mfp.items.length;
1663
- if(index > numSlides - 1) {
1664
- return index - numSlides;
1665
- } else if(index < 0) {
1666
- return numSlides + index;
1667
- }
1668
- return index;
1669
- },
1670
- _replaceCurrTotal = function(text, curr, total) {
1671
- return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
1672
- };
1673
-
1674
- $.magnificPopup.registerModule('gallery', {
1675
-
1676
- options: {
1677
- enabled: false,
1678
- arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
1679
- preload: [0,2],
1680
- navigateByImgClick: true,
1681
- arrows: true,
1682
-
1683
- tPrev: 'Previous (Left arrow key)',
1684
- tNext: 'Next (Right arrow key)',
1685
- tCounter: '%curr% of %total%'
1686
- },
1687
-
1688
- proto: {
1689
- initGallery: function() {
1690
-
1691
- var gSt = mfp.st.gallery,
1692
- ns = '.mfp-gallery';
1693
-
1694
- mfp.direction = true; // true - next, false - prev
1695
-
1696
- if(!gSt || !gSt.enabled ) return false;
1697
-
1698
- _wrapClasses += ' mfp-gallery';
1699
-
1700
- _mfpOn(OPEN_EVENT+ns, function() {
1701
-
1702
- if(gSt.navigateByImgClick) {
1703
- mfp.wrap.on('click'+ns, '.mfp-img', function() {
1704
- if(mfp.items.length > 1) {
1705
- mfp.next();
1706
- return false;
1707
- }
1708
- });
1709
- }
1710
-
1711
- _document.on('keydown'+ns, function(e) {
1712
- if (e.keyCode === 37) {
1713
- mfp.prev();
1714
- } else if (e.keyCode === 39) {
1715
- mfp.next();
1716
- }
1717
- });
1718
- });
1719
-
1720
- _mfpOn('UpdateStatus'+ns, function(e, data) {
1721
- if(data.text) {
1722
- data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
1723
- }
1724
- });
1725
-
1726
- _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
1727
- var l = mfp.items.length;
1728
- values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
1729
- });
1730
-
1731
- _mfpOn('BuildControls' + ns, function() {
1732
- if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
1733
- var markup = gSt.arrowMarkup,
1734
- arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
1735
- arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
1736
-
1737
- arrowLeft.click(function() {
1738
- mfp.prev();
1739
- });
1740
- arrowRight.click(function() {
1741
- mfp.next();
1742
- });
1743
-
1744
- mfp.container.append(arrowLeft.add(arrowRight));
1745
- }
1746
- });
1747
-
1748
- _mfpOn(CHANGE_EVENT+ns, function() {
1749
- if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
1750
-
1751
- mfp._preloadTimeout = setTimeout(function() {
1752
- mfp.preloadNearbyImages();
1753
- mfp._preloadTimeout = null;
1754
- }, 16);
1755
- });
1756
-
1757
-
1758
- _mfpOn(CLOSE_EVENT+ns, function() {
1759
- _document.off(ns);
1760
- mfp.wrap.off('click'+ns);
1761
- mfp.arrowRight = mfp.arrowLeft = null;
1762
- });
1763
-
1764
- },
1765
- next: function() {
1766
- mfp.direction = true;
1767
- mfp.index = _getLoopedId(mfp.index + 1);
1768
- mfp.updateItemHTML();
1769
- },
1770
- prev: function() {
1771
- mfp.direction = false;
1772
- mfp.index = _getLoopedId(mfp.index - 1);
1773
- mfp.updateItemHTML();
1774
- },
1775
- goTo: function(newIndex) {
1776
- mfp.direction = (newIndex >= mfp.index);
1777
- mfp.index = newIndex;
1778
- mfp.updateItemHTML();
1779
- },
1780
- preloadNearbyImages: function() {
1781
- var p = mfp.st.gallery.preload,
1782
- preloadBefore = Math.min(p[0], mfp.items.length),
1783
- preloadAfter = Math.min(p[1], mfp.items.length),
1784
- i;
1785
-
1786
- for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
1787
- mfp._preloadItem(mfp.index+i);
1788
- }
1789
- for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
1790
- mfp._preloadItem(mfp.index-i);
1791
- }
1792
- },
1793
- _preloadItem: function(index) {
1794
- index = _getLoopedId(index);
1795
-
1796
- if(mfp.items[index].preloaded) {
1797
- return;
1798
- }
1799
-
1800
- var item = mfp.items[index];
1801
- if(!item.parsed) {
1802
- item = mfp.parseEl( index );
1803
- }
1804
-
1805
- _mfpTrigger('LazyLoad', item);
1806
-
1807
- if(item.type === 'image') {
1808
- item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
1809
- item.hasSize = true;
1810
- }).on('error.mfploader', function() {
1811
- item.hasSize = true;
1812
- item.loadError = true;
1813
- _mfpTrigger('LazyLoadError', item);
1814
- }).attr('src', item.src);
1815
- }
1816
-
1817
-
1818
- item.preloaded = true;
1819
- }
1820
- }
1821
- });
1822
-
1823
- /*>>gallery*/
1824
-
1825
- /*>>retina*/
1826
-
1827
- var RETINA_NS = 'retina';
1828
-
1829
- $.magnificPopup.registerModule(RETINA_NS, {
1830
- options: {
1831
- replaceSrc: function(item) {
1832
- return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
1833
- },
1834
- ratio: 1 // Function or number. Set to 1 to disable.
1835
- },
1836
- proto: {
1837
- initRetina: function() {
1838
- if(window.devicePixelRatio > 1) {
1839
-
1840
- var st = mfp.st.retina,
1841
- ratio = st.ratio;
1842
-
1843
- ratio = !isNaN(ratio) ? ratio : ratio();
1844
-
1845
- if(ratio > 1) {
1846
- _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
1847
- item.img.css({
1848
- 'max-width': item.img[0].naturalWidth / ratio,
1849
- 'width': '100%'
1850
- });
1851
- });
1852
- _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
1853
- item.src = st.replaceSrc(item, ratio);
1854
- });
1855
- }
1856
- }
1857
-
1858
- }
1859
- }
1860
- });
1861
-
1862
- /*>>retina*/
1863
- _checkInstance(); }));
1864
-
1865
- };/////////////// callbackFunc
1866
-
1867
- // on 'nb-app-ready', jQuery is loaded
1868
- nb_.listenTo('nb-app-ready', function(){
1869
- callbackFunc();
1870
- nb_.emit('nb-jmp-parsed');
1871
- });
1872
- }(window, document));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/front/js/libs/jquery-magnific-popup.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e,t){var n=function(){var e;e=function(d){var p,i,u,o,f,t,l="Close",c="BeforeClose",m="MarkupParse",g="Open",a="Change",n="mfp",v="."+n,h="mfp-ready",r="mfp-removing",s="mfp-prevent-close",e=function(){},y=!!window.jQuery,C=d(window),w=function(e,t){p.ev.on(n+e+v,t)},b=function(e,t,n,i){var o=document.createElement("div");return o.className="mfp-"+e,n&&(o.innerHTML=n),i?t&&t.appendChild(o):(o=d(o),t&&o.appendTo(t)),o},I=function(e,t){p.ev.triggerHandler(n+e,t),p.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),p.st.callbacks[e]&&p.st.callbacks[e].apply(p,d.isArray(t)?t:[t]))},x=function(e){return e===t&&p.currTemplate.closeBtn||(p.currTemplate.closeBtn=d(p.st.closeMarkup.replace("%title%",p.st.tClose)),t=e),p.currTemplate.closeBtn},k=function(){d.magnificPopup.instance||((p=new e).init(),d.magnificPopup.instance=p)};e.prototype={constructor:e,init:function(){var e=navigator.appVersion;p.isLowIE=p.isIE8=document.all&&!document.addEventListener,p.isAndroid=/android/gi.test(e),p.isIOS=/iphone|ipad|ipod/gi.test(e),p.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),p.probablyMobile=p.isAndroid||p.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),u=d(document),p.popupsCache={}},open:function(e){var t;if(!1===e.isObj){p.items=e.items.toArray(),p.index=0;var n,i=e.items;for(t=0;t<i.length;t++)if((n=i[t]).parsed&&(n=n.el[0]),n===e.el[0]){p.index=t;break}}else p.items=d.isArray(e.items)?e.items:[e.items],p.index=e.index||0;if(!p.isOpen){p.types=[],f="",e.mainEl&&e.mainEl.length?p.ev=e.mainEl.eq(0):p.ev=u,e.key?(p.popupsCache[e.key]||(p.popupsCache[e.key]={}),p.currTemplate=p.popupsCache[e.key]):p.currTemplate={},p.st=d.extend(!0,{},d.magnificPopup.defaults,e),p.fixedContentPos="auto"===p.st.fixedContentPos?!p.probablyMobile:p.st.fixedContentPos,p.st.modal&&(p.st.closeOnContentClick=!1,p.st.closeOnBgClick=!1,p.st.showCloseBtn=!1,p.st.enableEscapeKey=!1),p.bgOverlay||(p.bgOverlay=b("bg").on("click"+v,function(){p.close()}),p.wrap=b("wrap").attr("tabindex",-1).on("click"+v,function(e){p._checkIfClose(e.target)&&p.close()}),p.container=b("container",p.wrap)),p.contentContainer=b("content"),p.st.preloader&&(p.preloader=b("preloader",p.container,p.st.tLoading));var o=d.magnificPopup.modules;for(t=0;t<o.length;t++){var r=o[t];r=r.charAt(0).toUpperCase()+r.slice(1),p["init"+r].call(p)}I("BeforeOpen"),p.st.showCloseBtn&&(p.st.closeBtnInside?(w(m,function(e,t,n,i){n.close_replaceWith=x(i.type)}),f+=" mfp-close-btn-in"):p.wrap.append(x())),p.st.alignTop&&(f+=" mfp-align-top"),p.fixedContentPos?p.wrap.css({overflow:p.st.overflowY,overflowX:"hidden",overflowY:p.st.overflowY}):p.wrap.css({top:C.scrollTop(),position:"absolute"}),(!1===p.st.fixedBgPos||"auto"===p.st.fixedBgPos&&!p.fixedContentPos)&&p.bgOverlay.css({height:u.height(),position:"absolute"}),p.st.enableEscapeKey&&u.on("keyup"+v,function(e){27===e.keyCode&&p.close()}),C.on("resize"+v,function(){p.updateSize()}),p.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&p.wrap.addClass(f);var a=p.wH=C.height(),s={};if(p.fixedContentPos&&p._hasScrollBar(a)){var l=p._getScrollbarSize();l&&(s.marginRight=l)}p.fixedContentPos&&(p.isIE7?d("body, html").css("overflow","hidden"):s.overflow="hidden");var c=p.st.mainClass;return p.isIE7&&(c+=" mfp-ie7"),c&&p._addClassToMFP(c),p.updateItemHTML(),I("BuildControls"),d("html").css(s),p.bgOverlay.add(p.wrap).prependTo(p.st.prependTo||d(document.body)),p._lastFocusedEl=document.activeElement,setTimeout(function(){p.content?(p._addClassToMFP(h),p._setFocus()):p.bgOverlay.addClass(h),u.on("focusin"+v,p._onFocusIn)},16),p.isOpen=!0,p.updateSize(a),I(g),e}p.updateItemHTML()},close:function(){p.isOpen&&(I(c),p.isOpen=!1,p.st.removalDelay&&!p.isLowIE&&p.supportsTransition?(p._addClassToMFP(r),setTimeout(function(){p._close()},p.st.removalDelay)):p._close())},_close:function(){I(l);var e=r+" "+h+" ";if(p.bgOverlay.detach(),p.wrap.detach(),p.container.empty(),p.st.mainClass&&(e+=p.st.mainClass+" "),p._removeClassFromMFP(e),p.fixedContentPos){var t={marginRight:""};p.isIE7?d("body, html").css("overflow",""):t.overflow="",d("html").css(t)}u.off("keyup.mfp focusin"+v),p.ev.off(v),p.wrap.attr("class","mfp-wrap").removeAttr("style"),p.bgOverlay.attr("class","mfp-bg"),p.container.attr("class","mfp-container"),!p.st.showCloseBtn||p.st.closeBtnInside&&!0!==p.currTemplate[p.currItem.type]||p.currTemplate.closeBtn&&p.currTemplate.closeBtn.detach(),p.st.autoFocusLast&&p._lastFocusedEl&&d(p._lastFocusedEl).focus(),p.currItem=null,p.content=null,p.currTemplate=null,p.prevHeight=0,I("AfterClose")},updateSize:function(e){if(p.isIOS){var t=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*t;p.wrap.css("height",n),p.wH=n}else p.wH=e||C.height();p.fixedContentPos||p.wrap.css("height",p.wH),I("Resize")},updateItemHTML:function(){var e=p.items[p.index];p.contentContainer.detach(),p.content&&p.content.detach(),e.parsed||(e=p.parseEl(p.index));var t=e.type;if(I("BeforeChange",[p.currItem?p.currItem.type:"",t]),p.currItem=e,!p.currTemplate[t]){var n=!!p.st[t]&&p.st[t].markup;I("FirstMarkupParse",n),p.currTemplate[t]=!n||d(n)}o&&o!==e.type&&p.container.removeClass("mfp-"+o+"-holder");var i=p["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,p.currTemplate[t]);p.appendContent(i,t),e.preloaded=!0,I(a,e),o=e.type,p.container.prepend(p.contentContainer),I("AfterChange")},appendContent:function(e,t){(p.content=e)?p.st.showCloseBtn&&p.st.closeBtnInside&&!0===p.currTemplate[t]?p.content.find(".mfp-close").length||p.content.append(x()):p.content=e:p.content="",I("BeforeAppend"),p.container.addClass("mfp-"+t+"-holder"),p.contentContainer.append(p.content)},parseEl:function(e){var t,n=p.items[e];if((n=n.tagName?{el:d(n)}:(t=n.type,{data:n,src:n.src})).el){for(var i=p.types,o=0;o<i.length;o++)if(n.el.hasClass("mfp-"+i[o])){t=i[o];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=t||p.st.type||"inline",n.index=e,n.parsed=!0,p.items[e]=n,I("ElementParse",n),p.items[e]},addGroup:function(t,n){var e=function(e){e.mfpEl=this,p._openClick(e,t,n)};n||(n={});var i="click.magnificPopup";n.mainEl=t,n.items?(n.isObj=!0,t.off(i).on(i,e)):(n.isObj=!1,n.delegate?t.off(i).on(i,n.delegate,e):(n.items=t).off(i).on(i,e))},_openClick:function(e,t,n){if((void 0!==n.midClick?n.midClick:d.magnificPopup.defaults.midClick)||!(2===e.which||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){var i=void 0!==n.disableOn?n.disableOn:d.magnificPopup.defaults.disableOn;if(i)if("function"==typeof i){if(!i.call(p))return!0}else if(C.width()<i)return!0;e.type&&(e.preventDefault(),p.isOpen&&e.stopPropagation()),n.el=d(e.mfpEl),n.delegate&&(n.items=t.find(n.delegate)),p.open(n)}},updateStatus:function(e,t){if(p.preloader){i!==e&&p.container.removeClass("mfp-s-"+i),t||"loading"!==e||(t=p.st.tLoading);var n={status:e,text:t};I("UpdateStatus",n),e=n.status,t=n.text,p.preloader.html(t),p.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),p.container.addClass("mfp-s-"+e),i=e}},_checkIfClose:function(e){if(!d(e).hasClass(s)){var t=p.st.closeOnContentClick,n=p.st.closeOnBgClick;if(t&&n)return!0;if(!p.content||d(e).hasClass("mfp-close")||p.preloader&&e===p.preloader[0])return!0;if(e===p.content[0]||d.contains(p.content[0],e)){if(t)return!0}else if(n&&d.contains(document,e))return!0;return!1}},_addClassToMFP:function(e){p.bgOverlay.addClass(e),p.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),p.wrap.removeClass(e)},_hasScrollBar:function(e){return(p.isIE7?u.height():document.body.scrollHeight)>(e||C.height())},_setFocus:function(){(p.st.focus?p.content.find(p.st.focus).eq(0):p.wrap).focus()},_onFocusIn:function(e){if(e.target!==p.wrap[0]&&!d.contains(p.wrap[0],e.target))return p._setFocus(),!1},_parseMarkup:function(o,e,t){var r;t.data&&(e=d.extend(t.data,e)),I(m,[o,e,t]),d.each(e,function(e,t){if(void 0===t||!1===t)return!0;if(1<(r=e.split("_")).length){var n=o.find(v+"-"+r[0]);if(0<n.length){var i=r[1];"replaceWith"===i?n[0]!==t[0]&&n.replaceWith(t):"img"===i?n.is("img")?n.attr("src",t):n.replaceWith(d("<img>").attr("src",t).attr("class",n.attr("class"))):n.attr(r[1],t)}}else o.find(v+"-"+e).html(t)})},_getScrollbarSize:function(){if(void 0===p.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),p.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return p.scrollbarSize}},d.magnificPopup={instance:null,proto:e.prototype,modules:[],open:function(e,t){return k(),(e=e?d.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return d.magnificPopup.instance&&d.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(d.magnificPopup.defaults[e]=t.options),d.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},d.fn.magnificPopup=function(e){k();var t=d(this);if("string"==typeof e)if("open"===e){var n,i=y?t.data("magnificPopup"):t[0].magnificPopup,o=parseInt(arguments[1],10)||0;n=i.items?i.items[o]:(n=t,i.delegate&&(n=n.find(i.delegate)),n.eq(o)),p._openClick({mfpEl:n},t,i)}else p.isOpen&&p[e].apply(p,Array.prototype.slice.call(arguments,1));else e=d.extend(!0,{},e),y?t.data("magnificPopup",e):t[0].magnificPopup=e,p.addGroup(t,e);return t};var T,_,P,S="inline",E=function(){P&&(_.after(P.addClass(T)).detach(),P=null)};d.magnificPopup.registerModule(S,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){p.types.push(S),w(l+"."+S,function(){E()})},getInline:function(e,t){if(E(),e.src){var n=p.st.inline,i=d(e.src);if(i.length){var o=i[0].parentNode;o&&o.tagName&&(_||(T=n.hiddenClass,_=b(T),T="mfp-"+T),P=i.after(_).detach().removeClass(T)),p.updateStatus("ready")}else p.updateStatus("error",n.tNotFound),i=d("<div>");return e.inlineElement=i}return p.updateStatus("ready"),p._parseMarkup(t,{},e),t}}});var z,O="ajax",M=function(){z&&d(document.body).removeClass(z)},B=function(){M(),p.req&&p.req.abort()};d.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){p.types.push(O),z=p.st.ajax.cursor,w(l+"."+O,B),w("BeforeChange."+O,B)},getAjax:function(o){z&&d(document.body).addClass(z),p.updateStatus("loading");var e=d.extend({url:o.src,success:function(e,t,n){var i={data:e,xhr:n};I("ParseAjax",i),p.appendContent(d(i.data),O),o.finished=!0,M(),p._setFocus(),setTimeout(function(){p.wrap.addClass(h)},16),p.updateStatus("ready"),I("AjaxContentAdded")},error:function(){M(),o.finished=o.loadError=!0,p.updateStatus("error",p.st.ajax.tError.replace("%url%",o.src))}},p.st.ajax.settings);return p.req=d.ajax(e),""}}});var L;d.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=p.st.image,t=".image";p.types.push("image"),w(g+t,function(){"image"===p.currItem.type&&e.cursor&&d(document.body).addClass(e.cursor)}),w(l+t,function(){e.cursor&&d(document.body).removeClass(e.cursor),C.off("resize"+v)}),w("Resize"+t,p.resizeImage),p.isLowIE&&w("AfterChange",p.resizeImage)},resizeImage:function(){var e=p.currItem;if(e&&e.img&&p.st.image.verticalFit){var t=0;p.isLowIE&&(t=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",p.wH-t)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,L&&clearInterval(L),e.isCheckingImgSize=!1,I("ImageHasSize",e),e.imgHidden&&(p.content&&p.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(t){var n=0,i=t.img[0],o=function(e){L&&clearInterval(L),L=setInterval(function(){0<i.naturalWidth?p._onImageHasSize(t):(200<n&&clearInterval(L),3===++n?o(10):40===n?o(50):100===n&&o(500))},e)};o(1)},getImage:function(e,t){var n=0,i=function(){e&&(e.img[0].complete?(e.img.off(".mfploader"),e===p.currItem&&(p._onImageHasSize(e),p.updateStatus("ready")),e.hasSize=!0,e.loaded=!0,I("ImageLoadComplete")):++n<200?setTimeout(i,100):o())},o=function(){e&&(e.img.off(".mfploader"),e===p.currItem&&(p._onImageHasSize(e),p.updateStatus("error",r.tError.replace("%url%",e.src))),e.hasSize=!0,e.loaded=!0,e.loadError=!0)},r=p.st.image,a=t.find(".mfp-img");if(a.length){var s=document.createElement("img");s.className="mfp-img",e.el&&e.el.find("img").length&&(s.alt=e.el.find("img").attr("alt")),e.img=d(s).on("load.mfploader",i).on("error.mfploader",o),s.src=e.src,a.is("img")&&(e.img=e.img.clone()),0<(s=e.img[0]).naturalWidth?e.hasSize=!0:s.width||(e.hasSize=!1)}return p._parseMarkup(t,{title:function(e){if(e.data&&void 0!==e.data.title)return e.data.title;var t=p.st.image.titleSrc;if(t){if("function"==typeof t)return t.call(p,e);if(e.el)return e.el.attr(t)||""}return""}(e),img_replaceWith:e.img},e),p.resizeImage(),e.hasSize?(L&&clearInterval(L),e.loadError?(t.addClass("mfp-loading"),p.updateStatus("error",r.tError.replace("%url%",e.src))):(t.removeClass("mfp-loading"),p.updateStatus("ready"))):(p.updateStatus("loading"),e.loading=!0,e.hasSize||(e.imgHidden=!0,t.addClass("mfp-loading"),p.findImageSize(e))),t}}});var H;d.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,r=p.st.zoom,t=".zoom";if(r.enabled&&p.supportsTransition){var n,i,o=r.duration,a=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+r.duration/1e3+"s "+r.easing,i={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return i["-webkit-"+o]=i["-moz-"+o]=i["-o-"+o]=i[o]=n,t.css(i),t},s=function(){p.content.css("visibility","visible")};w("BuildControls"+t,function(){if(p._allowZoom()){if(clearTimeout(n),p.content.css("visibility","hidden"),!(e=p._getItemToZoom()))return void s();(i=a(e)).css(p._getOffset()),p.wrap.append(i),n=setTimeout(function(){i.css(p._getOffset(!0)),n=setTimeout(function(){s(),setTimeout(function(){i.remove(),e=i=null,I("ZoomAnimationEnded")},16)},o)},16)}}),w(c+t,function(){if(p._allowZoom()){if(clearTimeout(n),p.st.removalDelay=o,!e){if(!(e=p._getItemToZoom()))return;i=a(e)}i.css(p._getOffset(!0)),p.wrap.append(i),p.content.css("visibility","hidden"),setTimeout(function(){i.css(p._getOffset())},16)}}),w(l+t,function(){p._allowZoom()&&(s(),i&&i.remove(),e=null)})}},_allowZoom:function(){return"image"===p.currItem.type},_getItemToZoom:function(){return!!p.currItem.hasSize&&p.currItem.img},_getOffset:function(e){var t,n=(t=e?p.currItem.img:p.st.zoom.opener(p.currItem.el||p.currItem)).offset(),i=parseInt(t.css("padding-top"),10),o=parseInt(t.css("padding-bottom"),10);n.top-=d(window).scrollTop()-i;var r={width:t.width(),height:(y?t.innerHeight():t[0].offsetHeight)-o-i};return void 0===H&&(H=void 0!==document.createElement("p").style.MozTransform),H?r["-moz-transform"]=r.transform="translate("+n.left+"px,"+n.top+"px)":(r.left=n.left,r.top=n.top),r}}});var A="iframe",F=function(e){if(p.currTemplate[A]){var t=p.currTemplate[A].find("iframe");t.length&&(e||(t[0].src="//about:blank"),p.isIE8&&t.css("display",e?"block":"none"))}};d.magnificPopup.registerModule(A,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){p.types.push(A),w("BeforeChange",function(e,t,n){t!==n&&(t===A?F():n===A&&F(!0))}),w(l+"."+A,function(){F()})},getIframe:function(e,t){var n=e.src,i=p.st.iframe;d.each(i.patterns,function(){if(-1<n.indexOf(this.index))return this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1});var o={};return i.srcAction&&(o[i.srcAction]=n),p._parseMarkup(t,o,e),p.updateStatus("ready"),t}}});var j=function(e){var t=p.items.length;return t-1<e?e-t:e<0?t+e:e},N=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};d.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var r=p.st.gallery,e=".mfp-gallery";if(p.direction=!0,!r||!r.enabled)return!1;f+=" mfp-gallery",w(g+e,function(){r.navigateByImgClick&&p.wrap.on("click"+e,".mfp-img",function(){if(1<p.items.length)return p.next(),!1}),u.on("keydown"+e,function(e){37===e.keyCode?p.prev():39===e.keyCode&&p.next()})}),w("UpdateStatus"+e,function(e,t){t.text&&(t.text=N(t.text,p.currItem.index,p.items.length))}),w(m+e,function(e,t,n,i){var o=p.items.length;n.counter=1<o?N(r.tCounter,i.index,o):""}),w("BuildControls"+e,function(){if(1<p.items.length&&r.arrows&&!p.arrowLeft){var e=r.arrowMarkup,t=p.arrowLeft=d(e.replace(/%title%/gi,r.tPrev).replace(/%dir%/gi,"left")).addClass(s),n=p.arrowRight=d(e.replace(/%title%/gi,r.tNext).replace(/%dir%/gi,"right")).addClass(s);t.click(function(){p.prev()}),n.click(function(){p.next()}),p.container.append(t.add(n))}}),w(a+e,function(){p._preloadTimeout&&clearTimeout(p._preloadTimeout),p._preloadTimeout=setTimeout(function(){p.preloadNearbyImages(),p._preloadTimeout=null},16)}),w(l+e,function(){u.off(e),p.wrap.off("click"+e),p.arrowRight=p.arrowLeft=null})},next:function(){p.direction=!0,p.index=j(p.index+1),p.updateItemHTML()},prev:function(){p.direction=!1,p.index=j(p.index-1),p.updateItemHTML()},goTo:function(e){p.direction=e>=p.index,p.index=e,p.updateItemHTML()},preloadNearbyImages:function(){var e,t=p.st.gallery.preload,n=Math.min(t[0],p.items.length),i=Math.min(t[1],p.items.length);for(e=1;e<=(p.direction?i:n);e++)p._preloadItem(p.index+e);for(e=1;e<=(p.direction?n:i);e++)p._preloadItem(p.index-e)},_preloadItem:function(e){if(e=j(e),!p.items[e].preloaded){var t=p.items[e];t.parsed||(t=p.parseEl(e)),I("LazyLoad",t),"image"===t.type&&(t.img=d('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,I("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0}}}});var W="retina";d.magnificPopup.registerModule(W,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(1<window.devicePixelRatio){var n=p.st.retina,i=n.ratio;1<(i=isNaN(i)?i():i)&&(w("ImageHasSize."+W,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),w("ElementParse."+W,function(e,t){t.src=n.replaceSrc(t,i)}))}}}}),k()},"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)};nb_.listenTo("nb-app-ready",function(){n(),nb_.emit("nb-jmp-parsed")})}(window,document);
 
assets/front/js/libs/jquery-swipebox.js ADDED
@@ -0,0 +1,965 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Swipebox v1.5.2 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
2
+
3
+ ;( function ( window, document, $, undefined ) {
4
+
5
+ $.swipebox = function( elem, options ) {
6
+
7
+ $( elem ).addClass( 'swipebox' ); // fugly but yea, swipebox class all the things
8
+
9
+ // Default options
10
+ var ui,
11
+ defaults = {
12
+ useCSS : true,
13
+ useSVG : true,
14
+ initialIndexOnArray : 0,
15
+ removeBarsOnMobile : true,
16
+ hideCloseButtonOnMobile : false,
17
+ hideBarsDelay : 3000,
18
+ videoMaxWidth : 1140,
19
+ vimeoColor : 'cccccc',
20
+ beforeOpen: null,
21
+ afterOpen: null,
22
+ afterClose: null,
23
+ afterMedia: null,
24
+ nextSlide: null,
25
+ prevSlide: null,
26
+ loopAtEnd: false,
27
+ autoplayVideos: false,
28
+ queryStringData: {},
29
+ toggleClassOnLoad: ''
30
+ },
31
+
32
+ plugin = this,
33
+ elements = [], // slides array [ { href:'...', title:'...' }, ...],
34
+ $elem,
35
+ selector = '.swipebox',
36
+ isMobile = navigator.userAgent.match( /(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i ),
37
+ isTouch = isMobile !== null || document.createTouch !== undefined || ( 'ontouchstart' in window ) || ( 'onmsgesturechange' in window ) || navigator.msMaxTouchPoints,
38
+ supportSVG = !! document.createElementNS && !! document.createElementNS( 'http://www.w3.org/2000/svg', 'svg').createSVGRect,
39
+ winWidth = window.innerWidth ? window.innerWidth : $( window ).width(),
40
+ winHeight = window.innerHeight ? window.innerHeight : $( window ).height(),
41
+ currentX = 0,
42
+ /* jshint multistr: true */
43
+ html = '<div id="swipebox-overlay">\
44
+ <div id="swipebox-container">\
45
+ <div id="swipebox-slider"></div>\
46
+ <div id="swipebox-top-bar">\
47
+ <div id="swipebox-title"></div>\
48
+ </div>\
49
+ <div id="swipebox-bottom-bar">\
50
+ <div id="swipebox-arrows">\
51
+ <a id="swipebox-prev"></a>\
52
+ <a id="swipebox-next"></a>\
53
+ </div>\
54
+ </div>\
55
+ <a id="swipebox-close"></a>\
56
+ </div>\
57
+ </div>';
58
+
59
+ plugin.settings = {};
60
+
61
+ $.swipebox.close = function () {
62
+ ui.closeSlide();
63
+ };
64
+
65
+ $.swipebox.extend = function () {
66
+ return ui;
67
+ };
68
+
69
+ plugin.init = function() {
70
+
71
+ plugin.settings = $.extend( {}, defaults, options );
72
+
73
+ if ( Array.isArray( elem ) ) {
74
+
75
+ elements = elem;
76
+ ui.target = $( window );
77
+ ui.init( plugin.settings.initialIndexOnArray );
78
+
79
+ } else {
80
+
81
+ $( document ).on( 'click', selector, function( event ) {
82
+
83
+ // console.log( isTouch );
84
+
85
+ if ( event.target.parentNode.className === 'slide current' ) {
86
+
87
+ return false;
88
+ }
89
+
90
+ if ( ! Array.isArray( elem ) ) {
91
+ ui.destroy();
92
+ $elem = $( selector );
93
+ ui.actions();
94
+ }
95
+
96
+ elements = [];
97
+ var index, relType, relVal;
98
+
99
+ // Allow for HTML5 compliant attribute before legacy use of rel
100
+ if ( ! relVal ) {
101
+ relType = 'data-rel';
102
+ relVal = $( this ).attr( relType );
103
+ }
104
+
105
+ if ( ! relVal ) {
106
+ relType = 'rel';
107
+ relVal = $( this ).attr( relType );
108
+ }
109
+
110
+ if ( relVal && relVal !== '' && relVal !== 'nofollow' ) {
111
+ $elem = $( selector ).filter( '[' + relType + '="' + relVal + '"]' );
112
+ } else {
113
+ $elem = $( selector );
114
+ }
115
+
116
+ $elem.each( function() {
117
+
118
+ var title = null,
119
+ href = null;
120
+
121
+ if ( $( this ).attr( 'title' ) ) {
122
+ title = $( this ).attr( 'title' );
123
+ }
124
+
125
+ if ( $( this ).attr( 'href' ) ) {
126
+ href = $( this ).attr( 'href' );
127
+ }
128
+
129
+ elements.push( {
130
+ href: href,
131
+ title: title
132
+ } );
133
+ } );
134
+
135
+ index = $elem.index( $( this ) );
136
+ event.preventDefault();
137
+ event.stopPropagation();
138
+ ui.target = $( event.target );
139
+ ui.init( index );
140
+ } );
141
+ }
142
+ };
143
+
144
+ ui = {
145
+
146
+ /**
147
+ * Initiate Swipebox
148
+ */
149
+ init : function( index ) {
150
+ if ( plugin.settings.beforeOpen ) {
151
+ plugin.settings.beforeOpen();
152
+ }
153
+ this.target.trigger( 'swipebox-start' );
154
+ $.swipebox.isOpen = true;
155
+ this.build();
156
+ this.openSlide( index );
157
+ this.openMedia( index );
158
+ this.preloadMedia( index+1 );
159
+ this.preloadMedia( index-1 );
160
+ if ( plugin.settings.afterOpen ) {
161
+ plugin.settings.afterOpen(index);
162
+ }
163
+ },
164
+
165
+ /**
166
+ * Built HTML containers and fire main functions
167
+ */
168
+ build : function () {
169
+ var $this = this, bg;
170
+
171
+ $( 'body' ).append( html );
172
+
173
+ if ( supportSVG && plugin.settings.useSVG === true ) {
174
+ bg = $( '#swipebox-close' ).css( 'background-image' );
175
+ bg = bg.replace( 'png', 'svg' );
176
+ $( '#swipebox-prev, #swipebox-next, #swipebox-close' ).css( {
177
+ 'background-image' : bg
178
+ } );
179
+ }
180
+
181
+ if ( isMobile && plugin.settings.removeBarsOnMobile ) {
182
+ $( '#swipebox-bottom-bar, #swipebox-top-bar' ).remove();
183
+ }
184
+
185
+ $.each( elements, function() {
186
+ $( '#swipebox-slider' ).append( '<div class="slide"></div>' );
187
+ } );
188
+
189
+ $this.setDim();
190
+ $this.actions();
191
+
192
+ if ( isTouch ) {
193
+ $this.gesture();
194
+ }
195
+
196
+ // Devices can have both touch and keyboard input so always allow key events
197
+ $this.keyboard();
198
+
199
+ $this.animBars();
200
+ $this.resize();
201
+
202
+ },
203
+
204
+ /**
205
+ * Set dimensions depending on windows width and height
206
+ */
207
+ setDim : function () {
208
+
209
+ var width, height, sliderCss = {};
210
+
211
+ // Reset dimensions on mobile orientation change
212
+ if ( 'onorientationchange' in window ) {
213
+
214
+ window.addEventListener( 'orientationchange', function() {
215
+ if ( window.orientation === 0 ) {
216
+ width = winWidth;
217
+ height = winHeight;
218
+ } else if ( window.orientation === 90 || window.orientation === -90 ) {
219
+ width = winHeight;
220
+ height = winWidth;
221
+ }
222
+ }, false );
223
+
224
+
225
+ } else {
226
+
227
+ width = window.innerWidth ? window.innerWidth : $( window ).width();
228
+ height = window.innerHeight ? window.innerHeight : $( window ).height();
229
+ }
230
+
231
+ sliderCss = {
232
+ width : width,
233
+ height : height
234
+ };
235
+
236
+ $( '#swipebox-overlay' ).css( sliderCss );
237
+
238
+ },
239
+
240
+ /**
241
+ * Reset dimensions on window resize envent
242
+ */
243
+ resize : function () {
244
+ var $this = this;
245
+
246
+ $( window ).resize( function() {
247
+ $this.setDim();
248
+ } ).resize();
249
+ },
250
+
251
+ /**
252
+ * Check if device supports CSS transitions
253
+ */
254
+ supportTransition : function () {
255
+
256
+ var prefixes = 'transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition'.split( ' ' ),
257
+ i;
258
+
259
+ for ( i = 0; i < prefixes.length; i++ ) {
260
+ if ( document.createElement( 'div' ).style[ prefixes[i] ] !== undefined ) {
261
+ return prefixes[i];
262
+ }
263
+ }
264
+ return false;
265
+ },
266
+
267
+ /**
268
+ * Check if CSS transitions are allowed (options + devicesupport)
269
+ */
270
+ doCssTrans : function () {
271
+ if ( plugin.settings.useCSS && this.supportTransition() ) {
272
+ return true;
273
+ }
274
+ },
275
+
276
+ /**
277
+ * Touch navigation
278
+ */
279
+ gesture : function () {
280
+
281
+ var $this = this,
282
+ index,
283
+ hDistance,
284
+ vDistance,
285
+ hDistanceLast,
286
+ vDistanceLast,
287
+ hDistancePercent,
288
+ vSwipe = false,
289
+ hSwipe = false,
290
+ hSwipMinDistance = 10,
291
+ vSwipMinDistance = 50,
292
+ startCoords = {},
293
+ endCoords = {},
294
+ bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' ),
295
+ slider = $( '#swipebox-slider' );
296
+
297
+ bars.addClass( 'visible-bars' );
298
+ $this.setTimeout();
299
+
300
+ $( 'body' ).bind( 'touchstart', function( event ) {
301
+
302
+ $( this ).addClass( 'touching' );
303
+ index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
304
+ endCoords = event.originalEvent.targetTouches[0];
305
+ startCoords.pageX = event.originalEvent.targetTouches[0].pageX;
306
+ startCoords.pageY = event.originalEvent.targetTouches[0].pageY;
307
+
308
+ $( '#swipebox-slider' ).css( {
309
+ '-webkit-transform' : 'translate3d(' + currentX +'%, 0, 0)',
310
+ 'transform' : 'translate3d(' + currentX + '%, 0, 0)'
311
+ } );
312
+
313
+ $( '.touching' ).bind( 'touchmove',function( event ) {
314
+ event.preventDefault();
315
+ event.stopPropagation();
316
+ endCoords = event.originalEvent.targetTouches[0];
317
+
318
+ if ( ! hSwipe ) {
319
+ vDistanceLast = vDistance;
320
+ vDistance = endCoords.pageY - startCoords.pageY;
321
+ if ( Math.abs( vDistance ) >= vSwipMinDistance || vSwipe ) {
322
+ var opacity = 0.75 - Math.abs(vDistance) / slider.height();
323
+
324
+ slider.css( { 'top': vDistance + 'px' } );
325
+ slider.css( { 'opacity': opacity } );
326
+
327
+ vSwipe = true;
328
+ }
329
+ }
330
+
331
+ hDistanceLast = hDistance;
332
+ hDistance = endCoords.pageX - startCoords.pageX;
333
+ hDistancePercent = hDistance * 100 / winWidth;
334
+
335
+ if ( ! hSwipe && ! vSwipe && Math.abs( hDistance ) >= hSwipMinDistance ) {
336
+ $( '#swipebox-slider' ).css( {
337
+ '-webkit-transition' : '',
338
+ 'transition' : ''
339
+ } );
340
+ hSwipe = true;
341
+ }
342
+
343
+ if ( hSwipe ) {
344
+
345
+ // swipe left
346
+ if ( 0 < hDistance ) {
347
+
348
+ // first slide
349
+ if ( 0 === index ) {
350
+ // console.log( 'first' );
351
+ $( '#swipebox-overlay' ).addClass( 'leftSpringTouch' );
352
+ } else {
353
+ // Follow gesture
354
+ $( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
355
+ $( '#swipebox-slider' ).css( {
356
+ '-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
357
+ 'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
358
+ } );
359
+ }
360
+
361
+ // swipe right
362
+ } else if ( 0 > hDistance ) {
363
+
364
+ // last Slide
365
+ if ( elements.length === index +1 ) {
366
+ // console.log( 'last' );
367
+ $( '#swipebox-overlay' ).addClass( 'rightSpringTouch' );
368
+ } else {
369
+ $( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
370
+ $( '#swipebox-slider' ).css( {
371
+ '-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
372
+ 'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
373
+ } );
374
+ }
375
+
376
+ }
377
+ }
378
+ } );
379
+
380
+ return false;
381
+
382
+ } ).bind( 'touchend',function( event ) {
383
+ event.preventDefault();
384
+ event.stopPropagation();
385
+
386
+ $( '#swipebox-slider' ).css( {
387
+ '-webkit-transition' : '-webkit-transform 0.4s ease',
388
+ 'transition' : 'transform 0.4s ease'
389
+ } );
390
+
391
+ vDistance = endCoords.pageY - startCoords.pageY;
392
+ hDistance = endCoords.pageX - startCoords.pageX;
393
+ hDistancePercent = hDistance*100/winWidth;
394
+
395
+ // Swipe to bottom to close
396
+ if ( vSwipe ) {
397
+ vSwipe = false;
398
+ if ( Math.abs( vDistance ) >= 2 * vSwipMinDistance && Math.abs( vDistance ) > Math.abs( vDistanceLast ) ) {
399
+ var vOffset = vDistance > 0 ? slider.height() : - slider.height();
400
+ slider.animate( { top: vOffset + 'px', 'opacity': 0 },
401
+ 300,
402
+ function () {
403
+ $this.closeSlide();
404
+ } );
405
+ } else {
406
+ slider.animate( { top: 0, 'opacity': 1 }, 300 );
407
+ }
408
+
409
+ } else if ( hSwipe ) {
410
+
411
+ hSwipe = false;
412
+
413
+ // swipeLeft
414
+ if( hDistance >= hSwipMinDistance && hDistance >= hDistanceLast) {
415
+
416
+ $this.getPrev();
417
+
418
+ // swipeRight
419
+ } else if ( hDistance <= -hSwipMinDistance && hDistance <= hDistanceLast) {
420
+
421
+ $this.getNext();
422
+ }
423
+
424
+ } else { // Top and bottom bars have been removed on touchable devices
425
+ // tap
426
+ if ( ! bars.hasClass( 'visible-bars' ) ) {
427
+ $this.showBars();
428
+ $this.setTimeout();
429
+ } else {
430
+ $this.clearTimeout();
431
+ $this.hideBars();
432
+ }
433
+ }
434
+
435
+ $( '#swipebox-slider' ).css( {
436
+ '-webkit-transform' : 'translate3d(' + currentX + '%, 0, 0)',
437
+ 'transform' : 'translate3d(' + currentX + '%, 0, 0)'
438
+ } );
439
+
440
+ $( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
441
+ $( '.touching' ).off( 'touchmove' ).removeClass( 'touching' );
442
+
443
+ } );
444
+ },
445
+
446
+ /**
447
+ * Set timer to hide the action bars
448
+ */
449
+ setTimeout: function () {
450
+ if ( plugin.settings.hideBarsDelay > 0 ) {
451
+ var $this = this;
452
+ $this.clearTimeout();
453
+ $this.timeout = window.setTimeout( function() {
454
+ $this.hideBars();
455
+ },
456
+
457
+ plugin.settings.hideBarsDelay
458
+ );
459
+ }
460
+ },
461
+
462
+ /**
463
+ * Clear timer
464
+ */
465
+ clearTimeout: function () {
466
+ window.clearTimeout( this.timeout );
467
+ this.timeout = null;
468
+ },
469
+
470
+ /**
471
+ * Show navigation and title bars
472
+ */
473
+ showBars : function () {
474
+ var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
475
+ if ( this.doCssTrans() ) {
476
+ bars.addClass( 'visible-bars' );
477
+ } else {
478
+ $( '#swipebox-top-bar' ).animate( { top : 0 }, 500 );
479
+ $( '#swipebox-bottom-bar' ).animate( { bottom : 0 }, 500 );
480
+ setTimeout( function() {
481
+ bars.addClass( 'visible-bars' );
482
+ }, 1000 );
483
+ }
484
+ },
485
+
486
+ /**
487
+ * Hide navigation and title bars
488
+ */
489
+ hideBars : function () {
490
+ var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
491
+ if ( this.doCssTrans() ) {
492
+ bars.removeClass( 'visible-bars' );
493
+ } else {
494
+ $( '#swipebox-top-bar' ).animate( { top : '-50px' }, 500 );
495
+ $( '#swipebox-bottom-bar' ).animate( { bottom : '-50px' }, 500 );
496
+ setTimeout( function() {
497
+ bars.removeClass( 'visible-bars' );
498
+ }, 1000 );
499
+ }
500
+ },
501
+
502
+ /**
503
+ * Animate navigation and top bars
504
+ */
505
+ animBars : function () {
506
+ var $this = this,
507
+ bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
508
+
509
+ bars.addClass( 'visible-bars' );
510
+ $this.setTimeout();
511
+
512
+ $( '#swipebox-slider' ).click( function() {
513
+ if ( ! bars.hasClass( 'visible-bars' ) ) {
514
+ $this.showBars();
515
+ $this.setTimeout();
516
+ }
517
+ } );
518
+
519
+ $( '#swipebox-bottom-bar' ).hover( function() {
520
+ $this.showBars();
521
+ bars.addClass( 'visible-bars' );
522
+ $this.clearTimeout();
523
+
524
+ }, function() {
525
+ if ( plugin.settings.hideBarsDelay > 0 ) {
526
+ bars.removeClass( 'visible-bars' );
527
+ $this.setTimeout();
528
+ }
529
+
530
+ } );
531
+ },
532
+
533
+ /**
534
+ * Keyboard navigation
535
+ */
536
+ keyboard : function () {
537
+ var $this = this;
538
+ $( window ).bind( 'keyup', function( event ) {
539
+ event.preventDefault();
540
+ event.stopPropagation();
541
+
542
+ if ( event.keyCode === 37 ) {
543
+
544
+ $this.getPrev();
545
+
546
+ } else if ( event.keyCode === 39 ) {
547
+
548
+ $this.getNext();
549
+
550
+ } else if ( event.keyCode === 27 ) {
551
+
552
+ $this.closeSlide();
553
+ }
554
+ } );
555
+ },
556
+
557
+ /**
558
+ * Navigation events : go to next slide, go to prevous slide and close
559
+ */
560
+ actions : function () {
561
+ var $this = this,
562
+ action = 'touchend click'; // Just detect for both event types to allow for multi-input
563
+
564
+ if ( elements.length < 2 ) {
565
+
566
+ $( '#swipebox-bottom-bar' ).hide();
567
+
568
+ if ( undefined === elements[ 1 ] ) {
569
+ $( '#swipebox-top-bar' ).hide();
570
+ }
571
+
572
+ } else {
573
+ $( '#swipebox-prev' ).bind( action, function( event ) {
574
+ event.preventDefault();
575
+ event.stopPropagation();
576
+ $this.getPrev();
577
+ $this.setTimeout();
578
+ } );
579
+
580
+ $( '#swipebox-next' ).bind( action, function( event ) {
581
+ event.preventDefault();
582
+ event.stopPropagation();
583
+ $this.getNext();
584
+ $this.setTimeout();
585
+ } );
586
+ }
587
+
588
+ $( '#swipebox-close' ).bind( action, function( event ) {
589
+ event.preventDefault();
590
+ event.stopPropagation();
591
+ $this.closeSlide();
592
+ } );
593
+ },
594
+
595
+ /**
596
+ * Set current slide
597
+ */
598
+ setSlide : function ( index, isFirst ) {
599
+
600
+ isFirst = isFirst || false;
601
+
602
+ var slider = $( '#swipebox-slider' );
603
+
604
+ currentX = -index*100;
605
+
606
+ if ( this.doCssTrans() ) {
607
+ slider.css( {
608
+ '-webkit-transform' : 'translate3d(' + (-index*100)+'%, 0, 0)',
609
+ 'transform' : 'translate3d(' + (-index*100)+'%, 0, 0)'
610
+ } );
611
+ } else {
612
+ slider.animate( { left : ( -index*100 )+'%' } );
613
+ }
614
+
615
+ $( '#swipebox-slider .slide' ).removeClass( 'current' );
616
+ $( '#swipebox-slider .slide' ).eq( index ).addClass( 'current' );
617
+ this.setTitle( index );
618
+
619
+ if ( isFirst ) {
620
+ slider.fadeIn();
621
+ }
622
+
623
+ $( '#swipebox-prev, #swipebox-next' ).removeClass( 'disabled' );
624
+
625
+ if ( index === 0 ) {
626
+ $( '#swipebox-prev' ).addClass( 'disabled' );
627
+ } else if ( index === elements.length - 1 && plugin.settings.loopAtEnd !== true ) {
628
+ $( '#swipebox-next' ).addClass( 'disabled' );
629
+ }
630
+ },
631
+
632
+ /**
633
+ * Open slide
634
+ */
635
+ openSlide : function ( index ) {
636
+ $( 'html' ).addClass( 'swipebox-html' );
637
+ if ( isTouch ) {
638
+ $( 'html' ).addClass( 'swipebox-touch' );
639
+
640
+ if ( plugin.settings.hideCloseButtonOnMobile ) {
641
+ $( 'html' ).addClass( 'swipebox-no-close-button' );
642
+ }
643
+ } else {
644
+ $( 'html' ).addClass( 'swipebox-no-touch' );
645
+ }
646
+ $( window ).trigger( 'resize' ); // fix scroll bar visibility on desktop
647
+ this.setSlide( index, true );
648
+ },
649
+
650
+ /**
651
+ * Set a time out if the media is a video
652
+ */
653
+ preloadMedia : function ( index ) {
654
+ var $this = this,
655
+ src = null;
656
+
657
+ if ( elements[ index ] !== undefined ) {
658
+ src = elements[ index ].href;
659
+ }
660
+
661
+ if ( ! $this.isVideo( src ) ) {
662
+ setTimeout( function() {
663
+ $this.openMedia( index );
664
+ }, 1000);
665
+ } else {
666
+ $this.openMedia( index );
667
+ }
668
+ },
669
+
670
+ /**
671
+ * Open
672
+ */
673
+ openMedia : function ( index ) {
674
+ var $this = this,
675
+ src,
676
+ slide;
677
+
678
+ if ( elements[ index ] !== undefined ) {
679
+ src = elements[ index ].href;
680
+ }
681
+
682
+ if ( index < 0 || index >= elements.length ) {
683
+ return false;
684
+ }
685
+
686
+ slide = $( '#swipebox-slider .slide' ).eq( index );
687
+
688
+ if ( ! $this.isVideo( src ) ) {
689
+ slide.addClass( 'slide-loading' );
690
+ $this.loadMedia( src, function() {
691
+ slide.removeClass( 'slide-loading' );
692
+ slide.html( this );
693
+
694
+ if ( plugin.settings.afterMedia ) {
695
+ plugin.settings.afterMedia( index );
696
+ }
697
+ } );
698
+ } else {
699
+ slide.html( $this.getVideo( src ) );
700
+
701
+ if ( plugin.settings.afterMedia ) {
702
+ plugin.settings.afterMedia( index );
703
+ }
704
+ }
705
+
706
+ },
707
+
708
+ /**
709
+ * Set link title attribute as caption
710
+ */
711
+ setTitle : function ( index ) {
712
+ var title = null;
713
+
714
+ $( '#swipebox-title' ).empty();
715
+
716
+ if ( elements[ index ] !== undefined ) {
717
+ title = elements[ index ].title;
718
+ }
719
+
720
+ if ( title ) {
721
+ $( '#swipebox-top-bar' ).show();
722
+ $( '#swipebox-title' ).append( title );
723
+ } else {
724
+ $( '#swipebox-top-bar' ).hide();
725
+ }
726
+ },
727
+
728
+ /**
729
+ * Check if the URL is a video
730
+ */
731
+ isVideo : function ( src ) {
732
+
733
+ if ( src ) {
734
+ if ( src.match( /(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || src.match( /vimeo\.com\/([0-9]*)/ ) || src.match( /youtu\.be\/([a-zA-Z0-9\-_]+)/ ) ) {
735
+ return true;
736
+ }
737
+
738
+ if ( src.toLowerCase().indexOf( 'swipeboxvideo=1' ) >= 0 ) {
739
+ return true;
740
+ }
741
+ }
742
+ },
743
+
744
+ /**
745
+ * Parse URI querystring and:
746
+ * - overrides value provided via dictionary
747
+ * - rebuild it again returning a string
748
+ */
749
+ parseUri : function (uri, customData) {
750
+ var a = document.createElement('a'),
751
+ qs = {};
752
+
753
+ // Decode the URI
754
+ a.href = decodeURIComponent( uri );
755
+
756
+ // QueryString to Object
757
+ if ( a.search ) {
758
+ qs = JSON.parse( '{"' + a.search.toLowerCase().replace('?','').replace(/&/g,'","').replace(/=/g,'":"') + '"}' );
759
+ }
760
+
761
+ // Extend with custom data
762
+ if ( $.isPlainObject( customData ) ) {
763
+ qs = $.extend( qs, customData, plugin.settings.queryStringData ); // The dev has always the final word
764
+ }
765
+
766
+ // Return querystring as a string
767
+ return $
768
+ .map( qs, function (val, key) {
769
+ if ( val && val > '' ) {
770
+ return encodeURIComponent( key ) + '=' + encodeURIComponent( val );
771
+ }
772
+ })
773
+ .join('&');
774
+ },
775
+
776
+ /**
777
+ * Get video iframe code from URL
778
+ */
779
+ getVideo : function( url ) {
780
+ var iframe = '',
781
+ youtubeUrl = url.match( /((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/ ),
782
+ youtubeShortUrl = url.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),
783
+ vimeoUrl = url.match( /(?:www\.)?vimeo\.com\/([0-9]*)/ ),
784
+ qs = '';
785
+
786
+ if ( youtubeUrl || youtubeShortUrl) {
787
+ if ( youtubeShortUrl ) {
788
+ youtubeUrl = youtubeShortUrl;
789
+ }
790
+
791
+ console.log( youtubeUrl );
792
+
793
+ qs = ui.parseUri( url, {
794
+ 'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
795
+ 'v' : ''
796
+ });
797
+ iframe = '<iframe width="560" height="315" src="https://' + youtubeUrl[1] + '/embed/' + youtubeUrl[2] + '?' + qs + '" frameborder="0" allowfullscreen></iframe>';
798
+
799
+ } else if ( vimeoUrl ) {
800
+ qs = ui.parseUri( url, {
801
+ 'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
802
+ 'byline' : '0',
803
+ 'portrait' : '0',
804
+ 'color': plugin.settings.vimeoColor
805
+ });
806
+ iframe = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + vimeoUrl[1] + '?' + qs + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
807
+
808
+ } else {
809
+ iframe = '<iframe width="560" height="315" src="' + url + '" frameborder="0" allowfullscreen></iframe>';
810
+ }
811
+
812
+ return '<div class="swipebox-video-container" style="max-width:' + plugin.settings.videoMaxWidth + 'px"><div class="swipebox-video">' + iframe + '</div></div>';
813
+ },
814
+
815
+ /**
816
+ * Load image
817
+ */
818
+ loadMedia : function ( src, callback ) {
819
+ // Inline content
820
+ if ( src.trim().indexOf('#') === 0 ) {
821
+ callback.call(
822
+ $('<div>', {
823
+ 'class' : 'swipebox-inline-container'
824
+ })
825
+ .append(
826
+ $(src)
827
+ .clone()
828
+ .toggleClass( plugin.settings.toggleClassOnLoad )
829
+ )
830
+ );
831
+ }
832
+ // Everything else
833
+ else {
834
+ if ( ! this.isVideo( src ) ) {
835
+ var img = $( '<img>' ).on( 'load', function() {
836
+ callback.call( img );
837
+ } );
838
+
839
+ img.attr( 'src', src );
840
+ }
841
+ }
842
+ },
843
+
844
+ /**
845
+ * Get next slide
846
+ */
847
+ getNext : function () {
848
+ var $this = this,
849
+ src,
850
+ index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
851
+ if ( index + 1 < elements.length ) {
852
+
853
+ src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
854
+ $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
855
+ index++;
856
+ $this.setSlide( index );
857
+ $this.preloadMedia( index+1 );
858
+ if ( plugin.settings.nextSlide ) {
859
+ plugin.settings.nextSlide(index);
860
+ }
861
+ } else {
862
+
863
+ if ( plugin.settings.loopAtEnd === true ) {
864
+ src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
865
+ $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
866
+ index = 0;
867
+ $this.preloadMedia( index );
868
+ $this.setSlide( index );
869
+ $this.preloadMedia( index + 1 );
870
+ if ( plugin.settings.nextSlide ) {
871
+ plugin.settings.nextSlide(index);
872
+ }
873
+ } else {
874
+ $( '#swipebox-overlay' ).addClass( 'rightSpring' );
875
+ setTimeout( function() {
876
+ $( '#swipebox-overlay' ).removeClass( 'rightSpring' );
877
+ }, 500 );
878
+ }
879
+ }
880
+ },
881
+
882
+ /**
883
+ * Get previous slide
884
+ */
885
+ getPrev : function () {
886
+ var index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) ),
887
+ src;
888
+ if ( index > 0 ) {
889
+ src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe').attr( 'src' );
890
+ $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
891
+ index--;
892
+ this.setSlide( index );
893
+ this.preloadMedia( index-1 );
894
+ if ( plugin.settings.prevSlide ) {
895
+ plugin.settings.prevSlide(index);
896
+ }
897
+ } else {
898
+ $( '#swipebox-overlay' ).addClass( 'leftSpring' );
899
+ setTimeout( function() {
900
+ $( '#swipebox-overlay' ).removeClass( 'leftSpring' );
901
+ }, 500 );
902
+ }
903
+ },
904
+ /* jshint unused:false */
905
+ nextSlide : function ( index ) {
906
+ // Callback for next slide
907
+ },
908
+
909
+ prevSlide : function ( index ) {
910
+ // Callback for prev slide
911
+ },
912
+
913
+ /**
914
+ * Close
915
+ */
916
+ closeSlide : function () {
917
+ $( 'html' ).removeClass( 'swipebox-html' );
918
+ $( 'html' ).removeClass( 'swipebox-touch' );
919
+ $( window ).trigger( 'resize' );
920
+ this.destroy();
921
+ },
922
+
923
+ /**
924
+ * Destroy the whole thing
925
+ */
926
+ destroy : function () {
927
+ $( window ).unbind( 'keyup' );
928
+ $( 'body' ).unbind( 'touchstart' );
929
+ $( 'body' ).unbind( 'touchmove' );
930
+ $( 'body' ).unbind( 'touchend' );
931
+ $( '#swipebox-slider' ).unbind();
932
+ $( '#swipebox-overlay' ).remove();
933
+
934
+ if ( ! Array.isArray( elem ) ) {
935
+ elem.removeData( '_swipebox' );
936
+ }
937
+
938
+ if ( this.target ) {
939
+ this.target.trigger( 'swipebox-destroy' );
940
+ }
941
+
942
+ $.swipebox.isOpen = false;
943
+
944
+ if ( plugin.settings.afterClose ) {
945
+ plugin.settings.afterClose();
946
+ }
947
+ }
948
+ };
949
+
950
+ plugin.init();
951
+ };
952
+
953
+ $.fn.swipebox = function( options ) {
954
+
955
+ if ( ! $.data( this, '_swipebox' ) ) {
956
+ var swipebox = new $.swipebox( this, options );
957
+ this.data( '_swipebox', swipebox );
958
+ }
959
+ return this.data( '_swipebox' );
960
+
961
+ };
962
+
963
+ }( window, document, jQuery ) );
964
+ // on 'nb-app-ready', jQuery is loaded
965
+ nb_.listenTo('nb-app-ready', function(){nb_.emit('nb-swipebox-parsed');});
assets/front/js/libs/jquery-swipebox.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(b,c,m,u){m.swipebox=function(o,e){m(o).addClass("swipebox");var n,a,t={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},r=this,g=[],l=".swipebox",i=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),s=null!==i||c.createTouch!==u||"ontouchstart"in b||"onmsgesturechange"in b||navigator.msMaxTouchPoints,d=!!c.createElementNS&&!!c.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,w=b.innerWidth?b.innerWidth:m(b).width(),p=b.innerHeight?b.innerHeight:m(b).height(),f=0;r.settings={},m.swipebox.close=function(){n.closeSlide()},m.swipebox.extend=function(){return n},r.init=function(){r.settings=m.extend({},t,e),Array.isArray(o)?(g=o,n.target=m(b),n.init(r.settings.initialIndexOnArray)):m(c).on("click",l,function(e){if("slide current"===e.target.parentNode.className)return!1;var t,i,s;Array.isArray(o)||(n.destroy(),a=m(l),n.actions()),g=[],s||(i="data-rel",s=m(this).attr(i)),s||(i="rel",s=m(this).attr(i)),(a=s&&""!==s&&"nofollow"!==s?m(l).filter("["+i+'="'+s+'"]'):m(l)).each(function(){var e=null,t=null;m(this).attr("title")&&(e=m(this).attr("title")),m(this).attr("href")&&(t=m(this).attr("href")),g.push({href:t,title:e})}),t=a.index(m(this)),e.preventDefault(),e.stopPropagation(),n.target=m(e.target),n.init(t)})},n={init:function(e){r.settings.beforeOpen&&r.settings.beforeOpen(),this.target.trigger("swipebox-start"),m.swipebox.isOpen=!0,this.build(),this.openSlide(e),this.openMedia(e),this.preloadMedia(e+1),this.preloadMedia(e-1),r.settings.afterOpen&&r.settings.afterOpen(e)},build:function(){var e,t=this;m("body").append('<div id="swipebox-overlay">\t\t\t\t\t<div id="swipebox-container">\t\t\t\t\t\t<div id="swipebox-slider"></div>\t\t\t\t\t\t<div id="swipebox-top-bar">\t\t\t\t\t\t\t<div id="swipebox-title"></div>\t\t\t\t\t\t</div>\t\t\t\t\t\t<div id="swipebox-bottom-bar">\t\t\t\t\t\t\t<div id="swipebox-arrows">\t\t\t\t\t\t\t\t<a id="swipebox-prev"></a>\t\t\t\t\t\t\t\t<a id="swipebox-next"></a>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t</div>\t\t\t\t\t\t<a id="swipebox-close"></a>\t\t\t\t\t</div>\t\t\t</div>'),d&&!0===r.settings.useSVG&&(e=(e=m("#swipebox-close").css("background-image")).replace("png","svg"),m("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":e})),i&&r.settings.removeBarsOnMobile&&m("#swipebox-bottom-bar, #swipebox-top-bar").remove(),m.each(g,function(){m("#swipebox-slider").append('<div class="slide"></div>')}),t.setDim(),t.actions(),s&&t.gesture(),t.keyboard(),t.animBars(),t.resize()},setDim:function(){var e,t,i;"onorientationchange"in b?b.addEventListener("orientationchange",function(){0===b.orientation?(e=w,t=p):90!==b.orientation&&-90!==b.orientation||(e=p,t=w)},!1):(e=b.innerWidth?b.innerWidth:m(b).width(),t=b.innerHeight?b.innerHeight:m(b).height()),i={width:e,height:t},m("#swipebox-overlay").css(i)},resize:function(){var e=this;m(b).resize(function(){e.setDim()}).resize()},supportTransition:function(){var e,t="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(e=0;e<t.length;e++)if(c.createElement("div").style[t[e]]!==u)return t[e];return!1},doCssTrans:function(){if(r.settings.useCSS&&this.supportTransition())return!0},gesture:function(){var i,s,o,a,n,r,l=this,d=!1,p=!1,b={},c={},u=m("#swipebox-top-bar, #swipebox-bottom-bar"),h=m("#swipebox-slider");u.addClass("visible-bars"),l.setTimeout(),m("body").bind("touchstart",function(e){return m(this).addClass("touching"),i=m("#swipebox-slider .slide").index(m("#swipebox-slider .slide.current")),c=e.originalEvent.targetTouches[0],b.pageX=e.originalEvent.targetTouches[0].pageX,b.pageY=e.originalEvent.targetTouches[0].pageY,m("#swipebox-slider").css({"-webkit-transform":"translate3d("+f+"%, 0, 0)",transform:"translate3d("+f+"%, 0, 0)"}),m(".touching").bind("touchmove",function(e){if(e.preventDefault(),e.stopPropagation(),c=e.originalEvent.targetTouches[0],!p&&(n=o,o=c.pageY-b.pageY,50<=Math.abs(o)||d)){var t=.75-Math.abs(o)/h.height();h.css({top:o+"px"}),h.css({opacity:t}),d=!0}a=s,s=c.pageX-b.pageX,r=100*s/w,!p&&!d&&10<=Math.abs(s)&&(m("#swipebox-slider").css({"-webkit-transition":"",transition:""}),p=!0),p&&(0<s?0===i?m("#swipebox-overlay").addClass("leftSpringTouch"):(m("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),m("#swipebox-slider").css({"-webkit-transform":"translate3d("+(f+r)+"%, 0, 0)",transform:"translate3d("+(f+r)+"%, 0, 0)"})):s<0&&(g.length===i+1?m("#swipebox-overlay").addClass("rightSpringTouch"):(m("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),m("#swipebox-slider").css({"-webkit-transform":"translate3d("+(f+r)+"%, 0, 0)",transform:"translate3d("+(f+r)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(e){if(e.preventDefault(),e.stopPropagation(),m("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),o=c.pageY-b.pageY,s=c.pageX-b.pageX,r=100*s/w,d)if(d=!1,100<=Math.abs(o)&&Math.abs(o)>Math.abs(n)){var t=0<o?h.height():-h.height();h.animate({top:t+"px",opacity:0},300,function(){l.closeSlide()})}else h.animate({top:0,opacity:1},300);else p?(p=!1,10<=s&&a<=s?l.getPrev():s<=-10&&s<=a&&l.getNext()):u.hasClass("visible-bars")?(l.clearTimeout(),l.hideBars()):(l.showBars(),l.setTimeout());m("#swipebox-slider").css({"-webkit-transform":"translate3d("+f+"%, 0, 0)",transform:"translate3d("+f+"%, 0, 0)"}),m("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),m(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(0<r.settings.hideBarsDelay){var e=this;e.clearTimeout(),e.timeout=b.setTimeout(function(){e.hideBars()},r.settings.hideBarsDelay)}},clearTimeout:function(){b.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var e=m("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.addClass("visible-bars"):(m("#swipebox-top-bar").animate({top:0},500),m("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){e.addClass("visible-bars")},1e3))},hideBars:function(){var e=m("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.removeClass("visible-bars"):(m("#swipebox-top-bar").animate({top:"-50px"},500),m("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){e.removeClass("visible-bars")},1e3))},animBars:function(){var e=this,t=m("#swipebox-top-bar, #swipebox-bottom-bar");t.addClass("visible-bars"),e.setTimeout(),m("#swipebox-slider").click(function(){t.hasClass("visible-bars")||(e.showBars(),e.setTimeout())}),m("#swipebox-bottom-bar").hover(function(){e.showBars(),t.addClass("visible-bars"),e.clearTimeout()},function(){0<r.settings.hideBarsDelay&&(t.removeClass("visible-bars"),e.setTimeout())})},keyboard:function(){var t=this;m(b).bind("keyup",function(e){e.preventDefault(),e.stopPropagation(),37===e.keyCode?t.getPrev():39===e.keyCode?t.getNext():27===e.keyCode&&t.closeSlide()})},actions:function(){var t=this,e="touchend click";g.length<2?(m("#swipebox-bottom-bar").hide(),u===g[1]&&m("#swipebox-top-bar").hide()):(m("#swipebox-prev").bind(e,function(e){e.preventDefault(),e.stopPropagation(),t.getPrev(),t.setTimeout()}),m("#swipebox-next").bind(e,function(e){e.preventDefault(),e.stopPropagation(),t.getNext(),t.setTimeout()})),m("#swipebox-close").bind(e,function(e){e.preventDefault(),e.stopPropagation(),t.closeSlide()})},setSlide:function(e,t){t=t||!1;var i=m("#swipebox-slider");f=100*-e,this.doCssTrans()?i.css({"-webkit-transform":"translate3d("+100*-e+"%, 0, 0)",transform:"translate3d("+100*-e+"%, 0, 0)"}):i.animate({left:100*-e+"%"}),m("#swipebox-slider .slide").removeClass("current"),m("#swipebox-slider .slide").eq(e).addClass("current"),this.setTitle(e),t&&i.fadeIn(),m("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===e?m("#swipebox-prev").addClass("disabled"):e===g.length-1&&!0!==r.settings.loopAtEnd&&m("#swipebox-next").addClass("disabled")},openSlide:function(e){m("html").addClass("swipebox-html"),s?(m("html").addClass("swipebox-touch"),r.settings.hideCloseButtonOnMobile&&m("html").addClass("swipebox-no-close-button")):m("html").addClass("swipebox-no-touch"),m(b).trigger("resize"),this.setSlide(e,!0)},preloadMedia:function(e){var t=this,i=null;g[e]!==u&&(i=g[e].href),t.isVideo(i)?t.openMedia(e):setTimeout(function(){t.openMedia(e)},1e3)},openMedia:function(e){var t,i;if(g[e]!==u&&(t=g[e].href),e<0||e>=g.length)return!1;i=m("#swipebox-slider .slide").eq(e),this.isVideo(t)?(i.html(this.getVideo(t)),r.settings.afterMedia&&r.settings.afterMedia(e)):(i.addClass("slide-loading"),this.loadMedia(t,function(){i.removeClass("slide-loading"),i.html(this),r.settings.afterMedia&&r.settings.afterMedia(e)}))},setTitle:function(e){var t=null;m("#swipebox-title").empty(),g[e]!==u&&(t=g[e].title),t?(m("#swipebox-top-bar").show(),m("#swipebox-title").append(t)):m("#swipebox-top-bar").hide()},isVideo:function(e){if(e){if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(0<=e.toLowerCase().indexOf("swipeboxvideo=1"))return!0}},parseUri:function(e,t){var i=c.createElement("a"),s={};return i.href=decodeURIComponent(e),i.search&&(s=JSON.parse('{"'+i.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),m.isPlainObject(t)&&(s=m.extend(s,t,r.settings.queryStringData)),m.map(s,function(e,t){if(e&&""<e)return encodeURIComponent(t)+"="+encodeURIComponent(e)}).join("&")},getVideo:function(e){var t="",i=e.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),s=e.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),o=e.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),a="";return t=i||s?(s&&(i=s),console.log(i),a=n.parseUri(e,{autoplay:r.settings.autoplayVideos?"1":"0",v:""}),'<iframe width="560" height="315" src="https://'+i[1]+"/embed/"+i[2]+"?"+a+'" frameborder="0" allowfullscreen></iframe>'):o?(a=n.parseUri(e,{autoplay:r.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:r.settings.vimeoColor}),'<iframe width="560" height="315" src="//player.vimeo.com/video/'+o[1]+"?"+a+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'):'<iframe width="560" height="315" src="'+e+'" frameborder="0" allowfullscreen></iframe>','<div class="swipebox-video-container" style="max-width:'+r.settings.videoMaxWidth+'px"><div class="swipebox-video">'+t+"</div></div>"},loadMedia:function(e,t){if(0===e.trim().indexOf("#"))t.call(m("<div>",{class:"swipebox-inline-container"}).append(m(e).clone().toggleClass(r.settings.toggleClassOnLoad)));else if(!this.isVideo(e)){var i=m("<img>").on("load",function(){t.call(i)});i.attr("src",e)}},getNext:function(){var e,t=this,i=m("#swipebox-slider .slide").index(m("#swipebox-slider .slide.current"));i+1<g.length?(e=m("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src"),m("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src",e),i++,t.setSlide(i),t.preloadMedia(i+1),r.settings.nextSlide&&r.settings.nextSlide(i)):!0===r.settings.loopAtEnd?(e=m("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src"),m("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src",e),i=0,t.preloadMedia(i),t.setSlide(i),t.preloadMedia(i+1),r.settings.nextSlide&&r.settings.nextSlide(i)):(m("#swipebox-overlay").addClass("rightSpring"),setTimeout(function(){m("#swipebox-overlay").removeClass("rightSpring")},500))},getPrev:function(){var e,t=m("#swipebox-slider .slide").index(m("#swipebox-slider .slide.current"));0<t?(e=m("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src"),m("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src",e),t--,this.setSlide(t),this.preloadMedia(t-1),r.settings.prevSlide&&r.settings.prevSlide(t)):(m("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){m("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(e){},prevSlide:function(e){},closeSlide:function(){m("html").removeClass("swipebox-html"),m("html").removeClass("swipebox-touch"),m(b).trigger("resize"),this.destroy()},destroy:function(){m(b).unbind("keyup"),m("body").unbind("touchstart"),m("body").unbind("touchmove"),m("body").unbind("touchend"),m("#swipebox-slider").unbind(),m("#swipebox-overlay").remove(),Array.isArray(o)||o.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),m.swipebox.isOpen=!1,r.settings.afterClose&&r.settings.afterClose()}},r.init()},m.fn.swipebox=function(e){if(!m.data(this,"_swipebox")){var t=new m.swipebox(this,e);this.data("_swipebox",t)}return this.data("_swipebox")}}(window,document,jQuery),nb_.listenTo("nb-app-ready",function(){nb_.emit("nb-swipebox-parsed")});
assets/front/js/nimble-init.js ADDED
@@ -0,0 +1,397 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // global sekFrontLocalized, nimbleListenTo
2
+ window.nb_ = {};
3
+ // Jquery agnostic
4
+ (function(w, d){
5
+ window.nb_ = {
6
+ isArray : function(obj) {
7
+ return Array.isArray(obj) || toString.call(obj) === '[object Array]';
8
+ },
9
+ inArray : function(obj, value) {
10
+ if ( !nb_.isArray(obj) || nb_.isUndefined(value) )
11
+ return false;
12
+ return obj.indexOf(value) > -1;
13
+ },
14
+ isUndefined : function(obj) {
15
+ return obj === void 0;
16
+ },
17
+ isObject : function(obj) {
18
+ var type = typeof obj;
19
+ return type === 'function' || type === 'object' && !!obj;
20
+ },
21
+ // safe console log for
22
+ errorLog : function() {
23
+ //fix for IE, because console is only defined when in F12 debugging mode in IE
24
+ if ( nb_.isUndefined( console ) || 'function' != typeof window.console.log )
25
+ return;
26
+ console.log.apply(console,arguments);
27
+ },
28
+ hasPreloadSupport : function( browser ) {
29
+ var link = document.createElement('link');
30
+ var relList = link.relList;
31
+ if (!relList || !relList.supports)
32
+ return false;
33
+ return relList.supports('preload');
34
+ },
35
+ listenTo : function( evt, func ) {
36
+ // store it, so if the event has been emitted before the listener is fired, we know it's been emitted
37
+ nb_.eventsListenedTo.push(evt);
38
+
39
+ var canWeFireCallbackForEvent = {
40
+ 'nb-jquery-loaded' : function() { return typeof undefined !== typeof jQuery; },
41
+ 'nb-app-ready' : function() { return ( typeof undefined !== typeof window.nb_ ) && nb_.wasListenedTo('nb-jquery-loaded'); },
42
+ 'nb-swipebox-parsed' : function() { return ( typeof undefined !== typeof jQuery ) && ( typeof undefined !== typeof jQuery.fn.swipebox ); },
43
+ 'nb-main-swiper-parsed' : function() { return typeof undefined !== typeof window.Swiper; }
44
+ };
45
+ // e is the event object passed
46
+ // it is possible to add params but we need to use new CustomEvent with a polyfill for IE
47
+ // see : https://stackoverflow.com/questions/18613456/trigger-event-with-parameters
48
+ var _executeAndLog = function(e) {
49
+ if ( !nb_.isUndefined(canWeFireCallbackForEvent[evt]) && false === canWeFireCallbackForEvent[evt]() ) {
50
+ nb_.errorLog('Nimble error => an event callback could not be fired because conditions not met => ', evt, nb_.eventsListenedTo, func );
51
+ return;
52
+ }
53
+ func();
54
+ // // store it, so if the event has been emitted before the listener is fired, we know it's been emitted
55
+ // nb_.eventsListenedTo.push(evt);
56
+ };
57
+ // if the event requires a condition to be executed let's check it
58
+ // if the event has alreay been listened to, let's fire the func, otherwise wait for its emission
59
+ if ( 'function' === typeof func ) {
60
+ if ( nb_.wasEmitted(evt) ) {
61
+ _executeAndLog();
62
+ } else {
63
+ document.addEventListener(evt,_executeAndLog);
64
+ }
65
+ } else {
66
+ nb_.errorLog('Nimble error => listenTo func param is not a function for event => ', evt );
67
+ }
68
+ },
69
+ eventsEmitted : [],
70
+ eventsListenedTo : [],
71
+ // @param params { fire_once : false }
72
+ // fire_once is used in nb_.maybeLoadAssetsWhenSelectorInScreen()
73
+ emit : function(evt, params ) {
74
+ var _fire_once = nb_.isUndefined( params ) || params.fire_once;
75
+ if ( _fire_once && nb_.wasEmitted(evt) )
76
+ return;
77
+
78
+ // it is possible to add params when dispatching the event, but we need to use new CustomEvent with a polyfill for IE
79
+ // see : https://stackoverflow.com/questions/18613456/trigger-event-with-parameters
80
+ var _evt = document.createEvent('Event');
81
+ _evt.initEvent(evt, true, true); //can bubble, and is cancellable
82
+ document.dispatchEvent(_evt);
83
+ nb_.eventsEmitted.push(evt);
84
+ },
85
+ wasListenedTo : function( evt ) {
86
+ return ('string' === typeof evt) && nb_.inArray( nb_.eventsListenedTo, evt );
87
+ },
88
+ wasEmitted : function( evt ) {
89
+ return ('string' === typeof evt) && nb_.inArray( nb_.eventsEmitted, evt );
90
+ },
91
+ // https://stackoverflow.com/questions/5353934/check-if-element-is-visible-on-screen
92
+ isInScreen : function(el) {
93
+ if ( !nb_.isObject( el ) )
94
+ return false;
95
+ var rect = el.getBoundingClientRect(),
96
+ viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
97
+ return !(rect.bottom < 0 || rect.top - viewHeight >= 0);
98
+ },
99
+ isCustomizing : function() {
100
+ return true == '<?php echo skp_is_customizing(); ?>';
101
+ },
102
+ isLazyLoadEnabled : function() {
103
+ return !nb_.isCustomizing() && true == '<?php echo sek_is_img_smartload_enabled(); ?>';
104
+ },
105
+ // params = {
106
+ // id : 'nb-animate-css',
107
+ // as : 'style',
108
+ // href : "",
109
+ // onEvent : 'nb-docready',
110
+ // scriptEl : document.currentScript,
111
+ // eventOnLoad : 'animate-css-loaded'
112
+ // }
113
+ // About preloading : rel="preload" tells the browser to start loading an important assets in priority
114
+ // example :
115
+ // - load late-discovered resources early
116
+ // - early loading of fonts
117
+ // NB asset strategy :
118
+ // - use rel="preload" for webfonts like Font Awesome ( stylesheet + fonts )
119
+ // - use defer attribute for all javascript files( see https://flaviocopes.com/javascript-async-defer/ ) "The best thing to do to speed up your page loading when using scripts is to put them in the head, and add a defer attribute to your script tag:"
120
+ // see https://www.smashingmagazine.com/2016/02/preload-what-is-it-good-for/
121
+ preloadOrDeferAsset : function(params) {
122
+ params = params || {};
123
+ // bail if preloaded already ?
124
+ nb_.preloadedAssets = nb_.preloadedAssets || [];
125
+ if ( nb_.inArray( nb_.preloadedAssets, params.id ) )
126
+ return;
127
+
128
+ var headTag = document.getElementsByTagName('head')[0],
129
+ link,
130
+ _injectFinalAsset = function() {
131
+ var link = this;
132
+ // this is the link element
133
+ if ( 'style' === params.as ) {
134
+ link.setAttribute('rel', 'stylesheet');
135
+ link.setAttribute('type', 'text/css');
136
+ link.setAttribute('media', 'all');
137
+ } else {
138
+ var _script = document.createElement("script");
139
+ _script.setAttribute('src', params.href );
140
+ _script.setAttribute('id', params.id );
141
+ if ( 'script' === params.as ) {
142
+ _script.setAttribute('defer', 'defer');
143
+ }
144
+ headTag.appendChild(_script);
145
+ // clean the loader link
146
+ _maybeRemoveScriptEl.call(link);
147
+ }
148
+ if ( params.eventOnLoad ) {
149
+ nb_.emit( params.eventOnLoad );
150
+ }
151
+ },
152
+ _maybeRemoveScriptEl = function() {
153
+ var _el = this;
154
+ if ( _el && _el.parentNode && _el.parentNode.contains(_el) ) {
155
+ try{_el.parentNode.removeChild(_el);} catch(er) {
156
+ nb_.errorLog('NB error when removing a script el', el);
157
+ }
158
+ }
159
+ };
160
+
161
+ // terminate here in the case of a font preload when preload not supported
162
+ if ( 'font' === params.as && !nb_.hasPreloadSupport() )
163
+ return;
164
+
165
+ link = document.createElement('link');
166
+
167
+ // script without preload support
168
+ if ( 'script' === params.as ) {
169
+ if ( params.onEvent ) {
170
+ nb_.listenTo( params.onEvent, function() { _injectFinalAsset.call(link); });
171
+ } else {
172
+ _injectFinalAsset.call(link);
173
+ }
174
+ } else {
175
+ // script, font and stylesheet
176
+ link.setAttribute('href', params.href);
177
+ if ( 'style' === params.as ) {
178
+ link.setAttribute('rel', nb_.hasPreloadSupport() ? 'preload' : 'stylesheet' );
179
+ } else if ( 'font' === params.as && nb_.hasPreloadSupport() ) {
180
+ link.setAttribute('rel', 'preload' );
181
+ }
182
+ link.setAttribute('id', params.id );
183
+ link.setAttribute('as', params.as);
184
+
185
+ // attributes specific to fonts
186
+ if ( 'font' === params.as ) {
187
+ link.setAttribute('type', params.type);
188
+ link.setAttribute('crossorigin', 'anonymous');
189
+ }
190
+
191
+ // watch load events
192
+ link.onload = function() {
193
+ this.onload=null;
194
+ // if this is a font, let's only check if an event is scheduled on load
195
+ if ( 'font' === params.as ) {
196
+ if ( params.eventOnLoad ) {
197
+ nb_.emit( params.eventOnLoad );
198
+ }
199
+ // nothing left to do if this is a font. It can now be used by the stylesheet
200
+ return;
201
+ }
202
+
203
+ if ( params.onEvent ) {
204
+ nb_.listenTo( params.onEvent, function() { _injectFinalAsset.call(link); });
205
+ } else {
206
+ _injectFinalAsset.call(link);
207
+ }
208
+ };
209
+ link.onerror = function(er) {
210
+ nb_.errorLog('Nimble preloadOrDeferAsset error', er, params );
211
+ };
212
+ }
213
+ // append link now
214
+ headTag.appendChild(link);
215
+
216
+ // store the asset as done
217
+ nb_.preloadedAssets.push( params.id );
218
+
219
+ // clean the script element from which preload has been requested
220
+ _maybeRemoveScriptEl.call(params.scriptEl);
221
+ },
222
+ mayBeRevealBG : function() {
223
+ var imgSrc = this.getAttribute('data-sek-src');
224
+ if ( imgSrc ) {
225
+ this.setAttribute( 'style', 'background-image:url("' + this.getAttribute('data-sek-src') +'")' );
226
+ this.className += ' sek-lazy-loaded';//<= so we don't parse it twice when lazyload is active
227
+ // clean css loader
228
+ var css_loaders = this.querySelectorAll('.sek-css-loader');
229
+ css_loaders.forEach( function(_cssl) {
230
+ if ( nb_.isObject(_cssl) ) {
231
+ _cssl.parentNode.removeChild(_cssl);
232
+ }
233
+ });
234
+ }
235
+ }
236
+ };//window.nb_
237
+
238
+ // forEach not supported by IE
239
+ // This polyfill adds compatibility to all Browsers supporting ES5:
240
+ if (window.NodeList && !NodeList.prototype.forEach) {
241
+ NodeList.prototype.forEach = function (callback, thisArg) {
242
+ thisArg = thisArg || window;
243
+ for (var i = 0; i < this.length; i++) {
244
+ callback.call(thisArg, this[i], i, this);
245
+ }
246
+ };
247
+ }
248
+ // maybe reveal bg images on dom ready
249
+ // if lazyload is not loaded yet, and container is visible
250
+ // Sept 2020 : if lazyload disabled, make sure all background get revealed
251
+ // because background are always printed as data-sek-src attribute for a level, lazyload or not, and therefore need to be inlined styled with javascript
252
+ nb_.listenTo('nb-docready', function() {
253
+ var matches = document.querySelectorAll('div.sek-has-bg');
254
+ if ( !nb_.isObject( matches ) || matches.length < 1 )
255
+ return;
256
+ var imgSrc;
257
+ matches.forEach( function(el) {
258
+ if ( !nb_.isObject(el) )
259
+ return;
260
+ if ( window.sekFrontLocalized && window.sekFrontLocalized.lazyload_enabled ) {
261
+ if ( nb_.isInScreen(el) ) {
262
+ nb_.mayBeRevealBG.call(el);
263
+ }
264
+ } else {
265
+ nb_.mayBeRevealBG.call(el);
266
+ }
267
+ });
268
+ });
269
+
270
+ // Add an internal document ready listener the jquery way
271
+ // Catch cases where $(document).ready() is called
272
+ // after the browser event has already occurred.
273
+ // Support: IE <=9 - 10 only
274
+ // Older IE sometimes signals "interactive" too soon
275
+ if ( document.readyState === "complete" || ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
276
+ nb_.emit('nb-docready');
277
+ } else {
278
+ var _docReady = function() {
279
+ if ( !nb_.wasEmitted('nb-docready') ) {
280
+ nb_.emit('nb-docready');
281
+ }
282
+ };
283
+ // Use the handy event callback
284
+ document.addEventListener( "DOMContentLoaded", _docReady );
285
+ // A fallback to window.onload, that will always work
286
+ window.addEventListener( "load", _docReady );
287
+ }
288
+
289
+ }(window, document ));
290
+
291
+
292
+ // introduced for https://github.com/presscustomizr/nimble-builder/issues/626
293
+ // jQuery can potentially be loaded async, so let's react to its load or the presence of window.jQuery
294
+ // This relies on the fact that we use add_filter( 'script_loader_tag', array( $this, 'sek_filter_script_loader_tag' ), 10, 2 ); to add id 'nb-jquery'
295
+ ( function() {
296
+ var _maybeEmit = function() {
297
+ var evt = 'nb-jquery-loaded';
298
+ if ( !nb_.wasEmitted(evt) ) {
299
+ nb_.emit(evt);
300
+ }
301
+ };
302
+ // recursively try to load jquery every 200ms during 6s ( max 30 times )
303
+ var _emitWhenJqueryIsReady = function( attempts ) {
304
+ attempts = attempts || 0;
305
+ if ( typeof undefined !== typeof window.jQuery ) {
306
+ _maybeEmit();
307
+ } else if ( attempts < 30 ) {
308
+ setTimeout( function() {
309
+ attempts++;
310
+ _emitWhenJqueryIsReady( attempts );
311
+ }, 200 );
312
+ } else {
313
+ if ( window.console && window.console.log ) {
314
+ console.log('Nimble Builder problem : jQuery.js was not detected on your website');
315
+ }
316
+ }
317
+ };
318
+ // if jQuery has already be printed, let's listen to the load event
319
+ var jquery_script_el = document.getElementById('nb-jquery');
320
+ if ( jquery_script_el ) {
321
+ jquery_script_el.addEventListener('load', function() {
322
+ _maybeEmit();
323
+ });
324
+ }
325
+ _emitWhenJqueryIsReady();
326
+ })();
327
+
328
+
329
+
330
+ //printed in sek_maybe_load_scripts_in_ajax()
331
+ (function(w, d){
332
+ nb_.listenTo( 'nb-jquery-loaded', function() {
333
+ if ( !sekFrontLocalized.load_front_assets_on_dynamically )
334
+ return;
335
+ // params = {
336
+ // path : 'js/libs/swiper-bundle.min.js'
337
+ // complete : function() {
338
+ // $.ajax( {
339
+ // url : sekFrontLocalized.frontAssetsPath + 'js/prod-front-simple-slider-module.min.js?'+sekFrontLocalized.assetVersion,
340
+ // cache : true,// use the browser cached version when available
341
+ // dataType: "script"
342
+ // }).done(function() {
343
+ // }).fail( function() {
344
+ // nb_.errorLog('script instantiation failed');
345
+ // });
346
+ // }
347
+ // loadcheck : 'function' === typeof( window.Swiper )
348
+ // }
349
+ nb_.scriptsLoadingStatus = {};
350
+ nb_.ajaxLoadScript = function( params ) {
351
+ jQuery(function($){
352
+ params = $.extend( { path : '', complete : '', loadcheck : false }, params );
353
+ // Bail if the load request has already been made, but not yet finished.
354
+ if ( nb_.scriptsLoadingStatus[params.path] && 'pending' === nb_.scriptsLoadingStatus[params.path].state() ) {
355
+ return;
356
+ }
357
+ // set the script loading status now to avoid several calls
358
+ nb_.scriptsLoadingStatus[params.path] = nb_.scriptsLoadingStatus[params.path] || $.Deferred();
359
+ jQuery.ajax( {
360
+ url : sekFrontLocalized.frontAssetsPath + params.path + '?'+ sekFrontLocalized.assetVersion,
361
+ cache : true,// use the browser cached version when available
362
+ dataType: "script"
363
+ }).done(function() {
364
+ if ( ('function' === typeof params.loadcheck) && !params.loadcheck() ) {
365
+ nb_.errorLog('ajaxLoadScript success but loadcheck failed for => ' + params.path );
366
+ return;
367
+ }
368
+
369
+ if ( 'function' === typeof params.complete ) {
370
+ params.complete();
371
+ }
372
+ }).fail( function() {
373
+ nb_.errorLog('ajaxLoadScript failed for => ' + params.path );
374
+ });
375
+ });
376
+ };//ajaxLoadScript
377
+ });/////////////// callbackFunc
378
+
379
+ nb_.listenTo('nb-jquery-loaded', function() {
380
+ jQuery(function($){
381
+ if ( !sekFrontLocalized.load_front_assets_on_dynamically )
382
+ return;
383
+ // Main script
384
+ nb_.ajaxLoadScript({ path : sekFrontLocalized.isDevMode ? 'js/ccat-nimble-front.js' : 'js/ccat-nimble-front.min.js'});
385
+
386
+ // Partial scripts
387
+ $.each( sekFrontLocalized.partialFrontScripts, function( _name, _event ){
388
+ nb_.listenTo( _event, function() {
389
+ nb_.ajaxLoadScript({ path : sekFrontLocalized.isDevMode ? 'js/partials/' + _name + '.js' : 'js/partials/' + _name + '.min.js'});
390
+ });
391
+ });
392
+
393
+ });
394
+ });
395
+ }(window, document));
396
+
397
+
assets/front/js/nimble-init.min.js ADDED
@@ -0,0 +1 @@
 
1
+ window.nb_={},function(e,t){if(window.nb_={isArray:function(e){return Array.isArray(e)||"[object Array]"===toString.call(e)},inArray:function(e,t){return!(!nb_.isArray(e)||nb_.isUndefined(t))&&-1<e.indexOf(t)},isUndefined:function(e){return void 0===e},isObject:function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},errorLog:function(){nb_.isUndefined(console)||"function"!=typeof window.console.log||console.log.apply(console,arguments)},hasPreloadSupport:function(e){var t=document.createElement("link").relList;return!(!t||!t.supports)&&t.supports("preload")},listenTo:function(t,n){nb_.eventsListenedTo.push(t);var o={"nb-jquery-loaded":function(){return"undefined"!=typeof jQuery},"nb-app-ready":function(){return void 0!==window.nb_&&nb_.wasListenedTo("nb-jquery-loaded")},"nb-swipebox-parsed":function(){return"undefined"!=typeof jQuery&&void 0!==jQuery.fn.swipebox},"nb-main-swiper-parsed":function(){return void 0!==window.Swiper}},e=function(e){nb_.isUndefined(o[t])||!1!==o[t]()?n():nb_.errorLog("Nimble error => an event callback could not be fired because conditions not met => ",t,nb_.eventsListenedTo,n)};"function"==typeof n?nb_.wasEmitted(t)?e():document.addEventListener(t,e):nb_.errorLog("Nimble error => listenTo func param is not a function for event => ",t)},eventsEmitted:[],eventsListenedTo:[],emit:function(e,t){if(!(nb_.isUndefined(t)||t.fire_once)||!nb_.wasEmitted(e)){var n=document.createEvent("Event");n.initEvent(e,!0,!0),document.dispatchEvent(n),nb_.eventsEmitted.push(e)}},wasListenedTo:function(e){return"string"==typeof e&&nb_.inArray(nb_.eventsListenedTo,e)},wasEmitted:function(e){return"string"==typeof e&&nb_.inArray(nb_.eventsEmitted,e)},isInScreen:function(e){if(!nb_.isObject(e))return!1;var t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||0<=t.top-n)},isCustomizing:function(){return!1},isLazyLoadEnabled:function(){return!nb_.isCustomizing()&&!1},preloadOrDeferAsset:function(n){if(n=n||{},nb_.preloadedAssets=nb_.preloadedAssets||[],!nb_.inArray(nb_.preloadedAssets,n.id)){var e,o=document.getElementsByTagName("head")[0],t=function(){var e=this;if("style"===n.as)e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("media","all");else{var t=document.createElement("script");t.setAttribute("src",n.href),t.setAttribute("id",n.id),"script"===n.as&&t.setAttribute("defer","defer"),o.appendChild(t),i.call(e)}n.eventOnLoad&&nb_.emit(n.eventOnLoad)},i=function(){var e=this;if(e&&e.parentNode&&e.parentNode.contains(e))try{e.parentNode.removeChild(e)}catch(e){nb_.errorLog("NB error when removing a script el",el)}};("font"!==n.as||nb_.hasPreloadSupport())&&(e=document.createElement("link"),"script"===n.as?n.onEvent?nb_.listenTo(n.onEvent,function(){t.call(e)}):t.call(e):(e.setAttribute("href",n.href),"style"===n.as?e.setAttribute("rel",nb_.hasPreloadSupport()?"preload":"stylesheet"):"font"===n.as&&nb_.hasPreloadSupport()&&e.setAttribute("rel","preload"),e.setAttribute("id",n.id),e.setAttribute("as",n.as),"font"===n.as&&(e.setAttribute("type",n.type),e.setAttribute("crossorigin","anonymous")),e.onload=function(){this.onload=null,"font"!==n.as?n.onEvent?nb_.listenTo(n.onEvent,function(){t.call(e)}):t.call(e):n.eventOnLoad&&nb_.emit(n.eventOnLoad)},e.onerror=function(e){nb_.errorLog("Nimble preloadOrDeferAsset error",e,n)}),o.appendChild(e),nb_.preloadedAssets.push(n.id),i.call(n.scriptEl))}},mayBeRevealBG:function(){this.getAttribute("data-sek-src")&&(this.setAttribute("style",'background-image:url("'+this.getAttribute("data-sek-src")+'")'),this.className+=" sek-lazy-loaded",this.querySelectorAll(".sek-css-loader").forEach(function(e){nb_.isObject(e)&&e.parentNode.removeChild(e)}))}},window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||window;for(var n=0;n<this.length;n++)e.call(t,this[n],n,this)}),nb_.listenTo("nb-docready",function(){var e=document.querySelectorAll("div.sek-has-bg");!nb_.isObject(e)||e.length<1||e.forEach(function(e){nb_.isObject(e)&&(window.sekFrontLocalized&&window.sekFrontLocalized.lazyload_enabled?nb_.isInScreen(e)&&nb_.mayBeRevealBG.call(e):nb_.mayBeRevealBG.call(e))})}),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll)nb_.emit("nb-docready");else{var n=function(){nb_.wasEmitted("nb-docready")||nb_.emit("nb-docready")};document.addEventListener("DOMContentLoaded",n),window.addEventListener("load",n)}}(window,document),function(){var t=function(){var e="nb-jquery-loaded";nb_.wasEmitted(e)||nb_.emit(e)},n=function(e){e=e||0,void 0!==window.jQuery?t():e<30?setTimeout(function(){n(++e)},200):window.console&&window.console.log&&console.log("Nimble Builder problem : jQuery.js was not detected on your website")},e=document.getElementById("nb-jquery");e&&e.addEventListener("load",function(){t()}),n()}(),window,document,nb_.listenTo("nb-jquery-loaded",function(){sekFrontLocalized.load_front_assets_on_dynamically&&(nb_.scriptsLoadingStatus={},nb_.ajaxLoadScript=function(t){jQuery(function(e){t=e.extend({path:"",complete:"",loadcheck:!1},t),nb_.scriptsLoadingStatus[t.path]&&"pending"===nb_.scriptsLoadingStatus[t.path].state()||(nb_.scriptsLoadingStatus[t.path]=nb_.scriptsLoadingStatus[t.path]||e.Deferred(),jQuery.ajax({url:sekFrontLocalized.frontAssetsPath+t.path+"?"+sekFrontLocalized.assetVersion,cache:!0,dataType:"script"}).done(function(){"function"!=typeof t.loadcheck||t.loadcheck()?"function"==typeof t.complete&&t.complete():nb_.errorLog("ajaxLoadScript success but loadcheck failed for => "+t.path)}).fail(function(){nb_.errorLog("ajaxLoadScript failed for => "+t.path)}))})})}),nb_.listenTo("nb-jquery-loaded",function(){jQuery(function(e){sekFrontLocalized.load_front_assets_on_dynamically&&(nb_.ajaxLoadScript({path:sekFrontLocalized.isDevMode?"js/ccat-nimble-front.js":"js/ccat-nimble-front.min.js"}),e.each(sekFrontLocalized.partialFrontScripts,function(e,t){nb_.listenTo(t,function(){nb_.ajaxLoadScript({path:sekFrontLocalized.isDevMode?"js/partials/"+e+".js":"js/partials/"+e+".min.js"})})}))})});
inc/admin/nb-options.php CHANGED
@@ -38,11 +38,10 @@ function nb_options_page() {
38
  <div id="nimble-options" class="wrap">
39
  <h1 class="nb-option-page-title">
40
  <?php
41
- printf('<span class="sek-nimble-title-icon"><img src="%1$s" alt="Build with Nimble Builder">%2$s</span>',
42
- NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION,
43
- apply_filters( 'nimble_option_title_icon_after', '' )
44
  );
45
- echo apply_filters( 'nimble_parse_admin_text', $page_title );
46
  ?>
47
  </h1>
48
  <div class="nav-tab-wrapper">
@@ -50,8 +49,8 @@ function nb_options_page() {
50
  foreach ($option_tabs as $tab_id => $tab_data ) {
51
  printf('<a class="nav-tab %1$s" href="%2$s">%3$s</a>',
52
  $tab_id === nb_get_active_option_tab() ? 'nav-tab-active' : '',
53
- admin_url( NIMBLE_OPTIONS_PAGE_URL ) . '&tab=' . $tab_id,
54
- $tab_data['title']
55
  );
56
  }
57
  ?>
@@ -63,7 +62,7 @@ function nb_options_page() {
63
  if ( function_exists( $_cb ) ) {
64
  call_user_func( $_cb );
65
  } else {
66
- echo esc_html($_cb);
67
  }
68
  } else if ( is_array($_cb) && 2 == count($_cb) ) {
69
  if ( is_object($_cb[0]) ) {
@@ -184,7 +183,7 @@ nb_register_option_tab([
184
  function print_welcome_page() {
185
  ?>
186
  <div class="nimble-welcome-content">
187
- <?php echo esc_html(sek_get_welcome_block()); ?>
188
  </div>
189
  <div class="clear"></div>
190
  <hr/>
@@ -335,7 +334,7 @@ nb_register_option_tab([
335
  ]);
336
  function print_options_page() {
337
  ?>
338
- <form method="post" action="<?php echo admin_url( 'admin-post.php' ) ; ?>">
339
  <table class="form-table" role="presentation">
340
  <tbody>
341
  <tr>
@@ -393,8 +392,8 @@ function print_options_page() {
393
  <fieldset><legend class="screen-reader-text"><span><?php _e('Remove all Nimble Builder data', 'nimble-builder'); ?></span></legend>
394
  <?php
395
  $refresh_url = add_query_arg( array( 'tab' => 'options', 'clean_nb' => 'true' ), admin_url( NIMBLE_OPTIONS_PAGE_URL ));
 
396
  ?>
397
- <script>
398
  var nb_toggle_clean_button = function() {
399
  jQuery( function($) {
400
  $('.nb-clean-traces-confirm').stop().slideToggle('fast');
@@ -412,9 +411,14 @@ function print_options_page() {
412
  window.location.href = _url;
413
  });
414
  };
415
- </script>
416
-
417
- <?php if ( isset( $_GET['clean_nb'] ) && sanitize_text_field($_GET['clean_nb']) ) : ?>
 
 
 
 
 
418
  <?php $status = sek_clean_all_nimble_data(); ?>
419
  <?php if ( 'success' === $status ) : ?>
420
  <div id="message" class="updated notice">
@@ -459,7 +463,7 @@ function nb_save_base_options() {
459
  // the option is updated only if different than the default val or if the option exists already
460
  function nb_maybe_update_checkbox_option( $opt_name, $unchecked_value ) {
461
  $opt_value = get_option( $opt_name );
462
- $posted_value = array_key_exists( $opt_name, $_POST ) ? $_POST[$opt_name] : $unchecked_value;
463
  if ( $unchecked_value !== $posted_value ) {
464
  update_option( $opt_name, esc_attr( $posted_value ), 'no' );
465
  } else {
@@ -521,7 +525,7 @@ function print_system_info() {
521
  ?>
522
  <h3><?php _e( 'System Informations', 'nimble-builder' ); ?></h3>
523
  <h4><?php _e( 'Please include your system informations when posting support requests.' , 'nimble-builder' ) ?></h4>
524
- <textarea readonly="readonly" onclick="this.focus();this.select()" id="system-info-textarea" name="tc-sysinfo" title="<?php _e( 'To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'nimble-builder' ); ?>" style="width: 800px;min-height: 800px;font-family: Menlo,Monaco,monospace;background: 0 0;white-space: pre;overflow: auto;display:block;"><?php echo esc_html(sek_config_infos()); ?></textarea>
525
  <?php
526
  }
527
 
38
  <div id="nimble-options" class="wrap">
39
  <h1 class="nb-option-page-title">
40
  <?php
41
+ printf('<span class="sek-nimble-title-icon"><img src="%1$s" alt="Build with Nimble Builder"></span>',
42
+ esc_url( NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION )
 
43
  );
44
+ echo apply_filters( 'nimble_parse_admin_text', esc_html( $page_title ) ) . wp_kses_post( apply_filters( 'nimble_option_title_icon_after', '' ) );
45
  ?>
46
  </h1>
47
  <div class="nav-tab-wrapper">
49
  foreach ($option_tabs as $tab_id => $tab_data ) {
50
  printf('<a class="nav-tab %1$s" href="%2$s">%3$s</a>',
51
  $tab_id === nb_get_active_option_tab() ? 'nav-tab-active' : '',
52
+ esc_url( admin_url( NIMBLE_OPTIONS_PAGE_URL ) . '&tab=' . $tab_id ),
53
+ esc_html($tab_data['title'])
54
  );
55
  }
56
  ?>
62
  if ( function_exists( $_cb ) ) {
63
  call_user_func( $_cb );
64
  } else {
65
+ echo esc_attr($_cb);
66
  }
67
  } else if ( is_array($_cb) && 2 == count($_cb) ) {
68
  if ( is_object($_cb[0]) ) {
183
  function print_welcome_page() {
184
  ?>
185
  <div class="nimble-welcome-content">
186
+ <?php echo wp_kses_post(sek_get_welcome_block()); ?>
187
  </div>
188
  <div class="clear"></div>
189
  <hr/>
334
  ]);
335
  function print_options_page() {
336
  ?>
337
+ <form method="post" action="<?php echo esc_html( admin_url( 'admin-post.php' ) ); ?>">
338
  <table class="form-table" role="presentation">
339
  <tbody>
340
  <tr>
392
  <fieldset><legend class="screen-reader-text"><span><?php _e('Remove all Nimble Builder data', 'nimble-builder'); ?></span></legend>
393
  <?php
394
  $refresh_url = add_query_arg( array( 'tab' => 'options', 'clean_nb' => 'true' ), admin_url( NIMBLE_OPTIONS_PAGE_URL ));
395
+ ob_start();
396
  ?>
 
397
  var nb_toggle_clean_button = function() {
398
  jQuery( function($) {
399
  $('.nb-clean-traces-confirm').stop().slideToggle('fast');
411
  window.location.href = _url;
412
  });
413
  };
414
+ <?php
415
+ $script = ob_get_clean();
416
+ wp_register_script( 'nb_options_js', '');
417
+ wp_enqueue_script( 'nb_options_js' );
418
+ wp_add_inline_script( 'nb_options_js', $script );
419
+ ?>
420
+ <?php $clean_nb = isset( $_GET['clean_nb'] ) ? sanitize_text_field($_GET['clean_nb']) : false; ?>
421
+ <?php if ( $clean_nb ) : ?>
422
  <?php $status = sek_clean_all_nimble_data(); ?>
423
  <?php if ( 'success' === $status ) : ?>
424
  <div id="message" class="updated notice">
463
  // the option is updated only if different than the default val or if the option exists already
464
  function nb_maybe_update_checkbox_option( $opt_name, $unchecked_value ) {
465
  $opt_value = get_option( $opt_name );
466
+ $posted_value = array_key_exists( $opt_name, $_POST ) ? sanitize_text_field($_POST[$opt_name]) : $unchecked_value;
467
  if ( $unchecked_value !== $posted_value ) {
468
  update_option( $opt_name, esc_attr( $posted_value ), 'no' );
469
  } else {
525
  ?>
526
  <h3><?php _e( 'System Informations', 'nimble-builder' ); ?></h3>
527
  <h4><?php _e( 'Please include your system informations when posting support requests.' , 'nimble-builder' ) ?></h4>
528
+ <textarea readonly="readonly" onclick="this.focus();this.select()" id="system-info-textarea" name="tc-sysinfo" title="<?php _e( 'To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'nimble-builder' ); ?>" style="width: 800px;min-height: 800px;font-family: Menlo,Monaco,monospace;background: 0 0;white-space: pre;overflow: auto;display:block;"><?php echo wp_kses_post(sek_config_infos()); ?></textarea>
529
  <?php
530
  }
531
 
inc/admin/nimble-admin.php CHANGED
@@ -115,7 +115,7 @@ function sek_enqueue_js_asset_for_gutenberg_edit_button() {
115
  true
116
  );
117
  }
118
- add_action( 'admin_footer', '\Nimble\sek_print_js_for_nimble_edit_btn' );
119
  function sek_print_js_for_nimble_edit_btn() {
120
  if ( !sek_current_user_can_access_nb_ui() || !apply_filters('nb_post_edit_btn_enabled', true ) )
121
  return;
@@ -131,13 +131,15 @@ function sek_print_js_for_nimble_edit_btn() {
131
  }
132
  ?>
133
  <?php if ( did_action( 'enqueue_block_editor_assets' ) ) : ?>
134
- <?php // Only printed when Gutenberg editor is enabled ?>
 
135
  <script id="sek-edit-with-nb" type="text/html">
136
  <?php sek_print_nb_btn_edit_with_nimble( 'gutenberg' ); ?>
137
  </script>
138
  <?php else : ?>
139
- <?php // Only printed when Gutenberg editor is NOT enabled ?>
140
- <script type="text/javascript">
 
141
  (function ($) {
142
  var _doRedirectToCustomizer = function( post_id, $clickedEl ) {
143
  wp.ajax.post( 'sek_get_customize_url_for_nimble_edit_button', {
@@ -165,7 +167,12 @@ function sek_print_js_for_nimble_edit_btn() {
165
  }
166
  });
167
  })(jQuery);
168
- </script>
 
 
 
 
 
169
  <?php endif; ?>
170
  <?php
171
  }
@@ -183,10 +190,10 @@ function sek_print_nb_btn_edit_with_nimble( $editor_type ) {
183
  }
184
  $btn_css_classes = 'classic' === $editor_type ? 'button button-primary button-hero classic-ed' : 'button button-primary button-large guten-ed';
185
  ?>
186
- <button id="sek-edit-with-nimble" type="button" class="<?php echo esc_html($btn_css_classes); ?>" data-cust-url="<?php echo esc_url( $customize_url ); ?>">
187
  <?php //_e( 'Edit with Nimble Builder', 'text_doma' ); ?>
188
  <?php printf( '<span class="sek-spinner"></span><span class="sek-nimble-icon" title="%3$s"><img src="%1$s" alt="%2$s"/><span class="sek-nimble-admin-bar-title">%2$s</span><span class="sek-nimble-mobile-admin-bar-title">%3$s</span></span>',
189
- NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION,
190
  apply_filters( 'nb_admin_nb_button_edit_title', sek_local_skope_has_been_customized( $manually_built_skope_id ) ? __('Continue building with Nimble','nimble-builder') : __('Build with Nimble Builder','nimble-builder'), $manually_built_skope_id ),
191
  __('Build','nimble-builder'),
192
  __('Build sections in live preview with Nimble Builder', 'nimble-builder')
@@ -237,7 +244,7 @@ function sek_filter_post_row_actions( $actions, $post ) {
237
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
238
  if ( $post && current_user_can( 'edit_post', $post->ID ) && sek_local_skope_has_been_customized( $manually_built_skope_id ) ) {
239
  $actions['edit_with_nimble_builder'] = sprintf( '<a href="%1$s" title="%2$s">%2$s</a>',
240
- sek_get_customize_url_for_post_id( $post->ID ),
241
  __( 'Edit with Nimble Builder', 'nimble-builder' )
242
  );
243
  }
@@ -275,7 +282,7 @@ function sek_ajax_get_nimble_content_for_seo_plugins() {
275
  $html = sek_get_raw_html_from_skope_id( sanitize_text_field($_POST['skope_id']) );
276
  wp_send_json_success($html);
277
  }
278
- add_action( 'admin_footer', '\Nimble\sek_print_js_for_yoast_analysis' );
279
  function sek_print_js_for_yoast_analysis() {
280
  if ( !defined( 'WPSEO_VERSION' ) )
281
  return;
@@ -284,13 +291,13 @@ function sek_print_js_for_yoast_analysis() {
284
  return;
285
  $post = get_post();
286
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
 
287
  ?>
288
- <script id="nimble-add-content-to-yoast-analysis">
289
  jQuery(function($){
290
  var NimblePlugin = function() {
291
  YoastSEO.app.registerPlugin( 'nimblePlugin', {status: 'loading'} );
292
  wp.ajax.post( 'sek_get_nimble_content_for_seo_plugins', {
293
- skope_id : '<?php echo $manually_built_skope_id; ?>'
294
  }).done( function( nimbleContent ) {
295
  YoastSEO.app.pluginReady('nimblePlugin');
296
  YoastSEO.app.registerModification( 'content', function(originalContent) { return originalContent + nimbleContent; }, 'nimblePlugin', 5 );
@@ -302,8 +309,11 @@ function sek_print_js_for_yoast_analysis() {
302
  try { new NimblePlugin(); } catch(er){ console.log('Yoast NimblePlugin error', er );}
303
  });
304
  });
305
- </script>
306
  <?php
 
 
 
 
307
  }
308
  add_filter('seopress_content_analysis_content', '\Nimble\sek_add_content_to_seopress_analyser', 10, 2);
309
  function sek_add_content_to_seopress_analyser($content, $id) {
@@ -331,7 +341,7 @@ function sek_enqueue_js_for_rank_math_analyser() {
331
  true
332
  );
333
  }
334
- add_action( 'admin_footer', '\Nimble\sek_print_js_for_rank_math_analyser' );
335
  function sek_print_js_for_rank_math_analyser() {
336
  if ( !defined( 'RANK_MATH_VERSION' ) )
337
  return;
@@ -341,14 +351,17 @@ function sek_print_js_for_rank_math_analyser() {
341
 
342
  $post = get_post();
343
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
 
344
  ?>
345
- <script id="nimble-add-content-to-rank-math-analyzer">
346
  jQuery(function($){
347
- window.nb_skope_id_for_rank_math_seo = '<?php echo $manually_built_skope_id; ?>';
348
- $(document).trigger('nb-skope-id-ready.rank-math', { skope_id : '<?php echo $manually_built_skope_id; ?>' } );
349
  });
350
- </script>
351
  <?php
 
 
 
 
352
  }
353
  add_action( 'wp_dashboard_setup', '\Nimble\sek_register_dashboard_widgets' );
354
  function sek_register_dashboard_widgets() {
@@ -393,25 +406,22 @@ function sek_nimble_dashboard_callback_fn() {
393
  __('Go Pro', 'nimble-builder')
394
  );
395
  ?>
396
- <?php
397
- // NeedClarification
398
- ?>
399
  <?php else : ?>
400
  <?php printf( '<a href="%1$s" class="button button-primary button-hero"><span class="dashicons dashicons-admin-appearance"></span> %2$s</a>',
401
- add_query_arg(
402
  array(
403
  array( 'autofocus' => array( 'section' => '__content_picker__' ) ),
404
  'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
405
  ),
406
  admin_url( 'customize.php' )
407
- ),
408
  __( 'Start building', 'nimble-builder' )
409
  ); ?>
410
  <?php endif; ?>
411
  </div>
412
  <?php if ( !empty( $post_data ) ) : ?>
413
  <div class="nimble-post-list">
414
- <h3 class="nimble-post-list-title"><?php echo __( 'News & release notes', 'nimble-builder' ); ?></h3>
415
  <ul class="nimble-collection">
416
  <?php foreach ( $post_data as $single_post_data ) : ?>
417
  <li class="nimble-single-post">
@@ -449,9 +459,9 @@ function sek_nimble_dashboard_callback_fn() {
449
  <?php foreach ( $footer_links as $link_id => $link_data ) : ?>
450
  <div class="nimble-footer-link-<?php echo esc_attr( $link_id ); ?>">
451
  <?php if ( !empty( $link_data['html'] ) ) : ?>
452
- <?php echo esc_html($link_data['html']); ?>
453
  <?php else : ?>
454
- <a href="<?php echo esc_attr( $link_data['link'] ); ?>" target="_blank"><?php echo esc_html( $link_data['title'] ); ?> <span class="screen-reader-text"><?php echo __( '(opens in a new window)', 'nimble-builder' ); ?></span></a><span aria-hidden="true" class="dashicons dashicons-external"></span>
455
  <?php endif; ?>
456
  </div>
457
  <?php endforeach; ?>
@@ -527,17 +537,17 @@ function sek_may_be_display_update_notice() {
527
  __( "Thanks, you successfully upgraded", 'nimble-builder'),
528
  'Nimble Builder',
529
  __( "to version", 'nimble-builder'),
530
- NIMBLE_VERSION
531
  );
532
  ?>
533
  <?php
534
  printf( '<h4>%1$s <a class="" href="%2$s" title="%3$s" target="_blank">%3$s &raquo;</a></h4>',
535
  '',//__( "Let us introduce the new features we've been working on.", 'text_doma'),
536
- NIMBLE_RELEASE_NOTE_URL,
537
  __( "Read the detailled release notes" , 'nimble-builder' )
538
  );
539
  ?>
540
- <p style="text-align:right;position: absolute;font-size: 1.1em;<?php echo is_rtl()? 'left' : 'right';?>: 7px;bottom: -6px;">
541
  <?php printf('<a href="#" title="%1$s" class="nimble-dismiss-update-notice"> ( %1$s <strong>X</strong> ) </a>',
542
  __('close' , 'nimble-builder')
543
  );
@@ -550,9 +560,10 @@ function sek_may_be_display_update_notice() {
550
  </div>
551
  <?php
552
  $_html = ob_get_clean();
553
- echo apply_filters( 'sek_update_notice', esc_html($_html) );
 
 
554
  ?>
555
- <script type="text/javascript" id="nimble-dismiss-update-notice">
556
  ( function($){
557
  var _ajax_action = function( $_el ) {
558
  var AjaxUrl = "<?php echo admin_url( 'admin-ajax.php' ); ?>",
@@ -581,8 +592,11 @@ function sek_may_be_display_update_notice() {
581
  } );
582
 
583
  })( jQuery );
584
- </script>
585
  <?php
 
 
 
 
586
  }
587
 
588
 
@@ -629,7 +643,7 @@ foreach ( array( 'wptexturize', 'convert_smilies') as $callback ) {
629
  if ( function_exists( $callback ) )
630
  add_filter( 'sek_feedback_notice', $callback );
631
  }
632
- add_action( 'admin_footer', function() {
633
  if ( !( defined('NIMBLE_DEV') && NIMBLE_DEV ) && sek_is_pro() )
634
  return;
635
  if ( 'eligible' !== sek_get_feedback_notif_status() )
@@ -640,8 +654,8 @@ add_action( 'admin_footer', function() {
640
  return;
641
  if ( sek_feedback_notice_is_dismissed() )
642
  return;
 
643
  ?>
644
- <script>
645
  jQuery( function( $ ) {
646
  var $optionGenMenu = $('#adminmenu').find('#menu-settings');
647
  if ( $optionGenMenu.length < 1 )
@@ -656,16 +670,18 @@ add_action( 'admin_footer', function() {
656
  $nbTitle.append(noticeHtml);
657
  }
658
  } );
659
- </script>
660
-
661
  <?php
 
 
 
 
662
  $current_screen = get_current_screen();
663
  if( 'settings_page_nb-options' !== $current_screen->base )
664
  return;
665
 
666
  $notice_id = NIMBLE_FEEDBACK_NOTICE_ID;
 
667
  ?>
668
- <script>
669
  jQuery( function( $ ) {
670
  $( <?php echo wp_json_encode( "#$notice_id" ); ?> ).on( 'click', '.notice-dismiss', function() {
671
  $(this).closest('.is-dismissible').slideUp('fast');//<= this line is not mandatory since WP has its own way to remove the is-dismissible block
@@ -679,9 +695,12 @@ add_action( 'admin_footer', function() {
679
  }
680
  } );
681
  } );
682
- </script>
683
  <?php
684
- });
 
 
 
 
685
 
686
 
687
 
@@ -723,14 +742,14 @@ function sek_maybe_display_feedback_notice() {
723
  </div>
724
  </div>
725
  <p style="font-size:14px;font-weight:600"><?php _e('Thank you 🙏 ! Nimble Builder needs your sponsorship to keep improving and helping you design your website in the best possible way.', 'nimble-builder' ); ?></p>
726
- <p style="font-size:14px;font-weight:bold"><?php _e('Limited offer : get 25% off with code HELLO2022 at checkout.', 'nimble-builder' ); ?> <a class="sek-pro-link-in-dashboard" href="https://presscustomizr.com/nimble-builder-pro/" rel="noopener noreferrer" title="Go Pro" target="_blank">Go Pro</a> <span style="color: #f07829;" class="dashicons dashicons-external"></span></p>
727
  <button type="button" class="notice-dismiss" title="<?php _e('Dismiss this notice.', 'nimble-builder'); ?>">
728
  <span class="screen-reader-text"><?php _e('Dismiss this notice.', 'nimble-builder'); ?></span>
729
  </button>
730
  </div>
731
  <?php
732
  $_html = ob_get_clean();
733
- echo apply_filters( 'sek_feedback_notice', esc_html($_html) );
734
  ?>
735
  <?php
736
  }
@@ -787,7 +806,7 @@ function sek_render_welcome_notice() {
787
  <?php sek_get_welcome_block(); ?>
788
  </div>
789
 
790
- <script>
791
  jQuery( function( $ ) {
792
  $( <?php echo wp_json_encode( "#$notice_id" ); ?> ).on( 'click', '.notice-dismiss', function() {
793
  $(this).closest('.is-dismissible').slideUp('fast');//<= this line is not mandatory since WP has its own way to remove the is-dismissible block
@@ -797,13 +816,16 @@ function sek_render_welcome_notice() {
797
  } );
798
  } );
799
  } );
800
- </script>
801
  <?php
 
 
 
 
802
  }
803
  function sek_get_welcome_block() {
804
  ?>
805
  <div class="nimble-welcome-icon-holder">
806
- <img class="nimble-welcome-icon" src="<?php echo NIMBLE_BASE_URL.'/assets/img/nimble/nimble_banner.svg?ver='.NIMBLE_VERSION; ?>" alt="<?php esc_html_e( 'Nimble Builder', 'nimble-builder' ); ?>" />
807
  </div>
808
  <div class="nimble-welcome-content">
809
  <h1><?php echo apply_filters( 'nimble_parse_admin_text', __('Welcome to Nimble Builder for WordPress :D', 'nimble-builder' ) ); ?></h1>
@@ -811,13 +833,13 @@ function sek_get_welcome_block() {
811
  <p><?php _e( 'Nimble allows you to drag and drop content modules, or pre-built section templates, into <u>any context</u> of your site, including search results or 404 pages. You can edit your pages in <i>real time</i> from the live customizer, and then publish when you are happy of the result, or save for later.', 'nimble-builder' ); ?></p>
812
  <p><?php _e( 'The plugin automatically creates fluid and responsive sections for a pixel-perfect rendering on smartphones and tablets, without the need to add complex code.', 'nimble-builder' ); ?></p>
813
  <?php printf( '<a href="%1$s" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-admin-appearance"></span> %2$s</a>',
814
- add_query_arg(
815
  array(
816
  array( 'autofocus' => array( 'section' => '__content_picker__' ) ),
817
  'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
818
  ),
819
  admin_url( 'customize.php' )
820
- ),
821
  __( 'Start creating content in live preview', 'nimble-builder' )
822
  ); ?>
823
  <div class="nimble-link-to-doc">
115
  true
116
  );
117
  }
118
+ add_action( 'admin_head', '\Nimble\sek_print_js_for_nimble_edit_btn', PHP_INT_MAX );
119
  function sek_print_js_for_nimble_edit_btn() {
120
  if ( !sek_current_user_can_access_nb_ui() || !apply_filters('nb_post_edit_btn_enabled', true ) )
121
  return;
131
  }
132
  ?>
133
  <?php if ( did_action( 'enqueue_block_editor_assets' ) ) : ?>
134
+ <?php // Only printed when Gutenberg editor is enabled
135
+ ?>
136
  <script id="sek-edit-with-nb" type="text/html">
137
  <?php sek_print_nb_btn_edit_with_nimble( 'gutenberg' ); ?>
138
  </script>
139
  <?php else : ?>
140
+ <?php // Only printed when Gutenberg editor is NOT enabled
141
+ ob_start();
142
+ ?>
143
  (function ($) {
144
  var _doRedirectToCustomizer = function( post_id, $clickedEl ) {
145
  wp.ajax.post( 'sek_get_customize_url_for_nimble_edit_button', {
167
  }
168
  });
169
  })(jQuery);
170
+ <?php
171
+ $script = ob_get_clean();
172
+ wp_register_script( 'nb_print_js_for_nimble_edit_btn', '');
173
+ wp_enqueue_script( 'nb_print_js_for_nimble_edit_btn' );
174
+ wp_add_inline_script( 'nb_print_js_for_nimble_edit_btn', $script );
175
+ ?>
176
  <?php endif; ?>
177
  <?php
178
  }
190
  }
191
  $btn_css_classes = 'classic' === $editor_type ? 'button button-primary button-hero classic-ed' : 'button button-primary button-large guten-ed';
192
  ?>
193
+ <button id="sek-edit-with-nimble" type="button" class="<?php echo esc_attr($btn_css_classes); ?>" data-cust-url="<?php echo esc_url( $customize_url ); ?>">
194
  <?php //_e( 'Edit with Nimble Builder', 'text_doma' ); ?>
195
  <?php printf( '<span class="sek-spinner"></span><span class="sek-nimble-icon" title="%3$s"><img src="%1$s" alt="%2$s"/><span class="sek-nimble-admin-bar-title">%2$s</span><span class="sek-nimble-mobile-admin-bar-title">%3$s</span></span>',
196
+ esc_url( NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION ),
197
  apply_filters( 'nb_admin_nb_button_edit_title', sek_local_skope_has_been_customized( $manually_built_skope_id ) ? __('Continue building with Nimble','nimble-builder') : __('Build with Nimble Builder','nimble-builder'), $manually_built_skope_id ),
198
  __('Build','nimble-builder'),
199
  __('Build sections in live preview with Nimble Builder', 'nimble-builder')
244
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
245
  if ( $post && current_user_can( 'edit_post', $post->ID ) && sek_local_skope_has_been_customized( $manually_built_skope_id ) ) {
246
  $actions['edit_with_nimble_builder'] = sprintf( '<a href="%1$s" title="%2$s">%2$s</a>',
247
+ esc_url(sek_get_customize_url_for_post_id( $post->ID )),
248
  __( 'Edit with Nimble Builder', 'nimble-builder' )
249
  );
250
  }
282
  $html = sek_get_raw_html_from_skope_id( sanitize_text_field($_POST['skope_id']) );
283
  wp_send_json_success($html);
284
  }
285
+ add_action( 'admin_head', '\Nimble\sek_print_js_for_yoast_analysis', PHP_INT_MAX );
286
  function sek_print_js_for_yoast_analysis() {
287
  if ( !defined( 'WPSEO_VERSION' ) )
288
  return;
291
  return;
292
  $post = get_post();
293
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
294
+ ob_start();
295
  ?>
 
296
  jQuery(function($){
297
  var NimblePlugin = function() {
298
  YoastSEO.app.registerPlugin( 'nimblePlugin', {status: 'loading'} );
299
  wp.ajax.post( 'sek_get_nimble_content_for_seo_plugins', {
300
+ skope_id : '<?php echo esc_attr($manually_built_skope_id); ?>'
301
  }).done( function( nimbleContent ) {
302
  YoastSEO.app.pluginReady('nimblePlugin');
303
  YoastSEO.app.registerModification( 'content', function(originalContent) { return originalContent + nimbleContent; }, 'nimblePlugin', 5 );
309
  try { new NimblePlugin(); } catch(er){ console.log('Yoast NimblePlugin error', er );}
310
  });
311
  });
 
312
  <?php
313
+ $script = ob_get_clean();
314
+ wp_register_script( 'nb_yoast_compat', '');
315
+ wp_enqueue_script( 'nb_yoast_compat' );
316
+ wp_add_inline_script( 'nb_yoast_compat', $script );
317
  }
318
  add_filter('seopress_content_analysis_content', '\Nimble\sek_add_content_to_seopress_analyser', 10, 2);
319
  function sek_add_content_to_seopress_analyser($content, $id) {
341
  true
342
  );
343
  }
344
+ add_action( 'admin_head', '\Nimble\sek_print_js_for_rank_math_analyser', PHP_INT_MAX );
345
  function sek_print_js_for_rank_math_analyser() {
346
  if ( !defined( 'RANK_MATH_VERSION' ) )
347
  return;
351
 
352
  $post = get_post();
353
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
354
+ ob_start();
355
  ?>
 
356
  jQuery(function($){
357
+ window.nb_skope_id_for_rank_math_seo = '<?php echo esc_attr($manually_built_skope_id); ?>';
358
+ $(document).trigger('nb-skope-id-ready.rank-math', { skope_id : '<?php echo esc_attr($manually_built_skope_id); ?>' } );
359
  });
 
360
  <?php
361
+ $script = ob_get_clean();
362
+ wp_register_script( 'nb_rank_math_analyzer_js', '');
363
+ wp_enqueue_script( 'nb_rank_math_analyzer_js' );
364
+ wp_add_inline_script( 'nb_rank_math_analyzer_js', $script );
365
  }
366
  add_action( 'wp_dashboard_setup', '\Nimble\sek_register_dashboard_widgets' );
367
  function sek_register_dashboard_widgets() {
406
  __('Go Pro', 'nimble-builder')
407
  );
408
  ?>
 
 
 
409
  <?php else : ?>
410
  <?php printf( '<a href="%1$s" class="button button-primary button-hero"><span class="dashicons dashicons-admin-appearance"></span> %2$s</a>',
411
+ esc_url( add_query_arg(
412
  array(
413
  array( 'autofocus' => array( 'section' => '__content_picker__' ) ),
414
  'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
415
  ),
416
  admin_url( 'customize.php' )
417
+ ) ),
418
  __( 'Start building', 'nimble-builder' )
419
  ); ?>
420
  <?php endif; ?>
421
  </div>
422
  <?php if ( !empty( $post_data ) ) : ?>
423
  <div class="nimble-post-list">
424
+ <h3 class="nimble-post-list-title"><?php _e( 'News & release notes', 'nimble-builder' ); ?></h3>
425
  <ul class="nimble-collection">
426
  <?php foreach ( $post_data as $single_post_data ) : ?>
427
  <li class="nimble-single-post">
459
  <?php foreach ( $footer_links as $link_id => $link_data ) : ?>
460
  <div class="nimble-footer-link-<?php echo esc_attr( $link_id ); ?>">
461
  <?php if ( !empty( $link_data['html'] ) ) : ?>
462
+ <?php echo esc_attr($link_data['html']); ?>
463
  <?php else : ?>
464
+ <a href="<?php echo esc_attr( $link_data['link'] ); ?>" target="_blank"><?php echo esc_html( $link_data['title'] ); ?> <span class="screen-reader-text"><?php _e( '(opens in a new window)', 'nimble-builder' ); ?></span></a><span aria-hidden="true" class="dashicons dashicons-external"></span>
465
  <?php endif; ?>
466
  </div>
467
  <?php endforeach; ?>
537
  __( "Thanks, you successfully upgraded", 'nimble-builder'),
538
  'Nimble Builder',
539
  __( "to version", 'nimble-builder'),
540
+ esc_attr(NIMBLE_VERSION)
541
  );
542
  ?>
543
  <?php
544
  printf( '<h4>%1$s <a class="" href="%2$s" title="%3$s" target="_blank">%3$s &raquo;</a></h4>',
545
  '',//__( "Let us introduce the new features we've been working on.", 'text_doma'),
546
+ esc_url(NIMBLE_RELEASE_NOTE_URL),
547
  __( "Read the detailled release notes" , 'nimble-builder' )
548
  );
549
  ?>
550
+ <p style="text-align:right;position: absolute;font-size: 1.1em;<?php echo is_rtl() ? 'left' : 'right';?>: 7px;bottom: -6px;">
551
  <?php printf('<a href="#" title="%1$s" class="nimble-dismiss-update-notice"> ( %1$s <strong>X</strong> ) </a>',
552
  __('close' , 'nimble-builder')
553
  );
560
  </div>
561
  <?php
562
  $_html = ob_get_clean();
563
+ echo wp_kses_post( apply_filters( 'sek_update_notice', $_html ) );
564
+
565
+ ob_start();
566
  ?>
 
567
  ( function($){
568
  var _ajax_action = function( $_el ) {
569
  var AjaxUrl = "<?php echo admin_url( 'admin-ajax.php' ); ?>",
592
  } );
593
 
594
  })( jQuery );
 
595
  <?php
596
+ $script = ob_get_clean();
597
+ wp_register_script( 'nb_update_notice_js', '');
598
+ wp_enqueue_script( 'nb_update_notice_js' );
599
+ wp_add_inline_script( 'nb_update_notice_js', $script );
600
  }
601
 
602
 
643
  if ( function_exists( $callback ) )
644
  add_filter( 'sek_feedback_notice', $callback );
645
  }
646
+ add_action( 'admin_head', function() {
647
  if ( !( defined('NIMBLE_DEV') && NIMBLE_DEV ) && sek_is_pro() )
648
  return;
649
  if ( 'eligible' !== sek_get_feedback_notif_status() )
654
  return;
655
  if ( sek_feedback_notice_is_dismissed() )
656
  return;
657
+ ob_start();
658
  ?>
 
659
  jQuery( function( $ ) {
660
  var $optionGenMenu = $('#adminmenu').find('#menu-settings');
661
  if ( $optionGenMenu.length < 1 )
670
  $nbTitle.append(noticeHtml);
671
  }
672
  } );
 
 
673
  <?php
674
+ $script = ob_get_clean();
675
+ wp_register_script( 'nb_feedback_notice_js', '');
676
+ wp_enqueue_script( 'nb_feedback_notice_js' );
677
+ wp_add_inline_script( 'nb_feedback_notice_js', $script );
678
  $current_screen = get_current_screen();
679
  if( 'settings_page_nb-options' !== $current_screen->base )
680
  return;
681
 
682
  $notice_id = NIMBLE_FEEDBACK_NOTICE_ID;
683
+ ob_start();
684
  ?>
 
685
  jQuery( function( $ ) {
686
  $( <?php echo wp_json_encode( "#$notice_id" ); ?> ).on( 'click', '.notice-dismiss', function() {
687
  $(this).closest('.is-dismissible').slideUp('fast');//<= this line is not mandatory since WP has its own way to remove the is-dismissible block
695
  }
696
  } );
697
  } );
 
698
  <?php
699
+ $script = ob_get_clean();
700
+ wp_register_script( 'nb_feedback_other_notice_js', '');
701
+ wp_enqueue_script( 'nb_feedback_other_notice_js' );
702
+ wp_add_inline_script( 'nb_feedback_other_notice_js', $script );
703
+ }, PHP_INT_MAX);
704
 
705
 
706
 
742
  </div>
743
  </div>
744
  <p style="font-size:14px;font-weight:600"><?php _e('Thank you 🙏 ! Nimble Builder needs your sponsorship to keep improving and helping you design your website in the best possible way.', 'nimble-builder' ); ?></p>
745
+ <!-- upsell message location -->
746
  <button type="button" class="notice-dismiss" title="<?php _e('Dismiss this notice.', 'nimble-builder'); ?>">
747
  <span class="screen-reader-text"><?php _e('Dismiss this notice.', 'nimble-builder'); ?></span>
748
  </button>
749
  </div>
750
  <?php
751
  $_html = ob_get_clean();
752
+ echo wp_kses_post(apply_filters( 'sek_feedback_notice', $_html ));
753
  ?>
754
  <?php
755
  }
806
  <?php sek_get_welcome_block(); ?>
807
  </div>
808
 
809
+ <?php ob_start(); ?>
810
  jQuery( function( $ ) {
811
  $( <?php echo wp_json_encode( "#$notice_id" ); ?> ).on( 'click', '.notice-dismiss', function() {
812
  $(this).closest('.is-dismissible').slideUp('fast');//<= this line is not mandatory since WP has its own way to remove the is-dismissible block
816
  } );
817
  } );
818
  } );
 
819
  <?php
820
+ $script = ob_get_clean();
821
+ wp_register_script( 'nb_welcome_notice', '');
822
+ wp_enqueue_script( 'nb_welcome_notice' );
823
+ wp_add_inline_script( 'nb_welcome_notice', $script );
824
  }
825
  function sek_get_welcome_block() {
826
  ?>
827
  <div class="nimble-welcome-icon-holder">
828
+ <img class="nimble-welcome-icon" src="<?php echo esc_url(NIMBLE_BASE_URL.'/assets/img/nimble/nimble_banner.svg?ver='.NIMBLE_VERSION); ?>" alt="<?php esc_html_e( 'Nimble Builder', 'nimble-builder' ); ?>" />
829
  </div>
830
  <div class="nimble-welcome-content">
831
  <h1><?php echo apply_filters( 'nimble_parse_admin_text', __('Welcome to Nimble Builder for WordPress :D', 'nimble-builder' ) ); ?></h1>
833
  <p><?php _e( 'Nimble allows you to drag and drop content modules, or pre-built section templates, into <u>any context</u> of your site, including search results or 404 pages. You can edit your pages in <i>real time</i> from the live customizer, and then publish when you are happy of the result, or save for later.', 'nimble-builder' ); ?></p>
834
  <p><?php _e( 'The plugin automatically creates fluid and responsive sections for a pixel-perfect rendering on smartphones and tablets, without the need to add complex code.', 'nimble-builder' ); ?></p>
835
  <?php printf( '<a href="%1$s" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-admin-appearance"></span> %2$s</a>',
836
+ esc_url( add_query_arg(
837
  array(
838
  array( 'autofocus' => array( 'section' => '__content_picker__' ) ),
839
  'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
840
  ),
841
  admin_url( 'customize.php' )
842
+ ) ),
843
  __( 'Start creating content in live preview', 'nimble-builder' )
844
  ); ?>
845
  <div class="nimble-link-to-doc">
inc/admin/system-info.php CHANGED
@@ -137,7 +137,7 @@ function sek_config_infos() {
137
  $return .= "\n\n" . '------------ WEBSERVER CONFIG' . "\n";
138
  $return .= 'PHP Version: ' . PHP_VERSION . "\n";
139
  $return .= 'MySQL Version: ' . $wpdb->db_version() . "\n";
140
- $return .= 'Webserver Info: ' . $_SERVER['SERVER_SOFTWARE'] . "\n";
141
  $return .= 'Write/Read permissions: ' . sek_get_write_permissions_status() . "\n";
142
 
143
  // PHP configs
137
  $return .= "\n\n" . '------------ WEBSERVER CONFIG' . "\n";
138
  $return .= 'PHP Version: ' . PHP_VERSION . "\n";
139
  $return .= 'MySQL Version: ' . $wpdb->db_version() . "\n";
140
+ $return .= 'Webserver Info: ' . sanitize_text_field($_SERVER['SERVER_SOFTWARE']) . "\n";
141
  $return .= 'Write/Read permissions: ' . sek_get_write_permissions_status() . "\n";
142
 
143
  // PHP configs
inc/czr-base-fmk/czr-base-fmk.php CHANGED
@@ -54,24 +54,24 @@ if ( !class_exists( 'CZR_Fmk_Base_Construct' ) ) :
54
  if ( !defined( 'NIMBLE_FMK_BASE_VERSION' ) ) { define( 'NIMBLE_FMK_BASE_VERSION' , isset( $params['version'] ) ? $params['version'] : '1.0.0' ); }
55
 
56
  // Cache the css attr used in the tmpl builder and in the localized params
57
- $this -> czr_css_attr = $this -> czr_fmk_get_customizer_controls_css_attr();
58
 
59
  // Cache the default dynamic params
60
- $this -> default_dynamic_setting_params = $this -> czr_fmk_get_default_dynamic_setting_params();
61
- $this -> default_dynamic_module_params = $this -> czr_fmk_get_default_dynamic_module_params();
62
 
63
  // Enqueue the fmk control js + a module tmpl
64
- $this -> czr_enqueue_fmk_resources();
65
 
66
  // ajax filters + template generator
67
- $this -> czr_setup_ajax_tmpl();
68
 
69
  // Dynamic Module Registration
70
- $this -> czr_setup_dynamic_settings_registration();
71
- $this -> czr_setup_dynamic_modules_registration();
72
 
73
  // Content picker
74
- $this -> czr_setup_content_picker_ajax_actions();
75
  }//__construct
76
 
77
 
@@ -261,7 +261,7 @@ if ( !class_exists( 'CZR_Fmk_Base_Load_Resources' ) ) :
261
  'serverControlParams',
262
  apply_filters( 'czr_js_customizer_control_params' ,
263
  array(
264
- 'css_attr' => $this -> czr_css_attr,
265
  'isDevMode' => ( defined('WP_DEBUG') && true === WP_DEBUG ) || ( defined('CZR_DEV') && true === CZR_DEV ),
266
  'docURL' => esc_url('docs.presscustomizr.com/'),
267
  'i18n' => array(
@@ -537,11 +537,10 @@ if ( !class_exists( 'CZR_Fmk_Base_Ajax_Filter' ) ) :
537
  // 2) the module meta options, or mod-opt
538
  // 3) the item input options
539
  function ac_get_all_modules_tmpl( $html, $requested_tmpl = '', $posted_params = array() ) {
540
- $css_attr = $this -> czr_css_attr;
541
  if ( empty( $requested_tmpl ) ) {
542
  wp_send_json_error( 'ac_get_all_modules_tmpl => the requested tmpl is empty' );
543
  }
544
-
545
  ob_start();
546
  switch ( $requested_tmpl ) {
547
  case 'crud-module-part' :
@@ -712,17 +711,16 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
712
  break;
713
  }
714
  if ( !is_array( $input_data ) ) {
715
- wp_send_json_error( __FUNCTION__ . ' => wrong var type for the input_data of input id : ' . $input_id );
716
  break;
717
  }
718
  // check that we have no unknown entries in the provided input_data
719
  $maybe_diff = array_diff_key( $input_data, $default_input_entries );
720
  if ( !empty( $maybe_diff ) ) {
721
  error_log('<' . __FUNCTION__ . '>');
722
- error_log( '=> at least one unknown param in the registered input params for input id : ' . $input_id );
723
  error_log( print_r( $maybe_diff, true ) );
724
  error_log('</' . __FUNCTION__ . '>');
725
- //wp_send_json_error( 'ac_generate_czr_tmpl_from_map => at least one unknow entry in the input data for input id : ' . $input_id );
726
  break;
727
  }
728
 
@@ -733,7 +731,7 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
733
  if ( !empty( $input_data[ 'tmpl_callback' ] ) && function_exists( $input_data[ 'tmpl_callback' ] ) ) {
734
  $html .= call_user_func_array( $input_data[ 'tmpl_callback' ], array( $input_data ) );
735
  } else {
736
- $html .= $this -> ac_get_default_input_tmpl( $input_id, $input_data );
737
  }
738
 
739
  }
@@ -745,7 +743,7 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
745
  // Fired in ac_generate_czr_tmpl_from_map
746
  function ac_get_default_input_tmpl( $input_id, $input_data ) {
747
  if ( !array_key_exists( 'input_type', $input_data ) || empty( $input_data[ 'input_type' ] ) ) {
748
- wp_send_json_error( 'ac_get_input_tmpl => missing input type for input id : ' . $input_id );
749
  }
750
  $input_type = $input_data[ 'input_type' ];
751
 
@@ -755,53 +753,56 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
755
  $is_width_100 = true;
756
  }
757
 
758
- $css_attr = $this -> czr_css_attr;
759
 
760
  ob_start();
761
  // <INPUT WRAPPER>
762
  printf( '<div class="%1$s %2$s %3$s" data-input-type="%4$s" %5$s>',
763
- $css_attr['sub_set_wrapper'],
764
  $is_width_100 ? 'width-100' : '',
765
  'hidden' === $input_type ? 'hidden' : '',
766
- $input_type,
767
- !empty( $input_data['transport'] ) ? 'data-transport="'. $input_data['transport'] .'"' : ''
768
  );
769
  ?>
770
  <?php if ( !empty( $input_data['html_before'] ) ) : ?>
771
- <div class="czr-html-before"><?php echo esc_html($input_data['html_before']); ?></div>
772
  <?php endif; ?>
773
 
774
  <?php if ( !empty( $input_data['notice_before_title'] ) ) : ?>
775
- <span class="czr-notice"><?php echo esc_html($input_data['notice_before_title']); ?></span><br/>
776
  <?php endif; ?>
777
 
778
  <?php
779
  // no need to print a title for an hidden input
780
  if ( $input_type !== 'hidden' ) {
781
- printf( '<div class="customize-control-title %1$s">%2$s</div>', !empty( $input_data['title_width'] ) ? $input_data['title_width'] : '', $input_data['title'] );
 
 
 
782
  }
783
  ?>
784
  <?php if ( !empty( $input_data['notice_before'] ) ) : ?>
785
- <span class="czr-notice"><?php echo esc_html($input_data['notice_before']); ?></span>
786
  <?php endif; ?>
787
 
788
- <?php printf( '<div class="czr-input %1$s">', !empty( $input_data['input_width'] ) ? $input_data['input_width'] : '' ); ?>
789
 
790
  <?php
791
  if ( !empty( $input_data['input_template'] ) && is_string( $input_data['input_template'] ) ) {
792
- echo esc_html($input_data['input_template']);
793
  } else {
794
  // THIS IS WHERE THE ACTUAL INPUT CONTENT IS SET
795
- $this -> ac_set_input_tmpl_content( $input_type, $input_id, $input_data );
796
  }
797
  ?>
798
  </div><?php // class="czr-input" ?>
799
  <?php if ( !empty( $input_data['notice_after'] ) ) : ?>
800
- <span class="czr-notice"><?php echo esc_html($input_data['notice_after']); ?></span>
801
  <?php endif; ?>
802
 
803
  <?php if ( !empty( $input_data['html_after'] ) ) : ?>
804
- <div class="czr-html-after"><?php echo esc_html($input_data['html_after']); ?></div>
805
  <?php endif; ?>
806
 
807
  </div> <?php //class="$css_attr['sub_set_wrapper']" ?>
@@ -811,7 +812,7 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
811
  $tmpl_html = apply_filters( "czr_set_input_tmpl___{$input_type}", ob_get_clean(), $input_id, $input_data );
812
  //error_log( print_r($tmpl_html, true ) );
813
  if ( empty( $tmpl_html ) ) {
814
- wp_send_json_error( 'ac_get_input_tmpl => no html returned for input ' . $input_id );
815
  }
816
  return $tmpl_html;
817
  }//ac_get_input_tmpl()
@@ -824,9 +825,8 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
824
 
825
  // fired in ::ac_get_default_input_tmpl();
826
  private function ac_set_input_tmpl_content( $input_type, $input_id, $input_data ) {
827
- $css_attr = $this -> czr_css_attr;
828
  $input_tmpl_content = null;
829
-
830
  // First fires a hook to allow the input content to be remotely set
831
  // For example the module_picker, the spacing, h_text_alignment... are printed this way
832
  ob_start();
@@ -834,7 +834,7 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
834
  $input_tmpl_content = ob_get_clean();
835
 
836
  if ( !empty( $input_tmpl_content ) ) {
837
- echo esc_html($input_tmpl_content);
838
  } else {
839
  // Then, if we have no content yet, let's go thought the default input cases
840
  switch ( $input_type ) {
@@ -881,10 +881,10 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
881
  ?>
882
  <?php
883
  printf( '<input data-czrtype="%4$s" type="number" %1$s %2$s %3$s value="{{ data[\'%4$s\'] }}" />',
884
- !empty( $input_data['step'] ) ? 'step="'. $input_data['step'] .'"' : '',
885
- !empty( $input_data['min'] ) ? 'min="'. $input_data['min'] .'"' : '',
886
- !empty( $input_data['max'] ) ? 'max="'. $input_data['max'] .'"' : '',
887
- $input_id
888
  );
889
  ?>
890
  <?php
@@ -913,7 +913,7 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
913
  <#
914
  var _checked = ( false != data['<?php echo esc_attr($input_id); ?>'] ) ? "checked=checked" : '';
915
  #>
916
- <input data-czrtype="<?php echo $input_id; ?>" type="checkbox" {{ _checked }}></input>
917
  <?php
918
  break;
919
 
@@ -978,11 +978,11 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
978
  <?php //<# //console.log( 'IN php::ac_get_default_input_tmpl() => data range_slide => ', data ); #> ?>
979
  <?php
980
  printf( '<input data-czrtype="%5$s" type="range" %1$s %2$s %3$s %4$s value="{{ data[\'%5$s\'] }}" />',
981
- !empty( $input_data['orientation'] ) ? 'data-orientation="'. $input_data['orientation'] .'"' : '',
982
- !empty( $input_data['unit'] ) ? 'data-unit="'. $input_data['unit'] .'"' : '',
983
- !empty( $input_data['min'] ) ? 'min="'. $input_data['min'] .'"' : '',
984
- !empty( $input_data['max'] ) ? 'max="'. $input_data['max'] .'"' : '',
985
- $input_id
986
  );
987
  ?>
988
  <?php
@@ -994,7 +994,7 @@ if ( !class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
994
  case 'content_picker' :
995
  ?>
996
  <?php
997
- printf( '<span data-czrtype="%1$s"></span>', $input_id );
998
  ?>
999
  <?php
1000
  break;
@@ -1402,7 +1402,7 @@ if ( !class_exists( 'CZR_Fmk_Dyn_Module_Registration' ) ) :
1402
  }
1403
 
1404
  // normalize
1405
- $module_params = wp_parse_args( $module_params, $this -> default_dynamic_module_params );
1406
 
1407
  $registered = $this->registered_modules;
1408
  $module_type_candidate = $module_params['module_type'];
@@ -1475,7 +1475,7 @@ if ( !class_exists( 'CZR_Fmk_Dyn_Module_Registration' ) ) :
1475
 
1476
  // loop on each registered modules
1477
  foreach ( $this->registered_modules as $module_type => $params ) {
1478
- $params = wp_parse_args( $params, $this -> default_dynamic_module_params );
1479
  //error_log( print_r( $params, true ) );
1480
  $control_js_params = $params[ 'customizer_assets' ][ 'control_js' ];
1481
  // Enqueue the list of registered scripts
@@ -1531,7 +1531,7 @@ if ( !class_exists( 'CZR_Fmk_Dyn_Module_Registration' ) ) :
1531
  return;
1532
 
1533
  foreach ( $this->registered_modules as $module_type => $params ) {
1534
- $params = wp_parse_args( $params, $this -> default_dynamic_module_params );
1535
  if ( !empty( $params['tmpl'] ) ) {
1536
  $module_type = $params['module_type'];
1537
  // filter declared with $html = apply_filters( "ac_set_ajax_czr_tmpl___{$module_type}", '', $tmpl, $_POST );
@@ -1631,9 +1631,9 @@ if ( !class_exists( 'CZR_Fmk_Dyn_Module_Registration' ) ) :
1631
  // print the tabs nav
1632
  foreach ( $tmpl_map['tabs'] as $_key => $tab ) {
1633
  printf( '<li data-tab-id="section-topline-%1$s" %2$s><a href="#"><span>%3$s</span></a></li>',
1634
- $_key + 1,
1635
- array_key_exists('attributes', $tab) ? $tab['attributes'] : '',
1636
- $tab['title']
1637
  );
1638
  }//foreach
1639
  ?>
@@ -1643,8 +1643,8 @@ if ( !class_exists( 'CZR_Fmk_Dyn_Module_Registration' ) ) :
1643
  <?php
1644
  foreach ( $tmpl_map['tabs'] as $_key => $tab ) {
1645
  printf( '<section id="section-topline-%1$s">%2$s</section>',
1646
- $_key + 1,
1647
- $this -> ac_generate_czr_tmpl_from_map( $tab['inputs'] )
1648
  );
1649
  }//foreach
1650
  ?>
@@ -1653,7 +1653,7 @@ if ( !class_exists( 'CZR_Fmk_Dyn_Module_Registration' ) ) :
1653
  <?php
1654
  return ob_get_clean();
1655
  } else {
1656
- return $this -> ac_generate_czr_tmpl_from_map( $tmpl_map );
1657
  }
1658
  }
1659
 
@@ -2115,8 +2115,8 @@ endif;
2115
  function czr_get_parent_theme_slug() {
2116
  $theme_slug = get_option( 'stylesheet' );
2117
  // $_REQUEST['theme'] is set both in live preview and when we're customizing a non active theme
2118
- $theme_slug = isset($_REQUEST['theme']) ? $_REQUEST['theme'] : $theme_slug; //old wp versions
2119
- $theme_slug = isset($_REQUEST['customize_theme']) ? $_REQUEST['customize_theme'] : $theme_slug;
2120
 
2121
  //gets the theme name (or parent if child)
2122
  $theme_data = wp_get_theme( $theme_slug );
54
  if ( !defined( 'NIMBLE_FMK_BASE_VERSION' ) ) { define( 'NIMBLE_FMK_BASE_VERSION' , isset( $params['version'] ) ? $params['version'] : '1.0.0' ); }
55
 
56
  // Cache the css attr used in the tmpl builder and in the localized params
57
+ $this->czr_css_attr = $this->czr_fmk_get_customizer_controls_css_attr();
58
 
59
  // Cache the default dynamic params
60
+ $this->default_dynamic_setting_params = $this->czr_fmk_get_default_dynamic_setting_params();
61
+ $this->default_dynamic_module_params = $this->czr_fmk_get_default_dynamic_module_params();
62
 
63
  // Enqueue the fmk control js + a module tmpl
64
+ $this->czr_enqueue_fmk_resources();
65
 
66
  // ajax filters + template generator
67
+ $this->czr_setup_ajax_tmpl();
68
 
69
  // Dynamic Module Registration
70
+ $this->czr_setup_dynamic_settings_registration();
71
+ $this->czr_setup_dynamic_modules_registration();
72
 
73
  // Content picker
74
+ $this->czr_setup_content_picker_ajax_actions();
75
  }//__construct
76
 
77
 
261
  'serverControlParams',
262
  apply_filters( 'czr_js_customizer_control_params' ,
263
  array(
264
+ 'css_attr' => $this->czr_css_attr,
265
  'isDevMode' => ( defined('WP_DEBUG') && true === WP_DEBUG ) || ( defined('CZR_DEV') && true === CZR_DEV ),
266
  'docURL' => esc_url('docs.presscustomizr.com/'),
267
  'i18n' => array(
537
  // 2) the module meta options, or mod-opt
538
  // 3) the item input options
539
  function ac_get_all_modules_tmpl( $html, $requested_tmpl = '', $posted_params = array() ) {
540
+ $css_attr = $this->czr_css_attr;
541
  if ( empty( $requested_tmpl ) ) {
542
  wp_send_json_error( 'ac_get_all_modules_tmpl => the requested tmpl is empty' );
543
  }
 
544
  ob_start();
545
  switch ( $requested_tmpl ) {
546
  case 'crud-module-part' :
711
  break;
712
  }
713
  if ( !is_array( $input_data ) ) {
714
+ wp_send_json_error( __FUNCTION__ . ' => wrong var type for the input_data of input id : ' . esc_attr($input_id) );
715
  break;
716
  }
717
  // check that we have no unknown entries in the provided input_data
718
  $maybe_diff = array_diff_key( $input_data, $default_input_entries );
719
  if ( !empty( $maybe_diff ) ) {
720
  error_log('<' . __FUNCTION__ . '>');
721
+ error_log( '=> at least one unknown param in the registered input params for input id : ' . esc_attr($input_id) );
722
  error_log( print_r( $maybe_diff, true ) );
723
  error_log('</' . __FUNCTION__ . '>');
 
724
  break;
725
  }
726
 
731
  if ( !empty( $input_data[ 'tmpl_callback' ] ) && function_exists( $input_data[ 'tmpl_callback' ] ) ) {
732
  $html .= call_user_func_array( $input_data[ 'tmpl_callback' ], array( $input_data ) );
733
  } else {
734
+ $html .= $this->ac_get_default_input_tmpl( $input_id, $input_data );
735
  }
736
 
737
  }
743
  // Fired in ac_generate_czr_tmpl_from_map
744
  function ac_get_default_input_tmpl( $input_id, $input_data ) {
745
  if ( !array_key_exists( 'input_type', $input_data ) || empty( $input_data[ 'input_type' ] ) ) {
746
+ wp_send_json_error( 'ac_get_input_tmpl => missing input type for input id : ' . esc_attr($input_id) );
747
  }
748
  $input_type = $input_data[ 'input_type' ];
749
 
753
  $is_width_100 = true;
754
  }
755
 
756
+ $css_attr = $this->czr_css_attr;
757
 
758
  ob_start();
759
  // <INPUT WRAPPER>
760
  printf( '<div class="%1$s %2$s %3$s" data-input-type="%4$s" %5$s>',
761
+ esc_attr($css_attr['sub_set_wrapper']),
762
  $is_width_100 ? 'width-100' : '',
763
  'hidden' === $input_type ? 'hidden' : '',
764
+ esc_attr($input_type),
765
+ esc_attr(!empty( $input_data['transport'] ) ? 'data-transport="'. $input_data['transport'] .'"' : '')
766
  );
767
  ?>
768
  <?php if ( !empty( $input_data['html_before'] ) ) : ?>
769
+ <div class="czr-html-before"><?php echo wp_kses_post($input_data['html_before']); ?></div>
770
  <?php endif; ?>
771
 
772
  <?php if ( !empty( $input_data['notice_before_title'] ) ) : ?>
773
+ <span class="czr-notice"><?php echo wp_kses_post($input_data['notice_before_title']); ?></span><br/>
774
  <?php endif; ?>
775
 
776
  <?php
777
  // no need to print a title for an hidden input
778
  if ( $input_type !== 'hidden' ) {
779
+ printf( '<div class="customize-control-title %1$s">%2$s</div>',
780
+ esc_attr(!empty( $input_data['title_width'] ) ? $input_data['title_width'] : ''),
781
+ wp_kses_post($input_data['title'])
782
+ );
783
  }
784
  ?>
785
  <?php if ( !empty( $input_data['notice_before'] ) ) : ?>
786
+ <span class="czr-notice"><?php echo wp_kses_post($input_data['notice_before']); ?></span>
787
  <?php endif; ?>
788
 
789
+ <?php printf( '<div class="czr-input %1$s">', esc_attr(!empty( $input_data['input_width'] ) ? $input_data['input_width'] : '' ) ); ?>
790
 
791
  <?php
792
  if ( !empty( $input_data['input_template'] ) && is_string( $input_data['input_template'] ) ) {
793
+ echo wp_kses_post($input_data['input_template']);
794
  } else {
795
  // THIS IS WHERE THE ACTUAL INPUT CONTENT IS SET
796
+ $this->ac_set_input_tmpl_content( $input_type, $input_id, $input_data );
797
  }
798
  ?>
799
  </div><?php // class="czr-input" ?>
800
  <?php if ( !empty( $input_data['notice_after'] ) ) : ?>
801
+ <span class="czr-notice"><?php echo wp_kses_post($input_data['notice_after']); ?></span>
802
  <?php endif; ?>
803
 
804
  <?php if ( !empty( $input_data['html_after'] ) ) : ?>
805
+ <div class="czr-html-after"><?php echo wp_kses_post($input_data['html_after']); ?></div>
806
  <?php endif; ?>
807
 
808
  </div> <?php //class="$css_attr['sub_set_wrapper']" ?>
812
  $tmpl_html = apply_filters( "czr_set_input_tmpl___{$input_type}", ob_get_clean(), $input_id, $input_data );
813
  //error_log( print_r($tmpl_html, true ) );
814
  if ( empty( $tmpl_html ) ) {
815
+ wp_send_json_error( 'ac_get_input_tmpl => no html returned for input ' . esc_attr($input_id) );
816
  }
817
  return $tmpl_html;
818
  }//ac_get_input_tmpl()
825
 
826
  // fired in ::ac_get_default_input_tmpl();
827
  private function ac_set_input_tmpl_content( $input_type, $input_id, $input_data ) {
828
+ $css_attr = $this->czr_css_attr;
829
  $input_tmpl_content = null;
 
830
  // First fires a hook to allow the input content to be remotely set
831
  // For example the module_picker, the spacing, h_text_alignment... are printed this way
832
  ob_start();
834
  $input_tmpl_content = ob_get_clean();
835
 
836
  if ( !empty( $input_tmpl_content ) ) {
837
+ echo wp_kses_post($input_tmpl_content);
838
  } else {
839
  // Then, if we have no content yet, let's go thought the default input cases
840
  switch ( $input_type ) {
881
  ?>
882
  <?php
883
  printf( '<input data-czrtype="%4$s" type="number" %1$s %2$s %3$s value="{{ data[\'%4$s\'] }}" />',
884
+ esc_attr(!empty( $input_data['step'] ) ? 'step="'. $input_data['step'] .'"' : ''),
885
+ esc_attr(!empty( $input_data['min'] ) ? 'min="'. $input_data['min'] .'"' : ''),
886
+ esc_attr(!empty( $input_data['max'] ) ? 'max="'. $input_data['max'] .'"' : ''),
887
+ esc_attr($input_id)
888
  );
889
  ?>
890
  <?php
913
  <#
914
  var _checked = ( false != data['<?php echo esc_attr($input_id); ?>'] ) ? "checked=checked" : '';
915
  #>
916
+ <input data-czrtype="<?php echo esc_attr($input_id); ?>" type="checkbox" {{ _checked }}></input>
917
  <?php
918
  break;
919
 
978
  <?php //<# //console.log( 'IN php::ac_get_default_input_tmpl() => data range_slide => ', data ); #> ?>
979
  <?php
980
  printf( '<input data-czrtype="%5$s" type="range" %1$s %2$s %3$s %4$s value="{{ data[\'%5$s\'] }}" />',
981
+ esc_attr(!empty( $input_data['orientation'] ) ? 'data-orientation="'. $input_data['orientation'] .'"' : ''),
982
+ esc_attr(!empty( $input_data['unit'] ) ? 'data-unit="'. $input_data['unit'] .'"' : ''),
983
+ esc_attr(!empty( $input_data['min'] ) ? 'min="'. $input_data['min'] .'"' : ''),
984
+ esc_attr(!empty( $input_data['max'] ) ? 'max="'. $input_data['max'] .'"' : ''),
985
+ esc_attr($input_id)
986
  );
987
  ?>
988
  <?php
994
  case 'content_picker' :
995
  ?>
996
  <?php
997
+ printf( '<span data-czrtype="%1$s"></span>', esc_attr($input_id) );
998
  ?>
999
  <?php
1000
  break;
1402
  }
1403
 
1404
  // normalize
1405
+ $module_params = wp_parse_args( $module_params, $this->default_dynamic_module_params );
1406
 
1407
  $registered = $this->registered_modules;
1408
  $module_type_candidate = $module_params['module_type'];
1475
 
1476
  // loop on each registered modules
1477
  foreach ( $this->registered_modules as $module_type => $params ) {
1478
+ $params = wp_parse_args( $params, $this->default_dynamic_module_params );
1479
  //error_log( print_r( $params, true ) );
1480
  $control_js_params = $params[ 'customizer_assets' ][ 'control_js' ];
1481
  // Enqueue the list of registered scripts
1531
  return;
1532
 
1533
  foreach ( $this->registered_modules as $module_type => $params ) {
1534
+ $params = wp_parse_args( $params, $this->default_dynamic_module_params );
1535
  if ( !empty( $params['tmpl'] ) ) {
1536
  $module_type = $params['module_type'];
1537
  // filter declared with $html = apply_filters( "ac_set_ajax_czr_tmpl___{$module_type}", '', $tmpl, $_POST );
1631
  // print the tabs nav
1632
  foreach ( $tmpl_map['tabs'] as $_key => $tab ) {
1633
  printf( '<li data-tab-id="section-topline-%1$s" %2$s><a href="#"><span>%3$s</span></a></li>',
1634
+ esc_attr($_key + 1),
1635
+ esc_attr(array_key_exists('attributes', $tab) ? $tab['attributes'] : ''),
1636
+ esc_html($tab['title'])
1637
  );
1638
  }//foreach
1639
  ?>
1643
  <?php
1644
  foreach ( $tmpl_map['tabs'] as $_key => $tab ) {
1645
  printf( '<section id="section-topline-%1$s">%2$s</section>',
1646
+ esc_attr($_key + 1),
1647
+ wp_kses_post($this->ac_generate_czr_tmpl_from_map( $tab['inputs'] ))
1648
  );
1649
  }//foreach
1650
  ?>
1653
  <?php
1654
  return ob_get_clean();
1655
  } else {
1656
+ return $this->ac_generate_czr_tmpl_from_map( $tmpl_map );
1657
  }
1658
  }
1659
 
2115
  function czr_get_parent_theme_slug() {
2116
  $theme_slug = get_option( 'stylesheet' );
2117
  // $_REQUEST['theme'] is set both in live preview and when we're customizing a non active theme
2118
+ $theme_slug = sanitize_text_field( isset($_REQUEST['theme']) ? $_REQUEST['theme'] : $theme_slug ); //old wp versions
2119
+ $theme_slug = sanitize_text_field( isset($_REQUEST['customize_theme']) ? $_REQUEST['customize_theme'] : $theme_slug );
2120
 
2121
  //gets the theme name (or parent if child)
2122
  $theme_data = wp_get_theme( $theme_slug );
inc/czr-skope/index.php CHANGED
@@ -330,11 +330,11 @@ function skp_get_skope_id( $level = 'local' ) {
330
  // => which will lead to skope_id set to '_skope_not_set_'
331
  // in order to prevent this, let's get the skope_id value from the customizer posted value when available.
332
  if ( skp_is_customizing() && '_skope_not_set_' === $skope_id_to_return && 'local' === $level && !empty($_POST['local_skope_id']) ) {
333
- $skope_id_to_return = sanitize_text_field( wp_unslash($_POST['local_skope_id']));
334
  }
335
  // Feb 2021 => added for https://github.com/presscustomizr/nimble-builder/issues/478
336
  if ( skp_is_customizing() && '_skope_not_set_' === $skope_id_to_return && 'group' === $level && !empty($_POST['group_skope_id']) ) {
337
- $skope_id_to_return = sanitize_text_field( wp_unslash($_POST['group_skope_id']));
338
  }
339
 
340
  $skope_id_to_return = apply_filters( 'skp_get_skope_id', $skope_id_to_return, $level );
@@ -410,7 +410,7 @@ function skp_get_skope_title( $args = array() ) {
410
  $long = $args['long'];
411
  $is_prefixed = $args['is_prefixed'];
412
 
413
- $_dyn_type = ( skp_is_customize_preview_frame() && isset( $_POST['dyn_type']) ) ? sanitize_text_field( wp_unslash($_POST['dyn_type'])) : '';
414
  $type = skp_get_skope('type');
415
  $skope = skp_get_skope();
416
  $title = '';
@@ -519,7 +519,7 @@ function skp_is_customizing() {
519
  $is_customize_admin_page_one = (
520
  $is_customize_php_page
521
  ||
522
- ( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] )
523
  ||
524
  ( !empty( $_GET['customize_changeset_uuid'] ) || !empty( $_POST['customize_changeset_uuid'] ) )
525
  );
@@ -634,7 +634,7 @@ if ( !class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
634
  class Flat_Export_Skope_Data_And_Send_To_Panel extends Flat_Skop_Register_And_Load_Control_Assets {
635
  // Fired in Flat_Skop_Base::__construct()
636
  public function skp_export_skope_data_and_schedule_sending_to_panel() {
637
- add_action( 'wp_footer', array( $this, 'skp_print_server_skope_data') , 30 );
638
  }
639
 
640
 
@@ -649,16 +649,11 @@ if ( !class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
649
  // $_czr_scopes = array( );
650
  $_czr_skopes = $this->_skp_get_json_export_ready_skopes();
651
  $_czr_query_data = $this->_skp_get_json_export_ready_query_data();
652
-
 
653
  ?>
654
- <script type="text/javascript" id="czr-print-skop">
655
- (function ( _export ){
656
- _export.czr_new_skopes = <?php echo wp_json_encode( $_czr_skopes ); ?>;
657
- _export.czr_stylesheet = '<?php echo get_stylesheet(); ?>';
658
- _export.czr_query_params = <?php echo wp_json_encode($_czr_query_data); ?>;
659
- })( _wpCustomizeSettings );
660
-
661
- // December 2020 : it may happen that the 'sync' event was already sent and that we missed it
662
  // Typically when the site is slow.
663
  // So we need to check if the "sync" event has fired already ( see customize-base.js, ::bind method )
664
  // For more security, let's introduce a marker and attempt to re-sent after a moment if needed
@@ -673,22 +668,49 @@ if ( !class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
673
  window.czr_skopes_sent = true;
674
  };
675
 
676
- jQuery( function() {
677
- if ( wp.customize.preview.topics && wp.customize.preview.topics.sync && wp.customize.preview.topics.sync.fired() ) {
678
- _send();
679
- } else {
680
- wp.customize.preview.bind( 'sync', function( events ) {
681
- _send();
682
- });
683
- }
684
- setTimeout( function() {
685
- if ( !window.czr_skopes_sent ) {
686
  _send();
687
- }
688
- }, 2500 );
689
- });
690
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
691
  <?php
 
 
 
 
692
  }
693
 
694
 
330
  // => which will lead to skope_id set to '_skope_not_set_'
331
  // in order to prevent this, let's get the skope_id value from the customizer posted value when available.
332
  if ( skp_is_customizing() && '_skope_not_set_' === $skope_id_to_return && 'local' === $level && !empty($_POST['local_skope_id']) ) {
333
+ $skope_id_to_return = sanitize_text_field($_POST['local_skope_id']);
334
  }
335
  // Feb 2021 => added for https://github.com/presscustomizr/nimble-builder/issues/478
336
  if ( skp_is_customizing() && '_skope_not_set_' === $skope_id_to_return && 'group' === $level && !empty($_POST['group_skope_id']) ) {
337
+ $skope_id_to_return = sanitize_text_field($_POST['group_skope_id']);
338
  }
339
 
340
  $skope_id_to_return = apply_filters( 'skp_get_skope_id', $skope_id_to_return, $level );
410
  $long = $args['long'];
411
  $is_prefixed = $args['is_prefixed'];
412
 
413
+ $_dyn_type = ( skp_is_customize_preview_frame() && isset( $_POST['dyn_type']) ) ? sanitize_text_field($_POST['dyn_type']) : '';
414
  $type = skp_get_skope('type');
415
  $skope = skp_get_skope();
416
  $title = '';
519
  $is_customize_admin_page_one = (
520
  $is_customize_php_page
521
  ||
522
+ ( isset( $_REQUEST['wp_customize'] ) && 'on' == sanitize_text_field($_REQUEST['wp_customize']) )
523
  ||
524
  ( !empty( $_GET['customize_changeset_uuid'] ) || !empty( $_POST['customize_changeset_uuid'] ) )
525
  );
634
  class Flat_Export_Skope_Data_And_Send_To_Panel extends Flat_Skop_Register_And_Load_Control_Assets {
635
  // Fired in Flat_Skop_Base::__construct()
636
  public function skp_export_skope_data_and_schedule_sending_to_panel() {
637
+ add_action( 'wp_head', array( $this, 'skp_print_server_skope_data') , 30 );
638
  }
639
 
640
 
649
  // $_czr_scopes = array( );
650
  $_czr_skopes = $this->_skp_get_json_export_ready_skopes();
651
  $_czr_query_data = $this->_skp_get_json_export_ready_query_data();
652
+
653
+ ob_start();
654
  ?>
655
+ var _doSend = function() {
656
+ // December 2020 : it may happen that the 'sync' event was already sent and that we missed it
 
 
 
 
 
 
657
  // Typically when the site is slow.
658
  // So we need to check if the "sync" event has fired already ( see customize-base.js, ::bind method )
659
  // For more security, let's introduce a marker and attempt to re-sent after a moment if needed
668
  window.czr_skopes_sent = true;
669
  };
670
 
671
+ jQuery( function() {
672
+ if ( wp.customize.preview.topics && wp.customize.preview.topics.sync && wp.customize.preview.topics.sync.fired() ) {
673
+ _send();
674
+ } else {
675
+ wp.customize.preview.bind( 'sync', function( events ) {
 
 
 
 
 
676
  _send();
677
+ });
678
+ }
679
+ setTimeout( function() {
680
+ if ( !window.czr_skopes_sent ) {
681
+ _send();
682
+ }
683
+ }, 2500 );
684
+ });
685
+ };
686
+
687
+
688
+ // recursively try to load jquery every 200ms during 6s ( max 30 times )
689
+ var _doWhenCustomizeSettingsReady = function( attempts ) {
690
+ attempts = attempts || 0;
691
+ if ( typeof undefined !== typeof window._wpCustomizeSettings ) {
692
+ _wpCustomizeSettings.czr_new_skopes = <?php echo wp_json_encode( $_czr_skopes ); ?>;
693
+ _wpCustomizeSettings.czr_stylesheet = '<?php echo get_stylesheet(); ?>';
694
+ _wpCustomizeSettings.czr_query_params = <?php echo wp_json_encode($_czr_query_data); ?>;
695
+ _doSend();
696
+ } else if ( attempts < 30 ) {
697
+ setTimeout( function() {
698
+ attempts++;
699
+ _doWhenCustomizeSettingsReady( attempts );
700
+ }, 20 );
701
+ } else {
702
+ if ( window.console && window.console.log ) {
703
+ console.log('Nimble Builder problem : _wpCustomizeSettings is not defined');
704
+ }
705
+ }
706
+ };
707
+
708
+ _doWhenCustomizeSettingsReady();
709
  <?php
710
+ $script = ob_get_clean();
711
+ wp_register_script( 'nb_print_skope_data_js', '');
712
+ wp_enqueue_script( 'nb_print_skope_data_js' );
713
+ wp_add_inline_script( 'nb_print_skope_data_js', $script );
714
  }
715
 
716
 
inc/functions.php CHANGED
@@ -27,9 +27,4 @@ function nimble_get_content_as_json() {
27
  'global_sections' => $global_sections
28
  ]);
29
  return wp_json_encode( $raw_content );
30
- }
31
-
32
- remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
33
- add_action( 'shutdown', function() {
34
- while ( @ob_end_flush() );
35
- } );
27
  'global_sections' => $global_sections
28
  ]);
29
  return wp_json_encode( $raw_content );
30
+ }
 
 
 
 
 
inc/libs/browser.php CHANGED
@@ -238,7 +238,7 @@ class Browser {
238
  * Reset all properties
239
  */
240
  function reset() {
241
- $this->_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : "";
242
  $this->_browser_name = $this->BROWSER_UNKNOWN;
243
  $this->_version = $this->VERSION_UNKNOWN;
244
  $this->_platform = $this->PLATFORM_UNKNOWN;
238
  * Reset all properties
239
  */
240
  function reset() {
241
+ $this->_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field($_SERVER['HTTP_USER_AGENT']) : "";
242
  $this->_browser_name = $this->BROWSER_UNKNOWN;
243
  $this->_version = $this->VERSION_UNKNOWN;
244
  $this->_platform = $this->PLATFORM_UNKNOWN;
inc/sektions/ccat-constants-and-helper-functions.php CHANGED
@@ -62,10 +62,6 @@ if ( !defined( 'NIMBLE_API_CHECK_TRANSIENT_ID' ) ) { define ( 'NIMBLE_API_CHECK_
62
  if ( !defined( 'NIMBLE_GOOGLE_FONTS_STYLESHEET_ID' ) ) { define ( 'NIMBLE_GOOGLE_FONTS_STYLESHEET_ID', 'sek-gfonts-local-and-global' ); }
63
  if ( !defined( 'NIMBLE_GLOBAL_OPTIONS_STYLESHEET_ID' ) ) { define ( 'NIMBLE_GLOBAL_OPTIONS_STYLESHEET_ID', 'nimble-global-inline-style' ); }
64
 
65
- if ( !defined( 'NIMBLE_JQUERY_ID' ) ) { define ( 'NIMBLE_JQUERY_ID', 'nb-jquery' ); }
66
- if ( !defined( 'NIMBLE_JQUERY_LATEST_CDN_URL' ) ) { define ( 'NIMBLE_JQUERY_LATEST_CDN_URL', 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js' ); }
67
- if ( !defined( 'NIMBLE_JQUERY_MIGRATE_URL' ) ) { define ( 'NIMBLE_JQUERY_MIGRATE_URL', site_url() . '/wp-includes/js/jquery/jquery-migrate.min.js' ); }
68
-
69
  if ( !defined( "NIMBLE_DATA_API_URL_V2" ) ) { define( "NIMBLE_DATA_API_URL_V2",
70
  ( defined('NIMBLE_FETCH_API_LOCALLY') && NIMBLE_FETCH_API_LOCALLY && defined('NIMBLE_LOCAL_API_URL') ) ? NIMBLE_LOCAL_API_URL : 'https://api.nimblebuilder.com/wp-json/nimble/v2/cravan'
71
  ); }
@@ -210,64 +206,6 @@ function sek_get_default_location_model( $skope_id = null ) {
210
 
211
  ?><?php
212
 
213
-
214
- // @return bool
215
- // march 2020 introduced https://github.com/presscustomizr/nimble-builder/issues/632
216
- // Nov 2020, replaced global option by a PHP constant : https://github.com/presscustomizr/nimble-builder/issues/763
217
- function sek_is_jquery_replaced() {
218
- if ( skp_is_customizing() )
219
- return;
220
- return defined('NIMBLE_USE_LATEST_JQUERY_VERSION') && NIMBLE_USE_LATEST_JQUERY_VERSION;
221
- }
222
-
223
- // @return bool
224
- // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/612
225
- // Nov 2020, replaced global option by a PHP constant : https://github.com/presscustomizr/nimble-builder/issues/763
226
- function sek_load_jquery_async() {
227
- return defined('NIMBLE_LOAD_JQUERY_ASYNC') && NIMBLE_LOAD_JQUERY_ASYNC;
228
- }
229
-
230
- // @return bool
231
- // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/626
232
- function sek_load_front_assets_on_scroll() {
233
- $glob_perf = sek_get_global_option_value( 'performances' );
234
- if ( !is_null( $glob_perf ) && is_array( $glob_perf ) && !empty( $glob_perf['load_front_assets_in_ajax'] ) ) {
235
- return sek_booleanize_checkbox_val( $glob_perf['load_front_assets_in_ajax'] );
236
- }
237
- return false;
238
- }
239
-
240
- // @return bool
241
- // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/626
242
- // function sek_preload_font_awesome() {
243
- // $glob_perf = sek_get_global_option_value( 'performances' );
244
- // if ( !is_null( $glob_perf ) && is_array( $glob_perf ) && !empty( $glob_perf['preload_font_awesome'] ) ) {
245
- // return sek_booleanize_checkbox_val( $glob_perf['preload_font_awesome'] );
246
- // }
247
- // return false;
248
- // }
249
-
250
- // @return bool
251
- // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/612
252
- // function sek_inline_module_stylesheets_on_front() {
253
- // $glob_perf = sek_get_global_option_value( 'performances' );
254
- // if ( !is_null( $glob_perf ) && is_array( $glob_perf ) && !empty( $glob_perf['print_partial_module_stylesheets_inline'] ) ) {
255
- // return sek_booleanize_checkbox_val( $glob_perf['print_partial_module_stylesheets_inline'] );
256
- // }
257
- // return false;
258
- // }
259
-
260
- // @return bool
261
- // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/612
262
- function sek_inline_dynamic_stylesheets_on_front() {
263
- $glob_perf = sek_get_global_option_value( 'performances' );
264
- if ( !is_null( $glob_perf ) && is_array( $glob_perf ) && !empty( $glob_perf['print_dyn_stylesheets_inline'] ) ) {
265
- return sek_booleanize_checkbox_val( $glob_perf['print_dyn_stylesheets_inline'] );
266
- }
267
- return false;
268
- }
269
-
270
-
271
  // @return bool
272
  // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/629
273
  // Firefox doesn not support preload
@@ -288,7 +226,7 @@ function sek_preload_google_fonts_on_front() {
288
 
289
  // @return bool
290
  // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/635
291
- function sek_load_front_assets_in_ajax() {
292
  $glob_perf = sek_get_global_option_value( 'performances' );
293
  if ( !is_null( $glob_perf ) && is_array( $glob_perf ) && !empty( $glob_perf['load_assets_in_ajax'] ) ) {
294
  return !skp_is_customizing() && sek_booleanize_checkbox_val( $glob_perf['load_assets_in_ajax'] );
@@ -312,128 +250,18 @@ function sek_emit_js_event( $event = '', $echo = true ) {
312
  return;
313
  $emitted[] = $event;
314
  Nimble_Manager()->emitted_js_event = $emitted;
315
- $html = sprintf('<script>(function(){if(window.nb_){nb_.emit("%1$s");}})();</script>', $event );
316
  if ( $echo ) {
317
- echo esc_html($html);
 
 
 
318
  } else {
319
- return esc_html($html);
 
320
  }
321
  }
322
 
323
-
324
- // October 2020 => module stylesheets are concatenated in the dynamic stylesheet
325
- // @return bool
326
- // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/612
327
- // function sek_use_split_stylesheets_on_front() {
328
- // $glob_perf = sek_get_global_option_value( 'performances' );
329
- // if ( !is_null( $glob_perf ) && is_array( $glob_perf ) && !empty( $glob_perf['use_partial_module_stylesheets'] ) ) {
330
- // return sek_booleanize_checkbox_val( $glob_perf['use_partial_module_stylesheets'] );
331
- // }
332
- // return false;
333
- // }
334
-
335
-
336
- /* ------------------------------------------------------------------------- *
337
- * FRONT ASSET SNIFFERS
338
- * Deprecated in October 2020 in favor of a js detection using events like nb-needs-video-bg
339
- /* ------------------------------------------------------------------------- */
340
-
341
- // // @return bool
342
- // // some modules uses font awesome :
343
- // // Fired in 'wp_enqueue_scripts' to check if font awesome is needed
344
- // function sek_front_needs_font_awesome( $bool = false, $recursive_data = null ) {
345
- // $contextually_active_modules = sek_get_collection_of_contextually_active_modules();
346
- // $font_awesome_dependant_modules = Nimble_Manager()->modules_dependant_of_font_awesome;//'czr_button_module', 'czr_icon_module', 'czr_social_icons_module'
347
- // foreach ( $font_awesome_dependant_modules as $module_type ) {
348
- // if ( array_key_exists($module_type , $contextually_active_modules) )
349
- // $bool = true;
350
- // }
351
- // return $bool;
352
- // }
353
-
354
- // @return bool
355
- // Fired in 'wp_enqueue_scripts'
356
- // Recursively sniff the local and global sections to find a 'img-lightbox' string
357
- // @see sek_get_module_params_for_czr_image_main_settings_child
358
- // function sek_front_needs_magnific_popup( $bool = false, $recursive_data = null ) {
359
- // if ( !$bool ) {
360
- // if ( is_null( $recursive_data ) ) {
361
- // $local_skope_settings = sek_get_skoped_seks( skp_get_skope_id() );
362
- // $local_collection = ( is_array( $local_skope_settings ) && !empty( $local_skope_settings['collection'] ) ) ? $local_skope_settings['collection'] : array();
363
- // $global_skope_settings = sek_get_skoped_seks( NIMBLE_GLOBAL_SKOPE_ID );
364
- // $global_collection = ( is_array( $global_skope_settings ) && !empty( $global_skope_settings['collection'] ) ) ? $global_skope_settings['collection'] : array();
365
-
366
- // $recursive_data = array_merge( $local_collection, $global_collection );
367
- // }
368
-
369
- // foreach ($recursive_data as $key => $value) {
370
- // // @see sek_get_module_params_for_czr_image_main_settings_child
371
- // if ( is_string( $value ) && 'img-lightbox' === $value ) {
372
- // $bool = true;
373
- // break;
374
- // }
375
- // if ( is_array( $value ) ) {
376
- // $bool = sek_front_needs_magnific_popup( $bool, $value );
377
- // }
378
- // }
379
- // }
380
- // return true === $bool;
381
- // }
382
-
383
- // @return bool
384
- // Fired in 'wp_enqueue_scripts'
385
- // function sek_front_needs_parallax_bg( $bool = false, $recursive_data = null ) {
386
- // if ( !$bool ) {
387
- // if ( is_null( $recursive_data ) ) {
388
- // $local_skope_settings = sek_get_skoped_seks( skp_get_skope_id() );
389
- // $local_collection = ( is_array( $local_skope_settings ) && !empty( $local_skope_settings['collection'] ) ) ? $local_skope_settings['collection'] : array();
390
- // $global_skope_settings = sek_get_skoped_seks( NIMBLE_GLOBAL_SKOPE_ID );
391
- // $global_collection = ( is_array( $global_skope_settings ) && !empty( $global_skope_settings['collection'] ) ) ? $global_skope_settings['collection'] : array();
392
-
393
- // $recursive_data = array_merge( $local_collection, $global_collection );
394
- // }
395
-
396
- // foreach ($recursive_data as $key => $value) {
397
- // // @see sek_get_module_params_for_czr_image_main_settings_child
398
- // if ( 'bg-parallax' === $key && sek_booleanize_checkbox_val($value) ) {
399
- // $bool = true;
400
- // break;
401
- // }
402
- // if ( is_array( $value ) ) {
403
- // $bool = sek_front_needs_parallax_bg( $bool, $value );
404
- // }
405
- // }
406
- // }
407
- // return true === $bool;
408
- // }
409
-
410
- // @return bool
411
- // Fired in 'wp_enqueue_scripts'
412
- // function sek_front_needs_video_bg( $bool = false, $recursive_data = null ) {
413
- // if ( !$bool ) {
414
- // if ( is_null( $recursive_data ) ) {
415
- // $local_skope_settings = sek_get_skoped_seks( skp_get_skope_id() );
416
- // $local_collection = ( is_array( $local_skope_settings ) && !empty( $local_skope_settings['collection'] ) ) ? $local_skope_settings['collection'] : array();
417
- // $global_skope_settings = sek_get_skoped_seks( NIMBLE_GLOBAL_SKOPE_ID );
418
- // $global_collection = ( is_array( $global_skope_settings ) && !empty( $global_skope_settings['collection'] ) ) ? $global_skope_settings['collection'] : array();
419
-
420
- // $recursive_data = array_merge( $local_collection, $global_collection );
421
- // }
422
-
423
- // foreach ($recursive_data as $key => $value) {
424
- // // @see sek_get_module_params_for_czr_image_main_settings_child
425
- // if ( 'bg-video' === $key && !empty($value) ) {
426
- // $bool = true;
427
- // break;
428
- // }
429
- // if ( is_array( $value ) ) {
430
- // $bool = sek_front_needs_video_bg( $bool, $value );
431
- // }
432
- // }
433
- // }
434
- // return true === $bool;
435
- // }
436
-
437
  ?><?php
438
 
439
  /* ------------------------------------------------------------------------- *
@@ -803,9 +631,9 @@ function sek_page_menu_fallback( $args = array() ) {
803
 
804
  //$menu = apply_filters( 'wp_page_menu', $menu, $args );
805
  if ( $args['echo'] )
806
- echo esc_html($menu);
807
  else
808
- return esc_html($menu);
809
  }
810
  /**
811
  * Retrieve or display list of pages in list (li) format.
@@ -858,9 +686,9 @@ function sek_list_pages( $args = '' ) {
858
  }
859
  $html = apply_filters( 'wp_list_pages', $output, $r );
860
  if ( $r['echo'] ) {
861
- echo esc_html($html);
862
  } else {
863
- return esc_html($html);
864
  }
865
  }
866
 
@@ -1070,14 +898,6 @@ function sek_get_module_collection() {
1070
  'font_icon' => '<i class="material-icons">menu</i>'
1071
  //'active' => sek_are_beta_features_enabled()
1072
  )
1073
- // array(
1074
- // 'content-type' => 'module',
1075
- // 'content-id' => 'czr_featured_pages_module',
1076
- // 'title' => __( 'Featured pages', 'text_doma' ),
1077
- // 'icon' => 'Nimble__featured_icon.svg'
1078
- // ),
1079
-
1080
-
1081
  ));
1082
  }
1083
 
@@ -1582,6 +1402,84 @@ function _sek_normalize_single_module_values( $raw_module_value, $module_type )
1582
  return $module_values;
1583
  }
1584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1585
  ?><?php
1586
  /* ------------------------------------------------------------------------- *
1587
  * BREAKPOINTS HELPER
@@ -1746,7 +1644,7 @@ function sek_get_closest_section_custom_breakpoint( $params ) {
1746
  if ( 'not_set' === $collection ) {
1747
  if ( empty( $skope_id ) ) {
1748
  if ( is_array( $_POST ) && !empty( $_POST['location_skope_id'] ) ) {
1749
- $skope_id = sanitize_text_field( wp_unslash($_POST['location_skope_id']));
1750
  } else {
1751
  // When fired during an ajax 'customize_save' action, the skp_get_skope_id() is determined with $_POST['local_skope_id']
1752
  // @see add_filter( 'skp_get_skope_id', '\Nimble\sek_filter_skp_get_skope_id', 10, 2 );
@@ -2369,7 +2267,7 @@ function sek_get_the_content() {
2369
  return sek_get_tmpl_tag_error( $tag = 'the_content', $msg = __('It can only be used in single pages or single posts.', 'nimble-builder') );
2370
  }
2371
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX && skp_is_customizing() ) {
2372
- $post_id = sek_get_posted_query_param_when_customizing( 'post_id' );
2373
  if ( is_int($post_id) ) {
2374
  $post_object = get_post( $post_id );
2375
  return !empty( $post_object ) ? apply_filters( 'the_content', $post_object->post_content ) : null;
@@ -2441,13 +2339,31 @@ function sek_get_author_id_on_front_and_when_customizing() {
2441
  // when performing ajax action, we need the posted query params made available from the ajax params
2442
  function sek_get_post_id_on_front_and_when_customizing() {
2443
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX && skp_is_customizing() ) {
2444
- $post_id = sek_get_posted_query_param_when_customizing( 'post_id' );
2445
  } else {
2446
  $post_id = get_the_ID();
2447
  }
2448
  return is_int($post_id) ? $post_id : null;
2449
  }
2450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2451
  // introduced in october 2019 for https://github.com/presscustomizr/nimble-builder/issues/401
2452
  // Possible params as of October 2019
2453
  // @see inc/czr-skope/_dev/1_1_0_skop_customizer_preview_load_assets.php::
@@ -2457,7 +2373,11 @@ function sek_get_posted_query_param_when_customizing( $param ) {
2457
  if ( isset( $_POST['czr_query_params'] ) ) {
2458
  $query_params = json_decode( wp_unslash( $_POST['czr_query_params'] ), true );
2459
  if ( array_key_exists( $param, $query_params ) ) {
2460
- return $query_params[$param];
 
 
 
 
2461
  } else {
2462
  sek_error_log( __FUNCTION__ . ' => invalid param requested');
2463
  return null;
@@ -2643,7 +2563,7 @@ function sek_get_parent_level_model( $child_level_id = '', $collection = array()
2643
  if ( empty( $collection ) ) {
2644
  if ( empty( $skope_id ) ) {
2645
  if ( is_array( $_POST ) && !empty( $_POST['location_skope_id'] ) ) {
2646
- $skope_id = sanitize_text_field( wp_unslash($_POST['location_skope_id']));
2647
  } else {
2648
  // When fired during an ajax 'customize_save' action, the skp_get_skope_id() is determined with $_POST['local_skope_id']
2649
  // @see add_filter( 'skp_get_skope_id', '\Nimble\sek_filter_skp_get_skope_id', 10, 2 );
@@ -3021,8 +2941,8 @@ function sek_filter_skp_get_skope_id( $skope_id, $level ) {
3021
  // $.extend( query, { local_skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ) } );
3022
  // });
3023
  // implemented to fix : https://github.com/presscustomizr/nimble-builder/issues/242
3024
- if ( 'local' === $level && is_array( $_POST ) && !empty( $_POST['local_skope_id'] ) && 'customize_save' === sanitize_text_field( wp_unslash($_POST['action'])) ) {
3025
- $skope_id = sanitize_text_field( wp_unslash($_POST['local_skope_id']));
3026
  }
3027
  return $skope_id;
3028
  }
@@ -3036,18 +2956,6 @@ function sek_get_seks_setting_id( $skope_id = '' ) {
3036
  }
3037
 
3038
 
3039
-
3040
- // @return void()
3041
- /*function sek_get_module_placeholder( $placeholder_icon = 'short_text' ) {
3042
- $placeholder_icon = empty( $placeholder_icon ) ? 'not_interested' : $placeholder_icon;
3043
- ?>
3044
- <div class="sek-module-placeholder">
3045
- <i class="material-icons"><?php echo $placeholder_icon; ?></i>
3046
- </div>
3047
- <?php
3048
- }*/
3049
-
3050
-
3051
  /* ------------------------------------------------------------------------- *
3052
  * HELPER FOR CHECKBOX OPTIONS
3053
  /* ------------------------------------------------------------------------- */
@@ -3202,8 +3110,8 @@ function sek_is_customize_previewing_a_changeset_post() {
3202
  function sek_get_parent_theme_slug() {
3203
  $theme_slug = get_option( 'stylesheet' );
3204
  // $_REQUEST['theme'] is set both in live preview and when we're customizing a non active theme
3205
- $theme_slug = isset($_REQUEST['theme']) ? $_REQUEST['theme'] : $theme_slug; //old wp versions
3206
- $theme_slug = isset($_REQUEST['customize_theme']) ? $_REQUEST['customize_theme'] : $theme_slug;
3207
 
3208
  //gets the theme name (or parent if child)
3209
  $theme_data = wp_get_theme( $theme_slug );
@@ -3342,16 +3250,10 @@ function sek_current_user_can_access_nb_ui() {
3342
  function sek_clean_transients_like( $transient_string ) {
3343
  global $wpdb;
3344
  $where_like = '%'.$transient_string.'%';
3345
- // $sql = "SELECT `option_name` AS `name`, `option_value` AS `value`
3346
- // FROM $wpdb->options
3347
- // WHERE `option_name` LIKE '$where_like'
3348
- // ORDER BY `option_name`";
3349
-
3350
  $sql = "SELECT `option_name` AS `name`, `option_value` AS `value`
3351
  FROM $wpdb->options
3352
- WHERE `option_name` LIKE %s
3353
- ORDER BY `option_name";
3354
- $sql = $wpdb->prepare($sql, array($where_like));
3355
 
3356
  $results = $wpdb->get_results( $sql );
3357
  $transients = array();
@@ -3394,16 +3296,10 @@ function sek_clean_transients_like( $transient_string ) {
3394
  function sek_clean_options_starting_like( $opt_string ) {
3395
  global $wpdb;
3396
  $where_like = '%'.$opt_string.'%';
3397
- // $sql = "SELECT `option_name` AS `name`, `option_value` AS `value`
3398
- // FROM $wpdb->options
3399
- // WHERE `option_name` LIKE '$where_like'
3400
- // ORDER BY `option_name`";
3401
-
3402
  $sql = "SELECT `option_name` AS `name`, `option_value` AS `value`
3403
  FROM $wpdb->options
3404
- WHERE `option_name` LIKE %s
3405
  ORDER BY `option_name`";
3406
- $sql = $wpdb->prepare($sql, array($where_like));
3407
 
3408
  $results = $wpdb->get_results( $sql );
3409
  if ( !is_array( $results ) )
@@ -4118,7 +4014,7 @@ function sek_add_customize_link() {
4118
  if ( is_customize_preview() && $wp_customize->changeset_post_id() && !current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() ) ) {
4119
  return;
4120
  }
4121
- $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
4122
  if ( is_customize_preview() && $wp_customize->changeset_uuid() ) {
4123
  $current_url = remove_query_arg( 'customize_changeset_uuid', $current_url );
4124
  }
@@ -4267,12 +4163,7 @@ function sek_maybe_optimize_options() {
4267
  if ( !array_key_exists('fix_skope_opt_autoload_0321', $bw_fixes_options ) || 'done' != $bw_fixes_options['fix_skope_opt_autoload_0321'] ) {
4268
  // MOVE ALL OPTIONS LIKE nimble___skp__post_page_*****, nimble___skp__tax_product_cat_***** in a new option ( NIMBLE_OPT_SEKTION_POST_INDEX ), not autoloaded
4269
  global $wpdb;
4270
- // $results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE autoload = 'yes' and option_name like 'nimble___skp_%'", ARRAY_A );
4271
-
4272
- $tablename = $wpdb->prefix . "options";
4273
-
4274
- $sql = $wpdb->prepare( "SELECT * FROM %s WHERE autoload = 'yes' and option_name like 'nimble___skp_%'",$tablename );
4275
- $results = $wpdb->get_results( $sql , ARRAY_A );
4276
  if ( is_array( $results ) ) {
4277
  foreach( $results as $old_opt_data ) {
4278
  if ( !is_array($old_opt_data) )
@@ -4294,12 +4185,7 @@ function sek_maybe_optimize_options() {
4294
  if ( !array_key_exists('move_in_post_index_0321', $bw_fixes_options ) || 'done' != $bw_fixes_options['move_in_post_index_0321'] ) {
4295
  // MOVE ALL OPTIONS LIKE nimble___skp__post_page_*****, nimble___skp__tax_product_cat_***** in a new option ( NIMBLE_OPT_SEKTION_POST_INDEX ), not autoloaded
4296
  global $wpdb;
4297
- $tablename = $wpdb->prefix . "options";
4298
-
4299
- $sql = $wpdb->prepare( "SELECT * FROM %s WHERE autoload = 'yes' and option_name like 'nimble___skp_%'",$tablename );
4300
-
4301
- $results = $wpdb->get_results( $sql , ARRAY_A );
4302
- // $results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE autoload = 'yes' and option_name like 'nimble___skp_%'", ARRAY_A );
4303
  if ( is_array( $results ) ) {
4304
  // Populate the new option ( it should not exists at this point )
4305
  $nb_posts_index = get_option(NIMBLE_OPT_SEKTION_POST_INDEX);
62
  if ( !defined( 'NIMBLE_GOOGLE_FONTS_STYLESHEET_ID' ) ) { define ( 'NIMBLE_GOOGLE_FONTS_STYLESHEET_ID', 'sek-gfonts-local-and-global' ); }
63
  if ( !defined( 'NIMBLE_GLOBAL_OPTIONS_STYLESHEET_ID' ) ) { define ( 'NIMBLE_GLOBAL_OPTIONS_STYLESHEET_ID', 'nimble-global-inline-style' ); }
64
 
 
 
 
 
65
  if ( !defined( "NIMBLE_DATA_API_URL_V2" ) ) { define( "NIMBLE_DATA_API_URL_V2",
66
  ( defined('NIMBLE_FETCH_API_LOCALLY') && NIMBLE_FETCH_API_LOCALLY && defined('NIMBLE_LOCAL_API_URL') ) ? NIMBLE_LOCAL_API_URL : 'https://api.nimblebuilder.com/wp-json/nimble/v2/cravan'
67
  ); }
206
 
207
  ?><?php
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  // @return bool
210
  // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/629
211
  // Firefox doesn not support preload
226
 
227
  // @return bool
228
  // march 2020 introduced for https://github.com/presscustomizr/nimble-builder/issues/635
229
+ function sek_load_front_assets_dynamically() {
230
  $glob_perf = sek_get_global_option_value( 'performances' );
231
  if ( !is_null( $glob_perf ) && is_array( $glob_perf ) && !empty( $glob_perf['load_assets_in_ajax'] ) ) {
232
  return !skp_is_customizing() && sek_booleanize_checkbox_val( $glob_perf['load_assets_in_ajax'] );
250
  return;
251
  $emitted[] = $event;
252
  Nimble_Manager()->emitted_js_event = $emitted;
253
+
254
  if ( $echo ) {
255
+ $html = sprintf('(function(){if(window.nb_){nb_.emit("%1$s");}})();', $event );
256
+ wp_register_script( 'nb_emit_' . $event, '');
257
+ wp_enqueue_script( 'nb_emit_' . $event );
258
+ wp_add_inline_script( 'nb_emit_' . $event, $html );
259
  } else {
260
+ $html = sprintf('<script>(function(){if(window.nb_){nb_.emit("%1$s");}})();</script>', $event );
261
+ return $html;
262
  }
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  ?><?php
266
 
267
  /* ------------------------------------------------------------------------- *
631
 
632
  //$menu = apply_filters( 'wp_page_menu', $menu, $args );
633
  if ( $args['echo'] )
634
+ echo wp_kses_post($menu);
635
  else
636
+ return $menu;
637
  }
638
  /**
639
  * Retrieve or display list of pages in list (li) format.
686
  }
687
  $html = apply_filters( 'wp_list_pages', $output, $r );
688
  if ( $r['echo'] ) {
689
+ echo wp_kses_post($html);
690
  } else {
691
+ return $html;
692
  }
693
  }
694
 
898
  'font_icon' => '<i class="material-icons">menu</i>'
899
  //'active' => sek_are_beta_features_enabled()
900
  )
 
 
 
 
 
 
 
 
901
  ));
902
  }
903
 
1402
  return $module_values;
1403
  }
1404
 
1405
+
1406
+ // Returns an array of allowed HTML tags and attributes when securing form echoed with wp_kses()
1407
+ function sek_get_allowed_html_in_forms() {
1408
+ $allowed = array(
1409
+ 'div' => array(),
1410
+ 'span' => array(),
1411
+ 'form' => array(
1412
+ 'action' => true,
1413
+ 'method' => true,
1414
+ 'post' => true
1415
+ ),
1416
+ 'button' => array(
1417
+ 'disabled' => true,
1418
+ 'name' => true,
1419
+ 'type' => true,
1420
+ 'value' => true,
1421
+ ),
1422
+ 'input' => array(
1423
+ 'alt' => true,
1424
+ 'capture' => true,
1425
+ 'checked' => true,
1426
+ 'disabled' => true,
1427
+ 'list' => true,
1428
+ 'name' => true,
1429
+ 'placeholder' => true,
1430
+ 'readonly' => true,
1431
+ 'type' => true,
1432
+ 'value' => true,
1433
+ ),
1434
+ 'label' => array(
1435
+ 'for' => true,
1436
+ ),
1437
+ 'textarea' => array(
1438
+ 'cols' => true,
1439
+ 'disabled' => true,
1440
+ 'maxlength' => true,
1441
+ 'minlength' => true,
1442
+ 'name' => true,
1443
+ 'placeholder' => true,
1444
+ 'readonly' => true,
1445
+ 'rows' => true,
1446
+ 'spellcheck' => true,
1447
+ 'wrap' => true,
1448
+ ),
1449
+ );
1450
+
1451
+ $allowed = array_map(
1452
+ function ($to_map) {
1453
+ $attr = array(
1454
+ 'aria-checked' => true,
1455
+ 'aria-describedby' => true,
1456
+ 'aria-details' => true,
1457
+ 'aria-disabled' => true,
1458
+ 'aria-hidden' => true,
1459
+ 'aria-invalid' => true,
1460
+ 'aria-label' => true,
1461
+ 'aria-labelledby' => true,
1462
+ 'aria-live' => true,
1463
+ 'aria-relevant' => true,
1464
+ 'aria-required' => true,
1465
+ 'aria-selected' => true,
1466
+ 'class' => true,
1467
+ 'data-*' => true,
1468
+ 'id' => true,
1469
+ 'inputmode' => true,
1470
+ 'role' => true,
1471
+ 'style' => true,
1472
+ 'tabindex' => true,
1473
+ 'title' => true,
1474
+ );
1475
+
1476
+ return array_merge( $attr, (array) $to_map );
1477
+ },
1478
+ $allowed
1479
+ );
1480
+ return $allowed;
1481
+ }
1482
+
1483
  ?><?php
1484
  /* ------------------------------------------------------------------------- *
1485
  * BREAKPOINTS HELPER
1644
  if ( 'not_set' === $collection ) {
1645
  if ( empty( $skope_id ) ) {
1646
  if ( is_array( $_POST ) && !empty( $_POST['location_skope_id'] ) ) {
1647
+ $skope_id = sanitize_text_field($_POST['location_skope_id']);
1648
  } else {
1649
  // When fired during an ajax 'customize_save' action, the skp_get_skope_id() is determined with $_POST['local_skope_id']
1650
  // @see add_filter( 'skp_get_skope_id', '\Nimble\sek_filter_skp_get_skope_id', 10, 2 );
2267
  return sek_get_tmpl_tag_error( $tag = 'the_content', $msg = __('It can only be used in single pages or single posts.', 'nimble-builder') );
2268
  }
2269
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX && skp_is_customizing() ) {
2270
+ $post_id = (int)sek_get_posted_query_param_when_customizing( 'post_id' );
2271
  if ( is_int($post_id) ) {
2272
  $post_object = get_post( $post_id );
2273
  return !empty( $post_object ) ? apply_filters( 'the_content', $post_object->post_content ) : null;
2339
  // when performing ajax action, we need the posted query params made available from the ajax params
2340
  function sek_get_post_id_on_front_and_when_customizing() {
2341
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX && skp_is_customizing() ) {
2342
+ $post_id = (int)sek_get_posted_query_param_when_customizing( 'post_id' );
2343
  } else {
2344
  $post_id = get_the_ID();
2345
  }
2346
  return is_int($post_id) ? $post_id : null;
2347
  }
2348
 
2349
+ // recursively sanitize an array of posted ($_POST) query_params to be used when customzing
2350
+ // @param params (array)
2351
+ function sek_sanitize_query_params_array( $params = array()) {
2352
+ foreach ($params as $prm => $val) {
2353
+ if ( is_array($val) ) {
2354
+ if ( empty($val) ) {
2355
+ $sanitized_query_params[$prm] = [];
2356
+ } else {
2357
+ $sanitized_query_params[$prm] = sek_sanitize_query_params_array($params);
2358
+ }
2359
+ } else {
2360
+ $sanitized_query_params[$prm] = sanitize_text_field($val);
2361
+ }
2362
+ }
2363
+ return $sanitized_query_params;
2364
+ }
2365
+
2366
+
2367
  // introduced in october 2019 for https://github.com/presscustomizr/nimble-builder/issues/401
2368
  // Possible params as of October 2019
2369
  // @see inc/czr-skope/_dev/1_1_0_skop_customizer_preview_load_assets.php::
2373
  if ( isset( $_POST['czr_query_params'] ) ) {
2374
  $query_params = json_decode( wp_unslash( $_POST['czr_query_params'] ), true );
2375
  if ( array_key_exists( $param, $query_params ) ) {
2376
+ if ( !is_array($query_params[$param]) ) {
2377
+ return sanitize_text_field($query_params[$param]);
2378
+ } else {
2379
+ return sek_sanitize_query_params_array($query_params[$param]);
2380
+ }
2381
  } else {
2382
  sek_error_log( __FUNCTION__ . ' => invalid param requested');
2383
  return null;
2563
  if ( empty( $collection ) ) {
2564
  if ( empty( $skope_id ) ) {
2565
  if ( is_array( $_POST ) && !empty( $_POST['location_skope_id'] ) ) {
2566
+ $skope_id = sanitize_text_field($_POST['location_skope_id']);
2567
  } else {
2568
  // When fired during an ajax 'customize_save' action, the skp_get_skope_id() is determined with $_POST['local_skope_id']
2569
  // @see add_filter( 'skp_get_skope_id', '\Nimble\sek_filter_skp_get_skope_id', 10, 2 );
2941
  // $.extend( query, { local_skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ) } );
2942
  // });
2943
  // implemented to fix : https://github.com/presscustomizr/nimble-builder/issues/242
2944
+ if ( 'local' === $level && is_array( $_POST ) && !empty( $_POST['local_skope_id'] ) && 'customize_save' === sanitize_text_field($_POST['action']) ) {
2945
+ $skope_id = sanitize_text_field($_POST['local_skope_id']);
2946
  }
2947
  return $skope_id;
2948
  }
2956
  }
2957
 
2958
 
 
 
 
 
 
 
 
 
 
 
 
 
2959
  /* ------------------------------------------------------------------------- *
2960
  * HELPER FOR CHECKBOX OPTIONS
2961
  /* ------------------------------------------------------------------------- */
3110
  function sek_get_parent_theme_slug() {
3111
  $theme_slug = get_option( 'stylesheet' );
3112
  // $_REQUEST['theme'] is set both in live preview and when we're customizing a non active theme
3113
+ $theme_slug = sanitize_text_field( isset($_REQUEST['theme']) ? $_REQUEST['theme'] : $theme_slug ); //old wp versions
3114
+ $theme_slug = sanitize_text_field( isset($_REQUEST['customize_theme']) ? $_REQUEST['customize_theme'] : $theme_slug );
3115
 
3116
  //gets the theme name (or parent if child)
3117
  $theme_data = wp_get_theme( $theme_slug );
3250
  function sek_clean_transients_like( $transient_string ) {
3251
  global $wpdb;
3252
  $where_like = '%'.$transient_string.'%';
 
 
 
 
 
3253
  $sql = "SELECT `option_name` AS `name`, `option_value` AS `value`
3254
  FROM $wpdb->options
3255
+ WHERE `option_name` LIKE '$where_like'
3256
+ ORDER BY `option_name`";
 
3257
 
3258
  $results = $wpdb->get_results( $sql );
3259
  $transients = array();
3296
  function sek_clean_options_starting_like( $opt_string ) {
3297
  global $wpdb;
3298
  $where_like = '%'.$opt_string.'%';
 
 
 
 
 
3299
  $sql = "SELECT `option_name` AS `name`, `option_value` AS `value`
3300
  FROM $wpdb->options
3301
+ WHERE `option_name` LIKE '$where_like'
3302
  ORDER BY `option_name`";
 
3303
 
3304
  $results = $wpdb->get_results( $sql );
3305
  if ( !is_array( $results ) )
4014
  if ( is_customize_preview() && $wp_customize->changeset_post_id() && !current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() ) ) {
4015
  return;
4016
  }
4017
+ $current_url = ( is_ssl() ? 'https://' : 'http://' ) . sanitize_text_field($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
4018
  if ( is_customize_preview() && $wp_customize->changeset_uuid() ) {
4019
  $current_url = remove_query_arg( 'customize_changeset_uuid', $current_url );
4020
  }
4163
  if ( !array_key_exists('fix_skope_opt_autoload_0321', $bw_fixes_options ) || 'done' != $bw_fixes_options['fix_skope_opt_autoload_0321'] ) {
4164
  // MOVE ALL OPTIONS LIKE nimble___skp__post_page_*****, nimble___skp__tax_product_cat_***** in a new option ( NIMBLE_OPT_SEKTION_POST_INDEX ), not autoloaded
4165
  global $wpdb;
4166
+ $results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE autoload = 'yes' and option_name like 'nimble___skp_%'", ARRAY_A );
 
 
 
 
 
4167
  if ( is_array( $results ) ) {
4168
  foreach( $results as $old_opt_data ) {
4169
  if ( !is_array($old_opt_data) )
4185
  if ( !array_key_exists('move_in_post_index_0321', $bw_fixes_options ) || 'done' != $bw_fixes_options['move_in_post_index_0321'] ) {
4186
  // MOVE ALL OPTIONS LIKE nimble___skp__post_page_*****, nimble___skp__tax_product_cat_***** in a new option ( NIMBLE_OPT_SEKTION_POST_INDEX ), not autoloaded
4187
  global $wpdb;
4188
+ $results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE autoload = 'yes' and option_name like 'nimble___skp_%'", ARRAY_A );
 
 
 
 
 
4189
  if ( is_array( $results ) ) {
4190
  // Populate the new option ( it should not exists at this point )
4191
  $nb_posts_index = get_option(NIMBLE_OPT_SEKTION_POST_INDEX);
inc/sektions/ccat-czr-sektions.php CHANGED
@@ -738,7 +738,7 @@ function add_sektion_values_to_skope_export( $skopes ) {
738
  // June 2020 : added for https://github.com/presscustomizr/nimble-builder/issues/708
739
  // print a script in the head of the customizer
740
  // inject control js script on api "ready" event
741
- add_action( 'customize_controls_print_footer_scripts', '\Nimble\sek_print_nimble_czr_control_js', 100 );
742
  //add_action( 'customize_controls_print_scripts', '\Nimble\sek_print_nimble_czr_control_js', 100 );
743
  function sek_print_nimble_czr_control_js() {
744
  if ( !sek_current_user_can_access_nb_ui() )
@@ -749,8 +749,8 @@ function sek_print_nimble_czr_control_js() {
749
  sek_is_dev_mode() ? 'ccat-sek-control.js' : 'ccat-sek-control.min.js',
750
  NIMBLE_ASSETS_VERSION
751
  );
 
752
  ?>
753
- <script id="nb-schedule-control-js-load">
754
  (function() {
755
  var _loadScript = function() {
756
  wp.customize.bind( 'ready', function() {
@@ -783,8 +783,11 @@ function sek_print_nimble_czr_control_js() {
783
  };
784
  _loadWhenWpCustomizeLoaded();
785
  })();
786
- </script>
787
  <?php
 
 
 
 
788
  };
789
 
790
  add_action( 'customize_controls_print_footer_scripts', '\Nimble\sek_print_nimble_customizer_tmpl' );
@@ -1018,39 +1021,54 @@ function sek_print_nimble_customizer_tmpl() {
1018
  </button>
1019
  </div>
1020
  </script>
1021
-
1022
-
1023
- <?php // Detached WP Editor => added when coding https://github.com/presscustomizr/nimble-builder/issues/403 ?>
1024
- <div id="czr-customize-content_editor-pane">
1025
- <div data-czr-action="close-tinymce-editor" class="czr-close-editor"><i class="fas fa-arrow-circle-down" title="<?php _e( 'Hide Editor', 'nimble-builder' ); ?>"></i>&nbsp;<span><?php _e( 'Hide Editor', 'nimble-builder');?></span></div>
1026
- <div id="czr-customize-content_editor-dragbar" title="<?php _e('Resize the editor', 'nimble-builder'); ?>">
1027
- <span class="screen-reader-text"><?php _e( 'Resize the editor', 'nimble-builder' ); ?></span>
1028
- <i class="czr-resize-handle fas fa-arrows-alt-v"></i>
1029
- </div>
1030
- <!-- <textarea style="height:250px;width:100%" id="czr-customize-content_editor"></textarea> -->
1031
- <?php
1032
- // the textarea id for the detached editor is 'czr-customize-content_editor'
1033
- // this function generates the <textarea> markup
1034
- sek_setup_nimble_editor( '', NIMBLE_DETACHED_TINYMCE_TEXTAREA_ID , array(
1035
- '_content_editor_dfw' => false,
1036
- 'drag_drop_upload' => true,
1037
- 'tabfocus_elements' => 'content-html,save-post',
1038
- 'editor_height' => 235,
1039
- 'default_editor' => 'tinymce',
1040
- 'tinymce' => array(
1041
- 'resize' => false,
1042
- 'wp_autoresize_on' => false,
1043
- 'add_unload_trigger' => false,
1044
- 'wpautop' => true
1045
- ),
1046
- ) );
1047
- ?>
1048
- </div>
1049
  <?php
1050
  }
1051
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1052
 
1053
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1054
 
1055
  // Introduced for https://github.com/presscustomizr/nimble-builder/issues/395
1056
  function sek_has_active_cache_plugin() {
@@ -2148,10 +2166,15 @@ if ( !class_exists( 'SEK_CZR_Dyn_Register' ) ) :
2148
  endif;
2149
 
2150
  ?><?php
2151
- function sek_setup_nimble_editor( $content, $editor_id, $settings = array() ) {
2152
- _NIMBLE_Editors::nimble_editor( $content, $editor_id, $settings );
 
 
2153
  }
2154
 
 
 
 
2155
 
2156
 
2157
 
@@ -2185,6 +2208,8 @@ final class _NIMBLE_Editors {
2185
  private static $tinymce_scripts_printed = false;
2186
  private static $link_dialog_printed = false;
2187
 
 
 
2188
  private function __construct() {}
2189
 
2190
  /**
@@ -2302,16 +2327,32 @@ final class _NIMBLE_Editors {
2302
  }
2303
 
2304
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2305
  * Outputs the HTML for a single instance of the editor.
 
2306
  *
2307
  * @param string $content The initial content of the editor.
2308
  * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
2309
  * @param array $settings See _NIMBLE_Editors::parse_settings() for description.
2310
  */
2311
- public static function nimble_editor( $content, $editor_id, $settings = array() ) {
2312
  $set = self::parse_settings( $editor_id, $settings );
2313
- $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"';
2314
- $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
2315
  $default_editor = 'html';
2316
  $buttons = $autocomplete = '';
2317
  $editor_id_attr = esc_attr( $editor_id );
@@ -2320,12 +2361,6 @@ final class _NIMBLE_Editors {
2320
  self::$drag_drop_upload = true;
2321
  }
2322
 
2323
- if ( !empty( $set['editor_height'] ) ) {
2324
- $height = ' style="height: ' . (int) $set['editor_height'] . 'px"';
2325
- } else {
2326
- $height = ' rows="' . (int) $set['textarea_rows'] . '"';
2327
- }
2328
-
2329
  if ( !current_user_can( 'upload_files' ) ) {
2330
  $set['media_buttons'] = false;
2331
  }
@@ -2356,111 +2391,146 @@ final class _NIMBLE_Editors {
2356
  $wrap_class .= ' has-dfw';
2357
  }
2358
 
2359
- echo esc_html('<div id="wp-' . $editor_id_attr . '-wrap" class="' . $wrap_class . '">');
 
 
 
 
 
 
2360
 
2361
- if ( self::$editor_buttons_css ) {
2362
- wp_print_styles( 'editor-buttons' );
2363
- self::$editor_buttons_css = false;
2364
- }
 
2365
 
2366
- if ( !empty( $set['editor_css'] ) ) {
2367
- echo esc_html($set['editor_css']) . "\n";
2368
- }
2369
 
2370
- if ( !empty( $buttons ) || $set['media_buttons'] ) {
2371
- echo esc_html('<div id="wp-' . $editor_id_attr . '-editor-tools" class="wp-editor-tools hide-if-no-js">');
2372
 
2373
- if ( $set['media_buttons'] ) {
2374
- self::$has_medialib = true;
2375
 
2376
- if ( !function_exists( 'media_buttons' ) ) {
2377
- include( ABSPATH . 'wp-admin/includes/media.php' );
2378
- }
2379
 
2380
- echo esc_html('<div id="wp-' . $editor_id_attr . '-media-buttons" class="wp-media-buttons">');
2381
 
2382
- /**
2383
- * Fires after the default media button(s) are displayed.
2384
- *
2385
- * @since 2.5.0
2386
- *
2387
- * @param string $editor_id Unique editor identifier, e.g. 'content'.
2388
- */
2389
- do_action( 'media_buttons', $editor_id );
2390
- echo esc_html("</div>\n");
 
 
 
 
2391
  }
2392
 
2393
- echo esc_html('<div class="wp-editor-tabs">' . $buttons . "</div>\n");
2394
- echo esc_html("</div>\n");
2395
- }
2396
 
2397
- $quicktags_toolbar = '';
 
 
 
 
 
2398
 
2399
- if ( self::$this_quicktags ) {
2400
- if ( 'content' === $editor_id && !empty( $GLOBALS['current_screen'] ) && $GLOBALS['current_screen']->base === 'post' ) {
2401
- $toolbar_id = 'ed_toolbar';
2402
- } else {
2403
- $toolbar_id = 'qt_' . $editor_id_attr . '_toolbar';
2404
  }
2405
 
2406
- $quicktags_toolbar = '<div id="' . $toolbar_id . '" class="quicktags-toolbar"></div>';
2407
- }
 
 
 
 
 
 
 
 
 
 
 
738
  // June 2020 : added for https://github.com/presscustomizr/nimble-builder/issues/708
739
  // print a script in the head of the customizer
740
  // inject control js script on api "ready" event
741
+ add_action( 'customize_controls_print_scripts', '\Nimble\sek_print_nimble_czr_control_js', 100 );
742
  //add_action( 'customize_controls_print_scripts', '\Nimble\sek_print_nimble_czr_control_js', 100 );
743
  function sek_print_nimble_czr_control_js() {
744
  if ( !sek_current_user_can_access_nb_ui() )
749
  sek_is_dev_mode() ? 'ccat-sek-control.js' : 'ccat-sek-control.min.js',
750
  NIMBLE_ASSETS_VERSION
751
  );
752
+ ob_start();
753
  ?>
 
754
  (function() {
755
  var _loadScript = function() {
756
  wp.customize.bind( 'ready', function() {
783
  };
784
  _loadWhenWpCustomizeLoaded();
785
  })();
 
786
  <?php
787
+ $script = ob_get_clean();
788
+ wp_register_script( 'nb_load_czr_control_js', '');
789
+ wp_enqueue_script( 'nb_load_czr_control_js' );
790
+ wp_add_inline_script( 'nb_load_czr_control_js', $script );
791
  };
792
 
793
  add_action( 'customize_controls_print_footer_scripts', '\Nimble\sek_print_nimble_customizer_tmpl' );
1021
  </button>
1022
  </div>
1023
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1024
  <?php
1025
  }
1026
 
1027
+ // The idea here is to print the markup in customize_controls_print_footer_scripts hook and print the js in customize_controls_print_scripts
1028
+ // printing inline scripts @customize_controls_print_scripts is mandatory to be able to use wp_add_inline_script(). see https://github.com/presscustomizr/nimble-builder/issues/887
1029
+ add_action( 'customize_controls_print_scripts', function() {
1030
+ ?>
1031
+ <?php // Detached WP Editor => added when coding https://github.com/presscustomizr/nimble-builder/issues/403 ?>
1032
+ <?php
1033
+ // the textarea id for the detached editor is 'czr-customize-content_editor'
1034
+ // this function generates the <textarea> markup
1035
+ sek_setup_nimble_editor_js( '', NIMBLE_DETACHED_TINYMCE_TEXTAREA_ID , array(
1036
+ '_content_editor_dfw' => false,
1037
+ 'drag_drop_upload' => true,
1038
+ 'tabfocus_elements' => 'content-html,save-post',
1039
+ 'editor_height' => 235,
1040
+ 'default_editor' => 'tinymce',
1041
+ 'tinymce' => array(
1042
+ 'resize' => false,
1043
+ 'wp_autoresize_on' => false,
1044
+ 'add_unload_trigger' => false,
1045
+ 'wpautop' => true
1046
+ ),
1047
+ ) );
1048
+ });
1049
 
1050
+ // The idea here is to print the markup in customize_controls_print_footer_scripts hook and print the js in customize_controls_print_scripts
1051
+ // printing inline scripts @customize_controls_print_scripts is mandatory to be able to use wp_add_inline_script(). see https://github.com/presscustomizr/nimble-builder/issues/887
1052
+ add_action( 'customize_controls_print_footer_scripts', function() {
1053
+ ?>
1054
+ <?php // Detached WP Editor => added when coding https://github.com/presscustomizr/nimble-builder/issues/403 ?>
1055
+ <?php
1056
+ // the textarea id for the detached editor is 'czr-customize-content_editor'
1057
+ // this function generates the <textarea> markup
1058
+ sek_setup_nimble_editor_html( '', NIMBLE_DETACHED_TINYMCE_TEXTAREA_ID , array(
1059
+ '_content_editor_dfw' => false,
1060
+ 'drag_drop_upload' => true,
1061
+ 'tabfocus_elements' => 'content-html,save-post',
1062
+ 'editor_height' => 235,
1063
+ 'default_editor' => 'tinymce',
1064
+ 'tinymce' => array(
1065
+ 'resize' => false,
1066
+ 'wp_autoresize_on' => false,
1067
+ 'add_unload_trigger' => false,
1068
+ 'wpautop' => true
1069
+ ),
1070
+ ) );
1071
+ }, PHP_INT_MAX);
1072
 
1073
  // Introduced for https://github.com/presscustomizr/nimble-builder/issues/395
1074
  function sek_has_active_cache_plugin() {
2166
  endif;
2167
 
2168
  ?><?php
2169
+ // The idea here is to print the markup in customize_controls_print_footer_scripts hook and print the js in customize_controls_print_scripts
2170
+ // printing inline scripts @customize_controls_print_scripts is mandatory to be able to use wp_add_inline_script(). see https://github.com/presscustomizr/nimble-builder/issues/887
2171
+ function sek_setup_nimble_editor_js( $content, $editor_id, $settings = array() ) {
2172
+ _NIMBLE_Editors::nimble_editor_js( $content, $editor_id, $settings );
2173
  }
2174
 
2175
+ function sek_setup_nimble_editor_html( $content, $editor_id, $settings = array() ) {
2176
+ _NIMBLE_Editors::render_nimble_editor( $content, $editor_id, $settings );
2177
+ }
2178
 
2179
 
2180
 
2208
  private static $tinymce_scripts_printed = false;
2209
  private static $link_dialog_printed = false;
2210
 
2211
+ private static $editor_markup;// <= used to cache the editor markup and render it afterwards @customize_controls_print_footer_scripts
2212
+
2213
  private function __construct() {}
2214
 
2215
  /**
2327
  }
2328
 
2329
  /**
2330
+ * Outputs the JS for a single instance of the editor.
2331
+ *
2332
+ * @param string $content The initial content of the editor.
2333
+ * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
2334
+ * @param array $settings See _NIMBLE_Editors::parse_settings() for description.
2335
+ */
2336
+ public static function nimble_editor_js( $content, $editor_id, $settings = array() ) {
2337
+ $set = self::parse_settings( $editor_id, $settings );
2338
+
2339
+ if ( !current_user_can( 'upload_files' ) ) {
2340
+ $set['media_buttons'] = false;
2341
+ }
2342
+ self::editor_settings( $editor_id, $set );
2343
+ }
2344
+
2345
+
2346
+ /**
2347
  * Outputs the HTML for a single instance of the editor.
2348
+ *
2349
  *
2350
  * @param string $content The initial content of the editor.
2351
  * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
2352
  * @param array $settings See _NIMBLE_Editors::parse_settings() for description.
2353
  */
2354
+ public static function render_nimble_editor( $content, $editor_id, $settings = array() ) {
2355
  $set = self::parse_settings( $editor_id, $settings );
 
 
2356
  $default_editor = 'html';
2357
  $buttons = $autocomplete = '';
2358
  $editor_id_attr = esc_attr( $editor_id );
2361
  self::$drag_drop_upload = true;
2362
  }
2363
 
 
 
 
 
 
 
2364
  if ( !current_user_can( 'upload_files' ) ) {
2365
  $set['media_buttons'] = false;
2366
  }
2391
  $wrap_class .= ' has-dfw';
2392
  }
2393
 
2394
+ // Detached WP Editor => added when coding https://github.com/presscustomizr/nimble-builder/issues/403
2395
+ echo '<div id="czr-customize-content_editor-pane">';
2396
+ printf('<div data-czr-action="close-tinymce-editor" class="czr-close-editor"><i class="fas fa-arrow-circle-down" title="%1$s"></i>&nbsp;<span>%2$s</span></div>', __( 'Hide Editor', 'nimble-builder' ), __( 'Hide Editor', 'nimble-builder'));
2397
+ printf('<div id="czr-customize-content_editor-dragbar" title="%1$s">', __('Resize the editor', 'nimble-builder'));
2398
+ printf('<span class="screen-reader-text">%1$s</span>', __( 'Resize the editor', 'nimble-builder' ));
2399
+ echo '<i class="czr-resize-handle fas fa-arrows-alt-v"></i>';
2400
+ echo '</div>';
2401
 
2402
+ echo '<div id="wp-' . esc_attr($editor_id_attr) . '-wrap" class="' . esc_attr($wrap_class) . '">';
2403
+ if ( self::$editor_buttons_css ) {
2404
+ wp_print_styles( 'editor-buttons' );
2405
+ self::$editor_buttons_css = false;
2406
+ }
2407
 
2408
+ if ( !empty( $set['editor_css'] ) ) {
2409
+ echo wp_kses_post($set['editor_css']) . "\n";
2410
+ }
2411
 
2412
+ if ( !empty( $buttons ) || $set['media_buttons'] ) {
2413
+ echo '<div id="wp-' . esc_attr($editor_id_attr) . '-editor-tools" class="wp-editor-tools hide-if-no-js">';
2414
 
2415
+ if ( $set['media_buttons'] ) {
2416
+ self::$has_medialib = true;
2417
 
2418
+ if ( !function_exists( 'media_buttons' ) ) {
2419
+ include( ABSPATH . 'wp-admin/includes/media.php' );
2420
+ }
2421
 
2422
+ echo '<div id="wp-' . esc_attr($editor_id_attr) . '-media-buttons" class="wp-media-buttons">';
2423
 
2424
+ /**
2425
+ * Fires after the default media button(s) are displayed.
2426
+ *
2427
+ * @since 2.5.0
2428
+ *
2429
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
2430
+ */
2431
+ do_action( 'media_buttons', $editor_id );
2432
+ echo "</div>\n";
2433
+ }
2434
+
2435
+ echo '<div class="wp-editor-tabs">' . wp_kses_post($buttons) . "</div>\n";
2436
+ echo "</div>\n";
2437
  }
2438
 
2439
+ $quicktags_toolbar = '';
 
 
2440
 
2441
+ if ( self::$this_quicktags ) {
2442
+ if ( 'content' === $editor_id && !empty( $GLOBALS['current_screen'] ) && $GLOBALS['current_screen']->base === 'post' ) {
2443
+ $toolbar_id = 'ed_toolbar';
2444
+ } else {
2445
+ $toolbar_id = 'qt_' . esc_attr($editor_id_attr) . '_toolbar';
2446
+ }
2447
 
2448
+ $quicktags_toolbar = '<div id="' . esc_attr($toolbar_id) . '" class="quicktags-toolbar"></div>';
 
 
 
 
2449
  }
2450
 
2451
+ /**
2452
+ * Filters the HTML markup output that displays the editor.
2453
+ *
2454
+ * @since 2.1.0
2455
+ *
2456
+ * @param string $output Editor's HTML markup.
2457
+ */
2458
+ $the_editor = apply_filters(
2459
+ 'the_nimble_editor',
2460
+ '<div id="wp-' . esc_attr($editor_id_attr) . '-editor-container" class="wp-editor-container">' .
2461
+ $quicktags_toolbar .
2462
+ sprintf('<textarea' . ' class="%1$s" %2$s %3$s %4$s cols="40" name="%5$s" ' .
2463
+