Nimble Page Builder - Version 1.9.0

Version Description

Fixed a php error in the form module, occuring when the form only has the email field. Fixed a possible error at checkout when using credit card payment in WooCommerce. Added text options, like font size, color, font family, to sections. Added a set of text options to the HTML module. Nimble Builder api has been improved for developers, allowing them to add module from a theme or a plugin, and allowing custom template tags like {template_tag}.

=

Download this release

Release Info

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

Code changes from version 1.8.20 to 1.9.0

assets/admin/css/nimble-admin.css CHANGED
@@ -300,15 +300,48 @@ body .block-editor .sek-nimble-mobile-admin-bar-title { display: none; }
300
  body .block-editor .sek-nimble-admin-bar-title{ display: none;}
301
  body .block-editor .sek-nimble-mobile-admin-bar-title{ display: inline-block;}
302
  }
 
303
  /* Classic editor style */
304
  #sek-edit-with-nimble .sek-nimble-icon img {
305
- width: 28px;
306
- position: relative;
307
- top: 8px;
308
- /*left: 8px;*/
309
  }
310
  #sek-edit-with-nimble.classic-ed {
 
 
 
 
311
  position: relative;
312
  padding: 0 15px!important;
313
  margin: 10px 0!important;
314
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  body .block-editor .sek-nimble-admin-bar-title{ display: none;}
301
  body .block-editor .sek-nimble-mobile-admin-bar-title{ display: inline-block;}
302
  }
303
+
304
  /* Classic editor style */
305
  #sek-edit-with-nimble .sek-nimble-icon img {
306
+ width: 24px;
307
+ top: 3px;
308
+ left: 8px;
309
+ position: absolute;
310
  }
311
  #sek-edit-with-nimble.classic-ed {
312
+ margin: 2px;
313
+ height: 33px;
314
+ font-size: 13px;
315
+ line-height: 1;
316
  position: relative;
317
  padding: 0 15px!important;
318
  margin: 10px 0!important;
319
  }
320
+ #sek-edit-with-nimble.classic-ed .sek-nimble-mobile-admin-bar-title, #sek-edit-with-nimble.classic-ed .sek-nimble-admin-bar-title {
321
+ padding-left: 22px;
322
+ }
323
+
324
+ /* loading icon introduced for https://github.com/presscustomizr/nimble-builder/issues/509 */
325
+ #sek-edit-with-nimble .sek-spinner {
326
+ transition: .18s margin ease-in-out;
327
+ display: none;
328
+ }
329
+ #sek-edit-with-nimble .sek-spinner {
330
+ background: url(../img/spinner.gif) no-repeat;
331
+ background-size: 20px 20px;
332
+ position: absolute;
333
+ left: 10px;
334
+ top: 6px;
335
+ width: 20px;
336
+ height: 20px;
337
+ }
338
+ #sek-edit-with-nimble.sek-loading-customizer .sek-spinner {
339
+ display: block;
340
+ /* display: inline-block;*/
341
+ }
342
+ #sek-edit-with-nimble.sek-loading-customizer .sek-nimble-icon img {
343
+ display: none;
344
+ }
345
+ #sek-edit-with-nimble.sek-loading-customizer {
346
+ background: #30a5d4!important;
347
+ }
assets/admin/img/spinner-2x.gif ADDED
Binary file
assets/admin/img/spinner.gif ADDED
Binary file
assets/admin/js/nimble-gutenberg.js CHANGED
@@ -29,7 +29,8 @@
29
  // When creating a new post, the customizer url is generated with an ajax call
30
  $('body').on( 'click', '#sek-edit-with-nimble', function(evt) {
31
  evt.preventDefault();
32
- var _url = $(this).data('cust-url'),
 
33
  attempts = 0,
34
  _openCustomizer = function( customizer_url ) {
35
  // We don't want to enter in an infinite loop, that's why the number of attempts is limited to 5 if isSavingPost()
@@ -41,9 +42,13 @@
41
  } else {
42
  location.href = customizer_url;
43
  }
 
44
  };
45
 
46
  if ( _.isEmpty( _url ) ) {
 
 
 
47
  // for new post, the url is empty, let's generate it server side with an ajax call
48
  var post_id = wp.data.select('core/editor').getCurrentPostId();
49
  wp.ajax.post( 'sek_get_customize_url_for_nimble_edit_button', {
@@ -51,6 +56,8 @@
51
  }).done( function( resp ) {
52
  _openCustomizer( resp );
53
  }).fail( function( resp ) {
 
 
54
  // If the ajax request fails, let's save the draft with a Nimble Builder title, and refresh the page, so the url is generated server side on next load.
55
  var post_title = wp.data.select('core/editor').getEditedPostAttribute('title');
56
  if ( !post_title ) {
29
  // When creating a new post, the customizer url is generated with an ajax call
30
  $('body').on( 'click', '#sek-edit-with-nimble', function(evt) {
31
  evt.preventDefault();
32
+ var $clickedEl = $(this),
33
+ _url = $clickedEl.data('cust-url'),
34
  attempts = 0,
35
  _openCustomizer = function( customizer_url ) {
36
  // We don't want to enter in an infinite loop, that's why the number of attempts is limited to 5 if isSavingPost()
42
  } else {
43
  location.href = customizer_url;
44
  }
45
+ //$clickedEl.removeClass('sek-loading-customizer');
46
  };
47
 
48
  if ( _.isEmpty( _url ) ) {
49
+ // introduced for https://github.com/presscustomizr/nimble-builder/issues/509
50
+ $clickedEl.addClass('sek-loading-customizer');
51
+
52
  // for new post, the url is empty, let's generate it server side with an ajax call
53
  var post_id = wp.data.select('core/editor').getCurrentPostId();
54
  wp.ajax.post( 'sek_get_customize_url_for_nimble_edit_button', {
56
  }).done( function( resp ) {
57
  _openCustomizer( resp );
58
  }).fail( function( resp ) {
59
+ $clickedEl.removeClass('sek-loading-customizer');
60
+
61
  // If the ajax request fails, let's save the draft with a Nimble Builder title, and refresh the page, so the url is generated server side on next load.
62
  var post_title = wp.data.select('core/editor').getEditedPostAttribute('title');
63
  if ( !post_title ) {
assets/czr/sek/js/ccat-sek-control.js CHANGED
@@ -4453,7 +4453,24 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4453
  controlLabel : sektionsLocalizedData.i18n['Background settings for the'] + ' ' + sektionsLocalizedData.i18n[params.level],
4454
  expandAndFocusOnInit : true,
4455
  icon : '<i class="material-icons sek-level-option-icon">gradient</i>'//'<i class="material-icons sek-level-option-icon">brush</i>'
4456
- },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4457
  border : {
4458
  settingControlId : params.id + '__border_options',
4459
  module_type : 'sek_level_border_module',
@@ -7779,6 +7796,19 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7779
  api.errare( 'maybeSetupDeviceSwitcherForInput => error when setting the previewed device', er );
7780
  }
7781
  input.previewedDevice( device );
 
 
 
 
 
 
 
 
 
 
 
 
 
7782
  };
7783
  // react on device click
7784
  input.container.on( 'click', '[data-sek-device]', syncWithPreviewedDevice );
@@ -13050,6 +13080,29 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
13050
  });
13051
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
13052
  //extends api.CZRDynModule
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13053
  ( function ( api, $, _ ) {
13054
  var Constructor = {
13055
  initialize: function( id, options ) {
@@ -16432,97 +16485,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
16432
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
16433
  //extends api.CZRDynModule
16434
  ( function ( api, $, _ ) {
16435
- //BUTTON MODULE
16436
- var Constructor = {
16437
- initialize: function( id, options ) {
16438
- var module = this;
16439
-
16440
- //EXTEND THE DEFAULT CONSTRUCTORS FOR MONOMODEL
16441
- module.itemConstructor = api.CZRItem.extend( module.CZRItemConstructor || {} );
16442
-
16443
- // run the parent initialize
16444
- // Note : must be always invoked always after the input / item class extension
16445
- // Otherwise the constructor might be extended too early and not taken into account. @see https://github.com/presscustomizr/nimble-builder/issues/37
16446
- api.CZRDynModule.prototype.initialize.call( module, id, options );
16447
-
16448
- },//initialize
16449
-
16450
- //////////////////////////////////////////////////////////
16451
- /// ITEM CONSTRUCTOR
16452
- //////////////////////////////////////////
16453
- CZRItemConstructor : {
16454
- //overrides the parent ready
16455
- ready : function() {
16456
- var item = this;
16457
- //wait for the input collection to be populated,
16458
- //and then set the input visibility dependencies
16459
- item.inputCollection.bind( function( col ) {
16460
- if( _.isEmpty( col ) )
16461
- return;
16462
- try { item.setInputVisibilityDeps(); } catch( er ) {
16463
- api.errorLog( 'item.setInputVisibilityDeps() : ' + er );
16464
- }
16465
- });//item.inputCollection.bind()
16466
-
16467
- //fire the parent
16468
- api.CZRItem.prototype.ready.call( item );
16469
- },
16470
-
16471
- //Fired when the input collection is populated
16472
- //At this point, the inputs are all ready (input.isReady.state() === 'resolved') and we can use their visible Value ( set to true by default )
16473
- setInputVisibilityDeps : function() {
16474
- var item = this,
16475
- module = item.module;
16476
-
16477
- //Internal item dependencies
16478
- item.czr_Input.each( function( input ) {
16479
- switch( input.id ) {
16480
- case 'use_custom_bg_color_on_hover' :
16481
- _.each( [ 'bg_color_hover' ] , function( _inputId_ ) {
16482
- try { api.czr_sektions.scheduleVisibilityOfInputId.call( input, _inputId_, function() {
16483
- return input();
16484
- }); } catch( er ) {
16485
- api.errare( 'Button module => error in setInputVisibilityDeps', er );
16486
- }
16487
- });
16488
- break;
16489
- case 'use_box_shadow' :
16490
- _.each( [ 'push_effect' ] , function( _inputId_ ) {
16491
- try { api.czr_sektions.scheduleVisibilityOfInputId.call( input, _inputId_, function() {
16492
- return input();
16493
- }); } catch( er ) {
16494
- api.errare( 'Button module => error in setInputVisibilityDeps', er );
16495
- }
16496
- });
16497
- break;
16498
- case 'link-to' :
16499
- _.each( [ 'link-pick-url', 'link-custom-url', 'link-target' ] , function( _inputId_ ) {
16500
- try { api.czr_sektions.scheduleVisibilityOfInputId.call( input, _inputId_, function() {
16501
- var bool = false;
16502
- switch( _inputId_ ) {
16503
- case 'link-custom-url' :
16504
- bool = 'url' == input() && '_custom_' == item.czr_Input('link-pick-url')().id;
16505
- break;
16506
- default :
16507
- bool = 'url' == input();
16508
- break;
16509
- }
16510
- return bool;
16511
- }); } catch( er ) {
16512
- api.errare( 'Button module => error in setInputVisibilityDeps', er );
16513
- }
16514
- });
16515
- break;
16516
- case 'link-pick-url' :
16517
- api.czr_sektions.scheduleVisibilityOfInputId.call( input, 'link-custom-url', function() {
16518
- return '_custom_' == input().id && 'url' == item.czr_Input('link-to')();
16519
- });
16520
- break;
16521
- }
16522
- });
16523
- }
16524
- }
16525
- };
16526
  //provides a description of each module
16527
  //=> will determine :
16528
  //1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
@@ -16534,7 +16496,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
16534
  api.czrModuleMap = api.czrModuleMap || {};
16535
  $.extend( api.czrModuleMap, {
16536
  czr_font_child : {
16537
- mthds : Constructor,
16538
  crud : false,
16539
  name : api.czr_sektions.getRegisteredModuleProperty( 'czr_font_child', 'name' ),
16540
  has_mod_opt : false,
4453
  controlLabel : sektionsLocalizedData.i18n['Background settings for the'] + ' ' + sektionsLocalizedData.i18n[params.level],
4454
  expandAndFocusOnInit : true,
4455
  icon : '<i class="material-icons sek-level-option-icon">gradient</i>'//'<i class="material-icons sek-level-option-icon">brush</i>'
4456
+ }
4457
+ });
4458
+
4459
+ // implemented for https://github.com/presscustomizr/nimble-builder/issues/504
4460
+ if ( 'section' === params.level ) {
4461
+ $.extend( modulesRegistrationParams, {
4462
+ level_text : {
4463
+ settingControlId : params.id + '__text_options',
4464
+ module_type : 'sek_level_text_module',
4465
+ controlLabel : sektionsLocalizedData.i18n['Text settings for the'] + ' ' + sektionsLocalizedData.i18n[params.level],
4466
+ expandAndFocusOnInit : true,
4467
+ icon : '<i class="material-icons sek-level-option-icon">text_format</i>'//'<i class="material-icons sek-level-option-icon">brush</i>'
4468
+ }
4469
+ });
4470
+ }
4471
+
4472
+
4473
+ $.extend( modulesRegistrationParams, {
4474
  border : {
4475
  settingControlId : params.id + '__border_options',
4476
  module_type : 'sek_level_border_module',
7796
  api.errare( 'maybeSetupDeviceSwitcherForInput => error when setting the previewed device', er );
7797
  }
7798
  input.previewedDevice( device );
7799
+ var sectionIdToBeFocusedOn;
7800
+
7801
+ // focus on the parent section
7802
+ // only when really clicked (not triggered)
7803
+ // fixes https://github.com/presscustomizr/nimble-builder/issues/512
7804
+ if ( _.isUndefined( evt.isTrigger ) && input.module && input.module.control && input.module.control.params.section ) {
7805
+ sectionIdToBeFocusedOn = input.module.control.params.section;
7806
+ _.delay( function() {
7807
+ api.previewer.send('sek-animate-to-level', { id : sectionIdToBeFocusedOn });
7808
+ }, 300 );
7809
+ }
7810
+
7811
+
7812
  };
7813
  // react on device click
7814
  input.container.on( 'click', '[data-sek-device]', syncWithPreviewedDevice );
13080
  });
13081
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
13082
  //extends api.CZRDynModule
13083
+ ( function ( api, $, _ ) {
13084
+ //provides a description of each module
13085
+ //=> will determine :
13086
+ //1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
13087
+ //2) which js template(s) to use : if crud, the module template shall include the add new and pre-item elements.
13088
+ // , if crud, the item shall be removable
13089
+ //3) how to render : if multi item, the item content is rendered when user click on edit button.
13090
+ // If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
13091
+ //4) some DOM behaviour. For example, a multi item shall be sortable.
13092
+ api.czrModuleMap = api.czrModuleMap || {};
13093
+ $.extend( api.czrModuleMap, {
13094
+ sek_level_text_module : {
13095
+ //mthds : Constructor,
13096
+ crud : false,
13097
+ name : api.czr_sektions.getRegisteredModuleProperty( 'sek_level_text_module', 'name' ),
13098
+ has_mod_opt : false,
13099
+ ready_on_section_expanded : false,
13100
+ ready_on_control_event : 'sek-accordion-expanded',// triggered in ::scheduleModuleAccordion()
13101
+ defaultItemModel : api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( 'sek_level_text_module' )
13102
+ }
13103
+ });
13104
+ })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
13105
+ //extends api.CZRDynModule
13106
  ( function ( api, $, _ ) {
13107
  var Constructor = {
13108
  initialize: function( id, options ) {
16485
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
16486
  //extends api.CZRDynModule
16487
  ( function ( api, $, _ ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16488
  //provides a description of each module
16489
  //=> will determine :
16490
  //1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
16496
  api.czrModuleMap = api.czrModuleMap || {};
16497
  $.extend( api.czrModuleMap, {
16498
  czr_font_child : {
16499
+ //mthds : Constructor,
16500
  crud : false,
16501
  name : api.czr_sektions.getRegisteredModuleProperty( 'czr_font_child', 'name' ),
16502
  has_mod_opt : false,
assets/czr/sek/js/ccat-sek-control.min.js CHANGED
@@ -1 +1 @@
1
- !function(p,m){p.CZR_Helpers.getInputSubTemplate=function(e){return 0<m("#tmpl-nimble-subtemplate___"+e).length?wp.template("nimble-subtemplate___"+e):(p.errare("problem in api.czr_sektions.getInputSubTemplate(), missing js template in the DOM for template_name : "+e),null)};var f=p.CZR_Helpers.getModuleTmpl;p.CZR_Helpers.getModuleTmpl=function(n){if(-1===(n=_.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:p.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"),!p.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=p.czr_sektions.getRegisteredModuleProperty(n.module_type,"tmpl"),t=_.isObject(e)&&e[n.tmpl]?e[n.tmpl]:{};!_.isEmpty(t)&&_.isObject(t)||(p.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,{},p.czr_sektions.getDefaultItemModelFromRegisteredModuleData(n.module_type)),s=m.extend(!0,{},i);r=m.extend(s,r),_.isEmpty(r)&&(p.errare("getModuleTmpl => Error invalid item model for module : ",n.module_type),o.reject("getModuleTmpl => Error invalid item model for module : ",n.module_type));var a,c="",l=function(e){var i="";return _.each(e,function(e,t){a=e.input_type;try{i+=wp.template("nimble-input-wrapper")({input_type:a,input_data:e,input_id:t,item_model:r,input_tmpl:function(e){var t=e;switch(e){case"czr_layouts":case"select":case"simpleselect":case"fa_icon_picker":case"font_picker":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"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):(p.errare("problem in getInputTemplate(), missing js template in the DOM for input_type : "+e),null)}(a),control_id:n.control_id})}catch(e){return p.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="",u="";_.each(t.tabs,function(e,t){var i=m.extend(!0,{},e);i=m.extend({inputs:{},title:""},i);var n=_.isEmpty(i.attributes)?"":i.attributes;d+='<li data-tab-id="section-topline-'+(+t+1)+'" '+n+'><a href="#" title="'+i.title+'"><span>'+i.title+"</span></a></li>";var o=l(i.inputs);u+='<section id="section-topline-'+(+t+1)+'">'+o+"</section>"}),c+=['<div class="tabs tabs-style-topline">',"<nav>","<ul>",d,"</ul>","</nav>",'<div class="content-wrap">',u,"</div>","</div>"].join("")}else c=l(t);return o.resolve(c).promise()}}(wp.customize,jQuery);var CZRSeksPrototype=CZRSeksPrototype||{};!function(n,r){r.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(n.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 n.Value({}),e.registered=new n.Value([]),n.bind("ready",function(){e.doSektionThinksOnApiReady()}),n.bind("save-request-params",function(e){r.extend(e,{local_skope_id:n.czr_skopeBase.getSkopeProperty("skope_id")})});var t=function(){_.isArray(n.czrActiveWPEditors)&&(_.each(n.czrActiveWPEditors,function(e){wp.editor.remove(e)}),n.czrActiveWPEditors=[])};n.bind("sek-before-clean-registered",t),n.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){n.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),n.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),n.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"})}))})}),n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),n.trigger("nimble-ready-for-current-skope")};_.isEmpty(n.czr_activeSkopes().local)||i(),n.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){n.previewedDevice("desktop")}),n.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){n.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){r(this).trigger("click")})})})}),r("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){n.previewer.trigger("sek-reset-collection",{scope:"local"})}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&n.control(e.id,function(e){e.container.find("[draggable]").each(function(){r(this).off("dragstart dragend")})}),"control"==e.what&&n.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(r(this).data("czrSelect2"))||r(this).czrSelect2("destroy")})})}),n.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=r.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 n.Value([]),n.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[])}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI(),o.lastClickedTargetInPreview=new n.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?n.previewer.send("sek-set-double-click-target",e):n.previewer.send("sek-reset-double-click-target"),clearTimeout(r(window).data("_preview_target_timer_")),r(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),n.previewer.send("sek-reset-double-click-target")},2e4))}),n.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),r(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){n.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),n.previewer.bind("multi-items-module-refreshed",function(t){_.isUndefined(t.apiParams.control_id)||n.control(t.apiParams.control_id,function(e){_.isUndefined(e.params.sek_registration_params)||n.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")})})})})},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=n.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});n.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}sektionsLocalizedData.eligibleForFeedbackNotification&&n.expanded.bind(function(e){e&&_.isUndefined(o.feedbackUIVisible)&&o.setupFeedBackUI()})})}),n.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"postMessage",type:"option"}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=n.czr_initialSkopeCollectionPopulated.state()?n.czr_initialSkopeCollectionPopulated.done(function(){n.previewer.trigger("sek-pick-content",{focus:!1})}):n.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&n.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&n.previewer.trigger("sek-pick-content"),sektionsData=n.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&n.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(s(window).data("_scroll_move_timer_")),s(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};s(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){s(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){s("body").addClass("nimble-top-bar-visible")},200)}):(t=s.Deferred(),s("body").removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){var t,i=this;if(0<s(i.topBarId).length)return s(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}s("#customize-preview").after(s(t)),s(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),s(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),s("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(s(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),s(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(s(this).data("doc-href"),"_blank")});var n=function(e){s(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?s(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):s(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),s(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new l.Value([{status:"current",value:{local:l(this.localSectionsSettingId())(),global:l(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw l.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],s=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(s,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){_.isEmpty(r.local)||(l(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),l.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(s,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(s,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<c&&(t===c-1?newLog.status="current":t===c&&(newLog.status="future"));break;case"redo":s.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(z("body").toggleClass("sek-level-tree-expanded",e),e){if(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)})})}),z("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)}),z("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()}),z("body").on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),s=this.localSectionsSettingId(),a=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,s,a],function(e){b.has(e)||(c=e)}),!1===c){e=b(r)(),i=_.isObject(e)?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 l,d=_.union(i,n),u=!1,p=!1;o=b(a)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(u="nimble_local"===(l=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!u&&"theme"!==l&&(p="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===l);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)};u?h("local"):p&&h("global");var k,y=this.activeLocations(),v=[];_.isEmpty(y)?v=g:_.each(y,function(e){k=_.findWhere(g,{id:e}),_.isUndefined(k)||v.push(k)}),this.levelTree(v)}else 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={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i={svg:e.icon?sektionsLocalizedData.moduleIconPath+e.icon:"",font:e.font_icon?e.font_icon:""})}),_.isEmpty(i.svg)?_.isEmpty(i.font)?void 0:i.font:'<img class="sek-svg-mod-icon" src="'+i.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(a,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new a.Value(!1),n.saveUIVisible.bind(function(e,t,i){n.toggleSaveUI(e,i?i.id:null)})},toggleSaveUI:function(e,t){e=!!_.isUndefined(e)||e;var i,n=this;e?c.when(n.renderAndSetupSaveUITmpl({})).done(function(e){n.saveUIContainer=e,_.delay(function(){c("body").addClass("nimble-save-ui-visible")},200),c("#sek-saved-section-id").val(t)}):(i=c.Deferred(),c("body").removeClass("nimble-save-ui-visible"),0<c("#nimble-top-save-ui").length?_.delay(function(){n.saveUIContainer.remove(),i.resolve()},300):i.resolve(),i.promise()).done(function(){n.saveUIVisible(!1)})},preProcessSektion:function(e){var t=this.cleanIds(e);return _.omit(t,function(e,t){return _.contains(["id","level"],t)})},renderAndSetupSaveUITmpl:function(e){if(0<c("#nimble-top-save-ui").length)return c("#nimble-top-save-ui");var s=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return a.errare("Error when parsing the the top note template",e),!1}return c("#customize-preview").after(c(_tmpl)),c(".sek-do-save-section","#nimble-top-save-ui").on("click",function(e){e.preventDefault();var t=c.extend(!0,{},s.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=s.guid(),r=s.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")});c("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_section",{nonce:a.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){a.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n Your section has been saved.</strong>","</span>"].join("")})}).fail(function(e){a.errorLog("ajax sek_save_section => error",e),a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")})})}),c(".sek-cancel-save","#nimble-top-save-ui").on("click",function(e){e.preventDefault(),s.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupFeedBackUI:function(){var t=this;t.feedbackLastUserAction="none",t.feedbackUIId="#nimble-feedback",t.feedbackUIVisible=new r.Value(!1),t.feedbackUIVisible.bind(function(e){t.levelTreeExpanded()||t.toggleFeddBackUI(e),e&&t.refreshSelfClosingTimer()}),t.feedbackUIVisible(!0)},refreshSelfClosingTimer:function(){var e=this;clearTimeout(s(e.feedbackUIId).data("_feedback_user_action_timer_")),s(e.feedbackUIId).data("_feedback_user_action_timer_",setTimeout(function(){_.contains(["go_review","reporting_problem"],e.feedbackLastUserAction)||e.feedbackUIVisible(!1)},6e4))},toggleFeddBackUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupFeedbackTmpl({})).done(function(e){_.delay(function(){s("body").addClass("nimble-feedback-ui-visible")},200)}):(t=s.Deferred(),s("body").removeClass("nimble-feedback-ui-visible"),0<s(i.feedbackUIId).length?_.delay(function(){s(i.feedbackUIId).remove(),t.resolve()},300):t.resolve(),t.promise()).done(function(){i.feedbackUIVisible(!1)})},renderAndSetupFeedbackTmpl:function(e){var t,i=this;if(0<s(i.feedbackUIId).length)return s(i.feedbackUIId);try{t=wp.template("nimble-feedback-ui")({})}catch(e){return r.errare("Error when parsing the the feedback template",e),!1}if(s("#customize-preview").after(s(t)),!i.feedbackEventsScheduled){var n=s(i.feedbackUIId).data("sek-dismiss-pointer"),o=function(){wp.ajax.post("dismiss-wp-pointer",{pointer:n}).fail(function(e){r.errare("ajax dismiss failure",e)})};return s("body").on("click","[data-sek-feedback-action]",function(e){e.preventDefault(),i.refreshSelfClosingTimer();var t=s(this).data("sek-feedback-action");switch(i.feedbackLastUserAction=t){case"not_enjoying":s(i.feedbackUIId).find(".sek-feedback-step-one").hide(),s(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").show();break;case"enjoying":s(i.feedbackUIId).find(".sek-feedback-step-one").hide(),s(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").show();break;case"reporting_problem":window.open(s(this).data("problem-href"),"_blank");break;case"go_review":window.open("https://wordpress.org/support/plugin/nimble-builder/reviews/?filter=5/#new-post","_blank");break;case"maybe_later":i.feedbackUIVisible(!1),wp.ajax.post("sek_postpone_feedback",{nonce:r.settings.nonce.save,transient_duration_in_days:30}).fail(function(e){r.errare("ajax dismiss failure",e)});break;case"already_did":s(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").hide(),s(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").hide(),s(i.feedbackUIId).find(".sek-feedback-step-three-thanks").show(),_.delay(function(){i.feedbackUIVisible(!1)},3e3),o();break;case"dismiss":i.feedbackUIVisible(!1),o();break;default:r.errare("::renderAndSetupFeedbackTmpl => invalid action")}}),i.feedbackEventsScheduled=!0,s(i.feedbackUIId)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=c.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return c.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],s=function(e){c.errare(e,i),sektionsLocalizedData.isDevMode&&c.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),r=!0},a=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=l.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void s("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void s('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void s("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void s("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,a(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void s("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void s("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void s("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void s('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void s("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void s("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&c.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void s("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void s("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void s("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void s("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void s("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=l.extend(!0,{},t),_.isUndefined(e)?s("validation error => undefined level "):a(e)})}};return a(),r?null:i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);return l.extend(!0,{},this.getDefaultSektionSettingValue(e))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-content",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(a=!0,s={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;default:c.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-move-section-up":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-up",moved_level_id:e.apiParams.id})}},"sek-move-section-down":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id})}},"sek-duplicate":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),t=e.apiParams.location,c.previewer.send("sek-animate-to-level",{id:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_sektion;break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_column}c.previewer.trigger("sek-refresh-stylesheet",{id:t,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid();break;case"preset_section":c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),c.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId});break;case"preset_section":c.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id")),c.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&c.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return a=!1,s={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},c.czr_sektions.currentContentPickerType=c.czr_sektions.currentContentPickerType||new c.Value,c.czr_sektions.currentContentPickerType(e.content_type||"module"),_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),a=!0,r={},s={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s))},"sek-edit-module":function(e){return a=!0,r={},s={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s)},"sek-notify":function(t){a=!1;var i=t.notif_id||"sek-notify";return o.lastNimbleNotificationId&&c.notifications.remove(o.lastNimbleNotificationId),n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),o.lastNimbleNotificationId=i,_.delay(function(){c.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id,original_action:t.original_action,moved_level_id:t.moved_level_id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return a=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-reset-collection":{callback:function(e){return a=!1,s={},(r=e).action="sek-reset-collection",r.scope=e.scope,o.updateAPISetting(r)},complete:function(e){c.previewer.refresh(),c.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){e=e||{},a?c.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:s,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId,all_params:t}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){c.errare("reactToPreviewMsg => problem or error when running action "+n,e),!_.isEmpty(e)&&sektionsLocalizedData.isDevMode&&c.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this;c.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(y,v){v.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=v.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=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(o){if(!_.isEmpty(o.settingParams)&&_.has(o.settingParams,"to")){var r,s=this,e=o.settingParams.to,t=null,a=!1;if(!_.isEmpty(o.settingParams.args)&&_.has(o.settingParams.args,"moduleRegistrationParams")){var c=o.settingParams.args.moduleRegistrationParams.control,i=o.settingParams.args.moduleRegistrationParams.id,n=c.czr_Module(i);if(_.isEmpty(n)?y.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",o):(t=n.module_type,a=n.isMultiItem()),!a&&_.isObject(e)?r=s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!1}):(r=[],_.each(e,function(e){r.push(s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!0}))})),_.isEmpty(o.defaultPreviewAction))y.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",o);else{var l,d="refresh_stylesheet"===o.defaultPreviewAction,u="refresh_markup"===o.defaultPreviewAction,p="refresh_fonts"===o.defaultPreviewAction,m="refresh_preview"===o.defaultPreviewAction,f=o.settingParams.args.input_changed,g=function(){return l&&_.isString(l.refresh_markup)&&"true"!==l.refresh_markup&&"false"!==l.refresh_markup};_.isUndefined(f)||(l=s.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=g()?l.refresh_markup:Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var h=function(){if(!0!==o.isGlobalOptions)return s.updateAPISetting({action:o.uiParams.action,id:o.uiParams.id,value:r,in_column:o.uiParams.in_column,in_sektion:o.uiParams.in_sektion,options_type:o.options_type,settingParams:o.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:o.uiParams.id,level:o.uiParams.level}}),a&&o.settingParams.args.inputRegistrationParams&&_.isFunction(o.settingParams.args.inputRegistrationParams.input_parent)&&(t=o.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:o.uiParams.id,level:o.uiParams.level,changed_item_id:t,control_id:c.id,is_multi_items:a},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===u&&i(),g()){var n=o.settingParams.args.input_value;if(!_.isString(n))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");s.htmlIncludesShortcodesOrTmplTags(n)?i():y.previewer.send("sek-update-html-in-selector",{selector:l.refresh_markup,changed_item_id:t,is_multi_items:a,html:n,id:o.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:o.uiParams.id,level:o.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}!0===m&&y.previewer.refresh()}).fail(function(e){y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated",e),y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ",o)});if(_.isEmpty(o.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(sektionsLocalizedData.optNameForGlobalOptions)(),t=v.extend(!0,{},_.isObject(e)?e:{}),i={};if(_.each(r||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[o.options_type]=i,y(sektionsLocalizedData.optNameForGlobalOptions)(t),!1!==m&&y.previewer.refresh(),!0===p){var n=o.settingParams.args.input_value;if(!_.isString(n))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",n);-1<n.indexOf("gfont")&&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===p){var k=o.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);-1<k.indexOf("gfont")?!0===o.isGlobalOptions?h():s.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:s.isGlobalLocation(o.uiParams)}).always(function(){h().then(function(){s.updateAPISetting({action:"sek-update-fonts",is_global_location:s.isGlobalLocation(o.uiParams)})})}):h()}else h()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",o)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",o)},updateGlobalGFonts:function(e){var t=y(sektionsLocalizedData.optNameForGlobalOptions)(),i=v.extend(!0,{},_.isObject(t)?t:{}),n=this.sniffGlobalGFonts(i);if(!_.contains(n,e)){if(e.indexOf("gfont")<0)return y.errare("updateAPISetting => "+params.action+" => error => must be a google font, prefixed gfont"),void __updateAPISettingDeferred__.reject("updateAPISetting => "+params.action+" => error => must be a google font, prefixed gfont");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("generateUI => why is this control registered more than once ? => "+t)),i},htmlIncludesShortcodesOrTmplTags:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=[],o=[];if(t)for(var r=0;r<t.length;r++){var s=t[r].replace(/^\[+/g,"");-1===n.indexOf(s)&&n.push(s)}if(i)for(var a=0;a<i.length;a++){var c=i[a].replace(/^\[+/g,"");-1===o.indexOf(c)&&o.push(c)}return!_.isEmpty(n)||!_.isEmpty(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};a.extend(t,{content_type_switcher:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:sektionsLocalizedData.i18n["Select a content type"],priority:10,settingValue:{content_type:o.content_type}},module_picker:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:sektionsLocalizedData.i18n["Pick a module"],content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_intro_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_intro_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for an introduction"],content_type:"section",expandAndFocusOnInit:!0,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_features_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_features_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for services and features"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_about_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_about_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["About us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_contact_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_contact_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Contact-us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_column_layouts_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_column_layouts_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Empty sections with columns layout"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_header_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_header_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Header sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_footer_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_footer_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Footer sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&a.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:"@missi18n My sections",content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return r.isUIControlAlreadyRegistered(n)?s.control(n,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(t,function(n,e){s.has(n.settingControlId)||(s(n.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.SECTION_ID_FOR_CONTENT_PICKER,priority:n.priority||10,settings:{default:n.settingControlId},track:!1}).done(function(){s.control(n.settingControlId,function(e){e.content_type=n.content_type,!0===o.focus&&e.focus({completeCallback:function(){}});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),"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===n.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(r.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>'),r.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,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var s=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=s.getLevelProperty({property:"value",id:r.id}),t=s.getLevelProperty({property:"module_type",id:r.id}),n=s.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===s.getRegisteredModuleProperty(t,"is_father")){var a=s.getRegisteredModuleProperty(t,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(a,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:s.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var c=_.keys(o)[0],l=o[c].settingControlId;return s.isUIControlAlreadyRegistered(l)?d.control(l).focus({completeCallback:function(){var e=d.control(l).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=u.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=u("<div/>").html(t.html()).text();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})},d.section(r.id,function(e){d.section(r.id).focus(),s.generateModuleOptionSwitcherUI(r.id,r.action),_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){})),e},generateModuleOptionSwitcherUI:function(e,t){var i=e+"__option_switcher";d.has(i)||(d(i,function(e){e.bind(function(e,t){d.errare("generateUIforDraggableContent => the setting() should not changed")})}),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"setting",id:i,dirty:!1,value:"",transport:"postMessage",type:"_nimble_ui_"})),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"control",module_id:e,id:i,label:"",type:"czr_module",module_type:"sek_mod_option_switcher_module",section:e,priority:10,settings:{default:i},has_accordion:!1,ui_action:t}).done(function(){d.control(i,function(e){e.deferred.embedded.done(function(){e.container.find(".customize-control-title").hide(),e.container.attr("data-sek-accordion","no")})})})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(s,e){var a=this,c=a.getLevelProperty({property:"options",id:s.id});c=_.isObject(c)?c:{};var t={};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>'},border:{settingControlId:s.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:s.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:s.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:s.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:s.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"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 settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return a.isUIControlAlreadyRegistered(n)?l.control(n).focus({completeCallback:function(){var e=l.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(a.cleanRegistered(),_do_register_=function(){_.each(t,function(n,o){if(a.isUIControlAlreadyRegistered(n.settingControlId))l.section(l.control(n.settingControlId).section()).expanded(!0);else{if(!l.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=a.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,level_id:s.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.id,priority:20,settings:{default:n.settingControlId}}).done(function(){}),l.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})}})},l.section(s.id,function(e){_do_register_(),"module"===s.level&&a.generateModuleOptionSwitcherUI(s.id,s.action),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!1})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:s.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+s.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=l.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(l.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(s,e){var a=this,i=a.getLocalSkopeOptionId();if(a.isUIControlAlreadyRegistered(i))return e;if(a.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===s.clean_settings&&a.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":a.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"widths":a.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":a.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"local_reset":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:l.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=l(a.localSectionsSettingId())(),c=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(a.localOptionsRegistrationParams,function(n,o){var e=a.getModuleStartingValue(n.module_type),t=_.isObject(c[o])?c[o]:{};if(!l.has(n.settingControlId)){var i=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(l(n.settingControlId,function(e){e.bind(_.debounce(i,a.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){l.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(s,e){var a=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(a.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_text":n[t]={settingControlId:i+"__global_text",module_type:e,controlLabel:sektionsLocalizedData.i18n["Global text options for Nimble sections"],icon:'<i class="material-icons sek-level-option-icon">text_format</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"global_header_footer":n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_imp_exp":n[t]={settingControlId:i+"__global_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import global sections"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:l.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=a.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(ue,pe){pe.extend(CZRSeksPrototype,{updateAPISetting:function(ae){var ce=this,le=pe.Deferred();(ae=ae||{}).is_global_location="global"===ae.scope||ce.isGlobalLocation(ae);var de=ae.is_global_location?ce.getGlobalSectionsSettingId():ce.localSectionsSettingId(),t=function(){var r,t,s,i,n,o,a,e,c,l=ue(de)(),d=_.isObject(l)?pe.extend(!0,{},l):ce.getDefaultSektionSettingValue(ae.is_global_location?"global":"local"),u="_not_injection_scenario_";switch(d.collection=_.isArray(d.collection)?d.collection:ce.getDefaultSektionSettingValue(ae.is_global_location?"global":"local").collection,ae.action){case"sek-add-section":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if(_.isEmpty(ae.location))throw new Error("updateAPISetting => "+ae.action+" => missing location");if(!0===ae.is_nested){if(s=ce.getLevelModel(ae.in_column,d.collection),"no_match"==(c=ce.getLevelModel(ae.in_sektion,d.collection))){le.reject("updateAPISetting => "+ae.action+" => no grand parent sektion found");break}if(!0===c.is_nested){le.reject(""),ue.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("")});break}if("no_match"==s){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}s.collection=_.isArray(s.collection)?s.collection:[],s.collection.push({id:ae.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}r.collection=_.isArray(r.collection)?r.collection:[],_.each(r.collection,function(e,t){ae.before_section===e.id&&(O=t),ae.after_section===e.id&&(O=t+1)}),r.collection=_.isArray(r.collection)?r.collection:[],r.collection.splice(O,0,{id:ae.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if(_.isEmpty(ae.location))throw new Error("updateAPISetting => "+ae.action+" => missing location");var p;try{p=ce.cloneLevel(ae.id)}catch(e){ue.errare("updateAPISetting => "+ae.action,e);break}ce.maybeGenerateNewItemIdsForCrudModules(p);var m=ce.getLevelPositionInCollection(ae.id,d.collection);if(!0===ae.is_nested){if("no_match"==(s=ce.getLevelModel(ae.in_column,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}s.collection=_.isArray(s.collection)?s.collection:[],s.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}r.collection=_.isArray(r.collection)?r.collection:[],r.collection.splice(parseInt(m+1,10),0,p)}a=p.id;break;case"sek-remove-section":if(!0===ae.is_nested)"no_match"!=(s=ce.getLevelModel(ae.in_column,d.collection))?(s.collection=_.isArray(s.collection)?s.collection:[],s.collection=_.filter(s.collection,function(e){return e.id!=ae.id})):ue.errare("updateAPISetting => "+ae.action+" => no parent column matched");else{if("no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}r.collection=_.filter(r.collection,function(e){return e.id!=ae.id})}break;case"sek-move-section":var f,g,h=ce.getLevelModel(ae.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+ae.action+" => missing target location");if(ae.from_location!=ae.to_location){var k=ce.getLevelModel(ae.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+ae.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],f=ce.getLevelModel(ae.id,k.collection),g=pe.extend(!0,{},f),k.collection=_.filter(k.collection,function(e){return e.id!=ae.id})}h.collection=_.isArray(h.collection)?h.collection:[],n=pe.extend(!0,[],h.collection),o=[],_.each(ae.newOrder,function(e){if(ae.from_location!=ae.to_location&&e==g.id)o.push(g);else{if(t=ce.getLevelModel(e,n),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+ae.action+" => missing section candidate");o.push(t)}}),h.collection=o;break;case"sek-move-section-up-down":if(parentCandidate=ce.getLevelModel(ae.is_nested?ae.in_column:ae.location,d.collection),_.isEmpty(parentCandidate)||"no_match"==parentCandidate)throw new Error("updateAPISetting => "+ae.action+" => missing target location");parentCandidate.collection=_.isArray(parentCandidate.collection)?parentCandidate.collection:[],n=pe.extend(!0,[],parentCandidate.collection),o=pe.extend(!0,[],parentCandidate.collection);var y=_.findIndex(n,function(e){return e.id===ae.id});if(-1===y)throw new Error("updateAPISetting => "+ae.action+" => invalid index");var v=ae.direction||"up";if("up"!==v&&n.length===y+1)throw new Error("updateAPISetting => "+ae.action+" => bottom reached");if("up"===v&&0===y)throw new Error("updateAPISetting => "+ae.action+" => top reached");o[y]=n["up"===v?y-1:y+1],o["up"===v?y-1:y+1]=n[y],parentCandidate.collection=o;break;case"sek-add-column":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if("no_match"==(t=ce.getLevelModel(ae.in_sektion,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched"),le.reject("updateAPISetting => "+ae.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ce.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){le.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}ce.resetColumnsWidthInSection(t),t.collection.push({id:ae.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=ce.getLevelModel(ae.in_sektion,d.collection))){if(1===_.size(t.collection)){le.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection=_.filter(t.collection,function(e){return e.id!=ae.id}),ce.resetColumnsWidthInSection(t)}else ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if("no_match"==(t=ce.getLevelModel(ae.in_sektion,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched"),le.reject("updateAPISetting => "+ae.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ce.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){le.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var b;try{b=ce.cloneLevel(ae.id)}catch(e){ue.errare("updateAPISetting => "+ae.action,e);break}ce.maybeGenerateNewItemIdsForCrudModules(b);var z=ce.getLevelPositionInCollection(ae.id,d.collection);a=b.id,t.collection.splice(parseInt(z+1,10),0,b),ce.resetColumnsWidthInSection(t);break;case"sek-resize-columns":if(ae.col_number<2)break;var I=ce.getLevelModel(ae.resized_column,d.collection),w=ce.getLevelModel(ae.sister_column,d.collection);if("no_match"==I){ue.errare("updateAPISetting => "+ae.action+" => no resized column matched"),le.reject("updateAPISetting => "+ae.action+" => no resized column matched");break}var M=function(e,t){var i=pe.extend(!0,{},e.options||{});return i.width=_.isObject(i.width)?i.width:{},i.width["custom-width"]=t,e.options=i,pe("body").find('[data-sek-width-range-column-id="'+e.id+'"]').val(t).trigger("input",{is_resize_column_trigger:!0}),t},D=M(I,parseFloat(ae.resizedColumnWidthInPercent));D=parseFloat(D);var C=ce.getLevelModel(ae.in_sektion,d.collection),S=_.filter(C.collection,function(e){return e.id!=I.id&&e.id!=w.id}),x=parseFloat(D.toFixed(3));_.isEmpty(S)||_.each(S,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=M(e,parseFloat((100/ae.col_number).toFixed(3)))),x=parseFloat((x+currentColWidth).toFixed(3))}),M(w,parseFloat((100-x).toFixed(3)));break;case"sek-move-column":var P,E,R=ce.getLevelModel(ae.to_sektion,d.collection);if(_.isEmpty(R)||"no_match"==R)throw new Error("updateAPISetting => "+ae.action+" => missing target sektion");if(ae.from_sektion!=ae.to_sektion){var L=ce.getLevelModel(ae.from_sektion,d.collection);if(_.isEmpty(L)||"no_match"==L)throw new Error("updateAPISetting => "+ae.action+" => missing source column");L.collection=_.isArray(L.collection)?L.collection:[],P=ce.getLevelModel(ae.id,L.collection),E=pe.extend(!0,{},P),L.collection=_.filter(L.collection,function(e){return e.id!=ae.id}),ce.resetColumnsWidthInSection(L)}R.collection=_.isArray(R.collection)?R.collection:[],n=pe.extend(!0,[],R.collection),o=[],_.each(ae.newOrder,function(e){if(ae.from_sektion!=ae.to_sektion&&e==E.id)o.push(E);else{if(s=ce.getLevelModel(e,n),_.isEmpty(s)||"no_match"==s)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");o.push(s)}}),R.collection=o,ce.resetColumnsWidthInSection(R);break;case"sek-add-module":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if(_.isEmpty(ae.module_type))throw new Error("updateAPISetting => "+ae.action+" => missing module_type");if("no_match"===(s=ce.getLevelModel(ae.in_column,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}var O=0;s.collection=_.isArray(s.collection)?s.collection:[],_.each(s.collection,function(e,t){ae.before_module===e.id&&(O=t),ae.after_module===e.id&&(O=t+1)});var j={id:ae.id,level:"module",module_type:ae.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(e=ce.getModuleStartingValue(ae.module_type))&&(j.value=e),s.collection.splice(O,0,j);break;case"sek-duplicate-module":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if("no_match"==(s=ce.getLevelModel(ae.in_column,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}var A;s.collection=_.isArray(s.collection)?s.collection:[];try{A=ce.cloneLevel(ae.id)}catch(e){ue.errare("updateAPISetting => "+ae.action,e),le.reject("updateAPISetting => "+ae.action+" => error when cloning the level");break}ce.maybeGenerateNewItemIdsForCrudModules(A);var T=ce.getLevelPositionInCollection(ae.id,d.collection);a=A.id,s.collection.splice(parseInt(T+1,10),0,A);break;case"sek-remove-module":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");"no_match"!=(s=ce.getLevelModel(ae.in_column,d.collection))?(s.collection=_.isArray(s.collection)?s.collection:[],s.collection=_.filter(s.collection,function(e){return e.id!=ae.id})):ue.errare("updateAPISetting => "+ae.action+" => no parent column matched");break;case"sek-move-module":var V,Z,F;if(V=ce.getLevelModel(ae.to_column,d.collection),_.isEmpty(V)||"no_match"==V)throw new Error("updateAPISetting => "+ae.action+" => missing target column");if(ae.from_column!=ae.to_column){var U;if(U=ce.getLevelModel(ae.from_column,d.collection),_.isEmpty(U)||"no_match"==U)throw new Error("updateAPISetting => "+ae.action+" => missing source column");U.collection=_.isArray(U.collection)?U.collection:[],Z=ce.getLevelModel(ae.id,d.collection),F=pe.extend(!0,{},Z),U.collection=_.filter(U.collection,function(e){return e.id!=ae.id})}if(V.collection=_.isArray(V.collection)?V.collection:[],n=pe.extend(!0,[],V.collection),o=[],_.each(ae.newOrder,function(e){if(ae.from_column!=ae.to_column&&e==F.id)o.push(F);else{if(i=ce.getLevelModel(e,d.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+ae.action+" => missing moduleCandidate");o.push(i)}}),o.length!=_.uniq(o).length)throw new Error("updateAPISetting => "+ae.action+" => there are duplicated modules in column : "+V.id);V.collection=o;break;case"sek-set-module-value":i=ce.getLevelModel(ae.id,d.collection);var N={};if(_.each(ae.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),"no_match"==i){ue.errare("updateAPISetting => "+ae.action+" => no module matched",ae),le.reject("updateAPISetting => "+ae.action+" => error no module matched");break}if(_.isEmpty(ae.options_type)){ue.errare("updateAPISetting => "+ae.action+" => missing options_type"),le.reject("updateAPISetting => "+ae.action+" => missing options_type");break}if("__no_option_group_to_be_updated_by_children_modules__"===ae.options_type)i.value=N;else{var B=pe.extend(!0,{},_.isEmpty(i.value)?{}:i.value);B[ae.options_type]=N,i.value=B}break;case"sek-generate-level-options-ui":var Q=ce.getLevelModel(ae.id,d.collection),H={};if("no_match"===Q){ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched"),le.reject("updateAPISetting => "+ae.action+" => no parent sektion matched");break}var W=pe.extend(!0,{},Q.options||{});_.each(ae.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(H[t]=e)}),_.isEmpty(ae.options_type)&&ue.errare("updateAPISetting => "+ae.action+" => missing options_type"),W[ae.options_type]=H,Q.options=W;break;case"sek-generate-local-skope-options-ui":H={};var G=pe.extend(!0,{},_.isObject(d.local_options)?d.local_options:{});if(_.each(ae.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(H[t]=e)}),_.isEmpty(ae.options_type)||!_.isString(ae.options_type))ue.errare("updateAPISetting => "+ae.action+" => missing options_type");else{var q={};q[ae.options_type]=H,d.local_options=pe.extend(G,q)}break;case"sek-add-content-in-new-sektion":if(O=0,"no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}switch(r.collection=_.isArray(r.collection)?r.collection:[],_.each(r.collection,function(e,t){ae.before_section===e.id&&(O=t),ae.after_section===e.id&&(O=t+1)}),ae.content_type){case"module":e=ce.getModuleStartingValue(ae.content_id),r.collection.splice(O,0,{id:ae.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid(),level:"column",collection:[{id:ae.droppedModuleId,level:"module",module_type:ae.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":u=pe.Deferred();var $=function(e,t){t=t||0;var i=!1;if(!_.isEmpty(ae.sektion_to_replace)){var n=ce.getLevelModel(ae.sektion_to_replace,d.collection);"no_match"===n&&(ue.errare("updateAPISetting => "+ae.action+" => no sektionToReplace matched"),le.reject("updateAPISetting => "+ae.action+" => no sektionToReplace matched")),i=!0===n.is_nested}var o=sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid();ae.collection_of_preset_section_id=ae.collection_of_preset_section_id||[],ae.collection_of_preset_section_id.push(o),i?("no_match"===(s=ce.getLevelModel(ae.in_column,d.collection))&&(ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched")),s.collection=_.isArray(s.collection)?s.collection:[],_.each(s.collection,function(e,t){ae.before_section===e.id&&(O=t),ae.after_section===e.id&&(O=t+1)}),s.collection.splice(O+t,0,{id:o,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):r.collection.splice(O+t,0,{id:o,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})},Y=function(e){ce.preparePresetSectionForInjection(e).fail(function(e){le.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ae.action+" => "+e),u.reject(e)}).done(function(e){if("section"===e.collection[0].level){var t=0;_.each(e.collection,function(e){$(e,t),t++})}else $(e,O);u.resolve()})};ce.getPresetSectionCollection({is_user_section:ae.is_user_section,presetSectionId:ae.content_id}).fail(function(e){ue.errare("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()",e),le.reject("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ue.errare("updateAPISetting => "+ae.action+" => preset section type not found or empty : "+ae.content_id,e),le.reject("updateAPISetting => "+ae.action+" => preset section type not found or empty")),Y(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(s=ce.getLevelModel(ae.in_column,d.collection),"no_match"==(c=ce.getLevelModel(ae.in_sektion,d.collection))){le.reject("updateAPISetting => "+ae.action+" => no grand parent sektion found");break}if(!0===c.is_nested){le.reject(""),ue.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("")});break}if("no_match"==s){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}s.collection=_.isArray(s.collection)?s.collection:[],u=pe.Deferred(),Y=function(e){ce.preparePresetSectionForInjection(e).fail(function(e){le.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ae.action+" => "+e),u.reject(e)}).done(function(e){var t=function(e){var t=sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid();ae.collection_of_preset_section_id=ae.collection_of_preset_section_id||[],ae.collection_of_preset_section_id.push(t),s.collection.push({id:t,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)}):t(e),u.resolve()})},ce.getPresetSectionCollection({is_user_section:ae.is_user_section,presetSectionId:ae.content_id}).fail(function(){ue.errare("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()",_er_),le.reject("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ue.errare("updateAPISetting => "+ae.action+" => preset section type not found or empty : "+ae.content_id,e),le.reject("updateAPISetting => "+ae.action+" => preset section type not found or empty")),Y(e)});break;case"sek-update-fonts":var J=ce.sniffGFonts({is_global_location:ae&&!0===ae.is_global_location});if(!_.isEmpty(ae.font_family)&&_.isString(ae.font_family)&&!_.contains(J,ae.font_family)){if(ae.font_family.indexOf("gfont")<0){ue.errare("updateAPISetting => "+ae.action+" => error => must be a google font, prefixed gfont"),le.reject("updateAPISetting => "+ae.action+" => error => must be a google font, prefixed gfont");break}J.push(ae.font_family)}d.fonts=J;break;case"sek-restore-revision":d=ae.revision_value;break;case"sek-import-from-file":if(ue.infoLog("sek-import-from-file",ae),_.isUndefined(ae.imported_content.data)||_.isUndefined(ae.imported_content.metas)){ue.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);break}var K=_.isArray(ae.imported_content.data.collection)?pe.extend(!0,[],ae.imported_content.data.collection):[];if(!0===ae.assign_missing_locations){var X=ae.imported_content.metas.active_locations,ee=ue.czr_sektions.activeLocations(),te=_.first(ee);if(!_.isEmpty(te)&&!_.isEmpty(X)&&_.isArray(X)){var ie=pe(X).not(ee).get(),ne=ce.getLevelModel(te,d.collection),oe=ce.getLevelModel(te,ae.imported_content.data.collection),re=[];ne.collection=_.isArray(ne.collection)?ne.collection:[],oe.collection=_.isArray(oe.collection)?oe.collection:[],_.each(X,function(e){var t=ce.getLevelModel(e,K);_.isEmpty(t.collection)||(re=_.union(re,t.collection))}),oe.collection=re,ae.imported_content.data.collection=_.filter(ae.imported_content.data.collection,function(e){return!_.contains(ie,e.id)})}}!0===ae.keep_existing_sections&&(_.each(K,function(e){var t=ce.getLevelModel(e.id,d.collection);if(!_.isEmpty(t.collection)){var i=ce.getLevelModel(e.id,ae.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}}),d.fonts&&!_.isEmpty(d.fonts)&&_.isArray(d.fonts)&&(ae.imported_content.data.fonts=_.isArray(ae.imported_content.data.fonts)?ae.imported_content.data.fonts:[],ae.imported_content.data.fonts=_.uniq(_.union(d.fonts,ae.imported_content.data.fonts)))),d=ae.imported_content.data;break;case"sek-reset-collection":try{d=ue.czr_sektions.resetCollectionSetting(ae.scope)}catch(e){ue.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==le.state()){var se=function(){var e=ae.settingParams&&ae.settingParams.from&&ae.settingParams.to;e&&_.isEqual(ae.settingParams.from,ae.settingParams.to)?le.reject("updateAPISetting => main sektion setting change => the new setting value is unchanged when firing action : "+ae.action):!e&&_.isEqual(l,d)?le.reject("updateAPISetting => the new setting value is unchanged when firing action : "+ae.action):null!==ce.validateSettingValue(d,ae.is_global_location?"global":"local")?(ue(de)(d,ae),ae.cloneId=a,le.resolve(ae)):le.reject("Validation problem for action "+ae.action)};"_not_injection_scenario_"===u?(se(),"pending"===le.state()&&ue.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")):u.done(function(){se(),"pending"===le.state()&&ue.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")}).fail(function(e){ue.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}};return ue(de,function(e){t()}),le.promise()},resetColumnsWidthInSection:function(e){_.each(e.collection,function(e){e.options&&e.options.width&&e.options.width["custom-width"]&&(e.options.width=_.omit(e.options.width,"custom-width")),e.width=""})},_maybeFetchSectionsFromServer:function(t){var e,i=pe.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(ue.sek_userSavedSections)||_.isEmpty(ue.sek_userSavedSections[t.preset_section_id])?(ue.sek_userSavedSections=ue.sek_userSavedSections||{},_.isUndefined(ue.sek_fetchingUserSavedSections)||"pending"!=ue.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:ue.settings.nonce.save,preset_section_id:t.preset_section_id}),ue.sek_fetchingUserSavedSections=e):e=ue.sek_fetchingUserSavedSections,e.done(function(e){ue.sek_userSavedSections[t.preset_section_id]=e,i.resolve(ue.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(ue.sek_userSavedSections):_.isEmpty(ue.sek_presetSections)?(_.isUndefined(ue.sek_fetchingPresetSections)||"pending"!=ue.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:ue.settings.nonce.save}),ue.sek_fetchingPresetSections=e):e=ue.sek_fetchingPresetSections,e.done(function(e){ue.sek_presetSections=e,i.resolve(ue.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(ue.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var s=this,a=pe.Deferred();return s._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){a.reject(e)}).done(function(e){var t=pe.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[r.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+r.presetSectionId+'" has not been found in the collection');var i=t[r.presetSectionId],n=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+s.guid(),_.isArray(e.collection)&&n(e.collection)}),e},o=function(e){return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&o(e.collection)}),e};i.collection=n(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o(i.collection),a.resolve(i)}),a.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=pe.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(n,o){o.extend(CZRSeksPrototype,{cleanRegistered:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);n.trigger("sek-before-clean-registered"),e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return!_.isEmpty(e.level)&&"setting"===e.what&&n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"===e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(u,p){p.extend(CZRSeksPrototype,{rootPanelFocus:function(){u.section.has(u.czr_activeSectionId())?u.section(u.czr_activeSectionId()).expanded(!1):u.section.each(function(e){e.expanded(!1)}),u.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},getLevelModel:function(i,n){var s=this,a="no_match",c=function(t,e,i,n){if(_.isUndefined(e)){var o=u(i)(),r=_.isObject(o)?p.extend(!0,{},o):p.extend(!0,{},s.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==a&&(t===e.id?a=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},getParentSectionFromColumnId:function(i,n){var s=this,a="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=u(n)(),r=_.isObject(t)?p.extend(!0,{},t):p.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){var t;"no_match"==a&&("section"==e.level&&(t=_.findWhere(e.collection,{id:i})),_.isEmpty(t)?_.isArray(e.collection)&&c(i,e.collection,n,o):a=e)}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,s=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=u(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?p.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)},getLevelPositionInCollection:function(i,n){var s=this,a="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=u(n)(),r=_.isObject(t)?p.extend(!0,{},t):p.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==a&&(i===e.id?a=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,e,t,n)}):c(i,n),a},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))u.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];u.errare("getLevelProperty => invalid model for id : "+e.id,t)}else u.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=p.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(sektionsLocalizedData.registeredModules[e].is_father)return u.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.optPrefixForSektionsNotSaved)&&(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=u(i)();e=_.isObject(t)?p.extend(!0,{},t):p.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 n=this,o=[],r=function(i,e){if(_.isUndefined(e)){var t=u(i)();e=_.isObject(t)?p.extend(!0,{},t):p.extend(!0,{},n.getDefaultSektionSettingValue(localOrGlobal))}_.each(e,function(e,t){_.isString(t)&&_.isString(e)&&(-1<e.indexOf("[gfont]")||-1<e.indexOf("[cfont]"))&&o.push(e),(_.isArray(e)||_.isObject(e))&&r(i,e)})};return _.each([n.localSectionsSettingId(),n.getGlobalSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){r(e)}),o},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))u.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))u.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}u.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))u.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))u.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}u.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))u.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))u.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}u.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}u.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){var a=this;if(!sektionsLocalizedData.registeredModules)return u.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return u.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t,i,n,c=function(e){return readyStartValues=[],_.each(e,function(e){if(_.isObject(e)){var t=p.extend(!0,{},e);t.id=u.czr_sektions.guid(),readyStartValues.push(t)}else u.errare("getModuleStartingValue => multi-item module => items should be objects for module "+mod_type)}),readyStartValues},l={},d=(t=e,sektionsLocalizedData.registeredModules[t]&&sektionsLocalizedData.registeredModules[t].starting_value?sektionsLocalizedData.registeredModules[t].starting_value:{});return n=e,sektionsLocalizedData.registeredModules[n]&&!0===sektionsLocalizedData.registeredModules[n].is_father?_.each((i=e,sektionsLocalizedData.registeredModules[i]&&sektionsLocalizedData.registeredModules[i].children?sektionsLocalizedData.registeredModules[i].children:{}),function(e,t){var i,n,o,r,s=(i=e,r=(o=d)[n=t]?o[n]:{},a.isMultiItemsModule(i)&&_.isArray(r)?c(r):r);_.isEmpty(s)||(l[t]=s)}):l=a.isMultiItemsModule(e)&&_.isArray(d)?c(d):d,_.isEmpty(l)?"no_starting_value":l},selectNextTabbableOrFocusable:function(e){var t=p(e),i=p(":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=p(e),i=p(":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,u.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()?p.extend(i,{selected:"selected"}):"px"===t&&p.extend(i,{selected:"selected"}),p("select[data-czrtype]",n.container).append(p("<option>",i))}),p("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)&&p.extend(i,{selected:"selected"}),p("select[data-czrtype]",n.container).append(p("<option>",i))}),p("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),p("select[data-czrtype]",n.container).on("change",function(){0===p(this).find("option:selected").length&&n([])});break;default:u.errare("::setupSelectInput => invalid input type => "+n.type)}else u.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in module "+n.module.module_type)},maybeSetupDeviceSwitcherForInput:function(){var i=this;if(!i.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(" ");i.container.find(".customize-control-title").first().prepend(e),i.previewedDevice=new u.Value(u.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),i.container.find("[data-sek-device]").removeClass("active"),p(this).addClass("active");var t="desktop";try{t=p(this).data("sek-device")}catch(e){u.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{u.previewedDevice(t)}catch(e){u.errare("maybeSetupDeviceSwitcherForInput => error when setting the previewed device",e)}i.previewedDevice(t)},i.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=i.container.find('[data-sek-device="'+u.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")&&(p(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=p(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){p(this).attr("data-sek-accordion")||p(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"))}),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)&&u.control(n.id,function(e){e.container.one("items-collection-populated",function(){p(this).find("label > .customize-control-title").trigger("click")}),e.container.trigger("sek-accordion-expanded")})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(p.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=p.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(p.Deferred(function(t){(i.isPromise(e)?e:p.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),p.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||p.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:p.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:u.settings.nonce.save}).fail(function(e){u.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)||u.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);if(!n.czr_Input.has(t))throw new Error("::scheduleVisibilityOfInputId => missing input id : "+t);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),a.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){a.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(){a.notifications.add(new a.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(){a.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-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"),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){a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),a.previewer.send("sek-drag-start",{type:n.dndData.content_type})}).call(m(this),e)}).on("dragend",function(e){(function(e){m("body").removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),a.previewer.send("sek-drag-stop")}).call(m(this),e)}).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?(a.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module:t.data("drop-zone-before-module-or-nested-section"),after_module: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).data("sek-content-type"),content_id:m(this).data("sek-content-id"),section_type:m(this).data("sek-section-type"),is_user_section:"true"===m(this).data("sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),a.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop({targetEl:m(this),evt:e}))return;e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),a.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(u){var p=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=u.clientY,n=u.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),s=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),a=(o.right,o.left,r<50),c=s<50,l=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;p.distanceTable.push({el:m(this),dist:d&&l?0:(e=s,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(a||d)&&(c||l)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(p.distanceTable,"dist"));p.$dropTargetCandidate=null,_.each(p.distanceTable,function(e){_.isNull(p.$dropTargetCandidate)&&t===e.dist&&(p.$dropTargetCandidate=e.el)}),p.$dropTargetCandidate&&0<p.$dropTargetCandidate.length&&p.dnd_isInTarget(p.$dropTargetCandidate,u)&&p.$dropTargetCandidate.addClass("sek-drag-is-in"),p.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:a.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(a.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;if(i.closest('[data-sek-level="location"]').length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),s=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),a="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,c=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return(r||s)&&a?(c(r?sektionsLocalizedData.i18n["Header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["Footer location only accepts modules and pre-built footer sections"]),!1):s&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):i.hasClass("sek-drop-zone")&&("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){a.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"),e.removeClass("sek-feed-me-seymore"),e.find(".sek-no-drop-possible-message").remove())},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");m.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),e.addClass("sek-feed-me-seymore"),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,s=i.right,a=i.top,c=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=c-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();a.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),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=e.drop_target_element,i="content-in-column";switch(t.data("sek-location")){case"between-sections":i="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,i="content-in-empty-location";break;case"between-columns":i="content-in-new-column"}if("preset_section"===e.content_type)if(t.hasClass("sek-module-drop-zone-for-first-module")){var n=t.closest('div[data-sek-level="section"]');1<n.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(i="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=n.data("sek-id")):(e.sektion_to_replace=n.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=n.closest('[data-sek-level="column"]').data("sek-id"),i="content-in-a-section-to-replace")}else"between-sections"===t.data("sek-location")&&(i="content-in-a-section-to-create");switch(i){case"content-in-column":var o=t.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");a.previewer.trigger("sek-add-module",{level:r,id:s,in_column:t.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:t.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":case"content-in-empty-location":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":a.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;default:a.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){a.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}(),e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),d(window)[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){d(window).trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),s=d("#wp-czr-customize-content_editor-tools"),a=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=s.outerHeight()+a.outerHeight()+c.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),r.css("height",o.height-o.components))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(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(o,r,s){o.czrInputMap=o.czrInputMap||{},r.extend(o.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!o.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=o.section(n.module.control.section()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault(),n.container.find("[data-sek-content-type]").removeClass("is-selected").attr("aria-pressed",!1),r(this).addClass("is-selected").attr("aria-pressed",!0),o.czr_sektions.currentContentPickerType(r(this).data("sek-content-type"))});var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),s.each(i.controls(),function(e){s.isUndefined(e.content_type)||e.active(t===e.content_type)})};o.czr_sektions.currentContentPickerType=o.czr_sektions.currentContentPickerType||new o.Value(n()),o.bind("nimble-modules-and-sections-controls-registered",function(){t(o.czr_sektions.currentContentPickerType())}),o.czr_sektions.currentContentPickerType.bind(function(e){t(e)})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})},section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(s,a,c){s.czrInputMap=s.czrInputMap||{},a.extend(s.czrInputMap,{module_option_switcher:function(e){var t=this;if(!s.section.has(t.module.control.section()))throw new Error(t.input_type+" => section not registered");s.section(t.module.control.section());var i,n="",o=t.module.control.params.sek_registration_params;if(c.isUndefined(o))throw new Error(t.input_type+" => missing registration params");if(o&&o.module_id&&(n=o.module_id,i=o.ui_action),c.isEmpty(n))throw new Error(t.input_type+" => missing module id");t.container.on("click","[data-sek-option-type]",function(e){e.preventDefault(),t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0),s.previewer.trigger("settings"===a(this).data("sek-option-type")?"sek-edit-options":"sek-edit-module",{id:n,level:"module"})});var r="sek-generate-level-options-ui"===i?"settings":"content";t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),t.container.find('[data-sek-option-type="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(l,d,u){l.czrInputMap=l.czrInputMap||{};var p=function(e){return u.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(l.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=u.isEmpty(t)||u.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,{},u.isObject(o())?o():{}),n=d(this).val();u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?i[t]=n:i=u.omit(i,t),o(i)}),m.call(o,i,n),u.isObject(o())){u.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");u.isEmpty(o())||u.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+p.call(o,r)+'"]').trigger("click")}var s=o();o.initial_unit="px",u.isEmpty(s)||(o.initial_unit=u.isEmpty(s.unit)?"px":s.unit),o.css_unit=new l.Value(p.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=u.isEmpty(e)?"px":e,(t=d.extend(!0,{},u.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(l.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,s=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=u.isEmpty(t)||u.isEmpty(t.default)?{}:t.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]):{}},i=function(e){var t=d.extend(!0,{},u.isObject(r())?r():{}),i=d.extend(!0,{},a);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",s).each(function(){var e=d(this).data("sek-spacing"),t="";u.isEmpty(n)||u.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");u.isEmpty(n)||u.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+p.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",u.isEmpty(n)||u.isEmpty(n[r.previewedDevice()])||(r.initial_unit=u.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new l.Value(p.call(r,r.initial_unit)),s.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=l.previewedDevice()||"desktop";(t=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?t[o][i]=n:t[o]=u.omit(t[o],i),r(t)}),m.call(r,s,a),r.previewedDevice.bind(function(e){try{i(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!u.isObject(i)||!0!==i.previewed_device_switched){e=u.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,s);try{i(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,a,c){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(this).val())}),c.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=c.isEmpty(t)||c.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(c.has(e,t))return e[t];var n=c.findIndex(i,function(e){return t===e});return!c.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},c.isObject(o())?o():{}),i=a.extend(!0,{},r);t=c.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.extend(!0,{},c.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{};var e=function(e){var o=this,t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",s=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},n=function(e){var t=l.extend(!0,{},d.isObject(o())?o():{}),i=l.extend(!0,{},r);t=d.isObject(t)?l.extend(i,t):i;var n=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=l.extend(!0,{},d.isObject(o())?o():{}))[c.previewedDevice()||"desktop"]=l(this).data("sek-align"),s.find(".selected").removeClass("selected"),l.when(l(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};l.extend(c.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(f,g,h){f.czrInputMap=f.czrInputMap||{},g.extend(f.czrInputMap,{font_picker:function(e){var p=this,_=p.input_parent,n=function(e,t){_();var n=g('select[data-czrtype="'+p.id+'"]',p.container);h.isNull(p())||h.isEmpty(p())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>");var i=[{title:sektionsLocalizedData.i18n["Web safe fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google fonts"],type:"gfont",list:t.gfonts}],o=f.czr_sektions.sniffAllFonts(),r=sektionsLocalizedData.alreadyUsedFonts,s=[],a=[];if(!h.isEmpty(r)&&h.isObject(r)&&h.each(r,function(e){a.push(e)}),h.isArray(o)&&h.each(o,function(e){a.push(e)}),!h.isEmpty(a)){var c={},l=[];a.forEach(function(e){c[e]=(c[e]||0)+1});var d=h.sortBy(c,function(e){return e});h.each(d,function(i){h.each(c,function(e,t){i!==e||h.contains(l,t)||l.unshift(t)})}),h.each(l,function(e){s.push({name:e})}),i.unshift({title:sektionsLocalizedData.i18n["Already used fonts"],type:null,list:s})}h.each(i,function(e){var t,r,s,i=g("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",h.each(t,function(e){var t,i,n=h.isString(e.name)?e.name:"Undefined Font Family",o=n.replace(/[+|:]/g," ");t=n,i=r,n=h.isEmpty(i)?t:h.isString(t)?["[",i,"]",t].join(""):"",o=o.replace("[cfont]","").replace("[gfont]",""),n==p()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});n.append(i)});var u={escapeMarkup:function(e){return e}};e&&g.extend(u,{resultsAdapter:e,closeOnSelect:!1}),n.czrSelect2(u),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," "):""};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)})}).fail(function(e){f.errare("font_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(s.when(s.Deferred(function(t){a.isEmpty(n.sek_faIconCollection)?r.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection)})).done(function(e){!function(e){a.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(s.extend(t,{selected:"selected"}),o=!0),s("select[data-czrtype]",n.container).append(s("<option>",t))});var t,i=function(e){return e.id?s('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=o?s("<option>"):s("<option>",{selected:"selected"}),s("select[data-czrtype]",n.container).prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),t&&!0===t.open_on_init&&a.delay(function(){try{s("select[data-czrtype]",n.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){r.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)};n.container.on("click",function(){e()}),a.delay(function(){e({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(u,p,_){u.czrInputMap=u.czrInputMap||{},p.extend(u.czrInputMap,{code_editor:function(e){var n=this,i=this.module.control,o=(n.input_parent(),!1),r=n.container.find("textarea"),s=n.container.find(".customize-control-title"),a=function(){return p.Deferred(function(t){var i=_.isEmpty(r.data("editor-code-type"))?"text/html":r.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){_.isObject(e)||u.errare(n.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)})})};n.isReady.done(function(){var t=function(e){_.isEmpty(this.editor)&&(_.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),l()}else l();s.click()},10))};r.html(n()),p.when(a()).done(function(e){wp.codeEditor&&(_.isUndefined(e)||!1!==e)&&(o=e),t.call(n),n.module.control.container.on("sek-accordion-expanded",function(){t.call(n)})}).fail(function(e){u.errare(n.id+" => error when getting the editor params from server")})});var c=function(e){var t,i=!1;t=_.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:d}),n.editor=wp.codeEditor.initialize(r,t),p(n.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":s.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),s.on("click",function(e){e.stopPropagation(),n.editor.codemirror.focus()}),n.editor.codemirror.on("change",function(e){i=!0,r.val(e.getValue()).trigger("change"),i=!1}),n.editor.codemirror.setValue(n()),n.bind(n.id+":changed",function(e){i||n.editor.codemirror.setValue(e)}),n.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},l=function(){var o=r[0];n.editor=o,r.on("blur",function(){r.data("next-tab-blurs",!1)}),r.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||r.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)),r.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):r.data("next-tab-blurs")||(r.data("next-tab-blurs",!0),e.stopPropagation())})},d=function(e){var t;i.setting.notifications.remove(n.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",s.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",s.html()),i.setting.notifications.add(n.id,new u.Notification(n.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)}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var s=this,t=u(".sek-range-with-unit-picker-wrapper",s.container),a=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),c=p.isEmpty(i)||p.isEmpty(i.default)?{}:i.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]):u.extend(!0,{desktop:""},c).desktop},n=function(e){var t=s(),i={};i=u.extend(!0,{},c),p.isObject(t)?i=u.extend(!0,{},t):p.isString(t)&&!p.isEmpty(t)&&(i={desktop:t});var n,o=l(i,e),r=(n=o,p.isEmpty(n)||!p.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(u(this).val()).trigger("input")}),a.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=u(this).val();(i=u.extend(!0,{},p.isObject(s())?s():{}))[n]=u.extend(!0,{},i[n]||{}),p.isString(o)&&!p.isEmpty(o)&&(i[n]=o),(p.isEmpty(t)||p.isObject(t)&&!0!==t.previewed_device_switched)&&s(i),r.val(u(this).val())}),s.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}),r.val(a.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=c(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),s=function(e){return l.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(l.isEmpty(r)?"px":s(r)),t.css_unit.bind(function(e){e=l.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(c(this).val()).trigger("input")}),n.on("input",function(e){t(c(this).val()+s(t.css_unit())),o.val(c(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),c(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",c(this).data("sek-unit")),t.css_unit(c(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var c=this,l=_(".sek-range-with-unit-picker-wrapper",c.container),d=l.find('input[type="number"]'),r=l.find('input[type="range"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=a.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type),u=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return l.find("input[data-czrtype]").data("sek-unit")||"px"},p=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?p(e,i[n+1]):_.extend(!0,{desktop:""},u).desktop},n=function(e){var t=c(),i={};i=_.extend(!0,{},u),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=p(i,e),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new a.Value(m.isEmpty(i())?"px":s(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";c.container.find(".customize-control-title").append(o),c.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=a.previewedDevice()||"desktop",o=_(this).val()+s(c.css_unit());(i=_.extend(!0,{},m.isObject(c())?c():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&c(i),r.val(_(this).val())}),l.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),l.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),c.css_unit(_(this).data("sek-unit"),t)}),c.previewedDevice.bind(function(e){try{n(e)}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}),c.container.on("click",".sek-reset-button",function(e){var t=a.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(g,h,k){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var a=this,c=h(".sek-borders",a.container),l=c.find('input[type="number"]'),d=c.find('input[type="range"]'),u=c.find(".sek-alpha-color-input"),p=function(e){return k.contains(["px","em","%"],e)||(g.errare("borders => error : invalid unit for input "+a.id,e),e="px"),e},_=function(e){return k.isEmpty(e)||!k.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return k.isEmpty(e)||!k.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=g.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),t="px";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.wght)&&(t=p(m(e._all_.wght))),t},r=function(){var e=a(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!k.contains(k.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);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,s=function(e,t){var i,n=h.extend(!0,{},f);if(!k.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=k.isObject(e)&&k.has(e,"_all_")?k.extend(n._all_,e._all_):n._all_,k.has(e,t)&&k.isObject(e[t])?k.extend(i,e[t]):n._all_}(i=h.extend(n,i),e);if(k.isEmpty(s)||!k.isObject(s)||k.isEmpty(s.wght)||k.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.wght),h(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{border_type_switched:!0}),u.data("border_type_switched",!0),u.val(s.col).trigger("change"),u.data("border_type_switched",!1)};a.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),a.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),a.borderType=new g.Value("_all_"),l.val((i=a(),n=1,k.isObject(i)&&k.has(i,"_all_")&&k.isObject(i._all_)&&!k.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!k.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)),u.val(a.borderColor()),u.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){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}}),d.on("input",function(e){l.val(h(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.borderType()||"_all_",o=a.borderColor(),r=h(this).val()+p(a.css_unit()),s=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(a())?a():s))[n]=h.extend(!0,{},i[n]||s[n]),k.isString(r)&&!k.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(k.isEmpty(t)||k.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&k.each(a.cssBorderTypes,function(e){i=k.omit(i,e)}),a(i)),d.val(h(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),a.css_unit(h(this).data("sek-unit"),t)}),c.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),c.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=h.extend(!0,{},k.isObject(a())?a():{});k.isEmpty(i[t])||(i=k.omit(i,t),a(i),s(t))}),d.val(l.val()||0);try{s(a.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}h('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var a=this,c=f(".sek-borders",a.container),l=c.find('input[type="number"]'),s=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.id,e),e="px"),e},u=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},p=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(p(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=p(s),r=u(s),f(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{radius_type_switched:!0})};a.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),l.val((i=a(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(a())?a():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(a.cssRadiusTypes,function(e){i=g.omit(i,e)}),a(i)),s.val(f(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),a.css_unit(f(this).data("sek-unit"),t)}),c.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),c.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(a())?a():{});g.isEmpty(i[t])||(i=g.omit(i,t),a(i),r(t))}),s.val(l.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).done(function(e){n.previewer.refresh(),n.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"<br/>","<i>"+e+"</i>","</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,s){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){s.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!s.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(s.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];s.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),s.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&s.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),s.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(p,_,m){p.czrInputMap=p.czrInputMap||{},_.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(m.isNull(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => duplicate editor id.");var r,s,a=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&m.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=m.filter(e,function(e){return!m.contains(t,e)})}if(n.editor_params&&m.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;m.isEmpty(i)||!m.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=m.filter(e,function(e){return m.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),s=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(s=m.union(r.tinymce.content_css.split(","),s)),s.join(",")),min_height:40,height:n.editor_params&&m.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};c.tinymce.wpautop=a(),a()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var d=_.extend(!0,[],p.czrActiveWPEditors);d.push(i),p.czrActiveWPEditors=d;var u=function(){e.html(t()),l.setContent(t())};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=_("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,r,s=nimbleTinyMCEPreInit.mceInit[e];s.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=m.union(o.tinymce.content_css.split(","),r)),r.join(","));var a=t.input_parent,c=function(){var e=a();return m.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};s.wpautop=c(),c()||(s.forced_root_block=""),s.toolbar1=sektionsLocalizedData.defaultToolbarBtns,s.toolbar2="",window.tinymce.init(s),window.QTags.getInstance(e);var l=tinyMCE.get(e);if(!l)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d=function(){var e=c()?wp.editor.autop(t()):t();l.setContent(e),p.sekEditorExpanded(!0),_(window).trigger("resize")};l.initialized?d():l.on("init",d),l.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(c()?l.getContent():wp.editor.removep(l.getContent()))}),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(_(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{import_export:function(){var o=this,r=o.container.find('button[data-czr-action="sek-pre-import"]'),i=o.container.find("input[name=sek-import-file]"),n=m.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),s=n.scope,a="local"===n.scope?m.czr_sektions.localSectionsSettingId():m.czr_sektions.getGlobalSectionsSettingId();g.contains(["local","global"],s)||m.errare("api.czrInputMap.import_export => invalid currentScope",s),i.on("change",function(e){r.toggleClass("disabled",g.isEmpty(f(this).val()))});o.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),f(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),g.isEmpty(t)||g.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=m(a)(),o=!0;if(g.each(n.collection,function(e){o&&(g.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}c({scope:s});break;case"sek-pre-import":if(g.isEmpty(m.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}d({pre_import_check:!0}).done(l).fail(function(e){m.errare("sek_pre_import_checks failed",e),_(),d()});break;case"sek-import-as-is":d();break;case"sek-import-assign":d({assign_missing_locations:!0});break;case"sek-cancel-import":_()}});var c=function(e){var i=[],t={sek_export_nonce:m.settings.nonce.save,skope_id:"local"===e.scope?m.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:m.czr_sektions.activeLocations()};g.each(t,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:m.settings.nonce.save,sek_export_nonce:m.settings.nonce.save,skope_id:"local"===e.scope?m.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:m.czr_sektions.activeLocations()}).done(function(){f(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),f(window).on("beforeunload")}).fail(function(e){m.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("")})})},l=function(e){var t=m.czr_sektions.activeLocations(),i=f.extend(!0,[],g.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]);if(i=g.filter(i,function(e){return!g.contains(["nimble_local_header","nimble_local_footer"],e)}),g.isArray(i)&&g.isArray(t)){var n=f(i).not(t).get();g.isEmpty(n)?d():(r.hide(),"local"===s?o.container.find(".czr-import-dialog.czr-local-import").slideToggle():o.container.find(".czr-import-dialog.czr-global-import").slideToggle(),m.infoLog("sek-pre-import => imported locations missing in current page.",n))}else m.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("")}),_()},d=function(t){if(t=t||{},i.length<1||g.isUndefined(i[0])||!i[0].files||g.isEmpty(i.val()))m.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{m.notifications.remove("missing-import-file"),m.notifications.remove("import-success"),m.notifications.remove("import-failed"),m.notifications.remove("img-import-errors"),o.container.find(".sek-uploading").show();var e=new FormData;if(e.append("file_candidate",i[0].files[0]),e.append("action","sek_get_imported_file_content"),e.append("nonce",m.settings.nonce.save),g.contains(["local","global"],n.scope)){if(e.append("skope",n.scope),t.pre_import_check&&e.append("pre_import_check",t.pre_import_check),__request__=f.ajax({url:wp.ajax.settings.url,data:e,processData:!1,contentType:!1,type:"POST"}),t.pre_import_check)return f.Deferred(function(){var t=this;__request__.done(function(e){e.success||t.reject(e),u(e)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)}).always(function(){})});o.container.find(".sek-uploading").show(),m.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0}),__request__.done(function(e){var n=function(i){return(g.isObject(i)||g.isArray(i))&&g.each(i,function(e,t){(g.isObject(e)||g.isArray(e))&&(i[t]=n(e)),"id"!==t||!g.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.optPrefixForSektionsNotSaved+m.czr_sektions.guid())}),i};e.data.data.collection=n(e.data.data.collection),p(e,t)}).fail(function(e){m.errare("sek-import input => ajax error",e),m.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(_)}else m.errare("sek-import input => invalid scope provided",n.scope)}},u=function(e){var t=!0,i=e.data,n=null;e.success||(n=[sektionsLocalizedData.i18n["Import failed"],i].join(" : ")),g.isNull(n)&&!g.isObject(i)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var o=i.data,r=i.metas,s=i.img_errors;return g.isNull(n)&&!g.isObject(o)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),g.isNull(n)&&!g.isObject(r)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),g.isNull(n)&&g.isEqual(m(a)(),o)&&(m.infoLog("sek-import input => Setting unchanged"),t=!1),g.isNull(n)||(m.errare("sek-import input => invalid data sent from server",i),m.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",n,"</strong>","</span>"].join("")}),t=!1),g.isEmpty(s)||m.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">'+s+"</span>"].join(" : "),"</span>"].join("")}),t},p=function(e,t){t=t||{},u(e)?(m.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:s,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:"local"===s&&o.input_parent.czr_Input("keep_existing_sections")()}).done(function(){"local"===n.scope&&m.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),m.previewer.refresh(),m.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){m.errare("sek-import input => error when firing ::updateAPISetting",e),m.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),m.previewer.refresh()):_()},_=function(){m.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),o.container.find(".sek-uploading").hide(),i.val("").trigger("change"),o.container.find(".czr-import-dialog").hide(),r.show()}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{},l.extend(c.czrInputMap,{simpleselect:function(e){c.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){c.czr_sektions.setupSelectInput.call(this,e)},simpleselectWithDeviceSwitcher:function(e){var r=this,t=(r.input_parent,r.module,c.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type)),o=l("select",r.container),s=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i={params:e=d.isEmpty(e)?t.choices:e};if(r.module.trigger("nimble-set-select-input-options",i),e=i.params,!d.isEmpty(e)&&d.isObject(e)){d.each(e,function(e,t){var i={value:t,html:e};t==r()?l.extend(i,{selected:"selected"}):"px"===t&&l.extend(i,{selected:"selected"}),o.append(l("<option>",i))});var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):l.extend(!0,{desktop:""},s).desktop};c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r),o.on("change",function(e,t){var i,n=c.previewedDevice()||"desktop",o=l(this).val();(i=l.extend(!0,{},d.isObject(r())?r():{}))[n]=l.extend(!0,{},i[n]||{}),d.isString(o)&&!d.isEmpty(o)&&(i[n]=o),(d.isEmpty(t)||d.isObject(t)&&!0!==t.previewed_device_switched)&&r(i)}),r.previewedDevice.bind(function(e){try{!function(e){var t=r(),i={};i=l.extend(!0,{},s),d.isObject(t)?i=l.extend(!0,{},t):d.isString(t)&&!d.isEmpty(t)&&(i={desktop:t});var n=a(i,e);o.val(n).trigger("change",{previewed_device_switched:!0})}(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type "+r.type+" for input id "+r.id,e)}})}else c.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+r.id+" in module "+r.module.module_type)}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{category_picker:function(e){var n=this,o=c("select[data-czrtype]",n.container),r=function(){var e=n();return e=l.isString(e)?[e]:e,l.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(c.when(c.Deferred(function(i){l.isEmpty(a.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:a.settings.nonce.save}).done(function(e){l.isArray(e)||a.errare(n.id+" => error => invalid category collection sent by server");var t={};l.each(e,function(e){l.isEmpty(e.slug)||l.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),a.czr_sektions.post_categories=t,i.resolve(a.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(a.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&l.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){a.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){l.each(e,function(e,t){var i={value:t,html:e};l.contains(r(),t)&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===c(this).find("option:selected").length&&n([])})},s={};l.each(r(),function(e){s[e]=(e+"").replace(/-/g," ")}),i(s),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),c.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,s,e){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=s(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),s(this).addClass("selected").attr("aria-pressed",!0);try{i=s(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),s('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(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(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({initialize:function(e,t){var i=this;r.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),r.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:i.container})})},renderUserSavedSections:function(){var i="",n=this.container.find(".sek-content-type-wrapper"),o="";s.each(sektionsLocalizedData.userSavedSektions,function(e,t){try{o=function(e){var t=e.getDate(),i=e.getMonth(),n=e.getFullYear();e.getHours(),e.getMinutes(),e.getSeconds();return[t,["January","February","March","April","May","June","July","August","September","October","November","December"][i],n].join(" ")}(new Date(e.creation_date.replace(/-/g,"/")))}catch(e){r.errare("::renderUserSavedSections => formatDate => error",e)}i=['<div class="sek-user-section-wrapper">','<div class="sek-saved-section-title"><i class="sek-remove-user-section far fa-trash-alt"></i>'+e.title+"</div>",'<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="'+e.type+'" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-overlay"></div>','<div class="sek-saved-section-description">'+e.description+"</div>",s.isEmpty(o)?"":'<div class="sek-saved-section-date"><i class="far fa-calendar-alt"></i> @missi18n Created : '+o+"</div>","</div>","</div>"].join(""),n.append(i)})}}),r.CZRDynModule.prototype.initialize.call(this,e,t)}};r.czrModuleMap=r.czrModuleMap||{},sektionsLocalizedData.isSavedSectionEnabled&&e.extend(r.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:t,crud:!1,name:r.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:r.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(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"bg-image":s.each(["bg-attachment","bg-scale","bg-repeat","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay","bg-parallax","bg-parallax-force"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!s.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!s.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":s.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!s.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i())})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":s.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=!s.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!s.isEmpty(n.czr_Input("bg-image")()+"")&&!r.CZR_Helpers.isChecked(i())}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-attachment")())&&n.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")())&&n.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:r.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:s.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_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(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-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:i.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:n.extend({id:"",title:""},i.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.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",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,u,p){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=u(".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(p.isUndefined(t.level_id))d.errare("Error : missing column id",er);else if(i.columnId=t.level_id,i.columnModel=u.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=p.size(i.parentSectionModel.collection),o.attr("data-sek-width-range-column-id",i.columnId),1===i.colNb?i.container.html(["<p>",sektionsLocalizedData.i18n["This is a single-column section with a width of 100%. You can act on the internal width of the parent section, or adjust padding and margin."]].join("")):i.container.show();var s,a=d.czr_sektions.getLevelModel(i.columnId),c="_not_set_";if("no_match"!=a){var l=a.options&&a.options.width&&a.options.width["custom-width"]&&p.isNumber(+a.options.width["custom-width"]);l?c=a.options.width["custom-width"]:!l&&a.width&&p.isNumber(+a.width)&&(c=a.width),s="_not_set_"!==c?c:"_not_set_"===i()?Math.floor(100/i.colNb):i(),s=1*+parseFloat(s).toFixed(3),(!p.isNumber(s)||100<s||s<0)&&(d.errare("Error => invalid column width",s),s=50),r.on("input",function(e,t){o.val(u(this).val()).trigger("input",t)}),o.on("input",p.debounce(function(e,t){r.val(u(this).val()),t&&t.is_init||i(+parseFloat(u(this).val()).toFixed(3))},300)),o.on("input",p.debounce(function(e,t){t&&(t.is_init||t.is_resize_column_trigger)||i.sayItToApi(u(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=p.findIndex(i.parentSectionModel.collection,{id:i.columnId}),o=n+1==i.colNb?n-1:n+1,r=p.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||{},u.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:p.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_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(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-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"global-custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.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(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"img":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"img-size",function(){return!r.isEmpty(i()+"")&&r.isNumber(i())});break;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_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.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)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":s.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":s.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"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(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"use_custom_bg_color_on_hover":r.each(["bg_color_hover"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":r.each(["push_effect"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;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")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_font_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_),function(s,a,c){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=s.CZRItem.extend(i.CZRItemConstructor||{}),s.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return s.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&a.fn.sortable){var i=this;a("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){c.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!c.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},_buildTitle:function(e,t,i){var n=this.module;return e=e||("string"==typeof t?s.CZR_Helpers.capitalize(t.replace("fa-","")):""),e=s.CZR_Helpers.truncate(e,20),'<div><span class="'+t+'" style="color:'+(i=i||n.defaultSocialColor)+'"></span> '+e+"</div>"},writeItemViewTitle:function(e){var t=this.module,i=e||this(),n=(i.icon?i.icon:"").replace("fa-","").replace("envelope","email").replace("far","").replace("fab","").replace("fas","");a("."+t.control.css_attr.item_title,this.container).html(this._buildTitle(n,i.icon,i.color_css))},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_color_on_hover":c.each(["social_color_hover"],function(e){try{s.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){s.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=c.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=c.without(n,c.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=a.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=s(i.control.id).transport||!c.has(e,"dom_event")||c.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){s.previewer.unbind("ready",r),i.trigger("item-removed",o)};s.previewer.bind("ready",r)}}}};s.czrModuleMap=s.czrModuleMap||{},a.extend(s.czrModuleMap,{czr_social_icons_settings_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_social_icons_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_settings_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_social_icons_style_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_social_icons_style_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_style_child")}})}(wp.customize,jQuery,_),function(g,h,k){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=g.CZRItem.extend(i.CZRItemConstructor||{}),g.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return g.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&h.fn.sortable){var i=this;h("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){k.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(k.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(!k.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){g.errorLog("item.setInputVisibilityDeps() : "+e)}}),g.CZRItem.prototype.ready.call(t);var i=function(){g.previewer.send("sek-item-focus",{control_id:t.module.control.id,item_id:t.id,item_value:t()})};t.viewState.callbacks.add(function(e,t){"expanded"===e&&i()}),t.callbacks.add(i),t.bind("sek-request-item-focus-in-preview",i)},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="",s="",a="not_set",c=!k.isUndefined(t)&&k.isObject(t);if(!c||!t.input_changed||k.contains(["img","text_content"],t.input_changed)){if(k.isEmpty(o.title)){var l=k.findIndex(n.itemCollection(),function(e){return e.id===i.id});l=k.isUndefined(l)?1:l+1}else r=o.title;r=g.CZR_Helpers.truncate(r,15),o.img&&(s=o.img,k.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;k.isUndefined(s)||k.isEmpty(""+s)?e.resolve(""):k.isString(s)&&-1!==s.indexOf("http")?e.resolve(s):wp.media.attachment(s).fetch().always(function(){k.isObject(this)&&k.has(this,"attributes")&&k.has(this.attributes,"sizes")&&(a=this.get("sizes").thumbnail.url,e.resolve(a))})}).promise()},u=h("."+n.control.css_attr.item_title,i.container).find(".sek-slide-title"),p=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),u.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:_}))):u.html(_);var m=c&&t.input_changed&&"img"===t.input_changed,f=function(e){return k.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"),p.length<1?d().done(function(e){h("."+n.control.css_attr.item_title,i.container).prepend(h("<div/>",{class:"sek-slide-thumb",html:f(e)}))}):!m&&c||d().done(function(e){p.html(f(e))})}},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":k.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=!k.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":k.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":k.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":k.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=k.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=k.without(n,k.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||!k.has(e,"dom_event")||k.has(e.dom_event,"isTrigger")||g.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){g.previewer.unbind("ready",r),i.trigger("item-removed",o)};g.previewer.bind("ready",r)}}}};g.czrModuleMap=g.czrModuleMap||{},h.extend(g.czrModuleMap,{czr_img_slider_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:g.czr_sektions.getRegisteredModuleProperty("czr_img_slider_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:g.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_img_slider_collection_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"autoplay":o.each(["autoplay_delay"],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,u,p){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&&u.fn.sortable){var i=this;u("."+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(){p.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=u.extend(!0,{},this.preItem());if(p.isObject(e)){var i=u.extend(!0,{},e);return u.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(!(!p.isUndefined(t)&&p.isObject(t))||!t.input_changed||p.contains(["title_text"],t.input_changed)){if(p.isEmpty(o.title)){var s=p.findIndex(n.itemCollection(),function(e){return e.id===i.id});s=p.isUndefined(s)?1:s+1}else r=o.title;r=d.CZR_Helpers.truncate(r,25);var a=u("."+n.control.css_attr.item_title,i.container).find(".sek-accord-title"),c=o.title_text?o.title_text:"";c=u("<div>").html(c).text();var l=i.module.container.find(".czr-items-wrapper > li").index(i.container);c=(c=p.isEmpty(c)?sektionsLocalizedData.i18n["Accordion title"]+" #"+(+l+1):c).substring(0,60),a.length<1?(u("."+n.control.css_attr.item_title,i.container).html(""),u("."+n.control.css_attr.item_title,i.container).append(u("<div/>",{class:"sek-accord-title",html:c}))):a.html(c)}},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=p.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=p.without(n,p.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=u.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=d(i.control.id).transport||!p.has(e,"dom_event")||p.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||{},u.extend(d.czrModuleMap,{czr_accordion_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:d.czr_sektions.getRegisteredModuleProperty("czr_accordion_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:d.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_collection_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){n.CZRItem.prototype.ready.call(this)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_accordion_opts_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_accordion_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_opts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_shortcode_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_shortcode_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_shortcode_module")}})}(wp.customize,jQuery,_);
1
+ !function(p,m){p.CZR_Helpers.getInputSubTemplate=function(e){return 0<m("#tmpl-nimble-subtemplate___"+e).length?wp.template("nimble-subtemplate___"+e):(p.errare("problem in api.czr_sektions.getInputSubTemplate(), missing js template in the DOM for template_name : "+e),null)};var f=p.CZR_Helpers.getModuleTmpl;p.CZR_Helpers.getModuleTmpl=function(n){if(-1===(n=_.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:p.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"),!p.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=p.czr_sektions.getRegisteredModuleProperty(n.module_type,"tmpl"),t=_.isObject(e)&&e[n.tmpl]?e[n.tmpl]:{};!_.isEmpty(t)&&_.isObject(t)||(p.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,{},p.czr_sektions.getDefaultItemModelFromRegisteredModuleData(n.module_type)),s=m.extend(!0,{},i);r=m.extend(s,r),_.isEmpty(r)&&(p.errare("getModuleTmpl => Error invalid item model for module : ",n.module_type),o.reject("getModuleTmpl => Error invalid item model for module : ",n.module_type));var a,c="",l=function(e){var i="";return _.each(e,function(e,t){a=e.input_type;try{i+=wp.template("nimble-input-wrapper")({input_type:a,input_data:e,input_id:t,item_model:r,input_tmpl:function(e){var t=e;switch(e){case"czr_layouts":case"select":case"simpleselect":case"fa_icon_picker":case"font_picker":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"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):(p.errare("problem in getInputTemplate(), missing js template in the DOM for input_type : "+e),null)}(a),control_id:n.control_id})}catch(e){return p.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="",u="";_.each(t.tabs,function(e,t){var i=m.extend(!0,{},e);i=m.extend({inputs:{},title:""},i);var n=_.isEmpty(i.attributes)?"":i.attributes;d+='<li data-tab-id="section-topline-'+(+t+1)+'" '+n+'><a href="#" title="'+i.title+'"><span>'+i.title+"</span></a></li>";var o=l(i.inputs);u+='<section id="section-topline-'+(+t+1)+'">'+o+"</section>"}),c+=['<div class="tabs tabs-style-topline">',"<nav>","<ul>",d,"</ul>","</nav>",'<div class="content-wrap">',u,"</div>","</div>"].join("")}else c=l(t);return o.resolve(c).promise()}}(wp.customize,jQuery);var CZRSeksPrototype=CZRSeksPrototype||{};!function(n,r){r.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(n.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 n.Value({}),e.registered=new n.Value([]),n.bind("ready",function(){e.doSektionThinksOnApiReady()}),n.bind("save-request-params",function(e){r.extend(e,{local_skope_id:n.czr_skopeBase.getSkopeProperty("skope_id")})});var t=function(){_.isArray(n.czrActiveWPEditors)&&(_.each(n.czrActiveWPEditors,function(e){wp.editor.remove(e)}),n.czrActiveWPEditors=[])};n.bind("sek-before-clean-registered",t),n.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){n.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),n.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),n.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"})}))})}),n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),n.trigger("nimble-ready-for-current-skope")};_.isEmpty(n.czr_activeSkopes().local)||i(),n.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){n.previewedDevice("desktop")}),n.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){n.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){r(this).trigger("click")})})})}),r("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){n.previewer.trigger("sek-reset-collection",{scope:"local"})}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&n.control(e.id,function(e){e.container.find("[draggable]").each(function(){r(this).off("dragstart dragend")})}),"control"==e.what&&n.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(r(this).data("czrSelect2"))||r(this).czrSelect2("destroy")})})}),n.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=r.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 n.Value([]),n.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[])}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI(),o.lastClickedTargetInPreview=new n.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?n.previewer.send("sek-set-double-click-target",e):n.previewer.send("sek-reset-double-click-target"),clearTimeout(r(window).data("_preview_target_timer_")),r(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),n.previewer.send("sek-reset-double-click-target")},2e4))}),n.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),r(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){n.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),n.previewer.bind("multi-items-module-refreshed",function(t){_.isUndefined(t.apiParams.control_id)||n.control(t.apiParams.control_id,function(e){_.isUndefined(e.params.sek_registration_params)||n.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")})})})})},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=n.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});n.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}sektionsLocalizedData.eligibleForFeedbackNotification&&n.expanded.bind(function(e){e&&_.isUndefined(o.feedbackUIVisible)&&o.setupFeedBackUI()})})}),n.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"postMessage",type:"option"}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=n.czr_initialSkopeCollectionPopulated.state()?n.czr_initialSkopeCollectionPopulated.done(function(){n.previewer.trigger("sek-pick-content",{focus:!1})}):n.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&n.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&n.previewer.trigger("sek-pick-content"),sektionsData=n.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&n.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(s(window).data("_scroll_move_timer_")),s(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};s(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){s(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){s("body").addClass("nimble-top-bar-visible")},200)}):(t=s.Deferred(),s("body").removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){var t,i=this;if(0<s(i.topBarId).length)return s(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}s("#customize-preview").after(s(t)),s(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),s(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),s("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(s(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),s(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(s(this).data("doc-href"),"_blank")});var n=function(e){s(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?s(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):s(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),s(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new l.Value([{status:"current",value:{local:l(this.localSectionsSettingId())(),global:l(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw l.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],s=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(s,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){_.isEmpty(r.local)||(l(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),l.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(s,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(s,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<c&&(t===c-1?newLog.status="current":t===c&&(newLog.status="future"));break;case"redo":s.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(z("body").toggleClass("sek-level-tree-expanded",e),e){if(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)})})}),z("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)}),z("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()}),z("body").on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),s=this.localSectionsSettingId(),a=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,s,a],function(e){b.has(e)||(c=e)}),!1===c){e=b(r)(),i=_.isObject(e)?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 l,d=_.union(i,n),u=!1,p=!1;o=b(a)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(u="nimble_local"===(l=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!u&&"theme"!==l&&(p="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===l);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)};u?h("local"):p&&h("global");var k,v=this.activeLocations(),y=[];_.isEmpty(v)?y=g:_.each(v,function(e){k=_.findWhere(g,{id:e}),_.isUndefined(k)||y.push(k)}),this.levelTree(y)}else 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={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i={svg:e.icon?sektionsLocalizedData.moduleIconPath+e.icon:"",font:e.font_icon?e.font_icon:""})}),_.isEmpty(i.svg)?_.isEmpty(i.font)?void 0:i.font:'<img class="sek-svg-mod-icon" src="'+i.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(a,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new a.Value(!1),n.saveUIVisible.bind(function(e,t,i){n.toggleSaveUI(e,i?i.id:null)})},toggleSaveUI:function(e,t){e=!!_.isUndefined(e)||e;var i,n=this;e?c.when(n.renderAndSetupSaveUITmpl({})).done(function(e){n.saveUIContainer=e,_.delay(function(){c("body").addClass("nimble-save-ui-visible")},200),c("#sek-saved-section-id").val(t)}):(i=c.Deferred(),c("body").removeClass("nimble-save-ui-visible"),0<c("#nimble-top-save-ui").length?_.delay(function(){n.saveUIContainer.remove(),i.resolve()},300):i.resolve(),i.promise()).done(function(){n.saveUIVisible(!1)})},preProcessSektion:function(e){var t=this.cleanIds(e);return _.omit(t,function(e,t){return _.contains(["id","level"],t)})},renderAndSetupSaveUITmpl:function(e){if(0<c("#nimble-top-save-ui").length)return c("#nimble-top-save-ui");var s=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return a.errare("Error when parsing the the top note template",e),!1}return c("#customize-preview").after(c(_tmpl)),c(".sek-do-save-section","#nimble-top-save-ui").on("click",function(e){e.preventDefault();var t=c.extend(!0,{},s.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=s.guid(),r=s.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")});c("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_section",{nonce:a.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){a.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n Your section has been saved.</strong>","</span>"].join("")})}).fail(function(e){a.errorLog("ajax sek_save_section => error",e),a.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")})})}),c(".sek-cancel-save","#nimble-top-save-ui").on("click",function(e){e.preventDefault(),s.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupFeedBackUI:function(){var t=this;t.feedbackLastUserAction="none",t.feedbackUIId="#nimble-feedback",t.feedbackUIVisible=new r.Value(!1),t.feedbackUIVisible.bind(function(e){t.levelTreeExpanded()||t.toggleFeddBackUI(e),e&&t.refreshSelfClosingTimer()}),t.feedbackUIVisible(!0)},refreshSelfClosingTimer:function(){var e=this;clearTimeout(s(e.feedbackUIId).data("_feedback_user_action_timer_")),s(e.feedbackUIId).data("_feedback_user_action_timer_",setTimeout(function(){_.contains(["go_review","reporting_problem"],e.feedbackLastUserAction)||e.feedbackUIVisible(!1)},6e4))},toggleFeddBackUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupFeedbackTmpl({})).done(function(e){_.delay(function(){s("body").addClass("nimble-feedback-ui-visible")},200)}):(t=s.Deferred(),s("body").removeClass("nimble-feedback-ui-visible"),0<s(i.feedbackUIId).length?_.delay(function(){s(i.feedbackUIId).remove(),t.resolve()},300):t.resolve(),t.promise()).done(function(){i.feedbackUIVisible(!1)})},renderAndSetupFeedbackTmpl:function(e){var t,i=this;if(0<s(i.feedbackUIId).length)return s(i.feedbackUIId);try{t=wp.template("nimble-feedback-ui")({})}catch(e){return r.errare("Error when parsing the the feedback template",e),!1}if(s("#customize-preview").after(s(t)),!i.feedbackEventsScheduled){var n=s(i.feedbackUIId).data("sek-dismiss-pointer"),o=function(){wp.ajax.post("dismiss-wp-pointer",{pointer:n}).fail(function(e){r.errare("ajax dismiss failure",e)})};return s("body").on("click","[data-sek-feedback-action]",function(e){e.preventDefault(),i.refreshSelfClosingTimer();var t=s(this).data("sek-feedback-action");switch(i.feedbackLastUserAction=t){case"not_enjoying":s(i.feedbackUIId).find(".sek-feedback-step-one").hide(),s(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").show();break;case"enjoying":s(i.feedbackUIId).find(".sek-feedback-step-one").hide(),s(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").show();break;case"reporting_problem":window.open(s(this).data("problem-href"),"_blank");break;case"go_review":window.open("https://wordpress.org/support/plugin/nimble-builder/reviews/?filter=5/#new-post","_blank");break;case"maybe_later":i.feedbackUIVisible(!1),wp.ajax.post("sek_postpone_feedback",{nonce:r.settings.nonce.save,transient_duration_in_days:30}).fail(function(e){r.errare("ajax dismiss failure",e)});break;case"already_did":s(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").hide(),s(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").hide(),s(i.feedbackUIId).find(".sek-feedback-step-three-thanks").show(),_.delay(function(){i.feedbackUIVisible(!1)},3e3),o();break;case"dismiss":i.feedbackUIVisible(!1),o();break;default:r.errare("::renderAndSetupFeedbackTmpl => invalid action")}}),i.feedbackEventsScheduled=!0,s(i.feedbackUIId)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=c.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return c.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],s=function(e){c.errare(e,i),sektionsLocalizedData.isDevMode&&c.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),r=!0},a=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=l.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void s("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void s('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void s("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void s("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,a(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void s("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void s("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void s("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void s('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void s("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void s("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&c.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void s("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void s("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void s("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void s("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void s("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=l.extend(!0,{},t),_.isUndefined(e)?s("validation error => undefined level "):a(e)})}};return a(),r?null:i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);return l.extend(!0,{},this.getDefaultSektionSettingValue(e))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-content",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return a=!0,s={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(a=!0,s={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;default:c.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-move-section-up":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-up",moved_level_id:e.apiParams.id})}},"sek-move-section-down":{callback:function(e){return a=!1,s={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location,original_action:"sek-move-section-down",moved_level_id:e.apiParams.id})}},"sek-duplicate":{callback:function(e){switch(a=!0,s={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),t=e.apiParams.location,c.previewer.send("sek-animate-to-level",{id:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_sektion;break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_column}c.previewer.trigger("sek-refresh-stylesheet",{id:t,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid();break;case"preset_section":c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),c.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId});break;case"preset_section":c.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id")),c.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&c.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return a=!1,s={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},c.czr_sektions.currentContentPickerType=c.czr_sektions.currentContentPickerType||new c.Value,c.czr_sektions.currentContentPickerType(e.content_type||"module"),_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),a=!0,r={},s={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s))},"sek-edit-module":function(e){return a=!0,r={},s={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(s)},"sek-notify":function(t){a=!1;var i=t.notif_id||"sek-notify";return o.lastNimbleNotificationId&&c.notifications.remove(o.lastNimbleNotificationId),n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),o.lastNimbleNotificationId=i,_.delay(function(){c.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id,original_action:t.original_action,moved_level_id:t.moved_level_id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return a=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-reset-collection":{callback:function(e){return a=!1,s={},(r=e).action="sek-reset-collection",r.scope=e.scope,o.updateAPISetting(r)},complete:function(e){c.previewer.refresh(),c.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){e=e||{},a?c.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:s,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId,all_params:t}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){c.errare("reactToPreviewMsg => problem or error when running action "+n,e),!_.isEmpty(e)&&sektionsLocalizedData.isDevMode&&c.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this;c.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(v,y){y.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=y.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){v.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){v.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){v.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){v.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){v.errare("::generateUI() => error",e),i=y.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(o){if(!_.isEmpty(o.settingParams)&&_.has(o.settingParams,"to")){var r,s=this,e=o.settingParams.to,t=null,a=!1;if(!_.isEmpty(o.settingParams.args)&&_.has(o.settingParams.args,"moduleRegistrationParams")){var c=o.settingParams.args.moduleRegistrationParams.control,i=o.settingParams.args.moduleRegistrationParams.id,n=c.czr_Module(i);if(_.isEmpty(n)?v.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",o):(t=n.module_type,a=n.isMultiItem()),!a&&_.isObject(e)?r=s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!1}):(r=[],_.each(e,function(e){r.push(s.normalizeAndSanitizeSingleItemInputValues({item_value:e,parent_module_type:t,is_multi_items:!0}))})),_.isEmpty(o.defaultPreviewAction))v.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",o);else{var l,d="refresh_stylesheet"===o.defaultPreviewAction,u="refresh_markup"===o.defaultPreviewAction,p="refresh_fonts"===o.defaultPreviewAction,m="refresh_preview"===o.defaultPreviewAction,f=o.settingParams.args.input_changed,g=function(){return l&&_.isString(l.refresh_markup)&&"true"!==l.refresh_markup&&"false"!==l.refresh_markup};_.isUndefined(f)||(l=s.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=g()?l.refresh_markup:Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var h=function(){if(!0!==o.isGlobalOptions)return s.updateAPISetting({action:o.uiParams.action,id:o.uiParams.id,value:r,in_column:o.uiParams.in_column,in_sektion:o.uiParams.in_sektion,options_type:o.options_type,settingParams:o.settingParams}).done(function(e){var t;!0===d&&v.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:v.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:v.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:o.uiParams.id,level:o.uiParams.level}}),a&&o.settingParams.args.inputRegistrationParams&&_.isFunction(o.settingParams.args.inputRegistrationParams.input_parent)&&(t=o.settingParams.args.inputRegistrationParams.input_parent.id);var i=function(){v.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:v.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:v.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:o.uiParams.id,level:o.uiParams.level,changed_item_id:t,control_id:c.id,is_multi_items:a},skope_id:v.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===u&&i(),g()){var n=o.settingParams.args.input_value;if(!_.isString(n))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");s.htmlIncludesShortcodesOrTmplTags(n)?i():v.previewer.send("sek-update-html-in-selector",{selector:l.refresh_markup,changed_item_id:t,is_multi_items:a,html:n,id:o.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:v.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:v.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:o.uiParams.id,level:o.uiParams.level},skope_id:v.czr_skopeBase.getSkopeProperty("skope_id")})}!0===m&&v.previewer.refresh()}).fail(function(e){v.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated",e),v.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ",o)});if(_.isEmpty(o.options_type))v.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=v(sektionsLocalizedData.optNameForGlobalOptions)(),t=y.extend(!0,{},_.isObject(e)?e:{}),i={};if(_.each(r||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[o.options_type]=i,v(sektionsLocalizedData.optNameForGlobalOptions)(t),!1!==m&&v.previewer.refresh(),!0===p){var n=o.settingParams.args.input_value;if(!_.isString(n))return void v.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",n);-1<n.indexOf("gfont")&&s.updateGlobalGFonts(n)}!0===d&&v.previewer.send("sek-refresh-stylesheet",{local_skope_id:v.czr_skopeBase.getSkopeProperty("skope_id"),location_skope_id:sektionsLocalizedData.globalSkopeId})}};if(!0===p){var k=o.settingParams.args.input_value;if(!_.isString(k))return void v.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);-1<k.indexOf("gfont")?!0===o.isGlobalOptions?h():s.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:s.isGlobalLocation(o.uiParams)}).always(function(){h().then(function(){s.updateAPISetting({action:"sek-update-fonts",is_global_location:s.isGlobalLocation(o.uiParams)})})}):h()}else h()}}else v.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",o)}else v.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",o)},updateGlobalGFonts:function(e){var t=v(sektionsLocalizedData.optNameForGlobalOptions)(),i=y.extend(!0,{},_.isObject(t)?t:{}),n=this.sniffGlobalGFonts(i);if(!_.contains(n,e)){if(e.indexOf("gfont")<0)return v.errare("updateAPISetting => "+params.action+" => error => must be a google font, prefixed gfont"),void __updateAPISettingDeferred__.reject("updateAPISetting => "+params.action+" => error => must be a google font, prefixed gfont");n.push(e)}i.fonts=n,v(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))&&v.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=v.control.has(t):(i=!0,1<e.length&&v.errare("generateUI => why is this control registered more than once ? => "+t)),i},htmlIncludesShortcodesOrTmplTags:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=[],o=[];if(t)for(var r=0;r<t.length;r++){var s=t[r].replace(/^\[+/g,"");-1===n.indexOf(s)&&n.push(s)}if(i)for(var a=0;a<i.length;a++){var c=i[a].replace(/^\[+/g,"");-1===o.indexOf(c)&&o.push(c)}return!_.isEmpty(n)||!_.isEmpty(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};a.extend(t,{content_type_switcher:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:sektionsLocalizedData.i18n["Select a content type"],priority:10,settingValue:{content_type:o.content_type}},module_picker:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:sektionsLocalizedData.i18n["Pick a module"],content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_intro_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_intro_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for an introduction"],content_type:"section",expandAndFocusOnInit:!0,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_features_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_features_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for services and features"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_about_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_about_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["About us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_contact_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_contact_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Contact-us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_column_layouts_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_column_layouts_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Empty sections with columns layout"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_header_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_header_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Header sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_footer_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_footer_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Footer sections"],content_type:"section",expandAndFocusOnInit:!1,priority:30,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&a.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:"@missi18n My sections",content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return r.isUIControlAlreadyRegistered(n)?s.control(n,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(t,function(n,e){s.has(n.settingControlId)||(s(n.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.SECTION_ID_FOR_CONTENT_PICKER,priority:n.priority||10,settings:{default:n.settingControlId},track:!1}).done(function(){s.control(n.settingControlId,function(e){e.content_type=n.content_type,!0===o.focus&&e.focus({completeCallback:function(){}});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),"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===n.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(r.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>'),r.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,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var s=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=s.getLevelProperty({property:"value",id:r.id}),t=s.getLevelProperty({property:"module_type",id:r.id}),n=s.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===s.getRegisteredModuleProperty(t,"is_father")){var a=s.getRegisteredModuleProperty(t,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(a,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:s.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var c=_.keys(o)[0],l=o[c].settingControlId;return s.isUIControlAlreadyRegistered(l)?d.control(l).focus({completeCallback:function(){var e=d.control(l).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=u.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=u("<div/>").html(t.html()).text();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})},d.section(r.id,function(e){d.section(r.id).focus(),s.generateModuleOptionSwitcherUI(r.id,r.action),_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){})),e},generateModuleOptionSwitcherUI:function(e,t){var i=e+"__option_switcher";d.has(i)||(d(i,function(e){e.bind(function(e,t){d.errare("generateUIforDraggableContent => the setting() should not changed")})}),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"setting",id:i,dirty:!1,value:"",transport:"postMessage",type:"_nimble_ui_"})),d.CZR_Helpers.register({origin:"nimble",level:"module",what:"control",module_id:e,id:i,label:"",type:"czr_module",module_type:"sek_mod_option_switcher_module",section:e,priority:10,settings:{default:i},has_accordion:!1,ui_action:t}).done(function(){d.control(i,function(e){e.deferred.embedded.done(function(){e.container.find(".customize-control-title").hide(),e.container.attr("data-sek-accordion","no")})})})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(s,e){var a=this,c=a.getLevelProperty({property:"options",id:s.id});c=_.isObject(c)?c:{};var t={};d.extend(t,{bg:{settingControlId:s.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'}}),"section"===s.level&&d.extend(t,{level_text:{settingControlId:s.id+"__text_options",module_type:"sek_level_text_module",controlLabel:sektionsLocalizedData.i18n["Text settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">text_format</i>'}}),d.extend(t,{border:{settingControlId:s.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:s.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:s.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:s.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:s.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"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 settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return a.isUIControlAlreadyRegistered(n)?l.control(n).focus({completeCallback:function(){var e=l.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(a.cleanRegistered(),_do_register_=function(){_.each(t,function(n,o){if(a.isUIControlAlreadyRegistered(n.settingControlId))l.section(l.control(n.settingControlId).section()).expanded(!0);else{if(!l.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=a.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,level_id:s.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.id,priority:20,settings:{default:n.settingControlId}}).done(function(){}),l.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})}})},l.section(s.id,function(e){_do_register_(),"module"===s.level&&a.generateModuleOptionSwitcherUI(s.id,s.action),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!1})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:s.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+s.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=l.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(l.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(s,e){var a=this,i=a.getLocalSkopeOptionId();if(a.isUIControlAlreadyRegistered(i))return e;if(a.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===s.clean_settings&&a.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":a.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"widths":a.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":a.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"local_reset":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":a.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:l.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=l(a.localSectionsSettingId())(),c=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(a.localOptionsRegistrationParams,function(n,o){var e=a.getModuleStartingValue(n.module_type),t=_.isObject(c[o])?c[o]:{};if(!l.has(n.settingControlId)){var i=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(l(n.settingControlId,function(e){e.bind(_.debounce(i,a.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){l.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(s,e){var a=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(a.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_text":n[t]={settingControlId:i+"__global_text",module_type:e,controlLabel:sektionsLocalizedData.i18n["Global text options for Nimble sections"],icon:'<i class="material-icons sek-level-option-icon">text_format</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"global_header_footer":n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_imp_exp":n[t]={settingControlId:i+"__global_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import global sections"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:l.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh_preview",uiParams:s,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=a.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.attr("data-sek-expanded","false");var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(ue,pe){pe.extend(CZRSeksPrototype,{updateAPISetting:function(ae){var ce=this,le=pe.Deferred();(ae=ae||{}).is_global_location="global"===ae.scope||ce.isGlobalLocation(ae);var de=ae.is_global_location?ce.getGlobalSectionsSettingId():ce.localSectionsSettingId(),t=function(){var r,t,s,i,n,o,a,e,c,l=ue(de)(),d=_.isObject(l)?pe.extend(!0,{},l):ce.getDefaultSektionSettingValue(ae.is_global_location?"global":"local"),u="_not_injection_scenario_";switch(d.collection=_.isArray(d.collection)?d.collection:ce.getDefaultSektionSettingValue(ae.is_global_location?"global":"local").collection,ae.action){case"sek-add-section":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if(_.isEmpty(ae.location))throw new Error("updateAPISetting => "+ae.action+" => missing location");if(!0===ae.is_nested){if(s=ce.getLevelModel(ae.in_column,d.collection),"no_match"==(c=ce.getLevelModel(ae.in_sektion,d.collection))){le.reject("updateAPISetting => "+ae.action+" => no grand parent sektion found");break}if(!0===c.is_nested){le.reject(""),ue.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("")});break}if("no_match"==s){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}s.collection=_.isArray(s.collection)?s.collection:[],s.collection.push({id:ae.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}r.collection=_.isArray(r.collection)?r.collection:[],_.each(r.collection,function(e,t){ae.before_section===e.id&&(O=t),ae.after_section===e.id&&(O=t+1)}),r.collection=_.isArray(r.collection)?r.collection:[],r.collection.splice(O,0,{id:ae.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if(_.isEmpty(ae.location))throw new Error("updateAPISetting => "+ae.action+" => missing location");var p;try{p=ce.cloneLevel(ae.id)}catch(e){ue.errare("updateAPISetting => "+ae.action,e);break}ce.maybeGenerateNewItemIdsForCrudModules(p);var m=ce.getLevelPositionInCollection(ae.id,d.collection);if(!0===ae.is_nested){if("no_match"==(s=ce.getLevelModel(ae.in_column,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}s.collection=_.isArray(s.collection)?s.collection:[],s.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}r.collection=_.isArray(r.collection)?r.collection:[],r.collection.splice(parseInt(m+1,10),0,p)}a=p.id;break;case"sek-remove-section":if(!0===ae.is_nested)"no_match"!=(s=ce.getLevelModel(ae.in_column,d.collection))?(s.collection=_.isArray(s.collection)?s.collection:[],s.collection=_.filter(s.collection,function(e){return e.id!=ae.id})):ue.errare("updateAPISetting => "+ae.action+" => no parent column matched");else{if("no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}r.collection=_.filter(r.collection,function(e){return e.id!=ae.id})}break;case"sek-move-section":var f,g,h=ce.getLevelModel(ae.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+ae.action+" => missing target location");if(ae.from_location!=ae.to_location){var k=ce.getLevelModel(ae.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+ae.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],f=ce.getLevelModel(ae.id,k.collection),g=pe.extend(!0,{},f),k.collection=_.filter(k.collection,function(e){return e.id!=ae.id})}h.collection=_.isArray(h.collection)?h.collection:[],n=pe.extend(!0,[],h.collection),o=[],_.each(ae.newOrder,function(e){if(ae.from_location!=ae.to_location&&e==g.id)o.push(g);else{if(t=ce.getLevelModel(e,n),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+ae.action+" => missing section candidate");o.push(t)}}),h.collection=o;break;case"sek-move-section-up-down":if(parentCandidate=ce.getLevelModel(ae.is_nested?ae.in_column:ae.location,d.collection),_.isEmpty(parentCandidate)||"no_match"==parentCandidate)throw new Error("updateAPISetting => "+ae.action+" => missing target location");parentCandidate.collection=_.isArray(parentCandidate.collection)?parentCandidate.collection:[],n=pe.extend(!0,[],parentCandidate.collection),o=pe.extend(!0,[],parentCandidate.collection);var v=_.findIndex(n,function(e){return e.id===ae.id});if(-1===v)throw new Error("updateAPISetting => "+ae.action+" => invalid index");var y=ae.direction||"up";if("up"!==y&&n.length===v+1)throw new Error("updateAPISetting => "+ae.action+" => bottom reached");if("up"===y&&0===v)throw new Error("updateAPISetting => "+ae.action+" => top reached");o[v]=n["up"===y?v-1:v+1],o["up"===y?v-1:v+1]=n[v],parentCandidate.collection=o;break;case"sek-add-column":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if("no_match"==(t=ce.getLevelModel(ae.in_sektion,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched"),le.reject("updateAPISetting => "+ae.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ce.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){le.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}ce.resetColumnsWidthInSection(t),t.collection.push({id:ae.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=ce.getLevelModel(ae.in_sektion,d.collection))){if(1===_.size(t.collection)){le.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection=_.filter(t.collection,function(e){return e.id!=ae.id}),ce.resetColumnsWidthInSection(t)}else ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if("no_match"==(t=ce.getLevelModel(ae.in_sektion,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched"),le.reject("updateAPISetting => "+ae.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ce.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){le.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var b;try{b=ce.cloneLevel(ae.id)}catch(e){ue.errare("updateAPISetting => "+ae.action,e);break}ce.maybeGenerateNewItemIdsForCrudModules(b);var z=ce.getLevelPositionInCollection(ae.id,d.collection);a=b.id,t.collection.splice(parseInt(z+1,10),0,b),ce.resetColumnsWidthInSection(t);break;case"sek-resize-columns":if(ae.col_number<2)break;var I=ce.getLevelModel(ae.resized_column,d.collection),w=ce.getLevelModel(ae.sister_column,d.collection);if("no_match"==I){ue.errare("updateAPISetting => "+ae.action+" => no resized column matched"),le.reject("updateAPISetting => "+ae.action+" => no resized column matched");break}var M=function(e,t){var i=pe.extend(!0,{},e.options||{});return i.width=_.isObject(i.width)?i.width:{},i.width["custom-width"]=t,e.options=i,pe("body").find('[data-sek-width-range-column-id="'+e.id+'"]').val(t).trigger("input",{is_resize_column_trigger:!0}),t},D=M(I,parseFloat(ae.resizedColumnWidthInPercent));D=parseFloat(D);var C=ce.getLevelModel(ae.in_sektion,d.collection),S=_.filter(C.collection,function(e){return e.id!=I.id&&e.id!=w.id}),x=parseFloat(D.toFixed(3));_.isEmpty(S)||_.each(S,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=M(e,parseFloat((100/ae.col_number).toFixed(3)))),x=parseFloat((x+currentColWidth).toFixed(3))}),M(w,parseFloat((100-x).toFixed(3)));break;case"sek-move-column":var P,E,R=ce.getLevelModel(ae.to_sektion,d.collection);if(_.isEmpty(R)||"no_match"==R)throw new Error("updateAPISetting => "+ae.action+" => missing target sektion");if(ae.from_sektion!=ae.to_sektion){var L=ce.getLevelModel(ae.from_sektion,d.collection);if(_.isEmpty(L)||"no_match"==L)throw new Error("updateAPISetting => "+ae.action+" => missing source column");L.collection=_.isArray(L.collection)?L.collection:[],P=ce.getLevelModel(ae.id,L.collection),E=pe.extend(!0,{},P),L.collection=_.filter(L.collection,function(e){return e.id!=ae.id}),ce.resetColumnsWidthInSection(L)}R.collection=_.isArray(R.collection)?R.collection:[],n=pe.extend(!0,[],R.collection),o=[],_.each(ae.newOrder,function(e){if(ae.from_sektion!=ae.to_sektion&&e==E.id)o.push(E);else{if(s=ce.getLevelModel(e,n),_.isEmpty(s)||"no_match"==s)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");o.push(s)}}),R.collection=o,ce.resetColumnsWidthInSection(R);break;case"sek-add-module":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if(_.isEmpty(ae.module_type))throw new Error("updateAPISetting => "+ae.action+" => missing module_type");if("no_match"===(s=ce.getLevelModel(ae.in_column,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}var O=0;s.collection=_.isArray(s.collection)?s.collection:[],_.each(s.collection,function(e,t){ae.before_module===e.id&&(O=t),ae.after_module===e.id&&(O=t+1)});var j={id:ae.id,level:"module",module_type:ae.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(e=ce.getModuleStartingValue(ae.module_type))&&(j.value=e),s.collection.splice(O,0,j);break;case"sek-duplicate-module":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");if("no_match"==(s=ce.getLevelModel(ae.in_column,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}var A;s.collection=_.isArray(s.collection)?s.collection:[];try{A=ce.cloneLevel(ae.id)}catch(e){ue.errare("updateAPISetting => "+ae.action,e),le.reject("updateAPISetting => "+ae.action+" => error when cloning the level");break}ce.maybeGenerateNewItemIdsForCrudModules(A);var T=ce.getLevelPositionInCollection(ae.id,d.collection);a=A.id,s.collection.splice(parseInt(T+1,10),0,A);break;case"sek-remove-module":if(_.isEmpty(ae.id))throw new Error("updateAPISetting => "+ae.action+" => missing id");"no_match"!=(s=ce.getLevelModel(ae.in_column,d.collection))?(s.collection=_.isArray(s.collection)?s.collection:[],s.collection=_.filter(s.collection,function(e){return e.id!=ae.id})):ue.errare("updateAPISetting => "+ae.action+" => no parent column matched");break;case"sek-move-module":var V,Z,F;if(V=ce.getLevelModel(ae.to_column,d.collection),_.isEmpty(V)||"no_match"==V)throw new Error("updateAPISetting => "+ae.action+" => missing target column");if(ae.from_column!=ae.to_column){var U;if(U=ce.getLevelModel(ae.from_column,d.collection),_.isEmpty(U)||"no_match"==U)throw new Error("updateAPISetting => "+ae.action+" => missing source column");U.collection=_.isArray(U.collection)?U.collection:[],Z=ce.getLevelModel(ae.id,d.collection),F=pe.extend(!0,{},Z),U.collection=_.filter(U.collection,function(e){return e.id!=ae.id})}if(V.collection=_.isArray(V.collection)?V.collection:[],n=pe.extend(!0,[],V.collection),o=[],_.each(ae.newOrder,function(e){if(ae.from_column!=ae.to_column&&e==F.id)o.push(F);else{if(i=ce.getLevelModel(e,d.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+ae.action+" => missing moduleCandidate");o.push(i)}}),o.length!=_.uniq(o).length)throw new Error("updateAPISetting => "+ae.action+" => there are duplicated modules in column : "+V.id);V.collection=o;break;case"sek-set-module-value":i=ce.getLevelModel(ae.id,d.collection);var N={};if(_.each(ae.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),"no_match"==i){ue.errare("updateAPISetting => "+ae.action+" => no module matched",ae),le.reject("updateAPISetting => "+ae.action+" => error no module matched");break}if(_.isEmpty(ae.options_type)){ue.errare("updateAPISetting => "+ae.action+" => missing options_type"),le.reject("updateAPISetting => "+ae.action+" => missing options_type");break}if("__no_option_group_to_be_updated_by_children_modules__"===ae.options_type)i.value=N;else{var B=pe.extend(!0,{},_.isEmpty(i.value)?{}:i.value);B[ae.options_type]=N,i.value=B}break;case"sek-generate-level-options-ui":var Q=ce.getLevelModel(ae.id,d.collection),H={};if("no_match"===Q){ue.errare("updateAPISetting => "+ae.action+" => no parent sektion matched"),le.reject("updateAPISetting => "+ae.action+" => no parent sektion matched");break}var W=pe.extend(!0,{},Q.options||{});_.each(ae.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(H[t]=e)}),_.isEmpty(ae.options_type)&&ue.errare("updateAPISetting => "+ae.action+" => missing options_type"),W[ae.options_type]=H,Q.options=W;break;case"sek-generate-local-skope-options-ui":H={};var G=pe.extend(!0,{},_.isObject(d.local_options)?d.local_options:{});if(_.each(ae.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(H[t]=e)}),_.isEmpty(ae.options_type)||!_.isString(ae.options_type))ue.errare("updateAPISetting => "+ae.action+" => missing options_type");else{var q={};q[ae.options_type]=H,d.local_options=pe.extend(G,q)}break;case"sek-add-content-in-new-sektion":if(O=0,"no_match"==(r=ce.getLevelModel(ae.location,d.collection))){ue.errare("updateAPISetting => "+ae.action+" => no location matched"),le.reject("updateAPISetting => "+ae.action+" => no location matched");break}switch(r.collection=_.isArray(r.collection)?r.collection:[],_.each(r.collection,function(e,t){ae.before_section===e.id&&(O=t),ae.after_section===e.id&&(O=t+1)}),ae.content_type){case"module":e=ce.getModuleStartingValue(ae.content_id),r.collection.splice(O,0,{id:ae.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid(),level:"column",collection:[{id:ae.droppedModuleId,level:"module",module_type:ae.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":u=pe.Deferred();var $=function(e,t){t=t||0;var i=!1;if(!_.isEmpty(ae.sektion_to_replace)){var n=ce.getLevelModel(ae.sektion_to_replace,d.collection);"no_match"===n&&(ue.errare("updateAPISetting => "+ae.action+" => no sektionToReplace matched"),le.reject("updateAPISetting => "+ae.action+" => no sektionToReplace matched")),i=!0===n.is_nested}var o=sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid();ae.collection_of_preset_section_id=ae.collection_of_preset_section_id||[],ae.collection_of_preset_section_id.push(o),i?("no_match"===(s=ce.getLevelModel(ae.in_column,d.collection))&&(ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched")),s.collection=_.isArray(s.collection)?s.collection:[],_.each(s.collection,function(e,t){ae.before_section===e.id&&(O=t),ae.after_section===e.id&&(O=t+1)}),s.collection.splice(O+t,0,{id:o,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):r.collection.splice(O+t,0,{id:o,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})},Y=function(e){ce.preparePresetSectionForInjection(e).fail(function(e){le.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ae.action+" => "+e),u.reject(e)}).done(function(e){if("section"===e.collection[0].level){var t=0;_.each(e.collection,function(e){$(e,t),t++})}else $(e,O);u.resolve()})};ce.getPresetSectionCollection({is_user_section:ae.is_user_section,presetSectionId:ae.content_id}).fail(function(e){ue.errare("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()",e),le.reject("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ue.errare("updateAPISetting => "+ae.action+" => preset section type not found or empty : "+ae.content_id,e),le.reject("updateAPISetting => "+ae.action+" => preset section type not found or empty")),Y(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(s=ce.getLevelModel(ae.in_column,d.collection),"no_match"==(c=ce.getLevelModel(ae.in_sektion,d.collection))){le.reject("updateAPISetting => "+ae.action+" => no grand parent sektion found");break}if(!0===c.is_nested){le.reject(""),ue.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("")});break}if("no_match"==s){ue.errare("updateAPISetting => "+ae.action+" => no parent column matched"),le.reject("updateAPISetting => "+ae.action+" => no parent column matched");break}s.collection=_.isArray(s.collection)?s.collection:[],u=pe.Deferred(),Y=function(e){ce.preparePresetSectionForInjection(e).fail(function(e){le.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ae.action+" => "+e),u.reject(e)}).done(function(e){var t=function(e){var t=sektionsLocalizedData.optPrefixForSektionsNotSaved+ce.guid();ae.collection_of_preset_section_id=ae.collection_of_preset_section_id||[],ae.collection_of_preset_section_id.push(t),s.collection.push({id:t,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)}):t(e),u.resolve()})},ce.getPresetSectionCollection({is_user_section:ae.is_user_section,presetSectionId:ae.content_id}).fail(function(){ue.errare("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()",_er_),le.reject("updateAPISetting => "+ae.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ue.errare("updateAPISetting => "+ae.action+" => preset section type not found or empty : "+ae.content_id,e),le.reject("updateAPISetting => "+ae.action+" => preset section type not found or empty")),Y(e)});break;case"sek-update-fonts":var J=ce.sniffGFonts({is_global_location:ae&&!0===ae.is_global_location});if(!_.isEmpty(ae.font_family)&&_.isString(ae.font_family)&&!_.contains(J,ae.font_family)){if(ae.font_family.indexOf("gfont")<0){ue.errare("updateAPISetting => "+ae.action+" => error => must be a google font, prefixed gfont"),le.reject("updateAPISetting => "+ae.action+" => error => must be a google font, prefixed gfont");break}J.push(ae.font_family)}d.fonts=J;break;case"sek-restore-revision":d=ae.revision_value;break;case"sek-import-from-file":if(ue.infoLog("sek-import-from-file",ae),_.isUndefined(ae.imported_content.data)||_.isUndefined(ae.imported_content.metas)){ue.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);break}var K=_.isArray(ae.imported_content.data.collection)?pe.extend(!0,[],ae.imported_content.data.collection):[];if(!0===ae.assign_missing_locations){var X=ae.imported_content.metas.active_locations,ee=ue.czr_sektions.activeLocations(),te=_.first(ee);if(!_.isEmpty(te)&&!_.isEmpty(X)&&_.isArray(X)){var ie=pe(X).not(ee).get(),ne=ce.getLevelModel(te,d.collection),oe=ce.getLevelModel(te,ae.imported_content.data.collection),re=[];ne.collection=_.isArray(ne.collection)?ne.collection:[],oe.collection=_.isArray(oe.collection)?oe.collection:[],_.each(X,function(e){var t=ce.getLevelModel(e,K);_.isEmpty(t.collection)||(re=_.union(re,t.collection))}),oe.collection=re,ae.imported_content.data.collection=_.filter(ae.imported_content.data.collection,function(e){return!_.contains(ie,e.id)})}}!0===ae.keep_existing_sections&&(_.each(K,function(e){var t=ce.getLevelModel(e.id,d.collection);if(!_.isEmpty(t.collection)){var i=ce.getLevelModel(e.id,ae.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}}),d.fonts&&!_.isEmpty(d.fonts)&&_.isArray(d.fonts)&&(ae.imported_content.data.fonts=_.isArray(ae.imported_content.data.fonts)?ae.imported_content.data.fonts:[],ae.imported_content.data.fonts=_.uniq(_.union(d.fonts,ae.imported_content.data.fonts)))),d=ae.imported_content.data;break;case"sek-reset-collection":try{d=ue.czr_sektions.resetCollectionSetting(ae.scope)}catch(e){ue.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==le.state()){var se=function(){var e=ae.settingParams&&ae.settingParams.from&&ae.settingParams.to;e&&_.isEqual(ae.settingParams.from,ae.settingParams.to)?le.reject("updateAPISetting => main sektion setting change => the new setting value is unchanged when firing action : "+ae.action):!e&&_.isEqual(l,d)?le.reject("updateAPISetting => the new setting value is unchanged when firing action : "+ae.action):null!==ce.validateSettingValue(d,ae.is_global_location?"global":"local")?(ue(de)(d,ae),ae.cloneId=a,le.resolve(ae)):le.reject("Validation problem for action "+ae.action)};"_not_injection_scenario_"===u?(se(),"pending"===le.state()&&ue.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")):u.done(function(){se(),"pending"===le.state()&&ue.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")}).fail(function(e){ue.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}};return ue(de,function(e){t()}),le.promise()},resetColumnsWidthInSection:function(e){_.each(e.collection,function(e){e.options&&e.options.width&&e.options.width["custom-width"]&&(e.options.width=_.omit(e.options.width,"custom-width")),e.width=""})},_maybeFetchSectionsFromServer:function(t){var e,i=pe.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(ue.sek_userSavedSections)||_.isEmpty(ue.sek_userSavedSections[t.preset_section_id])?(ue.sek_userSavedSections=ue.sek_userSavedSections||{},_.isUndefined(ue.sek_fetchingUserSavedSections)||"pending"!=ue.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:ue.settings.nonce.save,preset_section_id:t.preset_section_id}),ue.sek_fetchingUserSavedSections=e):e=ue.sek_fetchingUserSavedSections,e.done(function(e){ue.sek_userSavedSections[t.preset_section_id]=e,i.resolve(ue.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(ue.sek_userSavedSections):_.isEmpty(ue.sek_presetSections)?(_.isUndefined(ue.sek_fetchingPresetSections)||"pending"!=ue.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:ue.settings.nonce.save}),ue.sek_fetchingPresetSections=e):e=ue.sek_fetchingPresetSections,e.done(function(e){ue.sek_presetSections=e,i.resolve(ue.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(ue.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var s=this,a=pe.Deferred();return s._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){a.reject(e)}).done(function(e){var t=pe.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[r.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+r.presetSectionId+'" has not been found in the collection');var i=t[r.presetSectionId],n=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+s.guid(),_.isArray(e.collection)&&n(e.collection)}),e},o=function(e){return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&o(e.collection)}),e};i.collection=n(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o(i.collection),a.resolve(i)}),a.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=pe.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(n,o){o.extend(CZRSeksPrototype,{cleanRegistered:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);n.trigger("sek-before-clean-registered"),e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return!_.isEmpty(e.level)&&"setting"===e.what&&n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"===e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(u,p){p.extend(CZRSeksPrototype,{rootPanelFocus:function(){u.section.has(u.czr_activeSectionId())?u.section(u.czr_activeSectionId()).expanded(!1):u.section.each(function(e){e.expanded(!1)}),u.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},getLevelModel:function(i,n){var s=this,a="no_match",c=function(t,e,i,n){if(_.isUndefined(e)){var o=u(i)(),r=_.isObject(o)?p.extend(!0,{},o):p.extend(!0,{},s.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==a&&(t===e.id?a=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},getParentSectionFromColumnId:function(i,n){var s=this,a="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=u(n)(),r=_.isObject(t)?p.extend(!0,{},t):p.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){var t;"no_match"==a&&("section"==e.level&&(t=_.findWhere(e.collection,{id:i})),_.isEmpty(t)?_.isArray(e.collection)&&c(i,e.collection,n,o):a=e)}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,s=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=u(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?p.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)},getLevelPositionInCollection:function(i,n){var s=this,a="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=u(n)(),r=_.isObject(t)?p.extend(!0,{},t):p.extend(!0,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==a&&(i===e.id?a=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,e,t,n)}):c(i,n),a},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))u.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];u.errare("getLevelProperty => invalid model for id : "+e.id,t)}else u.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=p.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(sektionsLocalizedData.registeredModules[e].is_father)return u.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.optPrefixForSektionsNotSaved)&&(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=u(i)();e=_.isObject(t)?p.extend(!0,{},t):p.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 n=this,o=[],r=function(i,e){if(_.isUndefined(e)){var t=u(i)();e=_.isObject(t)?p.extend(!0,{},t):p.extend(!0,{},n.getDefaultSektionSettingValue(localOrGlobal))}_.each(e,function(e,t){_.isString(t)&&_.isString(e)&&(-1<e.indexOf("[gfont]")||-1<e.indexOf("[cfont]"))&&o.push(e),(_.isArray(e)||_.isObject(e))&&r(i,e)})};return _.each([n.localSectionsSettingId(),n.getGlobalSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){r(e)}),o},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))u.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))u.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}u.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))u.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))u.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}u.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))u.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))u.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}u.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}u.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){var a=this;if(!sektionsLocalizedData.registeredModules)return u.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return u.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t,i,n,c=function(e){return readyStartValues=[],_.each(e,function(e){if(_.isObject(e)){var t=p.extend(!0,{},e);t.id=u.czr_sektions.guid(),readyStartValues.push(t)}else u.errare("getModuleStartingValue => multi-item module => items should be objects for module "+mod_type)}),readyStartValues},l={},d=(t=e,sektionsLocalizedData.registeredModules[t]&&sektionsLocalizedData.registeredModules[t].starting_value?sektionsLocalizedData.registeredModules[t].starting_value:{});return n=e,sektionsLocalizedData.registeredModules[n]&&!0===sektionsLocalizedData.registeredModules[n].is_father?_.each((i=e,sektionsLocalizedData.registeredModules[i]&&sektionsLocalizedData.registeredModules[i].children?sektionsLocalizedData.registeredModules[i].children:{}),function(e,t){var i,n,o,r,s=(i=e,r=(o=d)[n=t]?o[n]:{},a.isMultiItemsModule(i)&&_.isArray(r)?c(r):r);_.isEmpty(s)||(l[t]=s)}):l=a.isMultiItemsModule(e)&&_.isArray(d)?c(d):d,_.isEmpty(l)?"no_starting_value":l},selectNextTabbableOrFocusable:function(e){var t=p(e),i=p(":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=p(e),i=p(":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,u.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()?p.extend(i,{selected:"selected"}):"px"===t&&p.extend(i,{selected:"selected"}),p("select[data-czrtype]",n.container).append(p("<option>",i))}),p("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)&&p.extend(i,{selected:"selected"}),p("select[data-czrtype]",n.container).append(p("<option>",i))}),p("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),p("select[data-czrtype]",n.container).on("change",function(){0===p(this).find("option:selected").length&&n([])});break;default:u.errare("::setupSelectInput => invalid input type => "+n.type)}else u.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 u.Value(u.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),n.container.find("[data-sek-device]").removeClass("active"),p(this).addClass("active");var t,i="desktop";try{i=p(this).data("sek-device")}catch(e){u.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{u.previewedDevice(i)}catch(e){u.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(){u.previewer.send("sek-animate-to-level",{id:t})},300))},n.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=n.container.find('[data-sek-device="'+u.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")&&(p(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=p(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){p(this).attr("data-sek-accordion")||p(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"))}),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)&&u.control(n.id,function(e){e.container.one("items-collection-populated",function(){p(this).find("label > .customize-control-title").trigger("click")}),e.container.trigger("sek-accordion-expanded")})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(p.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=p.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(p.Deferred(function(t){(i.isPromise(e)?e:p.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),p.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||p.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:p.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:u.settings.nonce.save}).fail(function(e){u.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)||u.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);if(!n.czr_Input.has(t))throw new Error("::scheduleVisibilityOfInputId => missing input id : "+t);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),a.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){a.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(){a.notifications.add(new a.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(){a.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-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"),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){a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),a.previewer.send("sek-drag-start",{type:n.dndData.content_type})}).call(m(this),e)}).on("dragend",function(e){(function(e){m("body").removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),a.previewer.send("sek-drag-stop")}).call(m(this),e)}).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?(a.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module:t.data("drop-zone-before-module-or-nested-section"),after_module: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).data("sek-content-type"),content_id:m(this).data("sek-content-id"),section_type:m(this).data("sek-section-type"),is_user_section:"true"===m(this).data("sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),a.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop({targetEl:m(this),evt:e}))return;e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),a.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(u){var p=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=u.clientY,n=u.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),s=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),a=(o.right,o.left,r<50),c=s<50,l=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;p.distanceTable.push({el:m(this),dist:d&&l?0:(e=s,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(a||d)&&(c||l)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(p.distanceTable,"dist"));p.$dropTargetCandidate=null,_.each(p.distanceTable,function(e){_.isNull(p.$dropTargetCandidate)&&t===e.dist&&(p.$dropTargetCandidate=e.el)}),p.$dropTargetCandidate&&0<p.$dropTargetCandidate.length&&p.dnd_isInTarget(p.$dropTargetCandidate,u)&&p.$dropTargetCandidate.addClass("sek-drag-is-in"),p.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:a.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(a.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;if(i.closest('[data-sek-level="location"]').length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),s=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),a="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,c=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return(r||s)&&a?(c(r?sektionsLocalizedData.i18n["Header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["Footer location only accepts modules and pre-built footer sections"]),!1):s&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):i.hasClass("sek-drop-zone")&&("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){a.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"),e.removeClass("sek-feed-me-seymore"),e.find(".sek-no-drop-possible-message").remove())},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");m.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),e.addClass("sek-feed-me-seymore"),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,s=i.right,a=i.top,c=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=c-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();a.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),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=e.drop_target_element,i="content-in-column";switch(t.data("sek-location")){case"between-sections":i="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,i="content-in-empty-location";break;case"between-columns":i="content-in-new-column"}if("preset_section"===e.content_type)if(t.hasClass("sek-module-drop-zone-for-first-module")){var n=t.closest('div[data-sek-level="section"]');1<n.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(i="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=n.data("sek-id")):(e.sektion_to_replace=n.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=n.closest('[data-sek-level="column"]').data("sek-id"),i="content-in-a-section-to-replace")}else"between-sections"===t.data("sek-location")&&(i="content-in-a-section-to-create");switch(i){case"content-in-column":var o=t.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");a.previewer.trigger("sek-add-module",{level:r,id:s,in_column:t.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:t.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":case"content-in-empty-location":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":a.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;default:a.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){a.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}(),e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),d(window)[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){d(window).trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),s=d("#wp-czr-customize-content_editor-tools"),a=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=s.outerHeight()+a.outerHeight()+c.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),r.css("height",o.height-o.components))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(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(o,r,s){o.czrInputMap=o.czrInputMap||{},r.extend(o.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!o.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=o.section(n.module.control.section()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault(),n.container.find("[data-sek-content-type]").removeClass("is-selected").attr("aria-pressed",!1),r(this).addClass("is-selected").attr("aria-pressed",!0),o.czr_sektions.currentContentPickerType(r(this).data("sek-content-type"))});var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),s.each(i.controls(),function(e){s.isUndefined(e.content_type)||e.active(t===e.content_type)})};o.czr_sektions.currentContentPickerType=o.czr_sektions.currentContentPickerType||new o.Value(n()),o.bind("nimble-modules-and-sections-controls-registered",function(){t(o.czr_sektions.currentContentPickerType())}),o.czr_sektions.currentContentPickerType.bind(function(e){t(e)})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})},section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(s,a,c){s.czrInputMap=s.czrInputMap||{},a.extend(s.czrInputMap,{module_option_switcher:function(e){var t=this;if(!s.section.has(t.module.control.section()))throw new Error(t.input_type+" => section not registered");s.section(t.module.control.section());var i,n="",o=t.module.control.params.sek_registration_params;if(c.isUndefined(o))throw new Error(t.input_type+" => missing registration params");if(o&&o.module_id&&(n=o.module_id,i=o.ui_action),c.isEmpty(n))throw new Error(t.input_type+" => missing module id");t.container.on("click","[data-sek-option-type]",function(e){e.preventDefault(),t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0),s.previewer.trigger("settings"===a(this).data("sek-option-type")?"sek-edit-options":"sek-edit-module",{id:n,level:"module"})});var r="sek-generate-level-options-ui"===i?"settings":"content";t.container.find("[data-sek-option-type]").removeClass("is-selected").attr("aria-pressed",!1),t.container.find('[data-sek-option-type="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(l,d,u){l.czrInputMap=l.czrInputMap||{};var p=function(e){return u.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(l.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=u.isEmpty(t)||u.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,{},u.isObject(o())?o():{}),n=d(this).val();u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?i[t]=n:i=u.omit(i,t),o(i)}),m.call(o,i,n),u.isObject(o())){u.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");u.isEmpty(o())||u.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+p.call(o,r)+'"]').trigger("click")}var s=o();o.initial_unit="px",u.isEmpty(s)||(o.initial_unit=u.isEmpty(s.unit)?"px":s.unit),o.css_unit=new l.Value(p.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=u.isEmpty(e)?"px":e,(t=d.extend(!0,{},u.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(l.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,s=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=u.isEmpty(t)||u.isEmpty(t.default)?{}:t.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]):{}},i=function(e){var t=d.extend(!0,{},u.isObject(r())?r():{}),i=d.extend(!0,{},a);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",s).each(function(){var e=d(this).data("sek-spacing"),t="";u.isEmpty(n)||u.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");u.isEmpty(n)||u.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+p.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",u.isEmpty(n)||u.isEmpty(n[r.previewedDevice()])||(r.initial_unit=u.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new l.Value(p.call(r,r.initial_unit)),s.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=l.previewedDevice()||"desktop";(t=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?t[o][i]=n:t[o]=u.omit(t[o],i),r(t)}),m.call(r,s,a),r.previewedDevice.bind(function(e){try{i(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!u.isObject(i)||!0!==i.previewed_device_switched){e=u.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,s);try{i(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,a,c){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(this).val())}),c.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=c.isEmpty(t)||c.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(c.has(e,t))return e[t];var n=c.findIndex(i,function(e){return t===e});return!c.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},c.isObject(o())?o():{}),i=a.extend(!0,{},r);t=c.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.extend(!0,{},c.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{};var e=function(e){var o=this,t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",s=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},n=function(e){var t=l.extend(!0,{},d.isObject(o())?o():{}),i=l.extend(!0,{},r);t=d.isObject(t)?l.extend(i,t):i;var n=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=l.extend(!0,{},d.isObject(o())?o():{}))[c.previewedDevice()||"desktop"]=l(this).data("sek-align"),s.find(".selected").removeClass("selected"),l.when(l(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};l.extend(c.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(f,g,h){f.czrInputMap=f.czrInputMap||{},g.extend(f.czrInputMap,{font_picker:function(e){var p=this,_=p.input_parent,n=function(e,t){_();var n=g('select[data-czrtype="'+p.id+'"]',p.container);h.isNull(p())||h.isEmpty(p())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>");var i=[{title:sektionsLocalizedData.i18n["Web safe fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google fonts"],type:"gfont",list:t.gfonts}],o=f.czr_sektions.sniffAllFonts(),r=sektionsLocalizedData.alreadyUsedFonts,s=[],a=[];if(!h.isEmpty(r)&&h.isObject(r)&&h.each(r,function(e){a.push(e)}),h.isArray(o)&&h.each(o,function(e){a.push(e)}),!h.isEmpty(a)){var c={},l=[];a.forEach(function(e){c[e]=(c[e]||0)+1});var d=h.sortBy(c,function(e){return e});h.each(d,function(i){h.each(c,function(e,t){i!==e||h.contains(l,t)||l.unshift(t)})}),h.each(l,function(e){s.push({name:e})}),i.unshift({title:sektionsLocalizedData.i18n["Already used fonts"],type:null,list:s})}h.each(i,function(e){var t,r,s,i=g("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",h.each(t,function(e){var t,i,n=h.isString(e.name)?e.name:"Undefined Font Family",o=n.replace(/[+|:]/g," ");t=n,i=r,n=h.isEmpty(i)?t:h.isString(t)?["[",i,"]",t].join(""):"",o=o.replace("[cfont]","").replace("[gfont]",""),n==p()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});n.append(i)});var u={escapeMarkup:function(e){return e}};e&&g.extend(u,{resultsAdapter:e,closeOnSelect:!1}),n.czrSelect2(u),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," "):""};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)})}).fail(function(e){f.errare("font_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(s.when(s.Deferred(function(t){a.isEmpty(n.sek_faIconCollection)?r.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection)})).done(function(e){!function(e){a.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(s.extend(t,{selected:"selected"}),o=!0),s("select[data-czrtype]",n.container).append(s("<option>",t))});var t,i=function(e){return e.id?s('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=o?s("<option>"):s("<option>",{selected:"selected"}),s("select[data-czrtype]",n.container).prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),t&&!0===t.open_on_init&&a.delay(function(){try{s("select[data-czrtype]",n.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){r.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)};n.container.on("click",function(){e()}),a.delay(function(){e({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(u,p,_){u.czrInputMap=u.czrInputMap||{},p.extend(u.czrInputMap,{code_editor:function(e){var n=this,i=this.module.control,o=(n.input_parent(),!1),r=n.container.find("textarea"),s=n.container.find(".customize-control-title"),a=function(){return p.Deferred(function(t){var i=_.isEmpty(r.data("editor-code-type"))?"text/html":r.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){_.isObject(e)||u.errare(n.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)})})};n.isReady.done(function(){var t=function(e){_.isEmpty(this.editor)&&(_.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),l()}else l();s.click()},10))};r.html(n()),p.when(a()).done(function(e){wp.codeEditor&&(_.isUndefined(e)||!1!==e)&&(o=e),t.call(n),n.module.control.container.on("sek-accordion-expanded",function(){t.call(n)})}).fail(function(e){u.errare(n.id+" => error when getting the editor params from server")})});var c=function(e){var t,i=!1;t=_.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:d}),n.editor=wp.codeEditor.initialize(r,t),p(n.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":s.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),s.on("click",function(e){e.stopPropagation(),n.editor.codemirror.focus()}),n.editor.codemirror.on("change",function(e){i=!0,r.val(e.getValue()).trigger("change"),i=!1}),n.editor.codemirror.setValue(n()),n.bind(n.id+":changed",function(e){i||n.editor.codemirror.setValue(e)}),n.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},l=function(){var o=r[0];n.editor=o,r.on("blur",function(){r.data("next-tab-blurs",!1)}),r.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||r.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)),r.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):r.data("next-tab-blurs")||(r.data("next-tab-blurs",!0),e.stopPropagation())})},d=function(e){var t;i.setting.notifications.remove(n.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",s.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",s.html()),i.setting.notifications.add(n.id,new u.Notification(n.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)}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var s=this,t=u(".sek-range-with-unit-picker-wrapper",s.container),a=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),c=p.isEmpty(i)||p.isEmpty(i.default)?{}:i.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]):u.extend(!0,{desktop:""},c).desktop},n=function(e){var t=s(),i={};i=u.extend(!0,{},c),p.isObject(t)?i=u.extend(!0,{},t):p.isString(t)&&!p.isEmpty(t)&&(i={desktop:t});var n,o=l(i,e),r=(n=o,p.isEmpty(n)||!p.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(u(this).val()).trigger("input")}),a.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=u(this).val();(i=u.extend(!0,{},p.isObject(s())?s():{}))[n]=u.extend(!0,{},i[n]||{}),p.isString(o)&&!p.isEmpty(o)&&(i[n]=o),(p.isEmpty(t)||p.isObject(t)&&!0!==t.previewed_device_switched)&&s(i),r.val(u(this).val())}),s.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}),r.val(a.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+s.type+" for input id "+s.id,e)}}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=c(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),s=function(e){return l.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(l.isEmpty(r)?"px":s(r)),t.css_unit.bind(function(e){e=l.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(c(this).val()).trigger("input")}),n.on("input",function(e){t(c(this).val()+s(t.css_unit())),o.val(c(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),c(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",c(this).data("sek-unit")),t.css_unit(c(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var c=this,l=_(".sek-range-with-unit-picker-wrapper",c.container),d=l.find('input[type="number"]'),r=l.find('input[type="range"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=a.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type),u=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return l.find("input[data-czrtype]").data("sek-unit")||"px"},p=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?p(e,i[n+1]):_.extend(!0,{desktop:""},u).desktop},n=function(e){var t=c(),i={};i=_.extend(!0,{},u),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=p(i,e),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new a.Value(m.isEmpty(i())?"px":s(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";c.container.find(".customize-control-title").append(o),c.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=a.previewedDevice()||"desktop",o=_(this).val()+s(c.css_unit());(i=_.extend(!0,{},m.isObject(c())?c():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&c(i),r.val(_(this).val())}),l.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),l.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),c.css_unit(_(this).data("sek-unit"),t)}),c.previewedDevice.bind(function(e){try{n(e)}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}),c.container.on("click",".sek-reset-button",function(e){var t=a.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(g,h,k){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var a=this,c=h(".sek-borders",a.container),l=c.find('input[type="number"]'),d=c.find('input[type="range"]'),u=c.find(".sek-alpha-color-input"),p=function(e){return k.contains(["px","em","%"],e)||(g.errare("borders => error : invalid unit for input "+a.id,e),e="px"),e},_=function(e){return k.isEmpty(e)||!k.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return k.isEmpty(e)||!k.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=g.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),t="px";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.wght)&&(t=p(m(e._all_.wght))),t},r=function(){var e=a(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!k.contains(k.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);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,s=function(e,t){var i,n=h.extend(!0,{},f);if(!k.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=k.isObject(e)&&k.has(e,"_all_")?k.extend(n._all_,e._all_):n._all_,k.has(e,t)&&k.isObject(e[t])?k.extend(i,e[t]):n._all_}(i=h.extend(n,i),e);if(k.isEmpty(s)||!k.isObject(s)||k.isEmpty(s.wght)||k.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.wght),h(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{border_type_switched:!0}),u.data("border_type_switched",!0),u.val(s.col).trigger("change"),u.data("border_type_switched",!1)};a.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),a.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),a.borderType=new g.Value("_all_"),l.val((i=a(),n=1,k.isObject(i)&&k.has(i,"_all_")&&k.isObject(i._all_)&&!k.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!k.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)),u.val(a.borderColor()),u.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){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}}),d.on("input",function(e){l.val(h(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.borderType()||"_all_",o=a.borderColor(),r=h(this).val()+p(a.css_unit()),s=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(a())?a():s))[n]=h.extend(!0,{},i[n]||s[n]),k.isString(r)&&!k.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(k.isEmpty(t)||k.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&k.each(a.cssBorderTypes,function(e){i=k.omit(i,e)}),a(i)),d.val(h(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),a.css_unit(h(this).data("sek-unit"),t)}),c.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),c.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=h.extend(!0,{},k.isObject(a())?a():{});k.isEmpty(i[t])||(i=k.omit(i,t),a(i),s(t))}),d.val(l.val()||0);try{s(a.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}h('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var a=this,c=f(".sek-borders",a.container),l=c.find('input[type="number"]'),s=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.id,e),e="px"),e},u=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},p=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(p(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=p(s),r=u(s),f(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{radius_type_switched:!0})};a.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),l.val((i=a(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(a())?a():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(a.cssRadiusTypes,function(e){i=g.omit(i,e)}),a(i)),s.val(f(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),a.css_unit(f(this).data("sek-unit"),t)}),c.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),c.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(a())?a():{});g.isEmpty(i[t])||(i=g.omit(i,t),a(i),r(t))}),s.val(l.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).done(function(e){n.previewer.refresh(),n.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"<br/>","<i>"+e+"</i>","</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,s){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){s.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!s.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(s.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];s.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),s.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&s.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),s.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(p,_,m){p.czrInputMap=p.czrInputMap||{},_.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(m.isNull(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("api.czrInputMap.nimble_tinymce_editor => duplicate editor id.");var r,s,a=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&m.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=m.filter(e,function(e){return!m.contains(t,e)})}if(n.editor_params&&m.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;m.isEmpty(i)||!m.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=m.filter(e,function(e){return m.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),s=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(s=m.union(r.tinymce.content_css.split(","),s)),s.join(",")),min_height:40,height:n.editor_params&&m.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};c.tinymce.wpautop=a(),a()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var d=_.extend(!0,[],p.czrActiveWPEditors);d.push(i),p.czrActiveWPEditors=d;var u=function(){e.html(t()),l.setContent(t())};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=_("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,r,s=nimbleTinyMCEPreInit.mceInit[e];s.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=m.union(o.tinymce.content_css.split(","),r)),r.join(","));var a=t.input_parent,c=function(){var e=a();return m.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};s.wpautop=c(),c()||(s.forced_root_block=""),s.toolbar1=sektionsLocalizedData.defaultToolbarBtns,s.toolbar2="",window.tinymce.init(s),window.QTags.getInstance(e);var l=tinyMCE.get(e);if(!l)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d=function(){var e=c()?wp.editor.autop(t()):t();l.setContent(e),p.sekEditorExpanded(!0),_(window).trigger("resize")};l.initialized?d():l.on("init",d),l.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(c()?l.getContent():wp.editor.removep(l.getContent()))}),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(_(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{import_export:function(){var o=this,r=o.container.find('button[data-czr-action="sek-pre-import"]'),i=o.container.find("input[name=sek-import-file]"),n=m.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),s=n.scope,a="local"===n.scope?m.czr_sektions.localSectionsSettingId():m.czr_sektions.getGlobalSectionsSettingId();g.contains(["local","global"],s)||m.errare("api.czrInputMap.import_export => invalid currentScope",s),i.on("change",function(e){r.toggleClass("disabled",g.isEmpty(f(this).val()))});o.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),f(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),g.isEmpty(t)||g.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=m(a)(),o=!0;if(g.each(n.collection,function(e){o&&(g.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}c({scope:s});break;case"sek-pre-import":if(g.isEmpty(m.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}d({pre_import_check:!0}).done(l).fail(function(e){m.errare("sek_pre_import_checks failed",e),_(),d()});break;case"sek-import-as-is":d();break;case"sek-import-assign":d({assign_missing_locations:!0});break;case"sek-cancel-import":_()}});var c=function(e){var i=[],t={sek_export_nonce:m.settings.nonce.save,skope_id:"local"===e.scope?m.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:m.czr_sektions.activeLocations()};g.each(t,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:m.settings.nonce.save,sek_export_nonce:m.settings.nonce.save,skope_id:"local"===e.scope?m.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId,active_locations:m.czr_sektions.activeLocations()}).done(function(){f(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),f(window).on("beforeunload")}).fail(function(e){m.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("")})})},l=function(e){var t=m.czr_sektions.activeLocations(),i=f.extend(!0,[],g.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]);if(i=g.filter(i,function(e){return!g.contains(["nimble_local_header","nimble_local_footer"],e)}),g.isArray(i)&&g.isArray(t)){var n=f(i).not(t).get();g.isEmpty(n)?d():(r.hide(),"local"===s?o.container.find(".czr-import-dialog.czr-local-import").slideToggle():o.container.find(".czr-import-dialog.czr-global-import").slideToggle(),m.infoLog("sek-pre-import => imported locations missing in current page.",n))}else m.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("")}),_()},d=function(t){if(t=t||{},i.length<1||g.isUndefined(i[0])||!i[0].files||g.isEmpty(i.val()))m.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{m.notifications.remove("missing-import-file"),m.notifications.remove("import-success"),m.notifications.remove("import-failed"),m.notifications.remove("img-import-errors"),o.container.find(".sek-uploading").show();var e=new FormData;if(e.append("file_candidate",i[0].files[0]),e.append("action","sek_get_imported_file_content"),e.append("nonce",m.settings.nonce.save),g.contains(["local","global"],n.scope)){if(e.append("skope",n.scope),t.pre_import_check&&e.append("pre_import_check",t.pre_import_check),__request__=f.ajax({url:wp.ajax.settings.url,data:e,processData:!1,contentType:!1,type:"POST"}),t.pre_import_check)return f.Deferred(function(){var t=this;__request__.done(function(e){e.success||t.reject(e),u(e)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)}).always(function(){})});o.container.find(".sek-uploading").show(),m.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0}),__request__.done(function(e){var n=function(i){return(g.isObject(i)||g.isArray(i))&&g.each(i,function(e,t){(g.isObject(e)||g.isArray(e))&&(i[t]=n(e)),"id"!==t||!g.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.optPrefixForSektionsNotSaved+m.czr_sektions.guid())}),i};e.data.data.collection=n(e.data.data.collection),p(e,t)}).fail(function(e){m.errare("sek-import input => ajax error",e),m.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(_)}else m.errare("sek-import input => invalid scope provided",n.scope)}},u=function(e){var t=!0,i=e.data,n=null;e.success||(n=[sektionsLocalizedData.i18n["Import failed"],i].join(" : ")),g.isNull(n)&&!g.isObject(i)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var o=i.data,r=i.metas,s=i.img_errors;return g.isNull(n)&&!g.isObject(o)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),g.isNull(n)&&!g.isObject(r)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),g.isNull(n)&&g.isEqual(m(a)(),o)&&(m.infoLog("sek-import input => Setting unchanged"),t=!1),g.isNull(n)||(m.errare("sek-import input => invalid data sent from server",i),m.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",n,"</strong>","</span>"].join("")}),t=!1),g.isEmpty(s)||m.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">'+s+"</span>"].join(" : "),"</span>"].join("")}),t},p=function(e,t){t=t||{},u(e)?(m.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:s,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:"local"===s&&o.input_parent.czr_Input("keep_existing_sections")()}).done(function(){"local"===n.scope&&m.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),m.previewer.refresh(),m.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){m.errare("sek-import input => error when firing ::updateAPISetting",e),m.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),m.previewer.refresh()):_()},_=function(){m.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),o.container.find(".sek-uploading").hide(),i.val("").trigger("change"),o.container.find(".czr-import-dialog").hide(),r.show()}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{},l.extend(c.czrInputMap,{simpleselect:function(e){c.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){c.czr_sektions.setupSelectInput.call(this,e)},simpleselectWithDeviceSwitcher:function(e){var r=this,t=(r.input_parent,r.module,c.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type)),o=l("select",r.container),s=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i={params:e=d.isEmpty(e)?t.choices:e};if(r.module.trigger("nimble-set-select-input-options",i),e=i.params,!d.isEmpty(e)&&d.isObject(e)){d.each(e,function(e,t){var i={value:t,html:e};t==r()?l.extend(i,{selected:"selected"}):"px"===t&&l.extend(i,{selected:"selected"}),o.append(l("<option>",i))});var a=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?a(e,i[n+1]):l.extend(!0,{desktop:""},s).desktop};c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r),o.on("change",function(e,t){var i,n=c.previewedDevice()||"desktop",o=l(this).val();(i=l.extend(!0,{},d.isObject(r())?r():{}))[n]=l.extend(!0,{},i[n]||{}),d.isString(o)&&!d.isEmpty(o)&&(i[n]=o),(d.isEmpty(t)||d.isObject(t)&&!0!==t.previewed_device_switched)&&r(i)}),r.previewedDevice.bind(function(e){try{!function(e){var t=r(),i={};i=l.extend(!0,{},s),d.isObject(t)?i=l.extend(!0,{},t):d.isString(t)&&!d.isEmpty(t)&&(i={desktop:t});var n=a(i,e);o.val(n).trigger("change",{previewed_device_switched:!0})}(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type "+r.type+" for input id "+r.id,e)}})}else c.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+r.id+" in module "+r.module.module_type)}})}(wp.customize,jQuery,_),function(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.czrInputMap,{category_picker:function(e){var n=this,o=c("select[data-czrtype]",n.container),r=function(){var e=n();return e=l.isString(e)?[e]:e,l.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(c.when(c.Deferred(function(i){l.isEmpty(a.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:a.settings.nonce.save}).done(function(e){l.isArray(e)||a.errare(n.id+" => error => invalid category collection sent by server");var t={};l.each(e,function(e){l.isEmpty(e.slug)||l.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),a.czr_sektions.post_categories=t,i.resolve(a.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(a.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&l.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){a.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){l.each(e,function(e,t){var i={value:t,html:e};l.contains(r(),t)&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===c(this).find("option:selected").length&&n([])})},s={};l.each(r(),function(e){s[e]=(e+"").replace(/-/g," ")}),i(s),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),c.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,s,e){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=s(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),s(this).addClass("selected").attr("aria-pressed",!0);try{i=s(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),s('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(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(r,e,s){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({initialize:function(e,t){var i=this;r.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),r.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:i.container})})},renderUserSavedSections:function(){var i="",n=this.container.find(".sek-content-type-wrapper"),o="";s.each(sektionsLocalizedData.userSavedSektions,function(e,t){try{o=function(e){var t=e.getDate(),i=e.getMonth(),n=e.getFullYear();e.getHours(),e.getMinutes(),e.getSeconds();return[t,["January","February","March","April","May","June","July","August","September","October","November","December"][i],n].join(" ")}(new Date(e.creation_date.replace(/-/g,"/")))}catch(e){r.errare("::renderUserSavedSections => formatDate => error",e)}i=['<div class="sek-user-section-wrapper">','<div class="sek-saved-section-title"><i class="sek-remove-user-section far fa-trash-alt"></i>'+e.title+"</div>",'<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="'+e.type+'" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-overlay"></div>','<div class="sek-saved-section-description">'+e.description+"</div>",s.isEmpty(o)?"":'<div class="sek-saved-section-date"><i class="far fa-calendar-alt"></i> @missi18n Created : '+o+"</div>","</div>","</div>"].join(""),n.append(i)})}}),r.CZRDynModule.prototype.initialize.call(this,e,t)}};r.czrModuleMap=r.czrModuleMap||{},sektionsLocalizedData.isSavedSectionEnabled&&e.extend(r.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:t,crud:!1,name:r.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:r.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(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"bg-image":s.each(["bg-attachment","bg-scale","bg-repeat","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay","bg-parallax","bg-parallax-force"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!s.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!s.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":s.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!s.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i())})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":s.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=!s.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!s.isEmpty(n.czr_Input("bg-image")()+"")&&!r.CZR_Helpers.isChecked(i())}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-attachment")())&&n.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")())&&n.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:r.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:s.extend({id:"",title:""},r.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(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-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:i.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:n.extend({id:"",title:""},i.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.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",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,u,p){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=u(".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(p.isUndefined(t.level_id))d.errare("Error : missing column id",er);else if(i.columnId=t.level_id,i.columnModel=u.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=p.size(i.parentSectionModel.collection),o.attr("data-sek-width-range-column-id",i.columnId),1===i.colNb?i.container.html(["<p>",sektionsLocalizedData.i18n["This is a single-column section with a width of 100%. You can act on the internal width of the parent section, or adjust padding and margin."]].join("")):i.container.show();var s,a=d.czr_sektions.getLevelModel(i.columnId),c="_not_set_";if("no_match"!=a){var l=a.options&&a.options.width&&a.options.width["custom-width"]&&p.isNumber(+a.options.width["custom-width"]);l?c=a.options.width["custom-width"]:!l&&a.width&&p.isNumber(+a.width)&&(c=a.width),s="_not_set_"!==c?c:"_not_set_"===i()?Math.floor(100/i.colNb):i(),s=1*+parseFloat(s).toFixed(3),(!p.isNumber(s)||100<s||s<0)&&(d.errare("Error => invalid column width",s),s=50),r.on("input",function(e,t){o.val(u(this).val()).trigger("input",t)}),o.on("input",p.debounce(function(e,t){r.val(u(this).val()),t&&t.is_init||i(+parseFloat(u(this).val()).toFixed(3))},300)),o.on("input",p.debounce(function(e,t){t&&(t.is_init||t.is_resize_column_trigger)||i.sayItToApi(u(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=p.findIndex(i.parentSectionModel.collection,{id:i.columnId}),o=n+1==i.colNb?n-1:n+1,r=p.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||{},u.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:p.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_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(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-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"global-custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.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(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"img":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"img-size",function(){return!r.isEmpty(i()+"")&&r.isNumber(i())});break;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_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.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)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,s){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":s.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":s.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,"link-custom-url",function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_submission_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_submission_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_font_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_),function(s,a,c){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=s.CZRItem.extend(i.CZRItemConstructor||{}),s.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return s.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&a.fn.sortable){var i=this;a("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){c.has(i,"preItem")&&i.preItemExpanded.set(!1),i.closeAllItems().closeRemoveDialogs(),i.trigger("item-collection-sorted")})}})}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!c.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){s.errorLog("item.setInputVisibilityDeps() : "+e)}}),s.CZRItem.prototype.ready.call(t)},_buildTitle:function(e,t,i){var n=this.module;return e=e||("string"==typeof t?s.CZR_Helpers.capitalize(t.replace("fa-","")):""),e=s.CZR_Helpers.truncate(e,20),'<div><span class="'+t+'" style="color:'+(i=i||n.defaultSocialColor)+'"></span> '+e+"</div>"},writeItemViewTitle:function(e){var t=this.module,i=e||this(),n=(i.icon?i.icon:"").replace("fa-","").replace("envelope","email").replace("far","").replace("fab","").replace("fas","");a("."+t.control.css_attr.item_title,this.container).html(this._buildTitle(n,i.icon,i.color_css))},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_color_on_hover":c.each(["social_color_hover"],function(e){try{s.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){s.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=c.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=c.without(n,c.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=a.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=s(i.control.id).transport||!c.has(e,"dom_event")||c.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){s.previewer.unbind("ready",r),i.trigger("item-removed",o)};s.previewer.bind("ready",r)}}}};s.czrModuleMap=s.czrModuleMap||{},a.extend(s.czrModuleMap,{czr_social_icons_settings_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:s.czr_sektions.getRegisteredModuleProperty("czr_social_icons_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:s.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_settings_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_social_icons_style_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_social_icons_style_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_social_icons_style_child")}})}(wp.customize,jQuery,_),function(g,h,k){var e={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=g.CZRItem.extend(i.CZRItemConstructor||{}),g.CZRDynModule.prototype.initialize.call(i,e,t)},generateItemId:function(){return g.czr_sektions.guid()},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&h.fn.sortable){var i=this;h("."+i.control.css_attr.items_wrapper,i.container).sortable({handle:"."+i.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){i._getSortedDOMItemCollection().done(function(e){i.itemCollection.set(e)}).then(function(){k.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(k.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(!k.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){g.errorLog("item.setInputVisibilityDeps() : "+e)}}),g.CZRItem.prototype.ready.call(t);var i=function(){g.previewer.send("sek-item-focus",{control_id:t.module.control.id,item_id:t.id,item_value:t()})};t.viewState.callbacks.add(function(e,t){"expanded"===e&&i()}),t.callbacks.add(i),t.bind("sek-request-item-focus-in-preview",i)},writeItemViewTitle:function(e,t){var i=this,n=i.module,o=e||i(),r="",s="",a="not_set",c=!k.isUndefined(t)&&k.isObject(t);if(!c||!t.input_changed||k.contains(["img","text_content"],t.input_changed)){if(k.isEmpty(o.title)){var l=k.findIndex(n.itemCollection(),function(e){return e.id===i.id});l=k.isUndefined(l)?1:l+1}else r=o.title;r=g.CZR_Helpers.truncate(r,15),o.img&&(s=o.img,k.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;k.isUndefined(s)||k.isEmpty(""+s)?e.resolve(""):k.isString(s)&&-1!==s.indexOf("http")?e.resolve(s):wp.media.attachment(s).fetch().always(function(){k.isObject(this)&&k.has(this,"attributes")&&k.has(this.attributes,"sizes")&&(a=this.get("sizes").thumbnail.url,e.resolve(a))})}).promise()},u=h("."+n.control.css_attr.item_title,i.container).find(".sek-slide-title"),p=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),u.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:_}))):u.html(_);var m=c&&t.input_changed&&"img"===t.input_changed,f=function(e){return k.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"),p.length<1?d().done(function(e){h("."+n.control.css_attr.item_title,i.container).prepend(h("<div/>",{class:"sek-slide-thumb",html:f(e)}))}):!m&&c||d().done(function(e){p.html(f(e))})}},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":k.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=!k.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":k.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":k.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":k.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=k.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=k.without(n,k.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||!k.has(e,"dom_event")||k.has(e.dom_event,"isTrigger")||g.CZR_Helpers.hasPartRefresh(i.control.id))i.trigger("item-removed",o),i.control.trigger("item-removed",o);else{var r=function(){g.previewer.unbind("ready",r),i.trigger("item-removed",o)};g.previewer.bind("ready",r)}}}};g.czrModuleMap=g.czrModuleMap||{},h.extend(g.czrModuleMap,{czr_img_slider_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:g.czr_sektions.getRegisteredModuleProperty("czr_img_slider_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:g.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_img_slider_collection_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"autoplay":o.each(["autoplay_delay"],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,u,p){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&&u.fn.sortable){var i=this;u("."+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(){p.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=u.extend(!0,{},this.preItem());if(p.isObject(e)){var i=u.extend(!0,{},e);return u.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(!(!p.isUndefined(t)&&p.isObject(t))||!t.input_changed||p.contains(["title_text"],t.input_changed)){if(p.isEmpty(o.title)){var s=p.findIndex(n.itemCollection(),function(e){return e.id===i.id});s=p.isUndefined(s)?1:s+1}else r=o.title;r=d.CZR_Helpers.truncate(r,25);var a=u("."+n.control.css_attr.item_title,i.container).find(".sek-accord-title"),c=o.title_text?o.title_text:"";c=u("<div>").html(c).text();var l=i.module.container.find(".czr-items-wrapper > li").index(i.container);c=(c=p.isEmpty(c)?sektionsLocalizedData.i18n["Accordion title"]+" #"+(+l+1):c).substring(0,60),a.length<1?(u("."+n.control.css_attr.item_title,i.container).html(""),u("."+n.control.css_attr.item_title,i.container).append(u("<div/>",{class:"sek-accord-title",html:c}))):a.html(c)}},toggleRemoveAlert:function(){this.removeItem()},removeItem:function(e){e=e||{};var t=this,i=this.module,n=p.clone(i.itemCollection());i.trigger("pre_item_dom_remove",t()),t._destroyView(),n=p.without(n,p.findWhere(n,{id:t.id})),i.itemCollection.set(n),i.trigger("pre_item_api_remove",t());var o=u.extend(!0,{},t());if(i.czr_Item.remove(t.id),"postMessage"!=d(i.control.id).transport||!p.has(e,"dom_event")||p.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||{},u.extend(d.czrModuleMap,{czr_accordion_collection_child:{mthds:e,crud:!0,hasPreItem:!1,refresh_on_add_item:!1,name:d.czr_sektions.getRegisteredModuleProperty("czr_accordion_collection_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:d.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_collection_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){var i=this;i.crudModulePart="nimble-crud-module-part",i.rudItemPart="nimble-rud-item-part",i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRItemConstructor:{ready:function(){n.CZRItem.prototype.ready.call(this)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_accordion_opts_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_accordion_opts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_accordion_opts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_shortcode_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_shortcode_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_shortcode_module")}})}(wp.customize,jQuery,_);
assets/front/js/ccat-nimble-front.js CHANGED
@@ -2805,7 +2805,7 @@ jQuery( function($){
2805
 
2806
  // When customizing, expand the currently edited item
2807
  // @see CZRItemConstructor in api.czrModuleMap.czr_img_slider_collection_child
2808
- if ( ! _utils_.isUndefined( wp.customize ) ) {
2809
  wp.customize.preview.bind('sek-item-focus', function( params ) {
2810
 
2811
  var $itemEl = $('[data-sek-item-id="' + params.item_id +'"]', '.sek-accord-wrapper').first();
@@ -2981,7 +2981,7 @@ jQuery( function($){
2981
 
2982
  // When customizing, focus on the currently expanded / edited item
2983
  // @see CZRItemConstructor in api.czrModuleMap.czr_img_slider_collection_child
2984
- if ( ! _utils_.isUndefined( wp.customize ) ) {
2985
  wp.customize.preview.bind('sek-item-focus', function( params ) {
2986
 
2987
  var $itemEl = $('[data-sek-item-id="' + params.item_id +'"]', '.swiper-container').first();
@@ -3102,7 +3102,7 @@ jQuery( function($){
3102
 
3103
  };
3104
  //doFitText();
3105
- // if ( 'function' == typeof(_) && ! _utils_.isUndefined( wp.customize ) ) {
3106
  // wp.customize.selectiveRefresh.bind('partial-content-rendered' , function() {
3107
  // doFitText();
3108
  // });
2805
 
2806
  // When customizing, expand the currently edited item
2807
  // @see CZRItemConstructor in api.czrModuleMap.czr_img_slider_collection_child
2808
+ if ( window.wp && ! _utils_.isUndefined( wp.customize ) ) {
2809
  wp.customize.preview.bind('sek-item-focus', function( params ) {
2810
 
2811
  var $itemEl = $('[data-sek-item-id="' + params.item_id +'"]', '.sek-accord-wrapper').first();
2981
 
2982
  // When customizing, focus on the currently expanded / edited item
2983
  // @see CZRItemConstructor in api.czrModuleMap.czr_img_slider_collection_child
2984
+ if ( window.wp && ! _utils_.isUndefined( wp.customize ) ) {
2985
  wp.customize.preview.bind('sek-item-focus', function( params ) {
2986
 
2987
  var $itemEl = $('[data-sek-item-id="' + params.item_id +'"]', '.swiper-container').first();
3102
 
3103
  };
3104
  //doFitText();
3105
+ // if ( 'function' == typeof(_) && window.wp && ! _utils_.isUndefined( wp.customize ) ) {
3106
  // wp.customize.selectiveRefresh.bind('partial-content-rendered' , function() {
3107
  // doFitText();
3108
  // });
assets/front/js/ccat-nimble-front.min.js CHANGED
@@ -1 +1 @@
1
- !function(){var t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},e=t._,r=Array.prototype,o=Object.prototype,f="undefined"!=typeof Symbol?Symbol.prototype:null,i=r.push,u=r.slice,d=o.toString,a=o.hasOwnProperty,n=Array.isArray,s=Object.keys,l=Object.create,c=function(){},p=function(t){return t instanceof p?t:this instanceof p?void(this._wrapped=t):new p(t)};"undefined"==typeof exports||exports.nodeType?t._utils_=p:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=p),exports._utils_=p),p.VERSION="1.9.1";var h,m=function(i,a,t){if(void 0===a)return i;switch(null==t?3:t){case 1:return function(t){return i.call(a,t)};case 3:return function(t,e,n){return i.call(a,t,e,n)};case 4:return function(t,e,n,r){return i.call(a,t,e,n,r)}}return function(){return i.apply(a,arguments)}},g=function(t,e,n){return p.iteratee!==h?p.iteratee(t,e):null==t?p.identity:p.isFunction(t)?m(t,e,n):p.isObject(t)&&!p.isArray(t)?p.matcher(t):p.property(t)};p.iteratee=h=function(t,e){return g(t,e,1/0)};var v=function(i,a){return a=null==a?i.length-1:+a,function(){for(var t=Math.max(arguments.length-a,0),e=Array(t),n=0;n<t;n++)e[n]=arguments[n+a];switch(a){case 0:return i.call(this,e);case 1:return i.call(this,arguments[0],e);case 2:return i.call(this,arguments[0],arguments[1],e)}var r=Array(a+1);for(n=0;n<a;n++)r[n]=arguments[n];return r[a]=e,i.apply(this,r)}},y=function(t){if(!p.isObject(t))return{};if(l)return l(t);c.prototype=t;var e=new c;return c.prototype=null,e},_=function(e){return function(t){return null==t?void 0:t[e]}},k=function(t,e){return null!=t&&a.call(t,e)},b=function(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0},w=Math.pow(2,53)-1,x=_("length"),A=function(t){var e=x(t);return"number"==typeof e&&0<=e&&e<=w};p.each=p.forEach=function(t,e,n){var r,i;if(e=m(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var a=p.keys(t);for(r=0,i=a.length;r<i;r++)e(t[a[r]],a[r],t)}return t},p.map=p.collect=function(t,e,n){e=g(e,n);for(var r=!A(t)&&p.keys(t),i=(r||t).length,a=Array(i),o=0;o<i;o++){var s=r?r[o]:o;a[o]=e(t[s],s,t)}return a};var C=function(u){return function(t,e,n,r){var i=3<=arguments.length;return function(t,e,n,r){var i=!A(t)&&p.keys(t),a=(i||t).length,o=0<u?0:a-1;for(r||(n=t[i?i[o]:o],o+=u);0<=o&&o<a;o+=u){var s=i?i[o]:o;n=e(n,t[s],s,t)}return n}(t,m(e,r,4),n,i)}};p.reduce=p.foldl=p.inject=C(1),p.reduceRight=p.foldr=C(-1),p.find=p.detect=function(t,e,n){var r=(A(t)?p.findIndex:p.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},p.filter=p.select=function(t,r,e){var i=[];return r=g(r,e),p.each(t,function(t,e,n){r(t,e,n)&&i.push(t)}),i},p.reject=function(t,e,n){return p.filter(t,p.negate(g(e)),n)},p.every=p.all=function(t,e,n){e=g(e,n);for(var r=!A(t)&&p.keys(t),i=(r||t).length,a=0;a<i;a++){var o=r?r[a]:a;if(!e(t[o],o,t))return!1}return!0},p.some=p.any=function(t,e,n){e=g(e,n);for(var r=!A(t)&&p.keys(t),i=(r||t).length,a=0;a<i;a++){var o=r?r[a]:a;if(e(t[o],o,t))return!0}return!1},p.contains=p.includes=p.include=function(t,e,n,r){return A(t)||(t=p.values(t)),("number"!=typeof n||r)&&(n=0),0<=p.indexOf(t,e,n)},p.invoke=v(function(t,n,r){var i,a;return p.isFunction(n)?a=n:p.isArray(n)&&(i=n.slice(0,-1),n=n[n.length-1]),p.map(t,function(t){var e=a;if(!e){if(i&&i.length&&(t=b(t,i)),null==t)return;e=t[n]}return null==e?e:e.apply(t,r)})}),p.pluck=function(t,e){return p.map(t,p.property(e))},p.where=function(t,e){return p.filter(t,p.matcher(e))},p.findWhere=function(t,e){return p.find(t,p.matcher(e))},p.max=function(t,r,e){var n,i,a=-1/0,o=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=A(t)?t:p.values(t)).length;s<u;s++)null!=(n=t[s])&&a<n&&(a=n);else r=g(r,e),p.each(t,function(t,e,n){i=r(t,e,n),(o<i||i===-1/0&&a===-1/0)&&(a=t,o=i)});return a},p.min=function(t,r,e){var n,i,a=1/0,o=1/0;if(null==r||"number"==typeof r&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=A(t)?t:p.values(t)).length;s<u;s++)null!=(n=t[s])&&n<a&&(a=n);else r=g(r,e),p.each(t,function(t,e,n){((i=r(t,e,n))<o||i===1/0&&a===1/0)&&(a=t,o=i)});return a},p.shuffle=function(t){return p.sample(t,1/0)},p.sample=function(t,e,n){if(null==e||n)return A(t)||(t=p.values(t)),t[p.random(t.length-1)];var r=A(t)?p.clone(t):p.values(t),i=x(r);e=Math.max(Math.min(e,i),0);for(var a=i-1,o=0;o<e;o++){var s=p.random(o,a),u=r[o];r[o]=r[s],r[s]=u}return r.slice(0,e)},p.sortBy=function(t,r,e){var i=0;return r=g(r,e),p.pluck(p.map(t,function(t,e,n){return{value:t,index:i++,criteria:r(t,e,n)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(r<n||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var I=function(o,e){return function(r,i,t){var a=e?[[],[]]:{};return i=g(i,t),p.each(r,function(t,e){var n=i(t,e,r);o(a,t,n)}),a}};p.groupBy=I(function(t,e,n){k(t,n)?t[n].push(e):t[n]=[e]}),p.indexBy=I(function(t,e,n){t[n]=e}),p.countBy=I(function(t,e,n){k(t,n)?t[n]++:t[n]=1});var E=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;p.toArray=function(t){return t?p.isArray(t)?u.call(t):p.isString(t)?t.match(E):A(t)?p.map(t,p.identity):p.values(t):[]},p.size=function(t){return null==t?0:A(t)?t.length:p.keys(t).length},p.partition=I(function(t,e,n){t[n?0:1].push(e)},!0),p.first=p.head=p.take=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[0]:p.initial(t,t.length-e)},p.initial=function(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},p.last=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[t.length-1]:p.rest(t,Math.max(0,t.length-e))},p.rest=p.tail=p.drop=function(t,e,n){return u.call(t,null==e||n?1:e)},p.compact=function(t){return p.filter(t,Boolean)};var O=function(t,e,n,r){for(var i=(r=r||[]).length,a=0,o=x(t);a<o;a++){var s=t[a];if(A(s)&&(p.isArray(s)||p.isArguments(s)))if(e)for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else O(s,e,n,r),i=r.length;else n||(r[i++]=s)}return r};p.flatten=function(t,e){return O(t,e,!1)},p.without=v(function(t,e){return p.difference(t,e)}),p.uniq=p.unique=function(t,e,n,r){p.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=g(n,r));for(var i=[],a=[],o=0,s=x(t);o<s;o++){var u=t[o],l=n?n(u,o,t):u;e&&!n?(o&&a===l||i.push(u),a=l):n?p.contains(a,l)||(a.push(l),i.push(u)):p.contains(i,u)||i.push(u)}return i},p.union=v(function(t){return p.uniq(O(t,!0,!0))}),p.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=x(t);r<i;r++){var a=t[r];if(!p.contains(e,a)){var o;for(o=1;o<n&&p.contains(arguments[o],a);o++);o===n&&e.push(a)}}return e},p.difference=v(function(t,e){return e=O(e,!0,!0),p.filter(t,function(t){return!p.contains(e,t)})}),p.unzip=function(t){for(var e=t&&p.max(t,x).length||0,n=Array(e),r=0;r<e;r++)n[r]=p.pluck(t,r);return n},p.zip=v(p.unzip),p.object=function(t,e){for(var n={},r=0,i=x(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n};var j=function(a){return function(t,e,n){e=g(e,n);for(var r=x(t),i=0<a?0:r-1;0<=i&&i<r;i+=a)if(e(t[i],i,t))return i;return-1}};p.findIndex=j(1),p.findLastIndex=j(-1),p.sortedIndex=function(t,e,n,r){for(var i=(n=g(n,r,1))(e),a=0,o=x(t);a<o;){var s=Math.floor((a+o)/2);n(t[s])<i?a=s+1:o=s}return a};var S=function(a,o,s){return function(t,e,n){var r=0,i=x(t);if("number"==typeof n)0<a?r=0<=n?n:Math.max(n+i,r):i=0<=n?Math.min(n+1,i):n+i+1;else if(s&&n&&i)return t[n=s(t,e)]===e?n:-1;if(e!=e)return 0<=(n=o(u.call(t,r,i),p.isNaN))?n+r:-1;for(n=0<a?r:i-1;0<=n&&n<i;n+=a)if(t[n]===e)return n;return-1}};p.indexOf=S(1,p.findIndex,p.sortedIndex),p.lastIndexOf=S(-1,p.findLastIndex),p.range=function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),a=0;a<r;a++,t+=n)i[a]=t;return i},p.chunk=function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(u.call(t,r,r+=e));return n};var T=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var a=y(t.prototype),o=t.apply(a,i);return p.isObject(o)?o:a};p.bind=v(function(e,n,r){if(!p.isFunction(e))throw new TypeError("Bind must be called on a function");var i=v(function(t){return T(e,i,n,this,r.concat(t))});return i}),p.partial=v(function(i,a){var o=p.partial.placeholder,s=function(){for(var t=0,e=a.length,n=Array(e),r=0;r<e;r++)n[r]=a[r]===o?arguments[t++]:a[r];for(;t<arguments.length;)n.push(arguments[t++]);return T(i,s,this,this,n)};return s}),(p.partial.placeholder=p).bindAll=v(function(t,e){var n=(e=O(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=p.bind(t[r],t)}}),p.memoize=function(r,i){var a=function(t){var e=a.cache,n=""+(i?i.apply(this,arguments):t);return k(e,n)||(e[n]=r.apply(this,arguments)),e[n]};return a.cache={},a},p.delay=v(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),p.defer=p.partial(p.delay,p,1),p.throttle=function(n,r,i){var a,o,s,u,l=0;i||(i={});var c=function(){l=!1===i.leading?0:p.now(),a=null,u=n.apply(o,s),a||(o=s=null)},t=function(){var t=p.now();l||!1!==i.leading||(l=t);var e=r-(t-l);return o=this,s=arguments,e<=0||r<e?(a&&(clearTimeout(a),a=null),l=t,u=n.apply(o,s),a||(o=s=null)):a||!1===i.trailing||(a=setTimeout(c,e)),u};return t.cancel=function(){clearTimeout(a),l=0,a=o=s=null},t},p.debounce=function(n,r,i){var a,o,s=function(t,e){a=null,e&&(o=n.apply(t,e))},t=v(function(t){if(a&&clearTimeout(a),i){var e=!a;a=setTimeout(s,r),e&&(o=n.apply(this,t))}else a=p.delay(s,r,this,t);return o});return t.cancel=function(){clearTimeout(a),a=null},t},p.wrap=function(t,e){return p.partial(e,t)},p.negate=function(t){return function(){return!t.apply(this,arguments)}},p.compose=function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},p.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},p.before=function(t,e){var n;return function(){return 0<--t&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},p.once=p.partial(p.before,2),p.restArguments=v;var z=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],P=function(t,e){var n=F.length,r=t.constructor,i=p.isFunction(r)&&r.prototype||o,a="constructor";for(k(t,a)&&!p.contains(e,a)&&e.push(a);n--;)(a=F[n])in t&&t[a]!==i[a]&&!p.contains(e,a)&&e.push(a)};p.keys=function(t){if(!p.isObject(t))return[];if(s)return s(t);var e=[];for(var n in t)k(t,n)&&e.push(n);return z&&P(t,e),e},p.allKeys=function(t){if(!p.isObject(t))return[];var e=[];for(var n in t)e.push(n);return z&&P(t,e),e},p.values=function(t){for(var e=p.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},p.mapObject=function(t,e,n){e=g(e,n);for(var r=p.keys(t),i=r.length,a={},o=0;o<i;o++){var s=r[o];a[s]=e(t[s],s,t)}return a},p.pairs=function(t){for(var e=p.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},p.invert=function(t){for(var e={},n=p.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},p.functions=p.methods=function(t){var e=[];for(var n in t)p.isFunction(t[n])&&e.push(n);return e.sort()};var D=function(u,l){return function(t){var e=arguments.length;if(l&&(t=Object(t)),e<2||null==t)return t;for(var n=1;n<e;n++)for(var r=arguments[n],i=u(r),a=i.length,o=0;o<a;o++){var s=i[o];l&&void 0!==t[s]||(t[s]=r[s])}return t}};p.extend=D(p.allKeys),p.extendOwn=p.assign=D(p.keys),p.findKey=function(t,e,n){e=g(e,n);for(var r,i=p.keys(t),a=0,o=i.length;a<o;a++)if(e(t[r=i[a]],r,t))return r};var N,M,L=function(t,e,n){return e in n};p.pick=v(function(t,e){var n={},r=e[0];if(null==t)return n;p.isFunction(r)?(1<e.length&&(r=m(r,e[1])),e=p.allKeys(t)):(r=L,e=O(e,!1,!1),t=Object(t));for(var i=0,a=e.length;i<a;i++){var o=e[i],s=t[o];r(s,o,t)&&(n[o]=s)}return n}),p.omit=v(function(t,n){var e,r=n[0];return p.isFunction(r)?(r=p.negate(r),1<n.length&&(e=n[1])):(n=p.map(O(n,!1,!1),String),r=function(t,e){return!p.contains(n,e)}),p.pick(t,r,e)}),p.defaults=D(p.allKeys,!0),p.create=function(t,e){var n=y(t);return e&&p.extendOwn(n,e),n},p.clone=function(t){return p.isObject(t)?p.isArray(t)?t.slice():p.extend({},t):t},p.tap=function(t,e){return e(t),t},p.isMatch=function(t,e){var n=p.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),a=0;a<r;a++){var o=n[a];if(e[o]!==i[o]||!(o in i))return!1}return!0},N=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;return("function"===i||"object"===i||"object"==typeof e)&&M(t,e,n,r)},M=function(t,e,n,r){t instanceof p&&(t=t._wrapped),e instanceof p&&(e=e._wrapped);var i=d.call(t);if(i!==d.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return f.valueOf.call(t)===f.valueOf.call(e)}var a="[object Array]"===i;if(!a){if("object"!=typeof t||"object"!=typeof e)return!1;var o=t.constructor,s=e.constructor;if(o!==s&&!(p.isFunction(o)&&o instanceof o&&p.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===t)return r[u]===e;if(n.push(t),r.push(e),a){if((u=t.length)!==e.length)return!1;for(;u--;)if(!N(t[u],e[u],n,r))return!1}else{var l,c=p.keys(t);if(u=c.length,p.keys(e).length!==u)return!1;for(;u--;)if(l=c[u],!k(e,l)||!N(t[l],e[l],n,r))return!1}return n.pop(),r.pop(),!0},p.isEqual=function(t,e){return N(t,e)},p.isEmpty=function(t){return null==t||(A(t)&&(p.isArray(t)||p.isString(t)||p.isArguments(t))?0===t.length:0===p.keys(t).length)},p.isElement=function(t){return!(!t||1!==t.nodeType)},p.isArray=n||function(t){return"[object Array]"===d.call(t)},p.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},p.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e){p["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),p.isArguments(arguments)||(p.isArguments=function(t){return k(t,"callee")});var B=t.document&&t.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof B&&(p.isFunction=function(t){return"function"==typeof t||!1}),p.isFinite=function(t){return!p.isSymbol(t)&&isFinite(t)&&!isNaN(parseFloat(t))},p.isNaN=function(t){return p.isNumber(t)&&isNaN(t)},p.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===d.call(t)},p.isNull=function(t){return null===t},p.isUndefined=function(t){return void 0===t},p.has=function(t,e){if(!p.isArray(e))return k(t,e);for(var n=e.length,r=0;r<n;r++){var i=e[r];if(null==t||!a.call(t,i))return!1;t=t[i]}return!!n},p.noConflict=function(){return t._=e,this},p.identity=function(t){return t},p.constant=function(t){return function(){return t}},p.noop=function(){},p.property=function(e){return p.isArray(e)?function(t){return b(t,e)}:_(e)},p.propertyOf=function(e){return null==e?function(){}:function(t){return p.isArray(t)?b(e,t):e[t]}},p.matcher=p.matches=function(e){return e=p.extendOwn({},e),function(t){return p.isMatch(t,e)}},p.times=function(t,e,n){var r=Array(Math.max(0,t));e=m(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},p.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},p.now=Date.now||function(){return(new Date).getTime()};var W={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},H=p.invert(W),U=function(e){var n=function(t){return e[t]},t="(?:"+p.keys(e).join("|")+")",r=RegExp(t),i=RegExp(t,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,n):t}};p.escape=U(W),p.unescape=U(H),p.result=function(t,e,n){p.isArray(e)||(e=[e]);var r=e.length;if(!r)return p.isFunction(n)?n.call(t):n;for(var i=0;i<r;i++){var a=null==t?void 0:t[e[i]];void 0===a&&(a=n,i=r),t=p.isFunction(a)?a.call(t):a}return t};var $=0;p.uniqueId=function(t){var e=++$+"";return t?t+e:e},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var R=/(.)^/,V={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Q=/\\|'|\r|\n|\u2028|\u2029/g,q=function(t){return"\\"+V[t]};p.template=function(a,t,e){!t&&e&&(t=e),t=p.defaults({},t,p.templateSettings);var n,r=RegExp([(t.escape||R).source,(t.interpolate||R).source,(t.evaluate||R).source].join("|")+"|$","g"),o=0,s="__p+='";a.replace(r,function(t,e,n,r,i){return s+=a.slice(o,i).replace(Q,q),o=i+t.length,e?s+="'+\n((__t=("+e+"))==null?'':_.escape(__t))+\n'":n?s+="'+\n((__t=("+n+"))==null?'':__t)+\n'":r&&(s+="';\n"+r+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{n=new Function(t.variable||"obj","_",s)}catch(t){throw t.source=s,t}var i=function(t){return n.call(this,t,p)},u=t.variable||"obj";return i.source="function("+u+"){\n"+s+"}",i},p.chain=function(t){var e=p(t);return e._chain=!0,e};var K=function(t,e){return t._chain?p(e).chain():e};p.mixin=function(n){return p.each(p.functions(n),function(t){var e=p[t]=n[t];p.prototype[t]=function(){var t=[this._wrapped];return i.apply(t,arguments),K(this,e.apply(p,t))}}),p},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var n=r[e];p.prototype[e]=function(){var t=this._wrapped;return n.apply(t,arguments),"shift"!==e&&"splice"!==e||0!==t.length||delete t[0],K(this,t)}}),p.each(["concat","join","slice"],function(t){var e=r[t];p.prototype[t]=function(){return K(this,e.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},p.prototype.valueOf=p.prototype.toJSON=p.prototype.value,p.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return p})}(),function(i){i.fn.fitText=function(t,e){var n=t||1,r=i.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},e);return this.each(function(){var t=i(this),e=function(){t.css("font-size",Math.max(Math.min(t.width()/(10*n),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize)))};e(),i(window).on("resize.fittext orientationchange.fittext",e)})}}(jQuery),function(l,c){var n="nimbleLazyLoad",r={load_all_images_on_first_scroll:!1,excludeImg:[],threshold:200,fadeIn_options:{duration:400},delaySmartLoadEvent:0},i="smartload-skip";function e(t,e){this.element=t,this.options=l.extend({},r,e),_utils_.isArray(this.options.excludeImg)?this.options.excludeImg.push("."+i):this.options.excludeImg=["."+i],this._defaults=r,this._name=n,this.init()}e.prototype.init=function(){var e=this,n=l("[data-sek-src]:not("+this.options.excludeImg.join()+"), [data-sek-iframe-src]",this.element);this.increment=1,this.timer=0,n.addClass(i).bind("sek_load_img",{},function(){e._load_img(this)}).bind("sek_load_iframe",{},function(){e._load_iframe(this)}),l(c).scroll(function(t){e._better_scroll_event_handler(n,t)}),l(c).resize(_utils_.debounce(function(t){e._maybe_trigger_load(n,t)},100)),this._maybe_trigger_load(n)},e.prototype._better_scroll_event_handler=function(t,e){var n=this;this.doingAnimation||(this.doingAnimation=!0,c.requestAnimationFrame(function(){n._maybe_trigger_load(t,e),n.doingAnimation=!1}))},e.prototype._maybe_trigger_load=function(t,n){var r=this;t.filter(function(t,e){return r._is_visible(e,n)}).map(function(t,e){"IFRAME"===l(e).prop("tagName")?l(e).trigger("sek_load_iframe"):l(e).trigger("sek_load_img")})},e.prototype._is_visible=function(t,e){var r=function(t){if(0<t.length&&t.is(":visible"))return t;var e=t.prev();if(0<e.length&&e.is(":visible"))return e;if(0<e.length&&!e.is(":visible"))return r(e);var n=t.parent();return 0<n.length?r(n):null},n=r(l(t));if(!n||n.length<1)return!1;var i=l(c).scrollTop(),a=i+l(c).height(),o=n.offset().top,s=o+n.height(),u=this.options.threshold;return!(!e||"scroll"!=e.type||!this.options.load_all_images_on_first_scroll)||i-u<=s&&o<=a+u},e.prototype._load_img=function(t){var e=l(t),n=e.attr("data-sek-src"),r=e.attr("data-sek-srcset"),i=e.attr("data-sek-sizes"),a=l("<img />",{src:n});e.addClass("lazy-loading"),e.unbind("sek_load_img"),a.load(function(){e.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),e.data("sek-lazy-bg")?e.css("backgroundImage","url("+n+")"):(e.attr("src",n),r&&e.attr("srcset",r),i&&e.attr("sizes",i)),e.hasClass("sek-lazy-loaded")||e.addClass("sek-lazy-loaded"),e.trigger("smartload"),e.data("sek-lazy-loaded",!0)}),a[0].complete&&a.load(),e.removeClass("lazy-loading")},e.prototype._load_iframe=function(t){var e=l(t);e.unbind("sek_load_iframe"),e.attr("src",function(){var t=l(this).attr("data-sek-iframe-src");return l(this).removeAttr("data-sek-iframe-src"),e.data("sek-lazy-loaded",!0),e.trigger("smartload"),e.hasClass("sek-lazy-loaded")||e.addClass("sek-lazy-loaded"),t})},l.fn[n]=function(t){return this.each(function(){l.data(this,"plugin_"+n)||l.data(this,"plugin_"+n,new e(this,t))})}}(jQuery,window),function(u,a){var n="nimbleCenterImages",r={enableCentering:!0,onresize:!0,onInit:!0,oncustom:[],$containerToListen:null,imgSel:"img",defaultCSSVal:{width:"auto",height:"auto"},leftAdjust:0,zeroLeftAdjust:0,topAdjust:0,zeroTopAdjust:-2,useImgAttr:!1,setOpacityWhenCentered:!1,addCenteredClassWithDelay:0,opacity:1};function e(t,e){this.container=t,this.options=u.extend({},r,e),this._defaults=r,this._name=n,this._customEvt=u.isArray(this.options.oncustom)?this.options.oncustom:this.options.oncustom.split(" "),this.init()}e.prototype.init=function(){var n=this,e=function(t){t=t||"init";var e=u(n.options.imgSel,n.container);1<=e.length&&n.options.enableCentering&&n._parse_imgs(e,t)};n.options.onInit&&e(),u.isArray(n._customEvt)&&n._customEvt.map(function(t){(n.options.$containerToListen instanceof u&&1<n.options.$containerToListen.length?n.options.$containerToListen:u(n.container)).bind(t,{},function(){e(t)})})},e.prototype._parse_imgs=function(t,r){var i=this;if(t.each(function(t,e){var n=u(e);i._pre_img_cent(n,r),i.options.onresize&&!n.data("resize-react-bound")&&(n.data("resize-react-bound",!0),u(a).resize(_utils_.debounce(function(){i._pre_img_cent(n,"resize")},100)))}),u(i.container).attr("data-img-centered-in-container")){var e=parseInt(u(i.container).attr("data-img-centered-in-container"),10)+1;u(i.container).attr("data-img-centered-in-container",e)}else u(i.container).attr("data-img-centered-in-container",1)},e.prototype._pre_img_cent=function(t){var e=this._get_current_state(t),n=this,r=e.current,i=e.prop[r],a=e.prop["h"==r?"v":"h"],o="h"==r?this.options.zeroTopAdjust||0:this.options.zeroLeftAdjust||0,s=function(t){if(t.css(i.dim.name,i.dim.val).css(a.dim.name,n.options.defaultCSSVal[a.dim.name]||"auto").css(i.dir.name,i.dir.val).css(a.dir.name,o),0!==n.options.addCenteredClassWithDelay&&_utils_.isNumber(n.options.addCenteredClassWithDelay)?_utils_.delay(function(){t.addClass(i._class).removeClass(a._class)},n.options.addCenteredClassWithDelay):t.addClass(i._class).removeClass(a._class),t.attr("data-img-centered")){var e=parseInt(t.attr("data-img-centered"),10)+1;t.attr("data-img-centered",e)}else t.attr("data-img-centered",1);return t};this.options.setOpacityWhenCentered?u.when(s(t)).done(function(t){t.css("opacity",n.options.opacity)}):_utils_.delay(function(){s(t)},0)},e.prototype._get_current_state=function(t){var e=t.closest(this.container).outerWidth(),n=u(this.container).outerHeight(),r=this._get_img_dim(t,"x"),i=this._get_img_dim(t,"y"),a=i*n!=0?Math.round(r/i*n):e,o=r*e!=0?Math.round(i/r*e):n,s="h";return 0!=e*r&&(s=i/r<=n/e?"h":"v"),{current:s,prop:{h:{dim:{name:"height",val:n},dir:{name:"left",val:(e-a)/2+(this.options.leftAdjust||0)},_class:"sek-h-centrd"},v:{dim:{name:"width",val:e},dir:{name:"top",val:(n-o)/2+(this.options.topAdjust||0)},_class:"sek-v-centrd"}}}},e.prototype._get_img_dim=function(t,e){if(!this.options.useImgAttr)return"x"==e?t.outerWidth():t.outerHeight();if(t.is(":visible"))return"x"==e?t.outerWidth():t.outerHeight();if("x"==e){var n=t.originalWidth();return void 0===typeof n?0:n}if("y"==e){var r=t.originalHeight();return void 0===typeof r?0:r}},e.prototype._is_selector_allowed=function(){if(!u(this.container).attr("class"))return!0;var t=u(this.container).attr("class").split(" "),e=[];return 0===t.filter(function(t){return-1!=u.inArray(t,e)}).length},u.fn[n]=function(t){return this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new e(this,t))})}}(jQuery,window),function(n,s){var r="parallaxBg",i={parallaxForce:40,oncustom:[],matchMedia:"only screen and (max-width: 800px)"};function e(t,e){this.element=n(t),this.options=n.extend({},i,e,this.parseElementDataOptions()),this._defaults=i,this._name=r,this.init()}e.prototype.parseElementDataOptions=function(){return this.element.data()},e.prototype.init=function(){var e=this;this.$_window=n(s),this.doingAnimation=!1,this.isVisible=!1,this.isBefore=!1,this.isAfter=!0,("number"!=typeof e.options.parallaxForce||e.options.parallaxForce<0)&&(sekFrontLocalized.isDevMode&&console.log("parallaxBg => the provided parallaxForce is invalid => "+e.options.parallaxForce),e.options.parallaxForce=this._defaults.parallaxForce),100<e.options.parallaxForce&&(e.options.parallaxForce=100),this.$_window.scroll(function(t){e.maybeParallaxMe(t)}),this.$_window.resize(_utils_.debounce(function(t){e.maybeParallaxMe(t)},100)),this.checkIfIsVisibleAndCacheProperties(),this.setTopPositionAndBackgroundSize()},e.prototype.setTopPositionAndBackgroundSize=function(){if(_utils_.isFunction(s.matchMedia)&&matchMedia(this.options.matchMedia).matches)this.element.css({"background-position-y":"","background-attachment":""});else{var t=this.element,e=(t.outerHeight(),this.$_window.height()),n=t.offset().top,r=this.$_window.scrollTop(),i=100;this.isVisible?i=(n-r)/e:this.isBefore?i=1:this.isAfter&&(i=-1);var a=0<this.options.parallaxForce?e*(100-this.options.parallaxForce)/100:e,o=Math.round(i*a);this.element.css({"background-position-y":["calc(50% ",0<o?"+ ":"- ",Math.abs(o)+"px)"].join("")})}},e.prototype.checkIfIsVisibleAndCacheProperties=function(t){var e=this.element;if(!e.is(":visible"))return!1;var n=this.$_window.scrollTop(),r=n+this.$_window.height(),i=e.offset().top,a=i+e.outerHeight();return this.isVisible=n<=a&&i<=r,this.isBefore=r<i,this.isAfter=a<n,this.isVisible},e.prototype.maybeParallaxMe=function(t){var e=this;this.checkIfIsVisibleAndCacheProperties()&&(this.doingAnimation||(this.doingAnimation=!0,s.requestAnimationFrame(function(){e.setTopPositionAndBackgroundSize(),e.doingAnimation=!1})))},n.fn[r]=function(t){return this.each(function(){n.data(this,"plugin_"+r)||n.data(this,"plugin_"+r,new e(this,t))})}}(jQuery,window),jQuery(function(p){var t,a,o,s,u,l;!function(){var l="sek.sekDropdown",t="."+l,n={PLACE_ME:"placeme"+t,PLACE_ALL:"placeall"+t,SHOWN:"shown"+t,SHOW:"show"+t,HIDDEN:"hidden"+t,HIDE:"hide"+t,CLICK:"click"+t,TAP:"tap"+t},c="sek-dropdown-menu",e="sek-dropdown-submenu",r="show",i="menu-item-has-children",a='[data-toggle="sek-dropdown"]',o=".sek-nav-wrap .menu-item-has-children",s=".sek-nav-wrap .menu-item-has-children";p(".sek-nav .children, .sek-nav .sub-menu").addClass(c),p(".sek-nav-wrap .page_item_has_children").addClass(i),p(".sek-nav ."+c+" ."+i).addClass(e);var u,f,d;u=o,p(document).on("mouseenter",u,function(){var e=p(this);_utils_.debounce(function(){if("static"==e.find("."+c).css("position"))return!1;if(!e.hasClass(r)){e.trigger(n.SHOW).addClass(r).trigger(n.SHOWN);var t=e.children(a);t.length&&t[0].setAttribute("aria-expanded","true")}},30)()}).on("mouseleave",u,function(){var e=p(this);_utils_.debounce(function(){if(e.find("ul li:hover").length<1&&!e.closest("ul").find("li:hover").is(e)){e.trigger(n.HIDE).removeClass(r).trigger(n.HIDDEN);var t=e.children(a);t.length&&t[0].setAttribute("aria-expanded","false")}},30)()}),f="rtl"===p("html").attr("dir"),d=!1,p(window).on("resize",function(){d||(d=!0,window.requestAnimationFrame(function(){p(s+"."+r).trigger(n.PLACE_ME),d=!1}))}),p(document).on(n.PLACE_ALL,function(){p(s).trigger(n.PLACE_ME)}).on(n.SHOWN+" "+n.PLACE_ME,s,function(t){t.stopPropagation(),function(t,e){if(e&&e.namespace&&l===e.namespace){var n,r,i,a,o,s,u=t.children("."+c);u.length&&(t.css("overflow","hidden"),u.css({zIndex:"-100",display:"block"}),r=t,i=f?{_DEFAULT:"left",_OPPOSITE:"right"}:{_DEFAULT:"right",_OPPOSITE:"left"},a={OPEN_PREFIX:"open-",DD_SUBMENU:"sek-dropdown-submenu",CARET_TITLE_FLIP:"sek-menu-link__row-reverse",DROPDOWN:"sek-dropdown-menu"},o=function(t,n,e){p.each(t,function(){var t=p(this),e=t.find("a").first();1==e.length&&e.toggleClass(a.CARET_TITLE_FLIP,n==i._OPPOSITE)})},s=function(t){var e=t==i._OPPOSITE?i._DEFAULT:i._OPPOSITE;n.removeClass(a.OPEN_PREFIX+e).addClass(a.OPEN_PREFIX+t),r.hasClass(a.DD_SUBMENU)&&(o(r,t,e),o(n.children("."+a.DD_SUBMENU),t,e))},(n=u).parent().closest("."+a.DROPDOWN).hasClass(a.OPEN_PREFIX+i._OPPOSITE)?s(i._OPPOSITE):s(i._DEFAULT),n.offset().left+n.width()>p(window).width()?s("left"):n.offset().left<0&&s("right"),u.css({zIndex:"",display:""}),t.css("overflow",""))}}(p(this),t)})}(),a={SHOW:"show"+(t=".sek.sekCollapse"),SHOWN:"shown"+t,HIDE:"hide"+t,HIDDEN:"hidden"+t,CLICK_DATA_API:"click"+t+".data-api"},o="show",s="sek-collapse",u="sek-collapsing",l="sek-collapsed",p(document).on(a.CLICK_DATA_API,'[data-sek-toggle="sek-collapse"]',function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=p(this),n=e.data("target");p(n).each(function(){var r=p(this),i=r.hasClass(o);r.stop()[i?"slideUp":"slideDown"]({duration:400,start:function(){r.addClass(u).trigger(i?a.HIDE:a.SHOW),i?e.addClass(l).attr("aria-expanded","false"):e.removeClass(l).attr("aria-expanded","true")},complete:function(){var t,e,n;i?(t=o,e=s,n=a.HIDDEN):(t=s,e=o,n=a.SHOWN),r.removeClass(u+" "+t).addClass(e).trigger(n),function(t){(t=t||p(this)).css({display:"",paddingTop:"",marginTop:"",paddingBottom:"",marginBottom:"",height:""})}(r)}})})}),p(document).on("mouseenter",".sek-nav-toggler",function(){p(this).addClass("hovering")}).on("mouseleave",".sek-nav-toggler",function(){p(this).removeClass("hovering")}).on("show.sek.sekCollapse hide.sek.sekCollapse",".sek-nav-collapse",function(){p("[data-target=#"+p(this).attr("id")+"]").removeClass("hovering"),p(window).trigger("scroll")}),p(document).on("ready",function(){var e=function(){p('[data-sek-module-type="czr_menu_module"]').find('[data-sek-expand-below="yes"]').each(function(){if(!0!==p(this).data("sek-setup-menu-mobile-expanded-below-done")){var t=p(this).closest('[data-sek-module-type="czr_menu_module"]').clone(!0),e=p(".sek-nav-collapse",this).attr("id")+"-mobile";t.appendTo(p(this).closest(".sek-sektion-inner")).wrap('<div class="sek-col-base sek-mobile-menu-expanded-below" id="'+e+'-wrapper"></div>'),p(".sek-nav-collapse","#"+e+"-wrapper").attr("id",e),p(".sek-nav-wrap","#"+e+"-wrapper").attr("data-sek-is-mobile-menu","yes"),p(".sek-nav-toggler","#"+e+"-wrapper").detach(),p(".sek-nav-toggler",this).data("target","#"+e).attr("aria-controls",e),p(this).data("sek-setup-menu-mobile-expanded-below-done",!0)}})};e(),p("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",function(t){p(".sek-mobile-menu-expanded-below").remove(),e()})})}),jQuery(function(r){r("body").on("click sek-expand-accord-item",".sek-accord-item > .sek-accord-title",function(t){var e=r(this).closest(".sek-accord-item"),n=r(this).closest(".sek-accord-wrapper");"true"==n.data("sek-one-expanded")+""&&n.find(".sek-accord-item").not(e).each(function(){var t=r(this);t.find(".sek-accord-content").stop(!0,!0).slideUp({duration:200,start:function(){"true"==t.attr("data-sek-expanded")+""&&t.find(".sek-accord-content").css("display","block"),t.attr("data-sek-expanded","false")}})}),"sek-expand-accord-item"===t.type&&"true"==e.attr("data-sek-expanded")+""||e.find(".sek-accord-content").stop(!0,!0).slideToggle({duration:200,start:function(){"true"==e.attr("data-sek-expanded")+""&&e.find(".sek-accord-content").css("display","block"),e.attr("data-sek-expanded","false"==e.attr("data-sek-expanded")+""?"true":"false"),e.trigger("true"==e.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed")}})}),_utils_.isUndefined(wp.customize)||wp.customize.preview.bind("sek-item-focus",function(t){var e=r('[data-sek-item-id="'+t.item_id+'"]',".sek-accord-wrapper").first();e.length<1||e.find(".sek-accord-title").trigger("sek-expand-accord-item")})}),jQuery(function(a){var r=[],t=function(){var t=a(this),e="sek-swiper"+t.data("sek-swiper-id"),n={loop:!0===t.data("sek-loop")&&!0===t.data("sek-is-multislide"),grabCursor:!0===t.data("sek-is-multislide"),on:{init:function(){"nimble-wizard"===t.data("sek-image-layout")&&t.find(".sek-carousel-img").each(function(){var e=a(this).nimbleCenterImages({enableCentering:1,zeroTopAdjust:0,setOpacityWhenCentered:!1,oncustom:["simple_load","smartload","sek-nimble-refreshed"]}).find('img:not([src^="data"])');_utils_.delay(function(){var t;0!==(t=e).length&&t.map(function(t,e){a(e).load(function(){a(e).trigger("simple_load")}),a(e)[0]&&a(e)[0].complete&&a(e).load()})},10)})}}};!0===t.data("sek-autoplay")?a.extend(n,{autoplay:{delay:t.data("sek-autoplay-delay"),disableOnInteraction:t.data("sek-pause-on-hover")}}):a.extend(n,{autoplay:{delay:999999999}}),!0===t.data("sek-is-multislide")&&(_utils_.contains(["arrows_dots","arrows"],t.data("sek-navtype"))&&a.extend(n,{navigation:{nextEl:".sek-swiper-next"+t.data("sek-swiper-id"),prevEl:".sek-swiper-prev"+t.data("sek-swiper-id")}}),_utils_.contains(["arrows_dots","dots"],t.data("sek-navtype"))&&a.extend(n,{pagination:{el:".swiper-pagination"+t.data("sek-swiper-id"),clickable:!0}})),r.push(new Swiper("."+e,n))},e=function(){a(".sektion-wrapper").find("[data-sek-swiper-id]").each(function(){t.call(a(this))})};a("body").on("sek-columns-refreshed sek-modules-refreshed sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(){_utils_.isEmpty(r)||_utils_.each(r,function(t){t.destroy()}),r=[],e(),a(this).find(".swiper-container img").each(function(){a(this).trigger("sek-nimble-refreshed")})}),a("body").on("sek-stylesheet-refreshed",'[data-sek-module-type="czr_img_slider_module"]',function(){a(this).find(".swiper-container img").each(function(){a(this).trigger("sek-nimble-refreshed")})}),a(".sektion-wrapper").find(".swiper-container").each(function(){e()}),a(".swiper-slide").on("mouseover mouseout",function(t){var e=a(this).closest(".swiper-container")[0].swiper;if(!_utils_.isUndefined(e)&&!0===e.params.autoplay.disableOnInteraction)switch(t.type){case"mouseover":e.autoplay.stop();break;case"mouseout":e.autoplay.start()}}),_utils_.isUndefined(wp.customize)||wp.customize.preview.bind("sek-item-focus",function(t){var e=a('[data-sek-item-id="'+t.item_id+'"]',".swiper-container").first();if(!(e.length<1)){var n=e.closest(".swiper-container");if(!(n.length<1)){var r=e.closest(".swiper-container")[0].swiper;if(!_utils_.isUndefined(r)){var i=a(".swiper-slide",n).index(e);r.slideTo(i,100)}}}})}),jQuery(function(t){t('[data-sek-module-type="czr_image_module"]').each(function(){if($linkCandidate=t(this).find(".sek-link-to-img-lightbox"),!($linkCandidate.length<1||"string"!=typeof $linkCandidate[0].protocol||-1!==$linkCandidate[0].protocol.indexOf("javascript"))&&"function"==typeof t.fn.magnificPopup)try{$linkCandidate.magnificPopup({type:"image",closeOnContentClick:!0,closeBtnInside:!0,fixedContentPos:!0,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!0,duration:300}})}catch(t){"function"==typeof window.console.log&&console.log(t)}})}),jQuery(function(t){t(".sektion-wrapper").each(function(){try{t(this).nimbleLazyLoad()}catch(t){"function"==typeof window.console.log&&console.log(t)}})}),jQuery(function(e){e('[data-sek-bg-parallax="true"]').each(function(){e(this).parallaxBg({parallaxForce:e(this).data("sek-parallax-force")})});var n=function(){e(this).parallaxBg({parallaxForce:e(this).data("sek-parallax-force")}),setTimeout(function(){e("body").trigger("resize")},500)};e("body").on("sek-level-refreshed sek-section-added",function(t){"true"===e(this).data("sek-bg-parallax")?n.call(this):e(this).find('[data-sek-bg-parallax="true"]').each(function(){n.call(this)})})}),jQuery(function(a){var o=function(t){var e=document.createElement("a");e.href=t,e.href=e.href;for(var n=["host","hostname","hash","href","port","protocol","search"],r=0,i=n.length;r<i;r++)this[n[r]]=e[n[r]];this.pathname=("/"!==e.pathname.charAt(0)?"/":"")+e.pathname},s=a("html, body"),t=function(t){var e=a(this).attr("href");if(""!==e&&null!==e&&"string"==typeof e&&-1!==e.indexOf("#")){var n=new o(e),r=new o(window.document.location.href);if(n.pathname===r.pathname&&"string"==typeof n.hash&&""!==n.hash){var i=a('[data-sek-level="location"]').find('[id="'+n.hash.replace("#","")+'"]');1===i.length&&(t.preventDefault(),s.animate({scrollTop:i.offset().top-150},400))}}};a("body").find(".menu-item").on("click","a",t),a('[data-sek-level="location"]').on("click","a",t)});
1
+ !function(){var t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},e=t._,r=Array.prototype,o=Object.prototype,f="undefined"!=typeof Symbol?Symbol.prototype:null,i=r.push,u=r.slice,d=o.toString,a=o.hasOwnProperty,n=Array.isArray,s=Object.keys,l=Object.create,c=function(){},p=function(t){return t instanceof p?t:this instanceof p?void(this._wrapped=t):new p(t)};"undefined"==typeof exports||exports.nodeType?t._utils_=p:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=p),exports._utils_=p),p.VERSION="1.9.1";var h,m=function(i,a,t){if(void 0===a)return i;switch(null==t?3:t){case 1:return function(t){return i.call(a,t)};case 3:return function(t,e,n){return i.call(a,t,e,n)};case 4:return function(t,e,n,r){return i.call(a,t,e,n,r)}}return function(){return i.apply(a,arguments)}},g=function(t,e,n){return p.iteratee!==h?p.iteratee(t,e):null==t?p.identity:p.isFunction(t)?m(t,e,n):p.isObject(t)&&!p.isArray(t)?p.matcher(t):p.property(t)};p.iteratee=h=function(t,e){return g(t,e,1/0)};var v=function(i,a){return a=null==a?i.length-1:+a,function(){for(var t=Math.max(arguments.length-a,0),e=Array(t),n=0;n<t;n++)e[n]=arguments[n+a];switch(a){case 0:return i.call(this,e);case 1:return i.call(this,arguments[0],e);case 2:return i.call(this,arguments[0],arguments[1],e)}var r=Array(a+1);for(n=0;n<a;n++)r[n]=arguments[n];return r[a]=e,i.apply(this,r)}},y=function(t){if(!p.isObject(t))return{};if(l)return l(t);c.prototype=t;var e=new c;return c.prototype=null,e},_=function(e){return function(t){return null==t?void 0:t[e]}},k=function(t,e){return null!=t&&a.call(t,e)},b=function(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0},w=Math.pow(2,53)-1,x=_("length"),A=function(t){var e=x(t);return"number"==typeof e&&0<=e&&e<=w};p.each=p.forEach=function(t,e,n){var r,i;if(e=m(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var a=p.keys(t);for(r=0,i=a.length;r<i;r++)e(t[a[r]],a[r],t)}return t},p.map=p.collect=function(t,e,n){e=g(e,n);for(var r=!A(t)&&p.keys(t),i=(r||t).length,a=Array(i),o=0;o<i;o++){var s=r?r[o]:o;a[o]=e(t[s],s,t)}return a};var C=function(u){return function(t,e,n,r){var i=3<=arguments.length;return function(t,e,n,r){var i=!A(t)&&p.keys(t),a=(i||t).length,o=0<u?0:a-1;for(r||(n=t[i?i[o]:o],o+=u);0<=o&&o<a;o+=u){var s=i?i[o]:o;n=e(n,t[s],s,t)}return n}(t,m(e,r,4),n,i)}};p.reduce=p.foldl=p.inject=C(1),p.reduceRight=p.foldr=C(-1),p.find=p.detect=function(t,e,n){var r=(A(t)?p.findIndex:p.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},p.filter=p.select=function(t,r,e){var i=[];return r=g(r,e),p.each(t,function(t,e,n){r(t,e,n)&&i.push(t)}),i},p.reject=function(t,e,n){return p.filter(t,p.negate(g(e)),n)},p.every=p.all=function(t,e,n){e=g(e,n);for(var r=!A(t)&&p.keys(t),i=(r||t).length,a=0;a<i;a++){var o=r?r[a]:a;if(!e(t[o],o,t))return!1}return!0},p.some=p.any=function(t,e,n){e=g(e,n);for(var r=!A(t)&&p.keys(t),i=(r||t).length,a=0;a<i;a++){var o=r?r[a]:a;if(e(t[o],o,t))return!0}return!1},p.contains=p.includes=p.include=function(t,e,n,r){return A(t)||(t=p.values(t)),("number"!=typeof n||r)&&(n=0),0<=p.indexOf(t,e,n)},p.invoke=v(function(t,n,r){var i,a;return p.isFunction(n)?a=n:p.isArray(n)&&(i=n.slice(0,-1),n=n[n.length-1]),p.map(t,function(t){var e=a;if(!e){if(i&&i.length&&(t=b(t,i)),null==t)return;e=t[n]}return null==e?e:e.apply(t,r)})}),p.pluck=function(t,e){return p.map(t,p.property(e))},p.where=function(t,e){return p.filter(t,p.matcher(e))},p.findWhere=function(t,e){return p.find(t,p.matcher(e))},p.max=function(t,r,e){var n,i,a=-1/0,o=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=A(t)?t:p.values(t)).length;s<u;s++)null!=(n=t[s])&&a<n&&(a=n);else r=g(r,e),p.each(t,function(t,e,n){i=r(t,e,n),(o<i||i===-1/0&&a===-1/0)&&(a=t,o=i)});return a},p.min=function(t,r,e){var n,i,a=1/0,o=1/0;if(null==r||"number"==typeof r&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=A(t)?t:p.values(t)).length;s<u;s++)null!=(n=t[s])&&n<a&&(a=n);else r=g(r,e),p.each(t,function(t,e,n){((i=r(t,e,n))<o||i===1/0&&a===1/0)&&(a=t,o=i)});return a},p.shuffle=function(t){return p.sample(t,1/0)},p.sample=function(t,e,n){if(null==e||n)return A(t)||(t=p.values(t)),t[p.random(t.length-1)];var r=A(t)?p.clone(t):p.values(t),i=x(r);e=Math.max(Math.min(e,i),0);for(var a=i-1,o=0;o<e;o++){var s=p.random(o,a),u=r[o];r[o]=r[s],r[s]=u}return r.slice(0,e)},p.sortBy=function(t,r,e){var i=0;return r=g(r,e),p.pluck(p.map(t,function(t,e,n){return{value:t,index:i++,criteria:r(t,e,n)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(r<n||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var I=function(o,e){return function(r,i,t){var a=e?[[],[]]:{};return i=g(i,t),p.each(r,function(t,e){var n=i(t,e,r);o(a,t,n)}),a}};p.groupBy=I(function(t,e,n){k(t,n)?t[n].push(e):t[n]=[e]}),p.indexBy=I(function(t,e,n){t[n]=e}),p.countBy=I(function(t,e,n){k(t,n)?t[n]++:t[n]=1});var E=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;p.toArray=function(t){return t?p.isArray(t)?u.call(t):p.isString(t)?t.match(E):A(t)?p.map(t,p.identity):p.values(t):[]},p.size=function(t){return null==t?0:A(t)?t.length:p.keys(t).length},p.partition=I(function(t,e,n){t[n?0:1].push(e)},!0),p.first=p.head=p.take=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[0]:p.initial(t,t.length-e)},p.initial=function(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},p.last=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[t.length-1]:p.rest(t,Math.max(0,t.length-e))},p.rest=p.tail=p.drop=function(t,e,n){return u.call(t,null==e||n?1:e)},p.compact=function(t){return p.filter(t,Boolean)};var O=function(t,e,n,r){for(var i=(r=r||[]).length,a=0,o=x(t);a<o;a++){var s=t[a];if(A(s)&&(p.isArray(s)||p.isArguments(s)))if(e)for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else O(s,e,n,r),i=r.length;else n||(r[i++]=s)}return r};p.flatten=function(t,e){return O(t,e,!1)},p.without=v(function(t,e){return p.difference(t,e)}),p.uniq=p.unique=function(t,e,n,r){p.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=g(n,r));for(var i=[],a=[],o=0,s=x(t);o<s;o++){var u=t[o],l=n?n(u,o,t):u;e&&!n?(o&&a===l||i.push(u),a=l):n?p.contains(a,l)||(a.push(l),i.push(u)):p.contains(i,u)||i.push(u)}return i},p.union=v(function(t){return p.uniq(O(t,!0,!0))}),p.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=x(t);r<i;r++){var a=t[r];if(!p.contains(e,a)){var o;for(o=1;o<n&&p.contains(arguments[o],a);o++);o===n&&e.push(a)}}return e},p.difference=v(function(t,e){return e=O(e,!0,!0),p.filter(t,function(t){return!p.contains(e,t)})}),p.unzip=function(t){for(var e=t&&p.max(t,x).length||0,n=Array(e),r=0;r<e;r++)n[r]=p.pluck(t,r);return n},p.zip=v(p.unzip),p.object=function(t,e){for(var n={},r=0,i=x(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n};var j=function(a){return function(t,e,n){e=g(e,n);for(var r=x(t),i=0<a?0:r-1;0<=i&&i<r;i+=a)if(e(t[i],i,t))return i;return-1}};p.findIndex=j(1),p.findLastIndex=j(-1),p.sortedIndex=function(t,e,n,r){for(var i=(n=g(n,r,1))(e),a=0,o=x(t);a<o;){var s=Math.floor((a+o)/2);n(t[s])<i?a=s+1:o=s}return a};var S=function(a,o,s){return function(t,e,n){var r=0,i=x(t);if("number"==typeof n)0<a?r=0<=n?n:Math.max(n+i,r):i=0<=n?Math.min(n+1,i):n+i+1;else if(s&&n&&i)return t[n=s(t,e)]===e?n:-1;if(e!=e)return 0<=(n=o(u.call(t,r,i),p.isNaN))?n+r:-1;for(n=0<a?r:i-1;0<=n&&n<i;n+=a)if(t[n]===e)return n;return-1}};p.indexOf=S(1,p.findIndex,p.sortedIndex),p.lastIndexOf=S(-1,p.findLastIndex),p.range=function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),a=0;a<r;a++,t+=n)i[a]=t;return i},p.chunk=function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(u.call(t,r,r+=e));return n};var T=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var a=y(t.prototype),o=t.apply(a,i);return p.isObject(o)?o:a};p.bind=v(function(e,n,r){if(!p.isFunction(e))throw new TypeError("Bind must be called on a function");var i=v(function(t){return T(e,i,n,this,r.concat(t))});return i}),p.partial=v(function(i,a){var o=p.partial.placeholder,s=function(){for(var t=0,e=a.length,n=Array(e),r=0;r<e;r++)n[r]=a[r]===o?arguments[t++]:a[r];for(;t<arguments.length;)n.push(arguments[t++]);return T(i,s,this,this,n)};return s}),(p.partial.placeholder=p).bindAll=v(function(t,e){var n=(e=O(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=p.bind(t[r],t)}}),p.memoize=function(r,i){var a=function(t){var e=a.cache,n=""+(i?i.apply(this,arguments):t);return k(e,n)||(e[n]=r.apply(this,arguments)),e[n]};return a.cache={},a},p.delay=v(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),p.defer=p.partial(p.delay,p,1),p.throttle=function(n,r,i){var a,o,s,u,l=0;i||(i={});var c=function(){l=!1===i.leading?0:p.now(),a=null,u=n.apply(o,s),a||(o=s=null)},t=function(){var t=p.now();l||!1!==i.leading||(l=t);var e=r-(t-l);return o=this,s=arguments,e<=0||r<e?(a&&(clearTimeout(a),a=null),l=t,u=n.apply(o,s),a||(o=s=null)):a||!1===i.trailing||(a=setTimeout(c,e)),u};return t.cancel=function(){clearTimeout(a),l=0,a=o=s=null},t},p.debounce=function(n,r,i){var a,o,s=function(t,e){a=null,e&&(o=n.apply(t,e))},t=v(function(t){if(a&&clearTimeout(a),i){var e=!a;a=setTimeout(s,r),e&&(o=n.apply(this,t))}else a=p.delay(s,r,this,t);return o});return t.cancel=function(){clearTimeout(a),a=null},t},p.wrap=function(t,e){return p.partial(e,t)},p.negate=function(t){return function(){return!t.apply(this,arguments)}},p.compose=function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},p.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},p.before=function(t,e){var n;return function(){return 0<--t&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},p.once=p.partial(p.before,2),p.restArguments=v;var z=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],P=function(t,e){var n=F.length,r=t.constructor,i=p.isFunction(r)&&r.prototype||o,a="constructor";for(k(t,a)&&!p.contains(e,a)&&e.push(a);n--;)(a=F[n])in t&&t[a]!==i[a]&&!p.contains(e,a)&&e.push(a)};p.keys=function(t){if(!p.isObject(t))return[];if(s)return s(t);var e=[];for(var n in t)k(t,n)&&e.push(n);return z&&P(t,e),e},p.allKeys=function(t){if(!p.isObject(t))return[];var e=[];for(var n in t)e.push(n);return z&&P(t,e),e},p.values=function(t){for(var e=p.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},p.mapObject=function(t,e,n){e=g(e,n);for(var r=p.keys(t),i=r.length,a={},o=0;o<i;o++){var s=r[o];a[s]=e(t[s],s,t)}return a},p.pairs=function(t){for(var e=p.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},p.invert=function(t){for(var e={},n=p.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},p.functions=p.methods=function(t){var e=[];for(var n in t)p.isFunction(t[n])&&e.push(n);return e.sort()};var D=function(u,l){return function(t){var e=arguments.length;if(l&&(t=Object(t)),e<2||null==t)return t;for(var n=1;n<e;n++)for(var r=arguments[n],i=u(r),a=i.length,o=0;o<a;o++){var s=i[o];l&&void 0!==t[s]||(t[s]=r[s])}return t}};p.extend=D(p.allKeys),p.extendOwn=p.assign=D(p.keys),p.findKey=function(t,e,n){e=g(e,n);for(var r,i=p.keys(t),a=0,o=i.length;a<o;a++)if(e(t[r=i[a]],r,t))return r};var N,M,L=function(t,e,n){return e in n};p.pick=v(function(t,e){var n={},r=e[0];if(null==t)return n;p.isFunction(r)?(1<e.length&&(r=m(r,e[1])),e=p.allKeys(t)):(r=L,e=O(e,!1,!1),t=Object(t));for(var i=0,a=e.length;i<a;i++){var o=e[i],s=t[o];r(s,o,t)&&(n[o]=s)}return n}),p.omit=v(function(t,n){var e,r=n[0];return p.isFunction(r)?(r=p.negate(r),1<n.length&&(e=n[1])):(n=p.map(O(n,!1,!1),String),r=function(t,e){return!p.contains(n,e)}),p.pick(t,r,e)}),p.defaults=D(p.allKeys,!0),p.create=function(t,e){var n=y(t);return e&&p.extendOwn(n,e),n},p.clone=function(t){return p.isObject(t)?p.isArray(t)?t.slice():p.extend({},t):t},p.tap=function(t,e){return e(t),t},p.isMatch=function(t,e){var n=p.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),a=0;a<r;a++){var o=n[a];if(e[o]!==i[o]||!(o in i))return!1}return!0},N=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;return("function"===i||"object"===i||"object"==typeof e)&&M(t,e,n,r)},M=function(t,e,n,r){t instanceof p&&(t=t._wrapped),e instanceof p&&(e=e._wrapped);var i=d.call(t);if(i!==d.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return f.valueOf.call(t)===f.valueOf.call(e)}var a="[object Array]"===i;if(!a){if("object"!=typeof t||"object"!=typeof e)return!1;var o=t.constructor,s=e.constructor;if(o!==s&&!(p.isFunction(o)&&o instanceof o&&p.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===t)return r[u]===e;if(n.push(t),r.push(e),a){if((u=t.length)!==e.length)return!1;for(;u--;)if(!N(t[u],e[u],n,r))return!1}else{var l,c=p.keys(t);if(u=c.length,p.keys(e).length!==u)return!1;for(;u--;)if(l=c[u],!k(e,l)||!N(t[l],e[l],n,r))return!1}return n.pop(),r.pop(),!0},p.isEqual=function(t,e){return N(t,e)},p.isEmpty=function(t){return null==t||(A(t)&&(p.isArray(t)||p.isString(t)||p.isArguments(t))?0===t.length:0===p.keys(t).length)},p.isElement=function(t){return!(!t||1!==t.nodeType)},p.isArray=n||function(t){return"[object Array]"===d.call(t)},p.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},p.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e){p["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),p.isArguments(arguments)||(p.isArguments=function(t){return k(t,"callee")});var B=t.document&&t.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof B&&(p.isFunction=function(t){return"function"==typeof t||!1}),p.isFinite=function(t){return!p.isSymbol(t)&&isFinite(t)&&!isNaN(parseFloat(t))},p.isNaN=function(t){return p.isNumber(t)&&isNaN(t)},p.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===d.call(t)},p.isNull=function(t){return null===t},p.isUndefined=function(t){return void 0===t},p.has=function(t,e){if(!p.isArray(e))return k(t,e);for(var n=e.length,r=0;r<n;r++){var i=e[r];if(null==t||!a.call(t,i))return!1;t=t[i]}return!!n},p.noConflict=function(){return t._=e,this},p.identity=function(t){return t},p.constant=function(t){return function(){return t}},p.noop=function(){},p.property=function(e){return p.isArray(e)?function(t){return b(t,e)}:_(e)},p.propertyOf=function(e){return null==e?function(){}:function(t){return p.isArray(t)?b(e,t):e[t]}},p.matcher=p.matches=function(e){return e=p.extendOwn({},e),function(t){return p.isMatch(t,e)}},p.times=function(t,e,n){var r=Array(Math.max(0,t));e=m(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},p.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},p.now=Date.now||function(){return(new Date).getTime()};var W={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},H=p.invert(W),U=function(e){var n=function(t){return e[t]},t="(?:"+p.keys(e).join("|")+")",r=RegExp(t),i=RegExp(t,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,n):t}};p.escape=U(W),p.unescape=U(H),p.result=function(t,e,n){p.isArray(e)||(e=[e]);var r=e.length;if(!r)return p.isFunction(n)?n.call(t):n;for(var i=0;i<r;i++){var a=null==t?void 0:t[e[i]];void 0===a&&(a=n,i=r),t=p.isFunction(a)?a.call(t):a}return t};var $=0;p.uniqueId=function(t){var e=++$+"";return t?t+e:e},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var R=/(.)^/,V={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Q=/\\|'|\r|\n|\u2028|\u2029/g,q=function(t){return"\\"+V[t]};p.template=function(a,t,e){!t&&e&&(t=e),t=p.defaults({},t,p.templateSettings);var n,r=RegExp([(t.escape||R).source,(t.interpolate||R).source,(t.evaluate||R).source].join("|")+"|$","g"),o=0,s="__p+='";a.replace(r,function(t,e,n,r,i){return s+=a.slice(o,i).replace(Q,q),o=i+t.length,e?s+="'+\n((__t=("+e+"))==null?'':_.escape(__t))+\n'":n?s+="'+\n((__t=("+n+"))==null?'':__t)+\n'":r&&(s+="';\n"+r+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{n=new Function(t.variable||"obj","_",s)}catch(t){throw t.source=s,t}var i=function(t){return n.call(this,t,p)},u=t.variable||"obj";return i.source="function("+u+"){\n"+s+"}",i},p.chain=function(t){var e=p(t);return e._chain=!0,e};var K=function(t,e){return t._chain?p(e).chain():e};p.mixin=function(n){return p.each(p.functions(n),function(t){var e=p[t]=n[t];p.prototype[t]=function(){var t=[this._wrapped];return i.apply(t,arguments),K(this,e.apply(p,t))}}),p},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var n=r[e];p.prototype[e]=function(){var t=this._wrapped;return n.apply(t,arguments),"shift"!==e&&"splice"!==e||0!==t.length||delete t[0],K(this,t)}}),p.each(["concat","join","slice"],function(t){var e=r[t];p.prototype[t]=function(){return K(this,e.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},p.prototype.valueOf=p.prototype.toJSON=p.prototype.value,p.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return p})}(),function(i){i.fn.fitText=function(t,e){var n=t||1,r=i.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},e);return this.each(function(){var t=i(this),e=function(){t.css("font-size",Math.max(Math.min(t.width()/(10*n),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize)))};e(),i(window).on("resize.fittext orientationchange.fittext",e)})}}(jQuery),function(l,c){var n="nimbleLazyLoad",r={load_all_images_on_first_scroll:!1,excludeImg:[],threshold:200,fadeIn_options:{duration:400},delaySmartLoadEvent:0},i="smartload-skip";function e(t,e){this.element=t,this.options=l.extend({},r,e),_utils_.isArray(this.options.excludeImg)?this.options.excludeImg.push("."+i):this.options.excludeImg=["."+i],this._defaults=r,this._name=n,this.init()}e.prototype.init=function(){var e=this,n=l("[data-sek-src]:not("+this.options.excludeImg.join()+"), [data-sek-iframe-src]",this.element);this.increment=1,this.timer=0,n.addClass(i).bind("sek_load_img",{},function(){e._load_img(this)}).bind("sek_load_iframe",{},function(){e._load_iframe(this)}),l(c).scroll(function(t){e._better_scroll_event_handler(n,t)}),l(c).resize(_utils_.debounce(function(t){e._maybe_trigger_load(n,t)},100)),this._maybe_trigger_load(n)},e.prototype._better_scroll_event_handler=function(t,e){var n=this;this.doingAnimation||(this.doingAnimation=!0,c.requestAnimationFrame(function(){n._maybe_trigger_load(t,e),n.doingAnimation=!1}))},e.prototype._maybe_trigger_load=function(t,n){var r=this;t.filter(function(t,e){return r._is_visible(e,n)}).map(function(t,e){"IFRAME"===l(e).prop("tagName")?l(e).trigger("sek_load_iframe"):l(e).trigger("sek_load_img")})},e.prototype._is_visible=function(t,e){var r=function(t){if(0<t.length&&t.is(":visible"))return t;var e=t.prev();if(0<e.length&&e.is(":visible"))return e;if(0<e.length&&!e.is(":visible"))return r(e);var n=t.parent();return 0<n.length?r(n):null},n=r(l(t));if(!n||n.length<1)return!1;var i=l(c).scrollTop(),a=i+l(c).height(),o=n.offset().top,s=o+n.height(),u=this.options.threshold;return!(!e||"scroll"!=e.type||!this.options.load_all_images_on_first_scroll)||i-u<=s&&o<=a+u},e.prototype._load_img=function(t){var e=l(t),n=e.attr("data-sek-src"),r=e.attr("data-sek-srcset"),i=e.attr("data-sek-sizes"),a=l("<img />",{src:n});e.addClass("lazy-loading"),e.unbind("sek_load_img"),a.load(function(){e.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),e.data("sek-lazy-bg")?e.css("backgroundImage","url("+n+")"):(e.attr("src",n),r&&e.attr("srcset",r),i&&e.attr("sizes",i)),e.hasClass("sek-lazy-loaded")||e.addClass("sek-lazy-loaded"),e.trigger("smartload"),e.data("sek-lazy-loaded",!0)}),a[0].complete&&a.load(),e.removeClass("lazy-loading")},e.prototype._load_iframe=function(t){var e=l(t);e.unbind("sek_load_iframe"),e.attr("src",function(){var t=l(this).attr("data-sek-iframe-src");return l(this).removeAttr("data-sek-iframe-src"),e.data("sek-lazy-loaded",!0),e.trigger("smartload"),e.hasClass("sek-lazy-loaded")||e.addClass("sek-lazy-loaded"),t})},l.fn[n]=function(t){return this.each(function(){l.data(this,"plugin_"+n)||l.data(this,"plugin_"+n,new e(this,t))})}}(jQuery,window),function(u,a){var n="nimbleCenterImages",r={enableCentering:!0,onresize:!0,onInit:!0,oncustom:[],$containerToListen:null,imgSel:"img",defaultCSSVal:{width:"auto",height:"auto"},leftAdjust:0,zeroLeftAdjust:0,topAdjust:0,zeroTopAdjust:-2,useImgAttr:!1,setOpacityWhenCentered:!1,addCenteredClassWithDelay:0,opacity:1};function e(t,e){this.container=t,this.options=u.extend({},r,e),this._defaults=r,this._name=n,this._customEvt=u.isArray(this.options.oncustom)?this.options.oncustom:this.options.oncustom.split(" "),this.init()}e.prototype.init=function(){var n=this,e=function(t){t=t||"init";var e=u(n.options.imgSel,n.container);1<=e.length&&n.options.enableCentering&&n._parse_imgs(e,t)};n.options.onInit&&e(),u.isArray(n._customEvt)&&n._customEvt.map(function(t){(n.options.$containerToListen instanceof u&&1<n.options.$containerToListen.length?n.options.$containerToListen:u(n.container)).bind(t,{},function(){e(t)})})},e.prototype._parse_imgs=function(t,r){var i=this;if(t.each(function(t,e){var n=u(e);i._pre_img_cent(n,r),i.options.onresize&&!n.data("resize-react-bound")&&(n.data("resize-react-bound",!0),u(a).resize(_utils_.debounce(function(){i._pre_img_cent(n,"resize")},100)))}),u(i.container).attr("data-img-centered-in-container")){var e=parseInt(u(i.container).attr("data-img-centered-in-container"),10)+1;u(i.container).attr("data-img-centered-in-container",e)}else u(i.container).attr("data-img-centered-in-container",1)},e.prototype._pre_img_cent=function(t){var e=this._get_current_state(t),n=this,r=e.current,i=e.prop[r],a=e.prop["h"==r?"v":"h"],o="h"==r?this.options.zeroTopAdjust||0:this.options.zeroLeftAdjust||0,s=function(t){if(t.css(i.dim.name,i.dim.val).css(a.dim.name,n.options.defaultCSSVal[a.dim.name]||"auto").css(i.dir.name,i.dir.val).css(a.dir.name,o),0!==n.options.addCenteredClassWithDelay&&_utils_.isNumber(n.options.addCenteredClassWithDelay)?_utils_.delay(function(){t.addClass(i._class).removeClass(a._class)},n.options.addCenteredClassWithDelay):t.addClass(i._class).removeClass(a._class),t.attr("data-img-centered")){var e=parseInt(t.attr("data-img-centered"),10)+1;t.attr("data-img-centered",e)}else t.attr("data-img-centered",1);return t};this.options.setOpacityWhenCentered?u.when(s(t)).done(function(t){t.css("opacity",n.options.opacity)}):_utils_.delay(function(){s(t)},0)},e.prototype._get_current_state=function(t){var e=t.closest(this.container).outerWidth(),n=u(this.container).outerHeight(),r=this._get_img_dim(t,"x"),i=this._get_img_dim(t,"y"),a=i*n!=0?Math.round(r/i*n):e,o=r*e!=0?Math.round(i/r*e):n,s="h";return 0!=e*r&&(s=i/r<=n/e?"h":"v"),{current:s,prop:{h:{dim:{name:"height",val:n},dir:{name:"left",val:(e-a)/2+(this.options.leftAdjust||0)},_class:"sek-h-centrd"},v:{dim:{name:"width",val:e},dir:{name:"top",val:(n-o)/2+(this.options.topAdjust||0)},_class:"sek-v-centrd"}}}},e.prototype._get_img_dim=function(t,e){if(!this.options.useImgAttr)return"x"==e?t.outerWidth():t.outerHeight();if(t.is(":visible"))return"x"==e?t.outerWidth():t.outerHeight();if("x"==e){var n=t.originalWidth();return void 0===typeof n?0:n}if("y"==e){var r=t.originalHeight();return void 0===typeof r?0:r}},e.prototype._is_selector_allowed=function(){if(!u(this.container).attr("class"))return!0;var t=u(this.container).attr("class").split(" "),e=[];return 0===t.filter(function(t){return-1!=u.inArray(t,e)}).length},u.fn[n]=function(t){return this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new e(this,t))})}}(jQuery,window),function(n,s){var r="parallaxBg",i={parallaxForce:40,oncustom:[],matchMedia:"only screen and (max-width: 800px)"};function e(t,e){this.element=n(t),this.options=n.extend({},i,e,this.parseElementDataOptions()),this._defaults=i,this._name=r,this.init()}e.prototype.parseElementDataOptions=function(){return this.element.data()},e.prototype.init=function(){var e=this;this.$_window=n(s),this.doingAnimation=!1,this.isVisible=!1,this.isBefore=!1,this.isAfter=!0,("number"!=typeof e.options.parallaxForce||e.options.parallaxForce<0)&&(sekFrontLocalized.isDevMode&&console.log("parallaxBg => the provided parallaxForce is invalid => "+e.options.parallaxForce),e.options.parallaxForce=this._defaults.parallaxForce),100<e.options.parallaxForce&&(e.options.parallaxForce=100),this.$_window.scroll(function(t){e.maybeParallaxMe(t)}),this.$_window.resize(_utils_.debounce(function(t){e.maybeParallaxMe(t)},100)),this.checkIfIsVisibleAndCacheProperties(),this.setTopPositionAndBackgroundSize()},e.prototype.setTopPositionAndBackgroundSize=function(){if(_utils_.isFunction(s.matchMedia)&&matchMedia(this.options.matchMedia).matches)this.element.css({"background-position-y":"","background-attachment":""});else{var t=this.element,e=(t.outerHeight(),this.$_window.height()),n=t.offset().top,r=this.$_window.scrollTop(),i=100;this.isVisible?i=(n-r)/e:this.isBefore?i=1:this.isAfter&&(i=-1);var a=0<this.options.parallaxForce?e*(100-this.options.parallaxForce)/100:e,o=Math.round(i*a);this.element.css({"background-position-y":["calc(50% ",0<o?"+ ":"- ",Math.abs(o)+"px)"].join("")})}},e.prototype.checkIfIsVisibleAndCacheProperties=function(t){var e=this.element;if(!e.is(":visible"))return!1;var n=this.$_window.scrollTop(),r=n+this.$_window.height(),i=e.offset().top,a=i+e.outerHeight();return this.isVisible=n<=a&&i<=r,this.isBefore=r<i,this.isAfter=a<n,this.isVisible},e.prototype.maybeParallaxMe=function(t){var e=this;this.checkIfIsVisibleAndCacheProperties()&&(this.doingAnimation||(this.doingAnimation=!0,s.requestAnimationFrame(function(){e.setTopPositionAndBackgroundSize(),e.doingAnimation=!1})))},n.fn[r]=function(t){return this.each(function(){n.data(this,"plugin_"+r)||n.data(this,"plugin_"+r,new e(this,t))})}}(jQuery,window),jQuery(function(p){var t,a,o,s,u,l;!function(){var l="sek.sekDropdown",t="."+l,n={PLACE_ME:"placeme"+t,PLACE_ALL:"placeall"+t,SHOWN:"shown"+t,SHOW:"show"+t,HIDDEN:"hidden"+t,HIDE:"hide"+t,CLICK:"click"+t,TAP:"tap"+t},c="sek-dropdown-menu",e="sek-dropdown-submenu",r="show",i="menu-item-has-children",a='[data-toggle="sek-dropdown"]',o=".sek-nav-wrap .menu-item-has-children",s=".sek-nav-wrap .menu-item-has-children";p(".sek-nav .children, .sek-nav .sub-menu").addClass(c),p(".sek-nav-wrap .page_item_has_children").addClass(i),p(".sek-nav ."+c+" ."+i).addClass(e);var u,f,d;u=o,p(document).on("mouseenter",u,function(){var e=p(this);_utils_.debounce(function(){if("static"==e.find("."+c).css("position"))return!1;if(!e.hasClass(r)){e.trigger(n.SHOW).addClass(r).trigger(n.SHOWN);var t=e.children(a);t.length&&t[0].setAttribute("aria-expanded","true")}},30)()}).on("mouseleave",u,function(){var e=p(this);_utils_.debounce(function(){if(e.find("ul li:hover").length<1&&!e.closest("ul").find("li:hover").is(e)){e.trigger(n.HIDE).removeClass(r).trigger(n.HIDDEN);var t=e.children(a);t.length&&t[0].setAttribute("aria-expanded","false")}},30)()}),f="rtl"===p("html").attr("dir"),d=!1,p(window).on("resize",function(){d||(d=!0,window.requestAnimationFrame(function(){p(s+"."+r).trigger(n.PLACE_ME),d=!1}))}),p(document).on(n.PLACE_ALL,function(){p(s).trigger(n.PLACE_ME)}).on(n.SHOWN+" "+n.PLACE_ME,s,function(t){t.stopPropagation(),function(t,e){if(e&&e.namespace&&l===e.namespace){var n,r,i,a,o,s,u=t.children("."+c);u.length&&(t.css("overflow","hidden"),u.css({zIndex:"-100",display:"block"}),r=t,i=f?{_DEFAULT:"left",_OPPOSITE:"right"}:{_DEFAULT:"right",_OPPOSITE:"left"},a={OPEN_PREFIX:"open-",DD_SUBMENU:"sek-dropdown-submenu",CARET_TITLE_FLIP:"sek-menu-link__row-reverse",DROPDOWN:"sek-dropdown-menu"},o=function(t,n,e){p.each(t,function(){var t=p(this),e=t.find("a").first();1==e.length&&e.toggleClass(a.CARET_TITLE_FLIP,n==i._OPPOSITE)})},s=function(t){var e=t==i._OPPOSITE?i._DEFAULT:i._OPPOSITE;n.removeClass(a.OPEN_PREFIX+e).addClass(a.OPEN_PREFIX+t),r.hasClass(a.DD_SUBMENU)&&(o(r,t,e),o(n.children("."+a.DD_SUBMENU),t,e))},(n=u).parent().closest("."+a.DROPDOWN).hasClass(a.OPEN_PREFIX+i._OPPOSITE)?s(i._OPPOSITE):s(i._DEFAULT),n.offset().left+n.width()>p(window).width()?s("left"):n.offset().left<0&&s("right"),u.css({zIndex:"",display:""}),t.css("overflow",""))}}(p(this),t)})}(),a={SHOW:"show"+(t=".sek.sekCollapse"),SHOWN:"shown"+t,HIDE:"hide"+t,HIDDEN:"hidden"+t,CLICK_DATA_API:"click"+t+".data-api"},o="show",s="sek-collapse",u="sek-collapsing",l="sek-collapsed",p(document).on(a.CLICK_DATA_API,'[data-sek-toggle="sek-collapse"]',function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=p(this),n=e.data("target");p(n).each(function(){var r=p(this),i=r.hasClass(o);r.stop()[i?"slideUp":"slideDown"]({duration:400,start:function(){r.addClass(u).trigger(i?a.HIDE:a.SHOW),i?e.addClass(l).attr("aria-expanded","false"):e.removeClass(l).attr("aria-expanded","true")},complete:function(){var t,e,n;i?(t=o,e=s,n=a.HIDDEN):(t=s,e=o,n=a.SHOWN),r.removeClass(u+" "+t).addClass(e).trigger(n),function(t){(t=t||p(this)).css({display:"",paddingTop:"",marginTop:"",paddingBottom:"",marginBottom:"",height:""})}(r)}})})}),p(document).on("mouseenter",".sek-nav-toggler",function(){p(this).addClass("hovering")}).on("mouseleave",".sek-nav-toggler",function(){p(this).removeClass("hovering")}).on("show.sek.sekCollapse hide.sek.sekCollapse",".sek-nav-collapse",function(){p("[data-target=#"+p(this).attr("id")+"]").removeClass("hovering"),p(window).trigger("scroll")}),p(document).on("ready",function(){var e=function(){p('[data-sek-module-type="czr_menu_module"]').find('[data-sek-expand-below="yes"]').each(function(){if(!0!==p(this).data("sek-setup-menu-mobile-expanded-below-done")){var t=p(this).closest('[data-sek-module-type="czr_menu_module"]').clone(!0),e=p(".sek-nav-collapse",this).attr("id")+"-mobile";t.appendTo(p(this).closest(".sek-sektion-inner")).wrap('<div class="sek-col-base sek-mobile-menu-expanded-below" id="'+e+'-wrapper"></div>'),p(".sek-nav-collapse","#"+e+"-wrapper").attr("id",e),p(".sek-nav-wrap","#"+e+"-wrapper").attr("data-sek-is-mobile-menu","yes"),p(".sek-nav-toggler","#"+e+"-wrapper").detach(),p(".sek-nav-toggler",this).data("target","#"+e).attr("aria-controls",e),p(this).data("sek-setup-menu-mobile-expanded-below-done",!0)}})};e(),p("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",function(t){p(".sek-mobile-menu-expanded-below").remove(),e()})})}),jQuery(function(r){r("body").on("click sek-expand-accord-item",".sek-accord-item > .sek-accord-title",function(t){var e=r(this).closest(".sek-accord-item"),n=r(this).closest(".sek-accord-wrapper");"true"==n.data("sek-one-expanded")+""&&n.find(".sek-accord-item").not(e).each(function(){var t=r(this);t.find(".sek-accord-content").stop(!0,!0).slideUp({duration:200,start:function(){"true"==t.attr("data-sek-expanded")+""&&t.find(".sek-accord-content").css("display","block"),t.attr("data-sek-expanded","false")}})}),"sek-expand-accord-item"===t.type&&"true"==e.attr("data-sek-expanded")+""||e.find(".sek-accord-content").stop(!0,!0).slideToggle({duration:200,start:function(){"true"==e.attr("data-sek-expanded")+""&&e.find(".sek-accord-content").css("display","block"),e.attr("data-sek-expanded","false"==e.attr("data-sek-expanded")+""?"true":"false"),e.trigger("true"==e.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed")}})}),window.wp&&!_utils_.isUndefined(wp.customize)&&wp.customize.preview.bind("sek-item-focus",function(t){var e=r('[data-sek-item-id="'+t.item_id+'"]',".sek-accord-wrapper").first();e.length<1||e.find(".sek-accord-title").trigger("sek-expand-accord-item")})}),jQuery(function(a){var r=[],t=function(){var t=a(this),e="sek-swiper"+t.data("sek-swiper-id"),n={loop:!0===t.data("sek-loop")&&!0===t.data("sek-is-multislide"),grabCursor:!0===t.data("sek-is-multislide"),on:{init:function(){"nimble-wizard"===t.data("sek-image-layout")&&t.find(".sek-carousel-img").each(function(){var e=a(this).nimbleCenterImages({enableCentering:1,zeroTopAdjust:0,setOpacityWhenCentered:!1,oncustom:["simple_load","smartload","sek-nimble-refreshed"]}).find('img:not([src^="data"])');_utils_.delay(function(){var t;0!==(t=e).length&&t.map(function(t,e){a(e).load(function(){a(e).trigger("simple_load")}),a(e)[0]&&a(e)[0].complete&&a(e).load()})},10)})}}};!0===t.data("sek-autoplay")?a.extend(n,{autoplay:{delay:t.data("sek-autoplay-delay"),disableOnInteraction:t.data("sek-pause-on-hover")}}):a.extend(n,{autoplay:{delay:999999999}}),!0===t.data("sek-is-multislide")&&(_utils_.contains(["arrows_dots","arrows"],t.data("sek-navtype"))&&a.extend(n,{navigation:{nextEl:".sek-swiper-next"+t.data("sek-swiper-id"),prevEl:".sek-swiper-prev"+t.data("sek-swiper-id")}}),_utils_.contains(["arrows_dots","dots"],t.data("sek-navtype"))&&a.extend(n,{pagination:{el:".swiper-pagination"+t.data("sek-swiper-id"),clickable:!0}})),r.push(new Swiper("."+e,n))},e=function(){a(".sektion-wrapper").find("[data-sek-swiper-id]").each(function(){t.call(a(this))})};a("body").on("sek-columns-refreshed sek-modules-refreshed sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(){_utils_.isEmpty(r)||_utils_.each(r,function(t){t.destroy()}),r=[],e(),a(this).find(".swiper-container img").each(function(){a(this).trigger("sek-nimble-refreshed")})}),a("body").on("sek-stylesheet-refreshed",'[data-sek-module-type="czr_img_slider_module"]',function(){a(this).find(".swiper-container img").each(function(){a(this).trigger("sek-nimble-refreshed")})}),a(".sektion-wrapper").find(".swiper-container").each(function(){e()}),a(".swiper-slide").on("mouseover mouseout",function(t){var e=a(this).closest(".swiper-container")[0].swiper;if(!_utils_.isUndefined(e)&&!0===e.params.autoplay.disableOnInteraction)switch(t.type){case"mouseover":e.autoplay.stop();break;case"mouseout":e.autoplay.start()}}),window.wp&&!_utils_.isUndefined(wp.customize)&&wp.customize.preview.bind("sek-item-focus",function(t){var e=a('[data-sek-item-id="'+t.item_id+'"]',".swiper-container").first();if(!(e.length<1)){var n=e.closest(".swiper-container");if(!(n.length<1)){var r=e.closest(".swiper-container")[0].swiper;if(!_utils_.isUndefined(r)){var i=a(".swiper-slide",n).index(e);r.slideTo(i,100)}}}})}),jQuery(function(t){t('[data-sek-module-type="czr_image_module"]').each(function(){if($linkCandidate=t(this).find(".sek-link-to-img-lightbox"),!($linkCandidate.length<1||"string"!=typeof $linkCandidate[0].protocol||-1!==$linkCandidate[0].protocol.indexOf("javascript"))&&"function"==typeof t.fn.magnificPopup)try{$linkCandidate.magnificPopup({type:"image",closeOnContentClick:!0,closeBtnInside:!0,fixedContentPos:!0,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!0,duration:300}})}catch(t){"function"==typeof window.console.log&&console.log(t)}})}),jQuery(function(t){t(".sektion-wrapper").each(function(){try{t(this).nimbleLazyLoad()}catch(t){"function"==typeof window.console.log&&console.log(t)}})}),jQuery(function(e){e('[data-sek-bg-parallax="true"]').each(function(){e(this).parallaxBg({parallaxForce:e(this).data("sek-parallax-force")})});var n=function(){e(this).parallaxBg({parallaxForce:e(this).data("sek-parallax-force")}),setTimeout(function(){e("body").trigger("resize")},500)};e("body").on("sek-level-refreshed sek-section-added",function(t){"true"===e(this).data("sek-bg-parallax")?n.call(this):e(this).find('[data-sek-bg-parallax="true"]').each(function(){n.call(this)})})}),jQuery(function(a){var o=function(t){var e=document.createElement("a");e.href=t,e.href=e.href;for(var n=["host","hostname","hash","href","port","protocol","search"],r=0,i=n.length;r<i;r++)this[n[r]]=e[n[r]];this.pathname=("/"!==e.pathname.charAt(0)?"/":"")+e.pathname},s=a("html, body"),t=function(t){var e=a(this).attr("href");if(""!==e&&null!==e&&"string"==typeof e&&-1!==e.indexOf("#")){var n=new o(e),r=new o(window.document.location.href);if(n.pathname===r.pathname&&"string"==typeof n.hash&&""!==n.hash){var i=a('[data-sek-level="location"]').find('[id="'+n.hash.replace("#","")+'"]');1===i.length&&(t.preventDefault(),s.animate({scrollTop:i.offset().top-150},400))}}};a("body").find(".menu-item").on("click","a",t),a('[data-sek-level="location"]').on("click","a",t)});
inc/admin/nimble-admin.php CHANGED
@@ -623,14 +623,17 @@ function sek_print_js_for_nimble_edit_btn() {
623
  (function ($) {
624
  $('body').on( 'click', '#sek-edit-with-nimble', function(evt) {
625
  evt.preventDefault();
626
- var _url = $(this).data('cust-url');
 
627
  if ( _.isEmpty( _url ) ) {
 
628
  var post_id = $('#post_ID').val();
629
  wp.ajax.post( 'sek_get_customize_url_for_nimble_edit_button', {
630
  nimble_edit_post_id : post_id
631
  }).done( function( resp ) {
632
  location.href = resp;
633
  }).fail( function( resp ) {
 
634
  _.delay(function () {
635
  $( window ).off( 'beforeunload' );
636
  location.href = location.href; //wp-admin/post.php?post=70&action=edit
@@ -659,7 +662,7 @@ function sek_print_nb_btn_edit_with_nimble( $editor_type ) {
659
  ?>
660
  <button id="sek-edit-with-nimble" type="button" class="<?php echo $btn_css_classes; ?>" data-cust-url="<?php echo esc_url( $customize_url ); ?>">
661
  <?php //_e( 'Edit with Nimble Builder', 'text_doma' ); ?>
662
- <?php printf( '<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>',
663
  NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION,
664
  sek_local_skope_has_nimble_sections( $manually_built_skope_id ) ? __('Continue building with Nimble','nimble-builder') : __('Build with Nimble Builder','nimble-builder'),
665
  __('Build','nimble-builder'),
623
  (function ($) {
624
  $('body').on( 'click', '#sek-edit-with-nimble', function(evt) {
625
  evt.preventDefault();
626
+ var $clickedEl = $(this),
627
+ _url = $clickedEl.data('cust-url');
628
  if ( _.isEmpty( _url ) ) {
629
+ $clickedEl.addClass('sek-loading-customizer');
630
  var post_id = $('#post_ID').val();
631
  wp.ajax.post( 'sek_get_customize_url_for_nimble_edit_button', {
632
  nimble_edit_post_id : post_id
633
  }).done( function( resp ) {
634
  location.href = resp;
635
  }).fail( function( resp ) {
636
+ $clickedEl.removeClass('sek-loading-customizer');
637
  _.delay(function () {
638
  $( window ).off( 'beforeunload' );
639
  location.href = location.href; //wp-admin/post.php?post=70&action=edit
662
  ?>
663
  <button id="sek-edit-with-nimble" type="button" class="<?php echo $btn_css_classes; ?>" data-cust-url="<?php echo esc_url( $customize_url ); ?>">
664
  <?php //_e( 'Edit with Nimble Builder', 'text_doma' ); ?>
665
+ <?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>',
666
  NIMBLE_BASE_URL.'/assets/img/nimble/nimble_icon.svg?ver='.NIMBLE_VERSION,
667
  sek_local_skope_has_nimble_sections( $manually_built_skope_id ) ? __('Continue building with Nimble','nimble-builder') : __('Build with Nimble Builder','nimble-builder'),
668
  __('Build','nimble-builder'),
inc/sektions/ccat-czr-sektions.php CHANGED
@@ -514,6 +514,7 @@ function nimble_add_i18n_localized_control_params( $params ) {
514
 
515
  'Layout settings for the' => __('Layout settings for the', 'nimble-builder'),
516
  'Background settings for the' => __('Background settings for the', 'nimble-builder'),
 
517
  'Borders settings for the' => __('Borders settings for the', 'nimble-builder'),
518
  'Padding and margin settings for the' => __('Padding and margin settings for the', 'nimble-builder'),
519
  'Height and vertical alignment for the' => __('Height and vertical alignment for the', 'nimble-builder'),
514
 
515
  'Layout settings for the' => __('Layout settings for the', 'nimble-builder'),
516
  'Background settings for the' => __('Background settings for the', 'nimble-builder'),
517
+ 'Text settings for the' => __('Text settings for the', 'nimble-builder'),
518
  'Borders settings for the' => __('Borders settings for the', 'nimble-builder'),
519
  'Padding and margin settings for the' => __('Padding and margin settings for the', 'nimble-builder'),
520
  'Height and vertical alignment for the' => __('Height and vertical alignment for the', 'nimble-builder'),
inc/sektions/ccat-sektions.php CHANGED
@@ -1594,9 +1594,9 @@ function sek_is_nimble_widget_id( $id ) {
1594
  * Dynamic variables parsing
1595
  /* ------------------------------------------------------------------------- */
1596
  function sek_find_pattern_match($matches) {
1597
- $replace_values = array(
1598
  'home_url' => 'home_url'
1599
- );
1600
 
1601
  if ( array_key_exists( $matches[1], $replace_values ) ) {
1602
  $dyn_content = $replace_values[$matches[1]];
@@ -1660,7 +1660,7 @@ function sek_is_customize_previewing_a_changeset_post() {
1660
  /* ------------------------------------------------------------------------- */
1661
  // introduced when implementing the level tree #359
1662
  function sek_get_module_collection() {
1663
- return array(
1664
  array(
1665
  'content-type' => 'preset_section',
1666
  'content-id' => 'two_columns',
@@ -1807,7 +1807,7 @@ function sek_get_module_collection() {
1807
  // ),
1808
 
1809
 
1810
- );
1811
  }
1812
 
1813
  // @return string theme name
@@ -4201,7 +4201,7 @@ function sek_register_modules_when_customizing_or_ajaxing() {
4201
  SEK_Front_Construct::$ui_picker_modules,
4202
  SEK_Front_Construct::$ui_level_modules,
4203
  SEK_Front_Construct::$ui_local_global_options_modules,
4204
- SEK_Front_Construct::$ui_front_modules
4205
  );
4206
 
4207
  // widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
@@ -4220,7 +4220,7 @@ function sek_register_modules_when_not_customizing_and_not_ajaxing() {
4220
  sek_populate_contextually_active_module_list();
4221
 
4222
  $contextually_actives = array();
4223
- $front_modules = array_merge( SEK_Front_Construct::$ui_front_modules, SEK_Front_Construct::$ui_front_beta_modules );
4224
 
4225
  // we need to get all children when the module is a father.
4226
  // This will be flatenized afterwards
@@ -4229,7 +4229,7 @@ function sek_register_modules_when_not_customizing_and_not_ajaxing() {
4229
  // Parent module with children
4230
  if ( array_key_exists( $module_name, $front_modules ) ) {
4231
  // get the list of childrent, includes the parent too.
4232
- // @see ::$ui_front_modules
4233
  $contextually_actives[] = $front_modules[ $module_name ];
4234
  }
4235
  // Simple module with no children
@@ -4974,6 +4974,170 @@ function sek_add_css_rules_for_level_background( $rules, $level ) {
4974
  return $rules;
4975
  }
4976
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4977
  ?><?php
4978
  //Fired in add_action( 'after_setup_theme', 'sek_register_modules', 50 );
4979
  function sek_get_module_params_for_sek_level_border_module() {
@@ -7252,6 +7416,134 @@ function sek_get_module_params_for_czr_simple_html_module() {
7252
  'title' => __( 'HTML Content' , 'nimble-builder' ),
7253
  'refresh_markup' => '.sek-module-inner'
7254
  //'code_type' => 'text/html' //<= use 'text/css' to instantiate the code mirror as CSS editor, which by default will be an HTML editor
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7255
  )
7256
  )
7257
  ),
@@ -13258,6 +13550,45 @@ class Sek_Dyn_CSS_Builder {
13258
  }//if
13259
 
13260
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13261
  // LEVEL CSS RULES
13262
  if ( is_array( $entry ) ) {
13263
  // Populate rules for sections / columns / modules
@@ -14395,7 +14726,7 @@ function sek_add_css_rules_for_css_sniffed_input_id( $rules, $params ) {
14395
  // implemented to allow CSS rules to be generated on a per-item basis
14396
  // for https://github.com/presscustomizr/nimble-builder/issues/78
14397
  if ( $is_multi_items ) {
14398
- $selector = sprintf( '[data-sek-id="%1$s"] [data-sek-item-id="%2$s"]', $parent_level['id'], $item_id );
14399
  }
14400
  $css_identifier = $input_registration_params['css_identifier'];
14401
 
@@ -14611,7 +14942,10 @@ function sek_add_css_rules_for_css_sniffed_input_id( $rules, $params ) {
14611
  $properties_to_render['-ms-flex-align'] = $v_vendor_value;
14612
  break;
14613
  case 'font_family' :
14614
- $properties_to_render['font-family'] = sek_extract_css_font_family_from_customizer_option( $value );
 
 
 
14615
  break;
14616
 
14617
  /* Spacer */
@@ -15014,6 +15348,7 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
15014
  // UI LEVEL MODULES
15015
  'sek_mod_option_switcher_module',
15016
  'sek_level_bg_module',
 
15017
  'sek_level_border_module',
15018
  //'sek_level_section_layout_module',<// deactivated for now. Replaced by sek_level_width_section
15019
  'sek_level_height_module',
@@ -15050,106 +15385,6 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
15050
  'sek_global_beta_features'
15051
  ];
15052
 
15053
- public static $ui_front_modules = [
15054
- // FRONT MODULES
15055
- 'czr_simple_html_module',
15056
-
15057
- 'czr_tiny_mce_editor_module' => array(
15058
- 'czr_tiny_mce_editor_module',
15059
- 'czr_tinymce_child',
15060
- 'czr_font_child'
15061
- ),
15062
-
15063
- 'czr_image_module' => array(
15064
- 'czr_image_module',
15065
- 'czr_image_main_settings_child',
15066
- 'czr_image_borders_corners_child'
15067
- ),
15068
-
15069
- //'czr_featured_pages_module',
15070
- 'czr_heading_module' => array(
15071
- 'czr_heading_module',
15072
- 'czr_heading_child',
15073
- 'czr_heading_spacing_child',
15074
- 'czr_font_child'
15075
- ),
15076
-
15077
- 'czr_spacer_module',
15078
- 'czr_divider_module',
15079
-
15080
- 'czr_icon_module' => array(
15081
- 'czr_icon_module',
15082
- 'czr_icon_settings_child',
15083
- 'czr_icon_spacing_border_child',
15084
- ),
15085
-
15086
-
15087
- 'czr_map_module',
15088
-
15089
- 'czr_quote_module' => array(
15090
- 'czr_quote_module',
15091
- 'czr_quote_quote_child',
15092
- 'czr_quote_cite_child',
15093
- 'czr_quote_design_child',
15094
- ),
15095
-
15096
- 'czr_button_module' => array(
15097
- 'czr_button_module',
15098
- 'czr_btn_content_child',
15099
- 'czr_btn_design_child',
15100
- 'czr_font_child'
15101
- ),
15102
-
15103
- // simple form father + children
15104
- 'czr_simple_form_module' => array(
15105
- 'czr_simple_form_module',
15106
- 'czr_simple_form_fields_child',
15107
- 'czr_simple_form_button_child',
15108
- 'czr_simple_form_design_child',
15109
- 'czr_simple_form_fonts_child',
15110
- 'czr_simple_form_submission_child'
15111
- ),
15112
-
15113
- 'czr_post_grid_module' => array(
15114
- 'czr_post_grid_module',
15115
- 'czr_post_grid_main_child',
15116
- 'czr_post_grid_thumb_child',
15117
- 'czr_post_grid_metas_child',
15118
- 'czr_post_grid_fonts_child'
15119
- ),
15120
-
15121
- // widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
15122
- 'czr_menu_module' => array(
15123
- 'czr_menu_module',
15124
- 'czr_menu_content_child',
15125
- 'czr_menu_mobile_options',
15126
- 'czr_font_child'
15127
- ),
15128
- //'czr_menu_design_child',
15129
-
15130
- 'czr_widget_area_module',
15131
-
15132
- 'czr_social_icons_module' => array(
15133
- 'czr_social_icons_module',
15134
- 'czr_social_icons_settings_child',
15135
- 'czr_social_icons_style_child'
15136
- ),
15137
-
15138
- 'czr_img_slider_module' => array(
15139
- 'czr_img_slider_module',
15140
- 'czr_img_slider_collection_child',
15141
- 'czr_img_slider_opts_child'
15142
- ),
15143
-
15144
- 'czr_accordion_module' => array(
15145
- 'czr_accordion_module',
15146
- 'czr_accordion_collection_child',
15147
- 'czr_accordion_opts_child'
15148
- ),
15149
-
15150
- 'czr_shortcode_module',
15151
- ];
15152
-
15153
  // Is merged with front module when sek_is_header_footer_enabled() === true
15154
  // @see sek_register_modules_when_customizing_or_ajaxing
15155
  // and sek_register_modules_when_not_customizing_and_not_ajaxing
@@ -15212,6 +15447,110 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
15212
  register_sidebar( $args );
15213
  }
15214
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15215
  }//class
15216
  endif;
15217
  ?><?php
@@ -18710,7 +19049,14 @@ class Sek_Mailer {
18710
  $allow_html = true;
18711
 
18712
  $sender_email = $this->form->get_field('nimble_email')->get_input()->get_value();
18713
- $sender_name = sprintf( '%1$s', $this->form->get_field('nimble_name')->get_input()->get_value() );
 
 
 
 
 
 
 
18714
  $sender_body_message = null === $this->form->get_field('nimble_message') ? '' : $this->form->get_field('nimble_message')->get_input()->get_value();
18715
 
18716
  if ( array_key_exists( 'recipients', $submission_options ) ) {
1594
  * Dynamic variables parsing
1595
  /* ------------------------------------------------------------------------- */
1596
  function sek_find_pattern_match($matches) {
1597
+ $replace_values = apply_filters( 'sek_template_tags', array(
1598
  'home_url' => 'home_url'
1599
+ ));
1600
 
1601
  if ( array_key_exists( $matches[1], $replace_values ) ) {
1602
  $dyn_content = $replace_values[$matches[1]];
1660
  /* ------------------------------------------------------------------------- */
1661
  // introduced when implementing the level tree #359
1662
  function sek_get_module_collection() {
1663
+ return apply_filters( 'sek_get_module_collection', array(
1664
  array(
1665
  'content-type' => 'preset_section',
1666
  'content-id' => 'two_columns',
1807
  // ),
1808
 
1809
 
1810
+ ));
1811
  }
1812
 
1813
  // @return string theme name
4201
  SEK_Front_Construct::$ui_picker_modules,
4202
  SEK_Front_Construct::$ui_level_modules,
4203
  SEK_Front_Construct::$ui_local_global_options_modules,
4204
+ SEK_Front_Construct::sek_get_front_module_collection()
4205
  );
4206
 
4207
  // widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
4220
  sek_populate_contextually_active_module_list();
4221
 
4222
  $contextually_actives = array();
4223
+ $front_modules = array_merge( SEK_Front_Construct::sek_get_front_module_collection(), SEK_Front_Construct::$ui_front_beta_modules );
4224
 
4225
  // we need to get all children when the module is a father.
4226
  // This will be flatenized afterwards
4229
  // Parent module with children
4230
  if ( array_key_exists( $module_name, $front_modules ) ) {
4231
  // get the list of childrent, includes the parent too.
4232
+ // @see ::sek_get_front_module_collection()
4233
  $contextually_actives[] = $front_modules[ $module_name ];
4234
  }
4235
  // Simple module with no children
4974
  return $rules;
4975
  }
4976
 
4977
+ ?><?php
4978
+ //Fired in add_action( 'after_setup_theme', 'sek_register_modules', 50 );
4979
+ function sek_get_module_params_for_sek_level_text_module() {
4980
+ return array(
4981
+ 'dynamic_registration' => true,
4982
+ 'module_type' => 'sek_level_text_module',
4983
+ 'name' => __('Text', 'nimble-builder'),
4984
+ // 'starting_value' => array(
4985
+ // 'bg-color-overlay' => '#000000',
4986
+ // 'bg-opacity-overlay' => '40'
4987
+ // ),
4988
+ // 'sanitize_callback' => 'function_prefix_to_be_replaced_sanitize_callback__czr_social_module',
4989
+ // 'validate_callback' => 'function_prefix_to_be_replaced_validate_callback__czr_social_module',
4990
+ 'css_selectors' => array( '', // <= this first empty selector generates a selector looking like [data-sek-id="__nimble__27f2dc680c0c"], which allows us to style text not wrapped in any specific html tags
4991
+ 'p', 'a', '.sek-btn', 'button', 'input', 'select', 'optgroup', 'textarea' ),
4992
+ 'tmpl' => array(
4993
+ 'item-inputs' => array(
4994
+ 'h_alignment_css' => array(
4995
+ 'input_type' => 'horizTextAlignmentWithDeviceSwitcher',
4996
+ 'title' => __('Alignment', 'nimble-builder'),
4997
+ 'default' => array( 'desktop' => is_rtl() ? 'right' : 'left' ),
4998
+ 'refresh_markup' => false,
4999
+ 'refresh_stylesheet' => true,
5000
+ 'css_identifier' => 'h_alignment',
5001
+ 'title_width' => 'width-100',
5002
+ 'width-100' => true,
5003
+ 'html_before' => sprintf( '<span class="czr-notice">%1$s<br/>%2$s</span><hr>',
5004
+ __('Note : some modules have text settings in their module content tab. Those settings are applied first, before those below.', 'nimble-builder'),
5005
+ __('Text styling is always inherited in this order : section > column > module settings > module content', 'nimble-builder')
5006
+ )
5007
+ ),
5008
+ 'font_family_css' => array(
5009
+ 'input_type' => 'font_picker',
5010
+ 'title' => __('Font family', 'nimble-builder'),
5011
+ 'default' => '',
5012
+ 'refresh_markup' => false,
5013
+ 'refresh_stylesheet' => true,
5014
+ 'refresh_fonts' => true,
5015
+ 'css_identifier' => 'font_family'
5016
+ ),
5017
+ 'font_size_css' => array(
5018
+ 'input_type' => 'range_with_unit_picker_device_switcher',
5019
+ 'title' => __( 'Font size', 'nimble-builder' ),
5020
+ // the default value is commented to fix https://github.com/presscustomizr/nimble-builder/issues/313
5021
+ // => as a consequence, when a module uses the font child module, the default font-size rule must be defined in the module SCSS file.
5022
+ //'default' => array( 'desktop' => '16px' ),
5023
+ 'min' => 0,
5024
+ 'max' => 100,
5025
+ 'title_width' => 'width-100',
5026
+ 'width-100' => true,
5027
+ 'refresh_markup' => false,
5028
+ 'refresh_stylesheet' => true,
5029
+ 'css_identifier' => 'font_size'
5030
+ ),//16,//"14px",
5031
+ 'line_height_css' => array(
5032
+ 'input_type' => 'range_with_unit_picker',
5033
+ 'title' => __( 'Line height', 'nimble-builder' ),
5034
+ 'default' => '1.5em',
5035
+ 'min' => 0,
5036
+ 'max' => 10,
5037
+ 'step' => 0.1,
5038
+ 'width-100' => true,
5039
+ 'refresh_markup' => false,
5040
+ 'refresh_stylesheet' => true,
5041
+ 'css_identifier' => 'line_height'
5042
+ ),//24,//"20px",
5043
+ 'color_css' => array(
5044
+ 'input_type' => 'wp_color_alpha',
5045
+ 'title' => __('Text color', 'nimble-builder'),
5046
+ 'default' => '',
5047
+ 'refresh_markup' => false,
5048
+ 'refresh_stylesheet' => true,
5049
+ 'width-100' => true,
5050
+ 'css_identifier' => 'color'
5051
+ ),//"#000000",
5052
+ 'color_hover_css' => array(
5053
+ 'input_type' => 'wp_color_alpha',
5054
+ 'title' => __('Text color on mouse over', 'nimble-builder'),
5055
+ 'default' => '',
5056
+ 'refresh_markup' => false,
5057
+ 'refresh_stylesheet' => true,
5058
+ 'width-100' => true,
5059
+ 'title_width' => 'width-100',
5060
+ 'css_identifier' => 'color_hover'
5061
+ ),//"#000000",
5062
+ 'font_weight_css' => array(
5063
+ 'input_type' => 'simpleselect',
5064
+ 'title' => __('Font weight', 'nimble-builder'),
5065
+ 'default' => 400,
5066
+ 'refresh_markup' => false,
5067
+ 'refresh_stylesheet' => true,
5068
+ 'css_identifier' => 'font_weight',
5069
+ 'choices' => sek_get_select_options_for_input_id( 'font_weight_css' )
5070
+ ),//null,
5071
+ 'font_style_css' => array(
5072
+ 'input_type' => 'simpleselect',
5073
+ 'title' => __('Font style', 'nimble-builder'),
5074
+ 'default' => 'inherit',
5075
+ 'refresh_markup' => false,
5076
+ 'refresh_stylesheet' => true,
5077
+ 'css_identifier' => 'font_style',
5078
+ 'choices' => sek_get_select_options_for_input_id( 'font_style_css' )
5079
+ ),//null,
5080
+ 'text_decoration_css' => array(
5081
+ 'input_type' => 'simpleselect',
5082
+ 'title' => __('Text decoration', 'nimble-builder'),
5083
+ 'default' => 'none',
5084
+ 'refresh_markup' => false,
5085
+ 'refresh_stylesheet' => true,
5086
+ 'css_identifier' => 'text_decoration',
5087
+ 'choices' => sek_get_select_options_for_input_id( 'text_decoration_css' )
5088
+ ),//null,
5089
+ 'text_transform_css' => array(
5090
+ 'input_type' => 'simpleselect',
5091
+ 'title' => __('Text transform', 'nimble-builder'),
5092
+ 'default' => 'none',
5093
+ 'refresh_markup' => false,
5094
+ 'refresh_stylesheet' => true,
5095
+ 'css_identifier' => 'text_transform',
5096
+ 'choices' => sek_get_select_options_for_input_id( 'text_transform_css' )
5097
+ ),//null,
5098
+
5099
+ 'letter_spacing_css' => array(
5100
+ 'input_type' => 'range_simple',
5101
+ 'title' => __( 'Letter spacing', 'nimble-builder' ),
5102
+ 'default' => 0,
5103
+ 'min' => 0,
5104
+ 'step' => 1,
5105
+ 'refresh_markup' => false,
5106
+ 'refresh_stylesheet' => true,
5107
+ 'css_identifier' => 'letter_spacing',
5108
+ 'width-100' => true,
5109
+ )//0,
5110
+ // Note : always use the suffix '_flag_important' to name an input controling the !important css flag @see Nimble\sek_add_css_rules_for_css_sniffed_input_id
5111
+ // 'fonts___flag_important' => array(
5112
+ // 'input_type' => 'nimblecheck',
5113
+ // 'title' => __('Apply the style options in priority (uses !important).', 'text_doma'),
5114
+ // 'default' => 0,
5115
+ // 'refresh_markup' => false,
5116
+ // 'refresh_stylesheet' => true,
5117
+ // 'title_width' => 'width-80',
5118
+ // 'input_width' => 'width-20',
5119
+ // // declare the list of input_id that will be flagged with !important when the option is checked
5120
+ // // @see sek_add_css_rules_for_css_sniffed_input_id
5121
+ // // @see Nsek_is_flagged_important
5122
+ // 'important_input_list' => array(
5123
+ // 'font_family_css',
5124
+ // 'font_size_css',
5125
+ // 'line_height_css',
5126
+ // 'font_weight_css',
5127
+ // 'font_style_css',
5128
+ // 'text_decoration_css',
5129
+ // 'text_transform_css',
5130
+ // 'letter_spacing_css',
5131
+ // 'color_css',
5132
+ // 'color_hover_css'
5133
+ // )
5134
+ // )
5135
+ )//item-inputs
5136
+ )//tmpl
5137
+ );
5138
+ }
5139
+
5140
+
5141
  ?><?php
5142
  //Fired in add_action( 'after_setup_theme', 'sek_register_modules', 50 );
5143
  function sek_get_module_params_for_sek_level_border_module() {
7416
  'title' => __( 'HTML Content' , 'nimble-builder' ),
7417
  'refresh_markup' => '.sek-module-inner'
7418
  //'code_type' => 'text/html' //<= use 'text/css' to instantiate the code mirror as CSS editor, which by default will be an HTML editor
7419
+ ),
7420
+ 'font_family_css' => array(
7421
+ 'input_type' => 'font_picker',
7422
+ 'title' => __('Font family', 'nimble-builder'),
7423
+ 'default' => '',
7424
+ 'refresh_markup' => false,
7425
+ 'refresh_stylesheet' => true,
7426
+ 'refresh_fonts' => true,
7427
+ 'css_identifier' => 'font_family',
7428
+ 'html_before' => '<hr/><h3>' . __('TEXT OPTIONS', 'nimble-builder') .'</h3>'
7429
+ ),
7430
+ 'font_size_css' => array(
7431
+ 'input_type' => 'range_with_unit_picker_device_switcher',
7432
+ 'title' => __( 'Font size', 'nimble-builder' ),
7433
+ // the default value is commented to fix https://github.com/presscustomizr/nimble-builder/issues/313
7434
+ // => as a consequence, when a module uses the font child module, the default font-size rule must be defined in the module SCSS file.
7435
+ //'default' => array( 'desktop' => '16px' ),
7436
+ 'min' => 0,
7437
+ 'max' => 100,
7438
+ 'title_width' => 'width-100',
7439
+ 'width-100' => true,
7440
+ 'refresh_markup' => false,
7441
+ 'refresh_stylesheet' => true,
7442
+ 'css_identifier' => 'font_size'
7443
+ ),//16,//"14px",
7444
+ 'line_height_css' => array(
7445
+ 'input_type' => 'range_with_unit_picker',
7446
+ 'title' => __( 'Line height', 'nimble-builder' ),
7447
+ 'default' => '1.5em',
7448
+ 'min' => 0,
7449
+ 'max' => 10,
7450
+ 'step' => 0.1,
7451
+ 'width-100' => true,
7452
+ 'refresh_markup' => false,
7453
+ 'refresh_stylesheet' => true,
7454
+ 'css_identifier' => 'line_height'
7455
+ ),//24,//"20px",
7456
+ 'color_css' => array(
7457
+ 'input_type' => 'wp_color_alpha',
7458
+ 'title' => __('Text color', 'nimble-builder'),
7459
+ 'default' => '',
7460
+ 'refresh_markup' => false,
7461
+ 'refresh_stylesheet' => true,
7462
+ 'width-100' => true,
7463
+ 'css_identifier' => 'color'
7464
+ ),//"#000000",
7465
+ 'color_hover_css' => array(
7466
+ 'input_type' => 'wp_color_alpha',
7467
+ 'title' => __('Text color on mouse over', 'nimble-builder'),
7468
+ 'default' => '',
7469
+ 'refresh_markup' => false,
7470
+ 'refresh_stylesheet' => true,
7471
+ 'width-100' => true,
7472
+ 'title_width' => 'width-100',
7473
+ 'css_identifier' => 'color_hover'
7474
+ ),//"#000000",
7475
+ 'font_weight_css' => array(
7476
+ 'input_type' => 'simpleselect',
7477
+ 'title' => __('Font weight', 'nimble-builder'),
7478
+ 'default' => 400,
7479
+ 'refresh_markup' => false,
7480
+ 'refresh_stylesheet' => true,
7481
+ 'css_identifier' => 'font_weight',
7482
+ 'choices' => sek_get_select_options_for_input_id( 'font_weight_css' )
7483
+ ),//null,
7484
+ 'font_style_css' => array(
7485
+ 'input_type' => 'simpleselect',
7486
+ 'title' => __('Font style', 'nimble-builder'),
7487
+ 'default' => 'inherit',
7488
+ 'refresh_markup' => false,
7489
+ 'refresh_stylesheet' => true,
7490
+ 'css_identifier' => 'font_style',
7491
+ 'choices' => sek_get_select_options_for_input_id( 'font_style_css' )
7492
+ ),//null,
7493
+ 'text_decoration_css' => array(
7494
+ 'input_type' => 'simpleselect',
7495
+ 'title' => __('Text decoration', 'nimble-builder'),
7496
+ 'default' => 'none',
7497
+ 'refresh_markup' => false,
7498
+ 'refresh_stylesheet' => true,
7499
+ 'css_identifier' => 'text_decoration',
7500
+ 'choices' => sek_get_select_options_for_input_id( 'text_decoration_css' )
7501
+ ),//null,
7502
+ 'text_transform_css' => array(
7503
+ 'input_type' => 'simpleselect',
7504
+ 'title' => __('Text transform', 'nimble-builder'),
7505
+ 'default' => 'none',
7506
+ 'refresh_markup' => false,
7507
+ 'refresh_stylesheet' => true,
7508
+ 'css_identifier' => 'text_transform',
7509
+ 'choices' => sek_get_select_options_for_input_id( 'text_transform_css' )
7510
+ ),//null,
7511
+
7512
+ 'letter_spacing_css' => array(
7513
+ 'input_type' => 'range_simple',
7514
+ 'title' => __( 'Letter spacing', 'nimble-builder' ),
7515
+ 'default' => 0,
7516
+ 'min' => 0,
7517
+ 'step' => 1,
7518
+ 'refresh_markup' => false,
7519
+ 'refresh_stylesheet' => true,
7520
+ 'css_identifier' => 'letter_spacing',
7521
+ 'width-100' => true,
7522
+ ),//0,
7523
+ // Note : always use the suffix '_flag_important' to name an input controling the !important css flag @see Nimble\sek_add_css_rules_for_css_sniffed_input_id
7524
+ 'fonts___flag_important' => array(
7525
+ 'input_type' => 'nimblecheck',
7526
+ 'title' => __('Apply the style options in priority (uses !important).', 'nimble-builder'),
7527
+ 'default' => 0,
7528
+ 'refresh_markup' => false,
7529
+ 'refresh_stylesheet' => true,
7530
+ 'title_width' => 'width-80',
7531
+ 'input_width' => 'width-20',
7532
+ // declare the list of input_id that will be flagged with !important when the option is checked
7533
+ // @see sek_add_css_rules_for_css_sniffed_input_id
7534
+ // @see Nsek_is_flagged_important
7535
+ 'important_input_list' => array(
7536
+ 'font_family_css',
7537
+ 'font_size_css',
7538
+ 'line_height_css',
7539
+ 'font_weight_css',
7540
+ 'font_style_css',
7541
+ 'text_decoration_css',
7542
+ 'text_transform_css',
7543
+ 'letter_spacing_css',
7544
+ 'color_css',
7545
+ 'color_hover_css'
7546
+ )
7547
  )
7548
  )
7549
  ),
13550
  }//if
13551
 
13552
 
13553
+ // INPUT TEXT LEVEL CSS RULES
13554
+ // @added in sept 2019 for https://github.com/presscustomizr/nimble-builder/issues/499
13555
+ // When we are inside the associative arrays of the level 'options'
13556
+ // the keys are not integer.
13557
+ // We want to filter each input
13558
+ // which makes it possible to target for example the font-family. Either in module values or in level options
13559
+ if ( is_string( $key ) && 1 < strlen( $key ) && 'options' === $key ) {
13560
+ // we need to have a level model set
13561
+ if ( !empty( $parent_level ) && is_array( $parent_level ) ) {
13562
+ if ( is_array( $entry ) ) {
13563
+
13564
+ // Level options are structured as an associative array of option groups
13565
+ // $entry = array(
13566
+ // 'text' => array(
13567
+ // font_size_css => ...
13568
+ // color_css => ...
13569
+ // ),
13570
+ // 'bg' => array(),
13571
+ // ...
13572
+ // )
13573
+ foreach ( $entry as $opt_group_type => $input_candidates ) {
13574
+ if ( 'level_text' !== $opt_group_type )
13575
+ continue;
13576
+
13577
+ $level_text_registered_input_list = sek_get_registered_module_input_list( 'sek_level_text_module' );
13578
+ $level_text_css_selectors = sek_get_registered_module_type_property( 'sek_level_text_module', 'css_selectors' );
13579
+
13580
+ $rules = $this->sek_loop_on_input_candidates_and_maybe_generate_css_rules( $rules, array(
13581
+ 'input_list' => $input_candidates,
13582
+ 'registered_input_list' => $level_text_registered_input_list,// <= the full list of input for the module
13583
+ 'parent_module_level' => $parent_level,// <= the parent module level. can be one of those array( 'location', 'section', 'column', 'module' )
13584
+ 'module_css_selector' => $level_text_css_selectors //a default set of css_selectors might have been specified on module registration
13585
+ ));
13586
+ }
13587
+ }//if
13588
+ }//if
13589
+ }//if
13590
+
13591
+
13592
  // LEVEL CSS RULES
13593
  if ( is_array( $entry ) ) {
13594
  // Populate rules for sections / columns / modules
14726
  // implemented to allow CSS rules to be generated on a per-item basis
14727
  // for https://github.com/presscustomizr/nimble-builder/issues/78
14728
  if ( $is_multi_items ) {
14729
+ $selector = sprintf( '[data-sek-id="%1$s"] [data-sek-item-id="%2$s"]', $parent_level['id'], $item_id );
14730
  }
14731
  $css_identifier = $input_registration_params['css_identifier'];
14732
 
14942
  $properties_to_render['-ms-flex-align'] = $v_vendor_value;
14943
  break;
14944
  case 'font_family' :
14945
+ $ffamily = sek_extract_css_font_family_from_customizer_option( $value );
14946
+ if ( !empty( $ffamily ) ) {
14947
+ $properties_to_render['font-family'] = $ffamily;
14948
+ }
14949
  break;
14950
 
14951
  /* Spacer */
15348
  // UI LEVEL MODULES
15349
  'sek_mod_option_switcher_module',
15350
  'sek_level_bg_module',
15351
+ 'sek_level_text_module',
15352
  'sek_level_border_module',
15353
  //'sek_level_section_layout_module',<// deactivated for now. Replaced by sek_level_width_section
15354
  'sek_level_height_module',
15385
  'sek_global_beta_features'
15386
  ];
15387
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15388
  // Is merged with front module when sek_is_header_footer_enabled() === true
15389
  // @see sek_register_modules_when_customizing_or_ajaxing
15390
  // and sek_register_modules_when_not_customizing_and_not_ajaxing
15447
  register_sidebar( $args );
15448
  }
15449
  }
15450
+
15451
+ // Invoked @'after_setup_theme'
15452
+ static function sek_get_front_module_collection() {
15453
+ return apply_filters( 'sek_get_front_module_collection', [
15454
+ // FRONT MODULES
15455
+ 'czr_simple_html_module',
15456
+
15457
+ 'czr_tiny_mce_editor_module' => array(
15458
+ 'czr_tiny_mce_editor_module',
15459
+ 'czr_tinymce_child',
15460
+ 'czr_font_child'
15461
+ ),
15462
+
15463
+ 'czr_image_module' => array(
15464
+ 'czr_image_module',
15465
+ 'czr_image_main_settings_child',
15466
+ 'czr_image_borders_corners_child'
15467
+ ),
15468
+
15469
+ //'czr_featured_pages_module',
15470
+ 'czr_heading_module' => array(
15471
+ 'czr_heading_module',
15472
+ 'czr_heading_child',
15473
+ 'czr_heading_spacing_child',
15474
+ 'czr_font_child'
15475
+ ),
15476
+
15477
+ 'czr_spacer_module',
15478
+ 'czr_divider_module',
15479
+
15480
+ 'czr_icon_module' => array(
15481
+ 'czr_icon_module',
15482
+ 'czr_icon_settings_child',
15483
+ 'czr_icon_spacing_border_child',
15484
+ ),
15485
+
15486
+
15487
+ 'czr_map_module',
15488
+
15489
+ 'czr_quote_module' => array(
15490
+ 'czr_quote_module',
15491
+ 'czr_quote_quote_child',
15492
+ 'czr_quote_cite_child',
15493
+ 'czr_quote_design_child',
15494
+ ),
15495
+
15496
+ 'czr_button_module' => array(
15497
+ 'czr_button_module',
15498
+ 'czr_btn_content_child',
15499
+ 'czr_btn_design_child',
15500
+ 'czr_font_child'
15501
+ ),
15502
+
15503
+ // simple form father + children
15504
+ 'czr_simple_form_module' => array(
15505
+ 'czr_simple_form_module',
15506
+ 'czr_simple_form_fields_child',
15507
+ 'czr_simple_form_button_child',
15508
+ 'czr_simple_form_design_child',
15509
+ 'czr_simple_form_fonts_child',
15510
+ 'czr_simple_form_submission_child'
15511
+ ),
15512
+
15513
+ 'czr_post_grid_module' => array(
15514
+ 'czr_post_grid_module',
15515
+ 'czr_post_grid_main_child',
15516
+ 'czr_post_grid_thumb_child',
15517
+ 'czr_post_grid_metas_child',
15518
+ 'czr_post_grid_fonts_child'
15519
+ ),
15520
+
15521
+ // widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
15522
+ 'czr_menu_module' => array(
15523
+ 'czr_menu_module',
15524
+ 'czr_menu_content_child',
15525
+ 'czr_menu_mobile_options',
15526
+ 'czr_font_child'
15527
+ ),
15528
+ //'czr_menu_design_child',
15529
+
15530
+ 'czr_widget_area_module',
15531
+
15532
+ 'czr_social_icons_module' => array(
15533
+ 'czr_social_icons_module',
15534
+ 'czr_social_icons_settings_child',
15535
+ 'czr_social_icons_style_child'
15536
+ ),
15537
+
15538
+ 'czr_img_slider_module' => array(
15539
+ 'czr_img_slider_module',
15540
+ 'czr_img_slider_collection_child',
15541
+ 'czr_img_slider_opts_child'
15542
+ ),
15543
+
15544
+ 'czr_accordion_module' => array(
15545
+ 'czr_accordion_module',
15546
+ 'czr_accordion_collection_child',
15547
+ 'czr_accordion_opts_child'
15548
+ ),
15549
+
15550
+ 'czr_shortcode_module',
15551
+ ]);
15552
+ }
15553
+
15554
  }//class
15555
  endif;
15556
  ?><?php
19049
  $allow_html = true;
19050
 
19051
  $sender_email = $this->form->get_field('nimble_email')->get_input()->get_value();
19052
+
19053
+ // Define a default sender name + make sure the field exists
19054
+ // fixes https://github.com/presscustomizr/nimble-builder/issues/513
19055
+ $sender_name = __('Someone', 'nimble-builder');
19056
+ if ( array_key_exists( 'nimble_name', $submission_options ) ) {
19057
+ $sender_name = sprintf( '%1$s', $this->form->get_field('nimble_name')->get_input()->get_value() );
19058
+ }
19059
+
19060
  $sender_body_message = null === $this->form->get_field('nimble_message') ? '' : $this->form->get_field('nimble_message')->get_input()->get_value();
19061
 
19062
  if ( array_key_exists( 'recipients', $submission_options ) ) {
nimble-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Nimble Page Builder
4
  * Description: Powerful drag and drop page builder using the native WordPress customizer.
5
- * Version: 1.8.20
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  /* ------------------------------------------------------------------------- *
14
  * CONSTANTS
15
  /* ------------------------------------------------------------------------- */
16
- $current_version = "1.8.20";
17
 
18
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
19
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
2
  /**
3
  * Plugin Name: Nimble Page Builder
4
  * Description: Powerful drag and drop page builder using the native WordPress customizer.
5
+ * Version: 1.9.0
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
13
  /* ------------------------------------------------------------------------- *
14
  * CONSTANTS
15
  /* ------------------------------------------------------------------------- */
16
+ $current_version = "1.9.0";
17
 
18
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
19
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: page builder, visual editor, customizer, drag and drop, header, footer, la
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.2.3
9
- Stable tag: 1.8.20
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
@@ -120,10 +120,21 @@ We have also published a detailed [troubleshooting guide for Nimble Builder](htt
120
  If you can't troubleshoot your issue, please open a new thread in [Nimble Builder support forum](https://wordpress.org/support/plugin/nimble-builder/).
121
 
122
  == Upgrade Notice ==
123
- = 1.8.20 =
124
- Added a new option to export / import global sections like header-footer.
125
 
126
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
127
  = 1.8.20 : September 6th 2019 =
128
  * added a new option to export / import global sections like header-footer.
129
 
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.2.3
9
+ Stable tag: 1.9.0
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
120
  If you can't troubleshoot your issue, please open a new thread in [Nimble Builder support forum](https://wordpress.org/support/plugin/nimble-builder/).
121
 
122
  == Upgrade Notice ==
123
+ = 1.9.0 =
124
+ Fixed a php error in the form module, occuring when the form only has the email field. Fixed a possible error at checkout when using credit card payment in WooCommerce. Added text options, like font size, color, font family, to sections. Added a set of text options to the HTML module. Nimble Builder api has been improved for developers, allowing them to add module from a theme or a plugin, and allowing custom template tags like {template_tag}.
125
 
126
  == Changelog ==
127
+ = 1.9.0 : October 1st 2019 =
128
+ * fixed : [WooCommerce] possible js error at checkout when using credit card payment
129
+ * fixed : When switching device => always focus the preview on the currently edited section
130
+ * fixed : [Form module] submitting a form which only has the email field produces a fatal PHP error
131
+ * improved : Nimble edit button style for post and page admin screens
132
+ * improved : when switching device during customization => always focus the preview on the currently edited section
133
+ * added : text options, like font size, color, font family, to sections.
134
+ * added : a set of text options to the HTML module
135
+ * added : template tags => implement a way to add custom template tags
136
+ * added : filters allowing developers to add a module from a theme or a plugin
137
+
138
  = 1.8.20 : September 6th 2019 =
139
  * added a new option to export / import global sections like header-footer.
140
 
tmpl/modules/simple_html_module_tmpl.php CHANGED
@@ -15,6 +15,9 @@ if ( ! function_exists( 'Nimble\sek_print_html_content') ) {
15
  if ( empty( $html_content ) ) {
16
  echo Nimble_Manager()->sek_get_input_placeholder_content( 'text', 'html_content' );
17
  } else {
 
 
 
18
  //TODO: move add_filter 'sek_html_content' somewhere else so it's called once
19
  //and we won't need to remove it
20
  //Also consider to add several other filter callbacks e.g. wptexturize, wpemoji... : see default-filters for 'the_content' in wp-incudes/default-filters.php
15
  if ( empty( $html_content ) ) {
16
  echo Nimble_Manager()->sek_get_input_placeholder_content( 'text', 'html_content' );
17
  } else {
18
+ // added September 2019 when revamping presscustomizr.com
19
+ $html_content = sek_parse_template_tags( $html_content );
20
+
21
  //TODO: move add_filter 'sek_html_content' somewhere else so it's called once
22
  //and we won't need to remove it
23
  //Also consider to add several other filter callbacks e.g. wptexturize, wpemoji... : see default-filters for 'the_content' in wp-incudes/default-filters.php