!function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=151)}({0:function(e,t){e.exports=jQuery},151:function(e,t,i){"use strict";(function(e,t){var o,n=(o=i(23))&&o.__esModule?o:{default:o};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var s=s||{};window.ET_PageBuilder=s,window.wp=window.wp||{},window.et_builder_version="4.23.4",window.et_builder_product_name="Divi";var l=window.et_error_modal_shown,d=!1,r=!1,c=0,p=0,b=0,u="et_pb_templates_",g={},h={},f=[],m={s:!1,r:!1,c:!1};function v(e,t){if(_.isUndefined(t))return e;return e.replace(//g,(function(e,i){return t[i]}))}function w(){return new Promise((function(t,i){e.ajax({type:"POST",url:et_pb_options.ajaxurl,dataType:"json",data:{action:"et_builder_library_get_layouts_data",postId:et_pb_options.postId,nonce:et_pb_options.library_get_layouts_data_nonce}}).then((function(e){t(S(e,"data",""))}))}))}var y=w();function k(){var e,t,i=et_pb_options.product_version;e="et_forced_localstorage_clear",(t=localStorage.getItem(e))||(t=wpCookies.get(e)),t!==i&&(localStorage.clear(),wpCookies.set(e,i),localStorage.setItem(e,i),setTimeout((function(){window.location.reload()}),100))}function C(t){var i,o=0,n=new Date,a="".concat(n.getYear(),"_").concat(n.getMonth(),"_").concat(n.getDate()),s="".concat(et_pb_options.et_builder_module_parent_shortcodes,"|").concat(et_pb_options.et_builder_module_child_shortcodes).split("|"),c=et_pb_options.product_version,g=et_pb_options.active_plugins.join("|"),h="",f=0,m={missing_modules_array:[]};if((t=!_.isUndefined(t)&&t)||(e('script[src="'.concat(et_pb_options.builder_js_src,'"]')).length||e(".et-pb-cache-update").show(),e("body").on("click",".et_builder_increase_memory",(function(){var t=e(this);return e.ajax({type:"POST",dataType:"json",url:et_pb_options.ajaxurl,data:{action:"et_pb_increase_memory_limit",et_admin_load_nonce:et_pb_options.et_admin_load_nonce},success:function(e){_.isUndefined(e.success)?t.addClass("et_builder_modal_action_button_fail").prop("disabled",!0).text(et_pb_options.memory_limit_not_increased):t.addClass("et_builder_modal_action_button_success").text(et_pb_options.memory_limit_increased)}}),!1})),e("body").on("click",".et_pb_reload_builder",(function(){return location.reload(),!1}))),function(){if(!$())return!1;if(!_.isUndefined(et_pb_options.force_cache_purge)&&"true"===et_pb_options.force_cache_purge)return!1;var e=localStorage.getItem("".concat(u,"settings_date")),t=localStorage.getItem("".concat(u,"settings_product_version")),i=localStorage.getItem("".concat(u,"settings_active_plugins"));if(_.isUndefined(e)||_.isNull(e))return!1;if(_.isUndefined(t)||_.isNull(t))return!1;if(i!==g)return!1;if(a!=e||c!=t)return function(){if(!$())return!1;_.forEach(_.keys(localStorage),(function(e){j(e,"et_pb_templates_")&&localStorage.removeItem(e)}))}(),!1;return!0}()){if(r)return;for(var w in s){var y=s[w],S=u+y,x=LZString.decompressFromUTF16(localStorage.getItem(S));f++,_.isUndefined(x)||_.isNull(x)||""===x?m.missing_modules_array.push(y):h+=LZString.decompressFromUTF16(localStorage.getItem(S)),!d&&(m.missing_modules_array.length===parseInt(et_pb_options.et_builder_templates_amount)||m.missing_modules_array.length&&s.length===f)&&(d=!0,e.ajax({type:"POST",dataType:"json",url:et_pb_options.ajaxurl,data:{action:"et_pb_get_backbone_template",et_post_type:et_pb_options.post_type,et_modules_slugs:JSON.stringify(m),et_admin_load_nonce:et_pb_options.et_admin_load_nonce},success:function(t){var i;d=!1,!_.isUndefined(t.templates)&&t.templates.length&&_.each(t.templates,(function(o){i=v(o.template,t.unique);try{localStorage.setItem(u+o.slug,LZString.compressToUTF16(i))}catch(e){k()}e("body").append(i)}))}}),m.missing_modules_array=[])}e("body").append(h)}else i=setInterval((function(){if(o===Math.ceil(et_pb_options.et_builder_modules_count/et_pb_options.et_builder_templates_amount))return clearInterval(i),!1;var t;r=!0,p++,t=o*et_pb_options.et_builder_templates_amount,e.ajax({type:"POST",dataType:"json",url:et_pb_options.ajaxurl,data:{action:"et_pb_get_backbone_templates",et_post_type:et_pb_options.post_type,et_admin_load_nonce:et_pb_options.et_admin_load_nonce,et_templates_start_from:t},error:function(){var t=e("#et-builder-failure-notice-template");l||t.length&&(e(".et_pb_failure_notification_modal").length||($()&&(localStorage.removeItem("".concat(u,"settings_date")),localStorage.removeItem("".concat(u,"settings_product_version")),localStorage.removeItem("".concat(u,"settings_active_plugins"))),e("body").addClass("et_pb_stop_scroll").append(t.html())))},success:function(t){var i;for(var o in t.templates){if(i=v(t.templates[o],t.unique),$())try{localStorage.setItem("et_pb_templates_".concat(o),LZString.compressToUTF16(i))}catch(e){k()}e("body").append(i)}b++,p>0&&p===b&&(r=!1,C())}}),o++}),800),function(){if(!$())return!1;try{localStorage.setItem("".concat(u,"settings_date"),a),localStorage.setItem("".concat(u,"settings_product_version"),c),localStorage.setItem("".concat(u,"settings_active_plugins"),g)}catch(e){}}();function $(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}}function S(e,t,i){if(!_.isObject(e))return i;var o=_.reduce(t.split("."),(function(e,t){return e?e[t]:void 0}),e);return _.isUndefined(o)?i:o}function x(e,t){if(!t)return!0;var i=t.split("."),o=_.first(i);return _.has(e,o)&&x(e[o],_.rest(i).join("."))}function j(e,t){return e.substr(0,t.length)===t}C(),s.isDynamicContent=function(e){if("string"!=typeof e)return!1;var t=new RegExp(/^
(.*)<\/p>$/,"i"),i=/^\s+|\s+$/,o=e.replace(i,"");o=(o=o.replace(t,"$1")).replace(i,"");try{if(/^@ET-DC@(.*?)@$/.test(o))return!0;var n=JSON.parse(o);if(void 0!==n.dynamic&&!0===n.dynamic)return!0}catch(e){}return!1},document.addEventListener("DOMContentLoaded",(function(){function i(){e("#et-builder-right-click-controls").remove(),e("#et_pb_layout_right_click_overlay").remove()}function o(t){t.on("click",(function(t){var i=e(this);t.preventDefault(),(u=wp.media.frames.et_pb_file_frame=new wp.media.view.MediaFrame.ETSelect({title:i.data("choose"),library:{type:i.data("type")},button:{text:i.data("update")},multiple:!1})).on("select",(function(){var e=u.state().props.get("url"),t=i.siblings(".et-pb-upload-field");t.val(e),t.trigger("change"),p(i)})),u.on("insert",(function(){var e=u.state().get("selection").models[0];if(!_.isUndefined(e)){var t=i.siblings(".et-pb-upload-field");t.val(e.get("url")),t.trigger("change"),p(i)}})),u.open()})),t.siblings(".et-pb-upload-field").on("input",(function(){p(e(this).siblings(".et-pb-upload-button"))})),t.siblings(".et-pb-upload-field").each((function(){p(e(this).siblings(".et-pb-upload-button"))}))}function l(t){t.on("click",(function(i){e(this);var o=t.next(".et-pb-gallery"),n=t.closest(".et-pb-options-tab").find("#et_pb_gallery_orderby");if(i.preventDefault(),"undefined"!=typeof wp&&wp.media&&wp.media.gallery){var a=o.val().length?' ids="'.concat(o.val(),'"'):"",s=n.val().length?' orderby="'.concat(n.val(),'"'):"",l="[gallery".concat(a).concat(s,"]");u=wp.media.frames.et_pb_file_frame=wp.media.gallery.edit(l),a||u.setState("gallery-library"),_(u.$el),u.on("content:render:browse",(function(e){_(e.$el)})),u.state("gallery-edit").on("update",(function(e){var t=wp.media.gallery.shortcode(e).attrs.named;t.ids&&o.val(t.ids),t.orderby?n.val(t.orderby):n.val("")}))}function _(t){setTimeout((function(){t.find(".gallery-settings").find("label.setting").each((function(){e(this).find(".link-to, .columns, .size").length?e(this).remove():e(this).has("input[type=checkbox]").length&&e(this).children("input[type=checkbox]").css("margin","11px 5px")}))}),10)}}))}function d(e){return e.siblings("input").attr("id").replace("et_pb_","").replace("_list","")}function r(t){t.on("click",(function(t){var i=e(this),o=e("#et_pb_src.et-pb-upload-field").val().trim();t.preventDefault(),e.ajax({type:"POST",url:et_pb_options.ajaxurl,data:{action:"et_pb_video_get_oembed_thumbnail",et_admin_load_nonce:et_pb_options.et_admin_load_nonce,et_video_url:o},success:function(t){t.length?e("#et_pb_image_src").val(t).trigger("input"):(i.after('
/g,"
/g,"")).replace(/<\/p>/g,"")).replace(//g,"
")).replace(/
\xa0<\/p>/g,"
"));else{if(!_.isUndefined(t)&&"initial_load"===t)return;n=window.switchEditors.pre_wpautop(n)}i.set("et_pb_content",n,{silent:!0})}}}))}(ie(),"initial_load"),v.trigger("et-pb-content-updated"),v.trigger("et-pb-loading:ended"),e("#et_pb_main_container").addClass("et_pb_loading_animation"),setTimeout((function(){e("#et_pb_main_container").removeClass("et_pb_loading_animation")}),500),t.listenTo(t.collection,"change reset add",_.debounce(t.saveAsShortcode,128)),J.update();else{if(30<++c){var o=e("#et-builder-failure-notice-template");return v.trigger("et-pb-loading:ended"),e("#et_pb_main_container").removeClass("et_pb_loading_animation"),void e("body").addClass("et_pb_stop_scroll").append(o.html())}t.maybeGenerateInitialLayout()}}),500)},wp_regexp_not_global:_.memoize((function(e){return new RegExp("\\[(\\[?)(".concat(e,")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)"))})),getShortCodeParentTags:function(e){var t="et_pb_section|et_pb_row|et_pb_column|et_pb_column_inner|et_pb_row_inner".split("|");if(t=t.concat(et_pb_options.et_builder_module_parent_shortcodes.split("|")),!_.isUndefined(e)&&""!==e){var i=e.split("|"),o=_.difference(i,t);_.isEmpty(o)||(t=_.union(t,o))}return t=t.join("|")},getShortCodeChildTags:function(){return et_pb_options.et_builder_module_child_shortcodes},getShortCodeRawContentTags:function(){return et_pb_options.et_builder_module_raw_content_shortcodes.split("|")},createLayoutFromContent:function(t,i,o,n,a){var s=this,l=_.isUndefined(t)||""===t?"":t.match(/\[([^\W\/\[\]\x00-\x20=]+)/g),d=l&&_.isArray(l)?l.join("|").replace(/\[/g,""):"",r=this.getShortCodeParentTags().split("|"),c=void 0===o||""===o?this.getShortCodeParentTags(d):this.getShortCodeChildTags(),p=window.wp.shortcode.regexp(c),b=this.wp_regexp_not_global(c),u=t.match(p),g=this.getShortCodeRawContentTags(),m=void 0===n?{}:n;_.each(u,(function(t,o){var n,l=t.match(b),d=l[2],c=l[2],u=""!==l[3]?window.wp.shortcode.attrs(l[3]):"",v=l[5],w=k.generateNewId(),y={},C=e.inArray(c,["et_pb_section","et_pb_row","et_pb_column","et_pb_row_inner","et_pb_column_inner"])>-1,S=C&&void 0!==v&&""!==v&&v.match(p),x="",j=!C&&-1===_.indexOf(r,c);if(C&&(c=c.replace("et_pb_","")),n={type:c,cid:w,created:"manually",module_type:c,component_status:""},void 0!==m.current_row_cid&&""!==m.current_row_cid&&(n.current_row=m.current_row_cid),void 0!==m.global_parent&&""!==m.global_parent&&(n.et_pb_global_parent=m.global_parent,n.global_parent_cid=m.global_parent_cid),"section"===c&&void 0!==m.after_section&&""!==m.after_section&&(n.after_section=m.after_section),"section"!==c&&(n.parent=i),-1!==c.indexOf("et_pb_")&&(n.type="module"),d===n.type&&(n.type="module"),n.admin_label=j?c:k.getDefaultAdminLabel(c),n._address=_.isUndefined(m.predefined_address)?o.toString():m.predefined_address,_.isUndefined(a)||(n._address="".concat(a,".").concat(n._address)),_.isObject(u.named)){var $=!1;for(var T in"global"!==et_pb_options.is_global_template||C||void 0===u.named.template_type||"module"!==u.named.template_type||("updated"===et_pb_options.selective_sync_status?h[et_pb_options.template_post_id]=et_pb_options.excluded_global_options:($=!0,f[et_pb_options.template_post_id]=[])),x=void 0!==u.named.global_module&&""===x?u.named.global_module:x,"reinit"===m.is_reinit&&("migrate"!==m.migrate_global_modules||""===x&&""===m.global_parent)||(u=function(e,t,i,o){var n=!_.isUndefined(et_pb_options.et_pb_module_settings_migrations)&&et_pb_options.et_pb_module_settings_migrations,a=!_.isUndefined(n.name_changes)&&n.name_changes,s=!_.isUndefined(n.value_changes)&&n.value_changes;a&&!_.isUndefined(a[i])&&_.forEach(a[i],(function(t,i){!_.isUndefined(e.named[i])&&_.isUndefined(e.named[t])&&(e.named[t]=e.named[i])}));s&&!_.isUndefined(s[t])&&_.forEach(s[t],(function(t,i){e.named[i]=t}));if(_.includes(["module","row"],o)){var l={},d=t.length;_.forEach(s,(function(e,i){"".concat(t,".")===String(i).substr(0,d+1)&&(l[i.substr(t.length+1)]=e)})),_.isEmpty(l)||(e.named.value_changes=l)}return e}(u,n._address,n.type,c)),u.named)if(void 0===m.ignore_template_tag||""===m.ignore_template_tag||"ignore_template"===m.ignore_template_tag&&"template_type"!==T){var U="admin_label"!==T&&"specialty_columns"!==T&&"value_changes"!==T?"et_pb_".concat(T):T,O=!1;"et_pb_signup"===c&&-1!==e.inArray(T,["description","footer_content"])&&(u.named[T]=u.named[T].replace(/%91/g,"[").replace(/%93/g,"]"),u.named[T]=u.named[T].replace(/%22/g,'"')),$&&f[et_pb_options.template_post_id].push(T),"column"!==c&&"column_inner"!==c||"et_pb_type"!==U||(U="layout"),_.isEmpty(m.unsynced_options)||-1===_.indexOf(m.unsynced_options,T)||(O=!0),O||(y[U]=u.named[T],"value_changes"===T&&delete u.named[T])}n=_.extend(n,y)}if("section"===c&&"on"===n.et_pb_specialty&&(v=function(e){return e.replace(/(\[et_pb_(row |row_inner) [\s\S]*?\][\s\S]*\[\/et_pb_(row |row_inner)\])/im,te)}(v)),void 0!==n.specialty_columns&&(n.layout_specialty="1",n.specialty_columns=parseInt(n.specialty_columns)),S||!_.isUndefined(m.unsynced_options)&&!_.isEmpty(m.unsynced_options)&&-1!==_.indexOf(m.unsynced_options,"et_pb_content_field")||(e.inArray(c,g)>-1?(n.et_pb_raw_content=n.et_pb_raw_content||v||"",n.et_pb_raw_content=n.et_pb_raw_content.replace(//g,"\n")):n.et_pb_content=v),_.includes(["row","row_inner"],c)&&(n.et_pb_content=v),"et_pb_contact_form"===c&&void 0!==n.et_pb_custom_message&&(n.et_pb_custom_message=_.unescape(n.et_pb_custom_message.replace(/\|\|et_pb_line_break_holder\|\|/g,"\r\n"))),"undefined"!==!n.et_pb_disabled&&"on"===n.et_pb_disabled&&(n.className=" et_pb_disabled"),"undefined"!==!n.et_pb_locked&&"on"===n.et_pb_locked&&(n.className=" et_pb_locked"),void 0!==m.global_id&&""!==m.global_id&&(n.et_pb_global_module=m.global_id),!C&&-1===_.indexOf(r,c))return n.title=c,n.component_status="removed",void s.collection.add([n]);if(s.collection.add([n]),"reinit"===m.is_reinit||""===x||""!==x&&"row"!==c&&"row_inner"!==c&&"section"!==c){if(S){var A=void 0===m.global_parent||""===m.global_parent?x:m.global_parent,M=void 0===m.global_parent_cid||""===m.global_parent_cid?void 0!==x&&""!==x?w:"":m.global_parent_cid,L=C?"":S;s.createLayoutFromContent(v,w,L,{is_reinit:m.is_reinit,global_parent:A,global_parent_cid:M,migrate_global_modules:m.migrate_global_modules},n._address)}}else B++,function(t,i,o,n){e("body").find(".et_pb_global_loading_overlay").length||e("body").append('');var a="html"===ie()?"skip":"apply";e.ajax({type:"POST",url:et_pb_options.ajaxurl,dataType:"json",data:{action:"et_pb_get_global_module",et_admin_load_nonce:et_pb_options.et_admin_load_nonce,et_global_id:t,et_global_autop:a},success:function(a){var s=!1;if(!a||a.error){var l=k.getView(i);if(!l)return void e("body").find(".et_pb_global_loading_overlay").remove();var d=l.$el.find("[data-cid]");l.model.unset("et_pb_global_module"),d.length&&d.each((function(){var t=e(this).data("cid");if(void 0!==t&&""!==t){var i=k.getView(t);void 0!==i&&i.model.unset("et_pb_global_parent")}}))}else{var r=o.replace(/ global_parent="\S+"/g,""),c=qe(a.shortcode.replace(/template_type="\S+"/,'global_module="'.concat(t,'"')));c=(c=c.replace(/]\s?\n\s?\n\s?/g,"] ").replace(/\s?\n\s?\n\s?\[/g," [")).replace(/]\s+/g,"]").replace(/\s+\[/g,"["),r=r.replace(/]\s+/g,"]").replace(/\s+\[/g,"["),oe("content")&&(c=c.replace(/\r?\n|\r/g,"")),_.unescape(c)!==_.unescape(r)&&(s=!0,V.createLayoutFromContent(a.shortcode,"","",{ignore_template_tag:"ignore_template",current_row_cid:i,global_id:t,is_reinit:"reinit",predefined_address:n}))}if(z++,B===z){var p=!_.isUndefined(et_pb_options.et_pb_module_settings_migrations)&&et_pb_options.et_pb_module_settings_migrations;(s||!1!==p)&&Ue(!0,"migrate"),setTimeout((function(){e("body").find(".et_pb_global_loading_overlay").remove()}),650)}}})}(x,w,t,n._address),s.createLayoutFromContent(v,w,"",{is_reinit:"reinit"},n._address)}))},addModule:function(t){var i,o,n,a={model:t,collection:$},l=void 0!==t.get("cloned_cid")&&t.get("cloned_cid");switch(t.get("type")){case"section":if(i=new s.SectionView(a),k.addView(t.get("cid"),i),_.isUndefined(t.get("view"))?void 0!==t.get("after_section")&&""!==t.get("after_section")?k.getView(t.get("after_section")).$el.after(i.render().el):void 0!==t.get("current_row")?this.replaceElement(t.get("current_row"),i):l?this.$el.find('div[data-cid="'.concat(l,'"]')).closest(".et_pb_section").after(i.render().el):this.$el.append(i.render().el):t.get("view").$el.after(i.render().el),"on"===t.get("et_pb_fullwidth")){e(i.render().el).addClass("et_pb_section_fullwidth");var d=new s.ColumnView(a);i.addChildView(d),e(i.render().el).find(".et-pb-section-content").append(d.render().el)}var r;if("on"===t.get("et_pb_specialty")&&"auto"===t.get("created")&&!t.get("pasted_module"))e(i.render().el).addClass("et_pb_section_specialty"),r=new s.ModalView({model:a.model,collection:a.collection,attributes:{"data-open_view":"column_specialty_settings"},et_view:i,view:i}),e("body").append(r.render().el);t.get("pasted_module")||"manually"===t.get("created")||"on"===t.get("et_pb_fullwidth")||"on"===t.get("et_pb_specialty")||i.addRow();break;case"row":case"row_inner":i=new s.RowView(a),""!==t.get("parent")&&k.getView(t.get("parent")).$el.find(".et-pb-insert-row").hide(),k.addView(t.get("cid"),i),_.isUndefined(t.get("current_row"))?_.isUndefined(t.get("appendAfter"))?l?k.getView(t.get("parent")).$el.find('div[data-cid="'.concat(l,'"]')).parent().after(i.render().el):k.getView(t.get("parent")).$el.find(".et-pb-section-content").length?k.getView(t.get("parent")).$el.find(".et-pb-section-content").append(i.render().el):k.getView(t.get("parent")).$el.find("> .et-pb-insert-module, > .et-pb-insert-row").hide().end().append(i.render().el):t.get("appendAfter").after(i.render().el):this.replaceElement(t.get("current_row"),i),t.unset("columns_layout"),"manually"===t.get("created")&&"row_inner"===t.get("module_type")&&t.set("view",k.getView(t.get("parent")),{silent:!0});break;case"column":case"column_inner":a.className="et-pb-column et-pb-column-".concat(t.get("layout")),_.isUndefined(t.get("layout_specialty"))||"1"!==t.get("layout_specialty")||(a.className+=" et-pb-column-specialty"),i=new s.ColumnView(a),k.addView(t.get("cid"),i),_.isUndefined(t.get("layout_specialty"))?(n=void 0!==(o=k.getView(t.get("parent"))).model.get("columns_layout")?"".concat(o.model.get("columns_layout"),",").concat(t.get("layout")):t.get("layout"),o.model.set("columns_layout",n),"on"!==k.getView(t.get("parent")).model.get("et_pb_specialty")?(k.getView(t.get("parent")).$el.find(".et-pb-row-container").append(i.render().el),k.getView(t.get("parent")).toggleInsertColumnButton()):k.getView(t.get("parent")).$el.find(".et-pb-section-content").append(i.render().el)):(k.getView(t.get("parent")).$el.find(".et-pb-section-content").append(i.render().el),"1"===t.get("layout_specialty")&&("manually"!==t.get("created")&&this.collection.add([{type:"row",module_type:"row",cid:k.generateNewId(),parent:t.get("cid"),view:i,admin_label:et_pb_options.noun.row}]),k.getView(t.get("parent")).model.set("specialty_columns",parseInt(t.get("specialty_columns")))));break;case"module":if(a.attributes={"data-cid":t.get("cid")},"advanced"!==t.get("mode")&&"manually"===t.get("created")&&"column_inner"===k.getView(t.get("parent")).model.get("module_type")){var c=k.getView(t.get("parent")).model.get("parent");k.getView(c).$el.find(".et-pb-insert-column").hide()}if(void 0!==t.get("mode")&&"advanced"===t.get("mode"))i=new s.AdvancedModuleSettingView(a),t.attributes.view.child_views.push(i),void 0!==t.get("cloned_cid")&&""!==t.get("cloned_cid")?k.getView(t.get("cloned_cid")).$el.after(i.render().el):k.getView(t.get("parent")).$el.find(".et-pb-sortable-options").append(i.render().el),k.addView(t.get("cid"),i);else{var p="";if(v.trigger("et-new_module:show_settings"),i=new s.BlockModuleView(a),void 0!==t.attributes.view&&"on"===t.attributes.view.model.get("et_pb_fullwidth")?(k.getView(t.get("parent")).addChildView(i),p=k.getView(t.get("parent")).model.get("et_pb_template_type")):void 0!==t.attributes.view&&(p=k.getView(k.getView(t.get("parent")).model.get("parent")).model.get("et_pb_template_type")),l)k.getView(t.get("parent")).$el.find('div[data-cid="'.concat(l,'"]')).after(i.render().el);else if(k.getView(t.get("parent")).$el.find(".et-pb-insert-module").length)k.getView(t.get("parent")).$el.find(".et-pb-insert-module").before(i.render().el);else{var b=k.getView(t.get("parent"));void 0!==b.model.get("et_pb_fullwidth")&&"on"===b.model.get("et_pb_fullwidth")?b.$el.find(".et_pb_fullwidth_sortable_area").append(i.render().el):b.$el.append(i.render().el)}k.addView(t.get("cid"),i),void 0!==p&&"module"===p&&t.set("template_type","module",{silent:!0}),"manually"!==t.get("created")&&(a.attributes={"data-open_view":"module_settings"},this.openModuleSettings(a))}}t.unset("cloned_cid")},openModuleSettings:function(t){var i=this,o=new s.ModalView(t).render();if(!1===o)return setTimeout((function(){i.openModuleSettings(t)}),500),void v.trigger("et-pb-loading:started");v.trigger("et-pb-loading:ended"),e("body").append(o.el)},saveAsShortcode:function(e,t,i){var o=arguments.length>0&&"object"===a(arguments[0])&&arguments[0].et_action||"";if(ne(),!i||"false"!==i.update_shortcodes){var n=this.generateCompleteShortcode();this.addHistory(n),J.update();var s=o||"";ae("content",n,s),v.trigger("et-pb-content-updated")}},getDefaultSectionBackgroundColor:function(){var t=e("#_et_pb_section_background_color").val();return""!==t&&t||(t="#ffffff"),t},getSectionsBackgroundColor:function(){var t=this,i=[];return this.$el.find(".et_pb_section").each((function(){var o=e(this).find(".et-pb-data-cid").data("cid"),n=S($.find((function(e){return e.get("cid")==o})),"attributes.et_pb_background_color","");""!==n&&n||(n=t.getDefaultSectionBackgroundColor()),i.push(n)})),i},generateCompleteShortcode:function(t,i,o,n,a){var s="",l=this,_=void 0===t;i=void 0===i?"":i;return this.$el.find(".et_pb_section").each((function(){var d=e(this).find(".et-pb-section-content"),r=!1,c=void 0!==d.data("skip")&&d.data("skip");(!1===_&&t===d.data("cid")||!0===_)&&!0!==c&&(s+=l.generateModuleShortcode(e(this),!0,i,o),r=!0),d.closest(".et_pb_section").hasClass("et_pb_section_fullwidth")?d.find(".et_pb_module_block").each((function(){var a=e(this).data("cid");(!1!==_||t!==a&&!0!==r)&&!0!==_||(s+=l.generateModuleShortcode(e(this),!1,i,o,"",n))})):!d.closest(".et_pb_section").hasClass("et_pb_section_specialty")||!0!==r&&!0!==_&&"module"!==i&&"row"!==i||!0===c?d.find(".et_pb_row").each((function(){var d=e(this),c=d.find(".et-pb-row-content"),p=c.data("cid"),b=!1,u=void 0!==c.data("skip")&&c.data("skip");(!1!==_||t!==p&&!0!==r)&&!0!==_||!0===u||(s+=l.generateModuleShortcode(e(this),!0,i,o),b=!0),d.find(".et-pb-column").each((function(){var d=e(this),c=d.data("cid");$.findWhere({cid:c});(!1!==_||!0!==r&&!0!==b)&&!0!==_||!0===u||(s+=l.generateModuleShortcode(e(this),!0,i,o,"column")),d.find(".et_pb_module_block").each((function(){var d=e(this).data("cid");(!1!==_||t!==d&&!0!==r&&!0!==b)&&!0!==_||(s+=l.generateModuleShortcode(e(this),!1,i,o,"",n,a))})),(!1!==_||!0!==r&&!0!==b)&&!0!==_||!0===u||(s+="[/et_pb_column]")})),(!1!==_||t!==p&&!0!==r)&&!0!==_||!0===u||(s+="[/et_pb_row]")})):d.find("> .et-pb-column").each((function(){var d=e(this),c=d.data("cid"),p=$.findWhere({cid:c}),b="1"===p.get("layout_specialty")?' specialty_columns="'.concat(p.get("specialty_columns"),'"'):"",u=p.get("layout");!0!==r&&!0!==_||(s+='[et_pb_column type="'.concat(u,'"').concat(b,"]")),d.hasClass("et-pb-column-specialty")?d.find(".et_pb_row").each((function(){var a=e(this),d=a.find(".et-pb-row-content").data("cid"),c=($.findWhere({cid:d}),!1);(!0===r||!0===_||"row"===i&&d===t)&&(c=!0,s+=l.generateModuleShortcode(e(this),!0,i,o,"row_inner")),a.find(".et-pb-column").each((function(){var a=e(this),d=a.data("cid");$.findWhere({cid:d});!0===c&&(s+=l.generateModuleShortcode(e(this),!0,i,o,"column_inner",!1,!1,u)),a.find(".et_pb_module_block").each((function(){var a=e(this).data("cid");(!1!==_||t!==a&&!0!==r&&!0!==c)&&!0!==_||(s+=l.generateModuleShortcode(e(this),!1,i,o,"",n))})),!0===c&&(s+="[/et_pb_column_inner]")})),(!0===r||!0===_||"row"===i&&d===t)&&(s+="[/et_pb_row_inner]")})):d.find(".et_pb_module_block").each((function(){var d=e(this).data("cid");(!1!==_||t!==d&&!0!==r)&&!0!==_||(s+=l.generateModuleShortcode(e(this),!1,i,o,"",n,a))})),!0!==r&&!0!==_||(s+="[/et_pb_column]")})),(!1===_&&t===d.data("cid")||!0===_)&&!0!==c&&(s+="[/et_pb_section]")})),s},generateModuleShortcode:function(t,i,o,n,a,l,d,r){var c,p,b,u,g="",f="",m=t,v=!(m.is(".et_pb_section")||m.is(".et_pb_row")||m.is(".et_pb_row_inner")||m.is(".et_pb_column")||m.is(".et_pb_column_inner")),w=m.is(".et_pb_section")||m.is(".et_pb_row")||m.is(".et_pb_row_inner")?"et_pb_":"",y=void 0===m.data("cid")?m.find(".et-pb-data-cid").data("cid"):m.data("cid"),C=$.find((function(e){return e.get("cid")==y})),S=void 0!==C?C.get("module_type"):"undefined",x=[];if(void 0!==a&&""!==a&&(S=a),void 0!==C){if("section"===(p=C.attributes).type){var j=parseInt(C.attributes._address),T=j-1,V=j+1,U=this.getSectionsBackgroundColor(),O=_.isUndefined(p.et_pb_background_color)?this.getDefaultSectionBackgroundColor():p.et_pb_background_color,A=_.isUndefined(U[T])?"":U[T],M=_.isUndefined(U[V])?"":U[V],L=s.Helpers.moduleHasBackground(p,["gradient","image","video"]);A!==O||L||(A="#000000"),p.et_pb_prev_background_color=A,M!==O||L||(M="#000000"),p.et_pb_next_background_color=M}for(var E in c="module"===et_pb_options.layout_type&&"global"===et_pb_options.is_global_template||d&&v&&!_.isUndefined(p.et_pb_global_module),d&&v&&void 0!==p.et_pb_global_module&&(x=_.isEmpty(h[p.et_pb_global_module])?[]:h[p.et_pb_global_module]),p){if(!_.isEmpty(x)){var D=-1!==e.inArray(E,["et_pb_content","et_pb_raw_content"])?"et_pb_content_field":E.replace("et_pb_","");if(-1!==e.inArray(D,x))continue}if((void 0===n||"ignore_global"!==n||void 0!==n&&"ignore_global"===n&&"et_pb_global_module"!==E&&"et_pb_global_parent"!==E)&&(void 0===l||"ignore_global_tabs"!==l||void 0!==l&&"ignore_global_tabs"===l&&"et_pb_saved_tabs"!==E)){var I,P=E;if(_.includes(["et_pb_fb_built","et_pb_bb_built","_address"],P))continue;if(-1===P.indexOf("et_pb_")&&"admin_label"!==P)continue;if(I=void 0!==C.get(P)?C.get(P):"","et_pb_content"===P||"et_pb_raw_content"===P){f=I,"et_pb_raw_content"===P&&(f=f.replace(/\r?\n|\r/g,"\x3c!-- [et_pb_line_break_holder] --\x3e")),f=f.trim();var R=JSON.parse(et_pb_options.et_builder_modules_with_children);_.includes(_.keys(R),C.get("module_type"))||""===f||"et_pb_content"!==P||(f="\n\n".concat(f,"\n\n"))}else if(""!==I||c){if(void 0!==p.module_defaults&&void 0!==p.module_defaults[P])if(p.module_defaults[P]==="".concat(I)&&!c){delete C.attributes[P];continue}P=P.replace("et_pb_",""),"string"==typeof I&&(I=(I=I.replace(/\"/g,"%22").replace(/\\/g,"%92")).replace(/\[/g,"%91").replace(/\]/g,"%93")),"et_pb_contact_form"===S&&"custom_message"===P&&(I=_.escape(I.replace(/\r?\n|\r/g,"||et_pb_line_break_holder||")));/^(http[s]?:\/\/){0,1}(www\.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,5}[\.]{0,1}/.test(I)&&(I=_.escape(_.unescape(I))),"admin_label"===P?I!==k.getDefaultAdminLabel(p.module_type)&&(g=" ".concat(P,'="').concat(I,'"').concat(g)):g+=" ".concat(P,'="').concat(I,'"')}}}return u="section"!==S&&"row"!==S?"module":S,u="row_inner"===S?"row":u,void 0!==o&&o===u&&(g+=' template_type="'.concat(o,'"')),void 0!==p.template_type&&(g+=' template_type="'.concat(p.template_type,'"')),"section"===S&&(g=' bb_built="1"'.concat(g)),_.includes(["column","column_inner"],S)&&(g=' type="'.concat(C.get("layout"),'"').concat(g),w="et_pb_","column_inner"===S&&(g+=' saved_specialty_column_type="'.concat(r,'"'))),b="[".concat(w).concat(S).concat(g),""===f&&void 0!==p.type&&"module"===p.type?(i=!0,b+=" /]"):b+="]",i||(b+="".concat(f,"[/").concat(w).concat(S,"]")),b}},makeSectionsSortable:function(){var t=this;this.$el.sortable({items:"> *:not(#et_pb_layout_controls, #et_pb_main_container_right_click_overlay, #et-pb-histories-visualizer, #et-pb-histories-visualizer-overlay)",cancel:".et-pb-settings, .et-pb-clone, .et-pb-remove, .et-pb-section-add, .et-pb-row-add, .et-pb-insert-module, .et-pb-insert-column, .et_pb_locked, .et-pb-disable-sort",delay:100,update:function(i,o){if(V.isLoading)t.$el.sortable("cancel");else{if(J.is_active()){var n=e(o.item).children(".et-pb-section-content").attr("data-cid");if(!J.is_user_has_permission(n,"section"))return J.alert("has_no_permission"),t.$el.sortable("cancel"),void Ue()}t.allowHistorySaving("moved","section"),v.trigger("et-sortable:update")}},start:function(t,o){if(i(),t.altKey){var n=k.getView(e(o.item).children(".et-pb-section-content").data("cid")),a={model:n.model,view:n.$el,view_event:t},l=new s.RightClickOptionsView(a,!0);l.copy(t,!0),l.pasteAfter(t,void 0,void 0,void 0,!0,!0),V.allowHistorySaving("cloned","section")}}})},reInitialize:function(){var e=ee("content"),t=""==e,i=et_pb_options.default_initial_column_type,o=et_pb_options.default_initial_text_module;v.trigger("et-pb-loading:started"),this.removeAllSections(),-1===e.indexOf("[et_pb_section")&&(t||(e='[et_pb_column type="'.concat(i,'"][').concat(o,"]").concat(e,"[/").concat(o,"][/et_pb_column]")),e="[et_pb_section][et_pb_row]".concat(e,"[/et_pb_row][/et_pb_section]")),this.createNewLayout(e),v.trigger("et-pb-loading:ended")},removeAllSections:function(t){k.set("forceRemove",!0),this.$el.find(".et-pb-section-content").each((function(){var t=e(this),i=k.getView(t.data("cid"));void 0!==i&&i.removeSection(!1,!0)})),k.set("forceRemove",!1),t&&("[et_pb_section][et_pb_row][/et_pb_row][/et_pb_section]",this.createNewLayout("[et_pb_section][et_pb_row][/et_pb_row][/et_pb_section]"))},createNewLayout:function(e,t){t=t||"";this.stopListening(this.collection,"change reset add",this.saveAsShortcode),e=V.codeModuleContentPrep(e),"load_layout"===t&&void 0!==window.switchEditors&&(e=qe(window.switchEditors.wpautop(e))),e=V.codeModuleContentUnPrep(e),this.createLayoutFromContent(e),this.saveAsShortcode({et_action:t}),this.listenTo(this.collection,"change reset add",_.debounce(this.saveAsShortcode,128))},replaceElement:function(e,t){var i=k.getView(e);i.$el.after(t.render().el),i.model.destroy(),k.removeView(e),i.remove()},showRightClickOptions:function(e){e.preventDefault();var t={model:{attributes:{type:"app",module_type:"app"}},view:this.$el,view_event:e};new s.RightClickOptionsView(t)},hideRightClickOptions:function(e){e.preventDefault(),i()},recalculateModulesOrder:function(){this.collection;this.order_modules_array=[],this.order_modules_array.children_count=[],this.$el.find(".et_pb_section").each((function(t){var i=e(this).find(".et-pb-section-content"),o=i.data("cid");V.setModuleOrder(o),V.setModuleAddresses(o,t),i.closest(".et_pb_section").hasClass("et_pb_section_fullwidth")?i.find(".et_pb_module_block").each((function(){var t=e(this).data("cid");V.setModuleOrder(t)})):i.closest(".et_pb_section").hasClass("et_pb_section_specialty")?i.find("> .et-pb-column").each((function(){var t=e(this),i=t.data("cid");V.setModuleOrder(i),t.hasClass("et-pb-column-specialty")?t.find(".et_pb_row").each((function(){var t=e(this),i=t.find(".et-pb-row-content").data("cid");V.setModuleOrder(i),t.find(".et-pb-column").each((function(){var t=e(this),i=t.data("cid");V.setModuleOrder(i),t.find(".et_pb_module_block").each((function(){var t=e(this).data("cid");V.setModuleOrder(t)}))}))})):t.find(".et_pb_module_block").each((function(){var t=e(this).data("cid");V.setModuleOrder(t,"specialty")}))})):i.find(".et_pb_row").each((function(){var t=e(this),i=t.find(".et-pb-row-content").data("cid");V.setModuleOrder(i),t.find(".et-pb-column").each((function(){var t=e(this),i=t.data("cid");V.setModuleOrder(i),t.find(".et_pb_module_block").each((function(){var t=e(this).data("cid");V.setModuleOrder(t)}))}))}))}))},parseShortcode:function(i,o,n){var a=document.documentMode,s="et-fb-preview-".concat(Date.now(),"-").concat(Math.floor(1e3*Math.random()+1)),l="".concat(et_pb_options.preview_url,"&et_pb_preview=true&et_pb_preview_nonce=").concat(et_pb_options.et_pb_preview_nonce,"&iframe_id=").concat(s);setTimeout((function(){var d=e('*[data-shortcode-id="'.concat(n,'"]')),r=d.length?"".concat(d.width(),"px"):"100%",c=t("",{id:s,src:l,style:"position: absolute; bottom: 0; left: 0; opacity: 0; pointer-events: none; width:".concat(r,"; height: 100%;")}),p=!1,b={et_pb_preview_nonce:et_pb_options.et_pb_preview_nonce,shortcode:i,post_title:e("#title").val(),post_id:et_pb_options.postId};e("body").append(c),c.on("load",(function(){if(!p){var e=document.getElementById(s);!_.isUndefined(a)&&a<10&&(b=JSON.stringify(b)),e.contentWindow.postMessage(b,l),p=!0;var t=window.addEventListener?"addEventListener":"attachEvent";(0,window[t])("attachEvent"==t?"onmessage":"message",(function(e){e.data.iframe_id===s&&_.isString(e.data.html)&&(o(e.data),c.remove())}),!1)}}))}),0)},updateYoastContent:function(){if(Be()){var t=ee("content",!0),i=e("#yoast-readability-analysis-collapsible-metabox");e(".et-pb-yoast-loading").remove(),i.find("svg").first().after(''),this.parseShortcode(t,(function(e){var t=_.isUndefined(e.html)?"":e.html;F=t,YoastSEO.app.pluginReloaded("ET_PB_Yoast_Content")}),"yoast_preview_content")}},setModuleOrder:function(e,t){var i,o,n,a,s,l,_=JSON.parse(et_pb_options.et_builder_modules_with_children);if(void 0!==(i=$.findWhere({cid:e}))){if("column"!==(a=void 0!==i.attributes.module_type?i.attributes.module_type:i.attributes.type)&&"column_inner"!==a&&"specialty"!==t||(n=$.findWhere({cid:i.attributes.parent}),"column"===a&&"row_inner"===n.attributes.module_type&&(a="column_inner")),o=void 0!==this.order_modules_array[a]?this.order_modules_array[a]:0,i.attributes.module_order=o,"row"!==a&&"row_inner"!==a&&"section"!==a||void 0===i.attributes.columns_order||(i.attributes.columns_order=[]),"column"!==a&&"column_inner"!==a&&"specialty"!==t||(void 0!==n.attributes.columns_order?n.attributes.columns_order.push(o):n.attributes.columns_order=[o]),void 0!==_[a]){if(l=_[a],s=void 0!==this.order_modules_array.children_count[l]?this.order_modules_array.children_count[l]:0,i.attributes.child_start_from=s,void 0!==i.attributes.et_pb_content&&""!==i.attributes.et_pb_content){var d=V.getShortCodeChildTags(),r=window.wp.shortcode.regexp(d),c=i.attributes.et_pb_content.match(r);s+=null!==c?c.length:0}this.order_modules_array.children_count[l]=s}this.order_modules_array[a]=o+1}},setModuleAddresses:function(e,t,i){var o=$.findWhere({cid:e}),n=$.where({parent:e});if(!_.isUndefined(o)){var a=_.isUndefined(o.attributes.module_type)?o.attributes.type:o.attributes.module_type,s=o.get("_address"),l="section"===a?t.toString():"".concat(i,".").concat(t.toString()),d=!_.isUndefined(s)&&"et_pb_module_settings_migrations.value_changes.".concat(s),r=!!d&&x(et_pb_options,d),c=x(et_pb_options,"et_pb_module_settings_migrations.name_changes")&&!_.isUndefined(et_pb_options.et_pb_module_settings_migrations.name_changes[s]);l!==s&&(r&&(et_pb_options.et_pb_module_settings_migrations.value_changes[l]=_.clone(et_pb_options.et_pb_module_settings_migrations.value_changes[s]),delete et_pb_options.et_pb_module_settings_migrations.value_changes[s]),c&&(et_pb_options.et_pb_module_settings_migrations.name_changes[l]=_.clone(et_pb_options.et_pb_module_settings_migrations.name_changes[s]),delete et_pb_options.et_pb_module_settings_migrations.name_changes[s])),o.set({_address:l}),!_.isUndefined(n)&&n.length>0&&_.forEach(n,(function(e,t){V.setModuleAddresses(e.attributes.cid,t,l)}))}},updateAdvancedModulesOrder:function(t){var i,o=void 0!==t?t.find(".et-pb-option-advanced-module-settings"):e(".et-pb-option-advanced-module-settings"),n=0;o.length&&(i=o.find(".et-pb-sortable-options > li")).length&&i.each((function(){var t,i,o,a=e(this).data("cid");t=$.findWhere({cid:a}),o=void 0!==(i=$.findWhere({cid:t.attributes.parent_cid})).attributes.child_start_from?i.attributes.child_start_from:0,t.attributes.module_order=n+o,n++}))}}),s.Controls={},s.Controls.BorderRadiusControl=function(e){this.initialize(e)},e.extend(s.Controls.BorderRadiusControl.prototype,{initialize:function(e){if(this._container=e,this._setting_field=e.siblings(".et-pb-main-setting"),!this._setting_field.length)return!1;this._link_button=e.find(".et-pb-border-radius-wrap-link-button > a"),this._radius_fields=e.find(".et-pb-border-radius-option-input"),this._radius_preview=e.find(".et-pb-border-radius-preview"),this._defalut_value=_.isUndefined(this._setting_field.data("default_inherited"))?this._setting_field.data("default"):this._setting_field.data("default_inherited");var t=this._setting_field.val();if(_.isEmpty(t)){t=this._defalut_value,this._setting_field.val(this._defalut_value);var i=this._setting_field;setTimeout((function(){i.trigger("et_pb_setting:change")}),100)}var o=t;this._values=this._splitValue(o),this._lastValue="",this._setting_field.on("change",this._onSettingChange.bind(this)),this._radius_fields.on("change",this._onFieldChange.bind(this)),this._link_button.on("click",this._onClickLink.bind(this)),this._render()},_onClickLink:function(e){if(e.preventDefault(),e.stopPropagation(),this._getSettingValue("border-link")){var t=this._getValues();t["border-link"]=!1,this._onChange(this._combineValues(t))}else{""===this._lastValue&&(this._lastValue=this._getSettingValue("top-left"));var i=this._spreadValue(this._lastValue);this._onChange(this._combineValues(i))}},_onSettingChange:function(e){var t=_.isUndefined(e.target.value)||""===e.target.value?this._getDefaultValue():e.target.value;this._values=this._splitValue(t),this._render()},_onChange:function(t){var i=_.isUndefined(t)?this._getDefaultValue():t;e(this._setting_field).val(i),this._values=this._splitValue(i),e(this._setting_field).trigger("et_pb_setting:change"),this._render()},_isOn:function(e){return"on"===e},_isLinkedMode:function(){return this._getSettingValue("border-link")},_spreadValue:function(e){return{"border-link":!0,"top-left":e,"top-right":e,"bottom-right":e,"bottom-left":e}},_onFieldChange:function(e){var t,i=Se(e.target.value,!1);if(this._lastValue=i,this._isLinkedMode())t=this._spreadValue(i);else{var o=e.target.getAttribute("data-corner");(t=this._getValues())[o]=i}this._onChange(this._combineValues(t))},_getDefaultValue:function(){return _.isUndefined(this._defalut_value)||""===this._defalut_value?"on||||":this._setting_field.val()},_getValues:function(){return this._values},_getSettingValue:function(e){return this._getValues()[e]},_splitValue:function(e){var t=e.split("|");return{"border-link":!!_.isUndefined(t[0])||this._isOn(t[0]),"top-left":_.isUndefined(t[1])||""===t[1]?"0px":t[1],"top-right":_.isUndefined(t[2])||""===t[2]?"0px":t[2],"bottom-right":_.isUndefined(t[3])||""===t[3]?"0px":t[3],"bottom-left":_.isUndefined(t[4])||""===t[4]?"0px":t[4]}},_combineValues:function(e){return"".concat(e["border-link"]?"on":"off","|").concat(e["top-left"],"|").concat(e["top-right"],"|").concat(e["bottom-right"],"|").concat(e["bottom-left"])},_render:function(){_.each(this._radius_fields,(function(t){e(t).val(this._getSettingValue(e(t).data("corner")))}),this),e(this._link_button).toggleClass("active",this._getSettingValue("border-link")),e(this._radius_preview).css("border-top-left-radius",this._getSettingValue("top-left")),e(this._radius_preview).css("border-top-right-radius",this._getSettingValue("top-right")),e(this._radius_preview).css("border-bottom-right-radius",this._getSettingValue("bottom-right")),e(this._radius_preview).css("border-bottom-left-radius",this._getSettingValue("bottom-left"))}}),s.Controls.BorderRadius=function(t){var i=t.find(".et-pb-border-radius-wrap");i.length&&i.each((function(){new s.Controls.BorderRadiusControl(e(this))}))},s.Controls.TabbedControl=function(e){this.initialize(e)},e.extend(s.Controls.TabbedControl.prototype,{_getByPath:function(e,t){return _.reduce(t.split("."),(function(e,t){return e?e[t]:void 0}),e)},initialize:function(t){var i=t.find(".et-pb-settings-tab"),o=t.find(".et-pb-settings-tab-content");if(!i.length||!o.length)return!1;var n=this;this._$container=t,this._suffix=t.data("attr-suffix"),this._tabs={},this._tab_content={},this._first_tab=null,this._active_tab=null,this._tab_settings_map=null,this._outside_preview=t.find(".et-pb-outside-preview-container"),this._reset_button=t.closest(".et-pb-composite-tabbed-wrapper").siblings(".et-pb-composite-tabbed-reset-setting"),this._is_child_settings_container=t.parents(".et_pb_modal_settings_container").hasClass("et_pb_modal_settings_container_step2"),i.each((function(){var t=e(this).find(".et-pb-settings-tab-title");n._tabs[e(t).data("tab")]=t,t.length&&t.on("click",n._onClickTab.bind(n))})),o.each((function(t,i){var o=e(i).data("tab");n._tab_content[o]={content:this,"preview-area":e(i).find(".et-pb-tab-preview-container")},0===t&&(n._first_tab=o,n._active_tab=o)})),setTimeout((function(){n._buildTabSettingsMap(),e(o).on("et_pb_setting:change et_pb_setting:color_picker:change",n._onChangeHandler.bind(n)),e(o).on("change","select",n._onChangeHandler.bind(n)),e(n._reset_button).on("click",n._onClickReset.bind(n)),n._render()}),100)},_buildTabSettingsMap:function(){var t={};_.map(this._tab_content,(function(i,o){t[o]={};var n=!1;e(i.content).find(".et-pb-main-setting").each((function(i,a){var l=ve(e(a)),_=e(a).parents(".et-pb-composite-tabbed-option").data("control-index");t[o][_]={},t[o][_].default=l,t[o][_].value=s.Helpers.getSettingValue(e(a)),n=n||!we(e(a))})),_.contains(["top_divider","bottom_divider"],o)?t[o].modified=t[o]["".concat(o,"_style")].value!==t[o]["".concat(o,"_style")].default:t[o].modified=n})),this._tab_settings_map=t},_isAnySettingModified:function(){var e=!1;return _.map(this._tab_settings_map,(function(t){this._getByPath(t,"modified")&&(e=!0)}),this),e},_onChangeHandler:function(e){setTimeout(this._onSettingChange.bind(this),100)},_onSettingChange:function(){this._buildTabSettingsMap(),this._render()},_onClickTab:function(e){e.preventDefault();var t=e.target.getAttribute("data-tab");this._makeTabActive(t),this._render()},_onClickReset:function(){var e=this;_.map(this._tab_settings_map,(function(t){_.map(t,(function(t,i){e._$container.find('[data-control-index="'.concat(i,'"]')).find(".et-pb-reset-setting").trigger("click")}),this)})),this._active_tab=this._first_tab},_makeTabActive:function(e){this._active_tab=e},_showTab:function(t){e(this._tabs[t]).closest(".et-pb-settings-tab").addClass("active"),e(this._tab_content[t].content).show()},_hideTab:function(t){e(this._tabs[t]).closest(".et-pb-settings-tab").removeClass("active"),e(this._tab_content[t].content).hide()},_renderOutsidePreviewArea:function(e){return!1},_renderTabPreviewArea:function(e,t){return!1},_render:function(){this._renderOutsidePreviewArea(this._outside_preview),this._renderTabPreviewArea(this._active_tab,this._tab_content[this._active_tab]["preview-area"]),_.map(this._tabs,(function(t,i){i===this._active_tab?this._showTab(i):this._hideTab(i),this._tab_settings_map[i].modified?e(this._tabs[i]).closest(".et-pb-settings-tab").addClass("modified"):e(this._tabs[i]).closest(".et-pb-settings-tab").removeClass("modified")}),this),this._isAnySettingModified()?e(this._reset_button).addClass("et-pb-reset-icon-visible"):e(this._reset_button).removeClass("et-pb-reset-icon-visible")}}),s.Controls.Tabbed=function(t){var i=t.find(".et-pb-composite-tabbed");i.length&&i.each((function(){new s.Controls.TabbedControl(e(this))}))},s.Controls.BorderStylesControl=function(e){this._setting_values=null,this._had_previously_resetted=!1,this.initialize(e)},e.extend(s.Controls.BorderStylesControl.prototype,s.Controls.TabbedControl.prototype,{_processWidth:function(e){var t=parseInt(e);return t>50&&(t=50),Se(t.toString(),!1,"px")},_setControlInitials:function(e){var t=e.parents(".et-pb-composite-tabbed-option").data("control-index");this._setting_values[t]={};var i=e.data("saved_value"),o=me(e),n="",a="",s="";if(e.hasClass("et-pb-range")){var l=e.siblings(".et-pb-range-input");a=l.data(o),s=l.data("default_inherited"),n=l.val(),l.data("check_attr_default","yes")}else n=e.val(),a=e.data(o),s=e.data("default_inherited"),e.data("check_attr_default","yes");var d=_.isUndefined(a)?"":a,r="",c=(r=_.isUndefined(i)?n:_.isEmpty(i)?n===a?a:"":i)!==d;_.isEmpty(s)||(_.isEmpty(r)||r===s)&&(c=!1),_.isEmpty(s)||a===s||c||this._updateControl(e,a,!1),this._setting_values[t].saved_value=c?r:"",this._setting_values[t].default_value=a,this._setting_values[t].default_inherited=s,this._setting_values[t].control=e;var p=t.replace(this._suffix,"").lastIndexOf("_"),b=t.substr(p).replace(this._suffix,"");this._setting_values[t].tab="border".concat(b);var u=this._tab_settings_map["border".concat(b)].modified;this._tab_settings_map["border".concat(b)].modified=u||c},_recalculateEdgeSettings:function(e){if(-1!==e.indexOf("all")){var t=e.replace(this._suffix,"").lastIndexOf("_"),i=e.substr(0,t),o=this;_.map(this._setting_values,(function(t,n){if(-1!==n.indexOf(i)&&-1===n.indexOf("all")){var a=t.control,s=_.isEmpty(o._setting_values[e].saved_value)?o._setting_values[e].default_value:o._setting_values[e].saved_value;if(_.isEmpty(t.default_inherited))t.default_value=s,_.isEmpty(t.saved_value)?o._updateControl(a,s,s):o._updateControl(a,!1,s);else{s=o._setting_values[e].saved_value;var l=o._setting_values[e].default_value;if(_.isEmpty(t.saved_value))if(_.isEmpty(s))if(_.isEmpty(t.saved_default))t.default_value===t.default_inherited?(t.default_value=l,o._updateControl(a,l,l)):o._updateControl(a,t.default_value,!1);else{var d=t.saved_default;t.default_value=d,o._updateControl(a,d,d),t.saved_default=""}else _.isEmpty(t.saved_default)&&(t.saved_default=t.default_value),t.default_value=s,o._updateControl(a,s,s);else{var r=_.isEmpty(s)?l:s;t.default_value=r,o._updateControl(a,t.saved_value,r)}}}}))}},_onSettingChange:function(e,t,i){var o=i?"":s.Helpers.getSettingValue(e);this._updateSetting(t,o),this._recalculateEdgeSettings(t)},_onChangeHandler:function(t,i){if(_.isUndefined(i)||"et_pb_from_all_tab"!==i){var o=e(t.target),n=o.parents(".et-pb-composite-tabbed-option").data("control-index"),a=!_.isUndefined(i)&&"et_pb_reset_setting"===i;this._had_previously_resetted?this._had_previously_resetted=!1:(a&&(this._had_previously_resetted=!0),"et_pb_setting:color_picker:change"===t.type?(this._updateSetting(n,i),this._recalculateEdgeSettings(n)):-1===n.indexOf("color")&&this._onSettingChange(o,n,a),this._render())}},_updateSetting:function(e,t){var i=this,o=this._setting_values[e],n=t!==o.default_value;o.saved_value=n?t:"";var a=o.tab,s=!1;_.map(this._tab_settings_map[a],(function(e,t){if("modified"!==t){var o=i._setting_values[t].saved_value,a=i._setting_values[t].default_value;n=!_.isEmpty(o)&&o!==a,s=s||n}})),this._tab_settings_map[a].modified=s},_updateControl:function(e,t,i){var o=me(e),n=e.hasClass("et-pb-range"),a=null;n&&(a=e.siblings(".et-pb-range-input")),i&&(n?(a.data(o,i),e.data(o,parseFloat(i)||0)):e.data(o,i)),t&&(n&&(e.val(parseFloat(t)||0),e=a),e.val(t).trigger("change",["et_pb_from_all_tab"]))},_resetAllTab:function(){var e=this;_.map(this._setting_values,(function(t,i){-1!==i.indexOf("all")&&(t.saved_value="",e._updateControl(t.control,t.default_value,!1),e._recalculateEdgeSettings(i))}))},_resetEdgeTabs:function(){_.map(this._setting_values,(function(e,t){-1===t.indexOf("all")&&(_.isEmpty(e.default_inherited)?e.default_value="":_.isEmpty(e.saved_default)||(e.default_value=e.saved_default,e.saved_default=""),e.saved_value="")}))},_onClickReset:function(){this._is_child_settings_container?(this._resetAllTab(),this._resetEdgeTabs()):(this._resetEdgeTabs(),this._resetAllTab()),this._active_tab=this._first_tab,this._render()},_buildTabSettingsMap:function(){var t=this,i={};_.map(this._tab_content,(function(t,o){i[o]={},e(t.content).find(".et-pb-main-setting").each((function(t,n){var a=e(n).parents(".et-pb-composite-tabbed-option").data("control-index");i[o][a]={}})),i[o].modified=!1})),this._tab_settings_map=i,null===this._setting_values&&(this._setting_values={},_.map(this._tab_content,(function(i,o){"border_all"!==o&&e(i.content).find(".et-pb-main-setting").each((function(i,o){t._setControlInitials(e(o))}))})),e(this._tab_content.border_all.content).find(".et-pb-main-setting").each((function(i,o){t._setControlInitials(e(o));var n=e(o).parents(".et-pb-composite-tabbed-option").data("control-index");t._recalculateEdgeSettings(n)})))},_renderTabPreviewArea:function(e,t){var i=["width","style","color"],o={};_.forEach(["top","right","bottom","left"],(function(e){var t="";_.forEach(i,(function(i){var o="border_".concat(i,"_").concat(e).concat(this._suffix),n=_.isEmpty(this._setting_values[o].saved_value)?this._setting_values[o].default_value:this._setting_values[o].saved_value;"width"==i&&(n=this._processWidth(n)),t+=" ".concat(n)}),this),o["border-".concat(e)]=t}),this),_.map(o,(function(e,i){t.find(".et-pb-tab-preview-container-preview").css(i,e)}),this)}}),s.Controls.BorderStyles=function(t){var i=t.find(".et-pb-composite-tabbed-border-style");i.length&&i.each((function(){new s.Controls.BorderStylesControl(e(this))}))},e("body").on("click contextmenu","#et_pb_layout_right_click_overlay",(function(e){e.preventDefault(),i()}));var u,v=_.extend({},Backbone.Events),k=new s.Layout,$=new s.Modules,T=new s.Histories,V=new s.AppView({model:s.Module,collection:$,history:T}),U=new s.visualizeHistoriesView,O=e("#et_pb_hidden_editor"),A=(O.html(),e("#et_pb_toggle_builder")),M=e(".et_pb_toggle_builder_wrapper"),L=e("#et_pb_layout"),E=e("#et_pb_old_content"),D=e("#formatdiv"),I=e("#et_pb_use_builder"),P=e("#et_pb_main_editor_wrap"),R=e(".et_pb_page_setting"),H=e(".et_pb_page_layout_settings"),N=[],B=0,z=0,F=!1,W={};s.Events=v;var J={is_active:function(){return!(!e("#et_pb_use_ab_testing").length||"on"!==e("#et_pb_use_ab_testing").val())},toggle_status:function(t){var i=e("#et_pb_use_ab_testing"),o=i.val();t=!_.isUndefined(t)&&t;("on"===o&&!t||("off"===o||""===o)&&t)&&i.addClass("et_pb_value_updated"),ne(),t?(i.val("on"),this.toggle_portability(!1)):i.val("off")},toggle_portability:function(t){var i=e(".et-pb-app-portability-button"),o="et-core-disabled",n=i.hasClass(o);_.isUndefined(t)&&(t=!!n),t?i.removeClass(o):i.addClass(o)},get_stats_refresh_interval:function(){return e("#et_pb_ab_stats_refresh_interval").length?e("#et_pb_ab_stats_refresh_interval").val():"hourly"},get_shortcode_tracking_status:function(){return e("#_et_pb_enable_shortcode_tracking").length&&""!==e("#_et_pb_enable_shortcode_tracking").val()?e("#_et_pb_enable_shortcode_tracking").val():"off"},is_active_based_on_models:function(){var e=$.where({et_pb_ab_subject:"on"}),t=$.where({et_pb_ab_goal:"on"});return e.length>1&&t.length>0},has_permission:function(){return"1"===et_pb_ab_js_options.has_permission},check_create_db:function(){return"exists"!==et_pb_options.ab_db_status&&e.ajax({type:"POST",url:et_pb_options.ajaxurl,data:{action:"et_pb_create_ab_tables",et_pb_ab_nonce:et_pb_options.ab_testing_builder_nonce},success:function(e){if(!e.length||"success"!==e)return!1;et_pb_options.ab_db_status="exists"}}),!0},is_selecting_subject:function(){return!_.isUndefined(V.is_selecting_ab_testing_subject)&&!0===V.is_selecting_ab_testing_subject},is_selecting_goal:function(){return!_.isUndefined(V.is_selecting_ab_testing_goal)&&!0===V.is_selecting_ab_testing_goal},is_selecting_winner:function(){return!_.isUndefined(V.is_selecting_ab_testing_winner)&&!0===V.is_selecting_ab_testing_winner},is_selecting:function(){return!!(this.is_selecting_subject()||this.is_selecting_goal()||this.is_selecting_winner())},is_subject:function(e){return!(!this.is_active()||k.is_app(e)||!e.has("et_pb_ab_subject")||"on"!==e.get("et_pb_ab_subject"))},is_subject_children:function(e){var t=k.getParentViews(e.attributes.parent),i=!1;return _.isEmpty(t)||_.each(t,(function(e){_.isUndefined(e.model.get("et_pb_ab_subject"))||"on"!==e.model.get("et_pb_ab_subject")||(i=!0)})),i},is_unremovable_subject:function(e){return!!(this.is_active()&&this.is_subject(e)&&this.subjects().length<3)},is_goal:function(e){return!(!this.is_active()||k.is_app(e)||!e.has("et_pb_ab_goal")||"on"!==e.get("et_pb_ab_goal"))},is_goal_children:function(e){var t=k.getParentViews(e.attributes.parent),i=!1;return _.isEmpty(t)||_.each(t,(function(t){!k.is_app(e)&&t.model.has("et_pb_ab_goal")&&"on"===t.model.get("et_pb_ab_goal")&&(i=!0)})),i},is_user_has_permission:function(e,t,i){if(!e)return!1;var o,n=k.getView(e),a=(i=_.isUndefined(i)?n.model:i,J.has_permission()),s=J.is_subject(i),l=J.is_subject_children(i),d=J.has_subject(i),r=J.is_goal(i),c=J.is_goal_children(i),p=J.has_goal(i);return o="section"===t?s||d||r||p:"module"===t||"add_module"===t?s||l||r||c:"add_row"===t||"paste"===t?l||c:"copy"===t?s||d||r||p:s||l||d||r||c||p,!(!a&&o)},is_ab_testing_item:function(e){return!!(this.is_subject(e)||this.is_subject_children(e)||this.has_subject(e)||this.is_goal(e)||this.is_goal_children(e)||this.has_goal(e))},filter_goals:function(e){return _.filter(e,(function(e){return!(!e.has("et_pb_ab_goal")||"on"!==e.get("et_pb_ab_goal"))}))},filter_subjects:function(e){return _.filter(e,(function(e){return!(!e.has("et_pb_ab_subject")||"on"!==e.get("et_pb_ab_subject"))}))},filter_models_by_cids:function(t,i){return i=_.isUndefined(i)?$.models:i,_.filter(i,(function(i){return-1!==e.inArray(i.get("parent"),t)}))},pluck_cids_from_models:function(e){var t=[];return _.each(e,(function(e){t.push(e.get("cid"))})),t},has_goal:function(e){var t="function"==typeof e.get&&e.get("cid"),i=!1;return this.is_active()&&!1!==t&&_.each(k.getChildrenViews(t),(function(e){"on"===e.model.get("et_pb_ab_goal")&&(i=!0)})),i},has_subject:function(e){var t="function"==typeof e.get&&e.get("cid"),i=!1;return this.is_active()&&_.each(k.getChildrenViews(t),(function(e){"on"===e.model.get("et_pb_ab_subject")&&(i=!0)})),i},has_unremovable_subject:function(e){var t,i,o,n,a,s,l=e.get("cid"),d=e.get("type"),r=[],c=[];if(this.is_active()){if("section"===d){if(t=$.where({parent:l}),i=this.filter_subjects(t),this.count_subjects()-i.length<2)return!0;if(r=this.pluck_cids_from_models(t),!_.isUndefined(e.get("et_pb_specialty"))&&"on"===e.get("et_pb_specialty")){o=this.filter_models_by_cids(r);var p=this.filter_subjects(o);if(this.count_subjects()-p.length<2)return!0;r=this.pluck_cids_from_models(o)}}if("row"!==d&&"row_inner"!==d||(r=[l]),("section"===d||"row_inner"===d||"row"===d)&&(n=this.filter_models_by_cids(r),c=this.pluck_cids_from_models(n),a=this.filter_models_by_cids(c),s=this.filter_subjects(a),this.count_subjects()-s.length<2))return!0}return!1},subjects:function(){var e=$.where({et_pb_ab_subject:"on"});return e},subject_ids:function(){var e=this.subjects(),t=[];return e.length>0&&_.each(e,(function(e){e.has("et_pb_ab_subject_id")&&t.push(e.get("et_pb_ab_subject_id"))})),t},count_subjects:function(){return this.subjects().length},get_subject_id:function(){if(0===this.count_subjects())return 0;var e=this.subjects(),t=[];return _.each(e,(function(e){e.has("et_pb_ab_subject_id")?t.push(parseInt(e.get("et_pb_ab_subject_id"))):t.push(0)})),(Math.max.apply(Math,t)+1).toString()},set_subject:function(t,i){var o=this;if("removed"!==t.model.get("component_status")){if("exists"!==et_pb_options.ab_db_status)return setTimeout((function(){o.set_subject(t,"waiting")}),500),void v.trigger("et-pb-loading:started");void 0!==i&&"waiting"===i&&v.trigger("et-pb-loading:ended"),t.model.set("et_pb_ab_subject","on"),t.model.set("et_pb_ab_subject_id",o.get_subject_id()),t.$el.addClass("et_pb_ab_subject"),V.is_selecting_ab_testing_subject=!1,e("#et_pb_layout").removeClass("et_pb_select_ab_testing_subject"),J.count_subjects()<2&&(V.is_selecting_ab_testing_goal=!0,e("#et_pb_layout").addClass("et_pb_select_ab_testing_goal"),J.alert("select_ab_testing_goal")),V.saveAsShortcode()}},set_subject_rank_coloring:function(t){var i=et_pb_ab_js_options.subjects_rank,o=!!t.model.has("et_pb_ab_subject_id")&&"subject_".concat(t.model.get("et_pb_ab_subject_id")),n=t.model.get("type"),a=".et-pb-module-title";switch(n){case"section":a=".et-pb-section-title";break;case"row_inner":case"row":a=".et-pb-row-title"}!o||_.isUndefined(i[o])||_.isUndefined(i[o].rank)||_.isUndefined(i[o].percentage)||(t.$el.addClass("rank-".concat(i[o].rank)),t.$el.find(a).append(" (".concat(i[o].percentage,")"))),t.model.has("et_pb_ab_subject_id")&&("module"===n?(t.$el.find(".et-pb-ab-subject-id").remove(),t.$el.find(".et-pb-remove").after(e("",{class:"et-pb-ab-subject-id"}).text(t.model.get("et_pb_ab_subject_id")))):(t.$el.find(".et-pb-ab-subject-id").remove(),t.$el.find(a).append(e("",{class:"et-pb-ab-subject-id"}).text(t.model.get("et_pb_ab_subject_id")))))},set:function(t,i){if(this.is_selecting_subject()){if(!_.isUndefined(t.model.get("et_pb_global_parent")))return void J.alert("cannot_select_global_children_as_subject");(k.is_global(t.model)||k.is_global_children(t.model))&&k.removeGlobalAttributes(t,!0),this.set_subject(t),setTimeout((function(){V.disable_publish=!0,e("#publish").addClass("disabled")}),750)}else if(this.is_selecting_goal()){if(!_.isUndefined(t.model.get("et_pb_global_parent")))return void J.alert("cannot_select_global_children_as_goal");if("removed"===t.model.get("component_status"))return;if(this.has_subject(t.model))return void this.alert("cannot_select_subject_parent_as_goal");V.is_doing_combination=!0,(k.is_global(t.model)||k.is_global_children(t.model))&&k.removeGlobalAttributes(t,!0),t.model.set("et_pb_ab_goal","on"),t.$el.addClass("et_pb_ab_goal"),V.is_selecting_ab_testing_goal=!1,e("#et_pb_layout").removeClass("et_pb_select_ab_testing_goal"),e("#et_pb_ab_goal_module").val(t.options.model.attributes.module_type);var o=$.findWhere({et_pb_ab_subject:"on"}),n=!_.isUndefined(o.cid)&&k.getView(o.get("cid"));if(n){var a,l={model:n.model,view:n.$el,view_event:i};(a=new s.RightClickOptionsView(l,!0)).copy(i),a.pasteAfter(i),J.alert("configure_ab_testing_alternative"),this.update()}Ue(),setTimeout((function(){V.is_doing_combination=!1,V.allowHistorySaving("turnon","abtesting"),e("#et_pb_layout .et-pb-app-view-ab-stats-button").addClass("active"),delete V.disable_publish,e("#publish").removeClass("disabled")}),650)}else if(this.is_selecting_winner())if(t.options.model.has("et_pb_ab_subject")&&"on"===t.options.model.get("et_pb_ab_subject")){var d,r=$.where({et_pb_ab_subject:"on"});if(V.is_doing_combination=!0,V.is_selecting_ab_testing_winner=!1,_.each(r,(function(e){t.model.attributes.cid!==e.attributes.cid&&(n=k.getView(e.attributes.cid),"section"===(d=n.model.get("type"))?n.removeSection():"row"===d||"row_inner"===d?n.removeRow():"module"===d&&n.removeModule())})),t.model.unset("et_pb_ab_subject"),t.model.unset("et_pb_ab_subject_id"),t.model.has("et_pb_collapsed")&&"on"===t.model.get("et_pb_collapsed")&&t.model.unset("et_pb_collapsed"),k.is_temp_global(t.model)||k.is_temp_global_children(t.model))return void G("set_global_subject_winner",void 0,void 0,void 0,{view:t});this.turn_off_ab_testing_sequence()}else J.alert("select_ab_testing_winner_first")},turn_off_ab_testing_sequence:function(){et_pb_ab_js_options.subjects_rank={},Ue(),setTimeout((function(){V.is_doing_combination=!1,V.allowHistorySaving("turnoff","abtesting"),delete V.disable_publish,e("#publish").removeClass("disabled")}),650),e("#et_pb_layout").removeClass("et_pb_select_ab_testing_winner"),e("#et_pb_layout .et-pb-app-view-ab-stats-button").removeClass("active"),this.toggle_portability(!0),e.ajax({type:"POST",url:et_pb_options.ajaxurl,data:{action:"et_pb_ab_clear_stats",et_pb_ab_nonce:et_pb_options.ab_testing_builder_nonce,et_pb_test_id:et_pb_ab_js_options.test_id},success:function(e){et_pb_ab_js_options.has_report=!1,V.ab_stats={}}})},update_saved_subject_ids:function(){var t=this.subject_ids().join();e("#et_pb_ab_subjects").val()!==t&&e("#et_pb_ab_subjects").val(t).addClass("et_pb_value_updated"),ne()},update_layout:function(){if(this.is_active()){setTimeout((function(){var t=e("#et_pb_layout");J.count_subjects()<3?t.addClass("et_pb_ab_disable_subject_removal"):t.removeClass("et_pb_ab_disable_subject_removal")}),100),e(".et_pb_section.et_pb_ab_subject").length&&(e(".et_pb_ab_subject_first").removeClass("et_pb_ab_subject_first"),e(".et_pb_ab_subject_last").removeClass("et_pb_ab_subject_last"),e(".et_pb_section").each((function(){var t=e(this);t.find(".et_pb_section.et_pb_ab_subject").first().addClass("et_pb_ab_subject_first"),t.find(".et_pb_section.et_pb_ab_subject").last().addClass("et_pb_ab_subject_last")})),e(".et_pb_section.et_pb_ab_subject").each((function(){var t=e(this);t.prev().hasClass("et_pb_ab_subject")||t.addClass("et_pb_ab_subject_first"),t.next().hasClass("et_pb_ab_subject")||t.addClass("et_pb_ab_subject_last")}))),e(".et_pb_row.et_pb_ab_subject").length&&(e(".et_pb_ab_subject_first").removeClass("et_pb_ab_subject_first"),e(".et_pb_ab_subject_last").removeClass("et_pb_ab_subject_last"),e(".et_pb_section").each((function(){var t=e(this);t.find(".et_pb_row.et_pb_ab_subject").first().addClass("et_pb_ab_subject_first"),t.find(".et_pb_row.et_pb_ab_subject").last().addClass("et_pb_ab_subject_last")})),e(".et_pb_row.et_pb_ab_subject").each((function(){var t=e(this);t.prev().hasClass("et_pb_ab_subject")||t.addClass("et_pb_ab_subject_first"),t.next().hasClass("et_pb_ab_subject")||t.addClass("et_pb_ab_subject_last")}))),(e(".et_pb_row.et_pb_ab_subject.et_pb_ab_no_permission").length||e(".et_pb_row.et_pb_ab_goal.et_pb_ab_no_permission").length)&&e(".et_pb_row.et_pb_ab_subject.et_pb_ab_no_permission, .et_pb_row.et_pb_ab_goal.et_pb_ab_no_permission").each((function(){e(this).closest(".et_pb_section").addClass("et_pb_ab_no_permission_parent")})),e(".et_pb_module_block.et_pb_ab_subject").length&&(e(".et_pb_ab_subject_first").removeClass("et_pb_ab_subject_first"),e(".et_pb_ab_subject_last").removeClass("et_pb_ab_subject_last"),e(".et-pb-column").each((function(){var t=e(this);t.find(".et_pb_module_block.et_pb_ab_subject").first().addClass("et_pb_ab_subject_first"),t.find(".et_pb_module_block.et_pb_ab_subject").last().addClass("et_pb_ab_subject_last")})),e(".et_pb_module_block.et_pb_ab_subject").each((function(){var t=e(this);t.prev().hasClass("et_pb_ab_subject")||t.addClass("et_pb_ab_subject_first"),t.next().hasClass("et_pb_ab_subject")||t.addClass("et_pb_ab_subject_last")}))),(e(".et_pb_module_block.et_pb_ab_subject.et_pb_ab_no_permission").length||e(".et_pb_module_block.et_pb_ab_goal.et_pb_ab_no_permission").length)&&e(".et_pb_module_block.et_pb_ab_subject.et_pb_ab_no_permission, .et_pb_module_block.et_pb_ab_goal.et_pb_ab_no_permission").each((function(){var t=e(this);t.closest(".et_pb_row").addClass("et_pb_ab_no_permission_parent"),t.closest(".et_pb_section").addClass("et_pb_ab_no_permission_parent")}));var t,i,o,n=!0;_.each(this.subjects(),(function(e){e.has("et_pb_collapsed")&&"off"!==e.get("et_pb_collapsed")||(n=!1)})),n&&(i=(t=e(".et_pb_ab_subject").first()).children(".et-pb-data-cid").attr("data-cid"),o=k.getView(i),t.length&&!_.isUndefined(o)&&(t.removeClass("et_pb_collapsed"),o.model.set("et_pb_collapsed","off")))}},update:function(){this.update_saved_subject_ids(),this.update_layout()},is_alert_valid:function(e){return!(!_.isUndefined(V.ab_last_visible_alert)&&V.ab_last_visible_alert===e)&&(V.ab_last_visible_alert=e,!0)},alert:function(e){this.is_alert_valid(e)&&G("ab_testing_alert",void 0,void 0,void 0,{id:e})},alert_yes_no:function(e){this.is_alert_valid(e)&&G("ab_testing_alert_yes_no",void 0,void 0,void 0,{id:e})},get_all_subjects_stats_settings:function(t){var i,o=e('.view-stats-tab[data-analysis="'.concat(t,'"]')),n=o.find(".et-pb-ab-view-stats-subjects-filter"),a=o.find(".et-pb-ab-view-stats-time-filter"),s=(o.find(".et-pb-options-tabs-links"),["first","second","third","fourth","fifth"]),l={subject_statuses:[],subject_ids:[],table:{thead:[],tbody:{},tfoot:[]}};a.find(".active").length||a.find('a[data-duration="'.concat(et_pb_ab_js_options.refresh_interval_duration,'"]')).addClass("active"),i=V.ab_stats[a.find(".active").attr("data-duration")],n.find("a").each((function(){var t=e(this),i=!t.hasClass("inactive"),o=!t.parent("li").hasClass("et-pb-no-data"),n=t.attr("data-subject-id");o&&l.subject_statuses.push(i),i&&o&&l.subject_ids.push(parseInt(n))}));for(var d=0;d<5;d++)l.table.thead[s[d]]=et_pb_ab_js_options.view_stats_thead_titles[t][d];return _.isUndefined(i)||(_.each(i.subjects_id,(function(o){var n="subject_".concat(o),a=$.findWhere({et_pb_ab_subject_id:o}),s=!(_.isUndefined(a)||!a.has("admin_label"))&&a.get("admin_label");s&&-1!==e.inArray(parseInt(o),l.subject_ids)&&(l.table.tbody[n]={first:o,second:s,third:i.subjects_totals[n][et_pb_ab_js_options.analysis_formula[t].denominator],fourth:i.subjects_totals[n][et_pb_ab_js_options.analysis_formula[t].numerator],fifth:"".concat(i.subjects_totals[n][t],"%")})})),l.table.tfoot={first:et_pb_ab_js_options.total_title,second:null,third:i.events_totals[et_pb_ab_js_options.analysis_formula[t].denominator],fourth:i.events_totals[et_pb_ab_js_options.analysis_formula[t].numerator],fifth:"".concat(i.events_totals[t],"%")}),l},switch_view_stats_tab:function(){var t=e(".et-pb-options-tabs-links"),i=e(".et-pb-ab-view-stats-content.has-data"),o=t.find("li.et-pb-options-tabs-links-active").attr("data-analysis");i.find(".view-stats-tab").removeClass("active"),i.find('.view-stats-tab[data-analysis="'.concat(o,'"]')).addClass("active")},display_stats_tabs:function(t){var i=this,o=_.template("
\[/g,"[")).replace(/\]<\/p>/g,"]")),o.trim()}function te(e){var t=e.replace(/et_pb_row /g,"et_pb_row_inner ").replace(/et_pb_row\]/g,"et_pb_row_inner]");return t=t.replace(/et_pb_column /g,"et_pb_column_inner ").replace(/et_pb_column\]/g,"et_pb_column_inner]")}function ie(){var e="tinymce";return"html"===getUserSetting("editor")&&(e="html"),e}function oe(e){return!(void 0===window.tinyMCE||!window.tinyMCE.get(e)||window.tinyMCE.get(e).isHidden())}function ne(){var t=e("#post_ID").val(),i="https:"===window.location.protocol;wpCookies.set("et-editor-available-post-".concat(t,"-bb"),"bb",1800,et_pb_options.cookie_path,!1,i),wpCookies.set("et-editing-post-".concat(t,"-bb"),"bb",300,et_pb_options.cookie_path,!1,i),wpCookies.remove("et-saving-post-".concat(t,"-bb"),et_pb_options.cookie_path,!1,i),wpCookies.remove("et-saved-post-".concat(t,"-bb"),et_pb_options.cookie_path,!1,i)}function ae(t,i,o){o=o||"",oe("content");var n=oe(t),a=i.trim();if("load_secondary_editor"===o&&(a=_.unescape(a)),void 0!==window.tinyMCE&&window.tinyMCE.get(t)&&n){var s=window.tinyMCE.get(t);"load_secondary_editor"===o&&(a=window.switchEditors.wpautop(a)),s.setContent(a,{format:"html"})}e("#".concat(t)).length&&e("#".concat(t)).val(a),W[t]||"content"===t||(void 0!==tinyMCEPreInit.mceInit[t]?quicktags({id:t}):quicktags(tinyMCEPreInit.qtInit[t]),QTags._buttonsInit(),W[t]=!0),wp.heartbeat&&wp.heartbeat.hasConnectionError()||(e("#publish").removeClass("disabled"),delete V.disable_publish)}function se(e){void 0!==window.tinyMCE&&(window.tinyMCE.execCommand("mceRemoveEditor",!1,e),void 0!==window.tinyMCE.get(e)&&window.tinyMCE.remove("#".concat(e)),W[e]=!1)}function le(t){t.length&&t.each((function(){e(this).trigger("change")}))}function _e(t){if(0!==t.length){var i=t.closest(".et-pb-options-toggle-container");if(0!==i.length){var o=!1;i.find(".et-pb-option").length>0&&i.find(".et-pb-option").each((function(){"none"!==e(this).css("display")&&(o=!0)})),o?i.removeClass("et-pb-options-toggle-empty"):i.addClass("et-pb-options-toggle-empty")}}}function de(e,t){var i=void 0===e.data("device")?"all":e.data("device");if("all"!==i&&"phone"!==i){var o,n,a=void 0!==t?t:e.val(),s=e.hasClass("et-pb-range-input")||e.hasClass("et-pb-range"),l=e.hasClass("et_custom_margin_main"),d=s?".et-pb-range-input":".et-pb-main-setting",r=e.siblings("".concat(d,".et_pb_setting_mobile_tablet")),c=e.siblings("".concat(d,".et_pb_setting_mobile_phone")),p=void 0===r.data("default")?"":r.data("default"),b=void 0===c.data("default")?"":c.data("default"),u=_.isNaN(parseFloat(a))?0:parseFloat(a),g=!1;s?(o=e.siblings(".et-pb-range.et_pb_setting_mobile_tablet"),n=e.siblings(".et-pb-range.et_pb_setting_mobile_phone")):e.hasClass("et_custom_margin_main")||(a=Se(a,!1,"")),"desktop"===i?("no"===r.data("has_saved_value")&&r.val()===p&&(r.val(a).trigger("change"),g=!0,s&&o.val(u)),r.data("default",a),s&&o.data("default",u),l&&xe(r)):g=!0,g&&("no"===c.data("has_saved_value")&&c.val()===b&&(c.val(a).trigger("change"),s&&n.val(u),l&&xe(c)),c.data("default",a),s&&n.data("default",u))}}function re(e){var t=e.find(".et-pb-main-setting.et_pb_setting_mobile_active"),i="".concat(t.val()),o=t.hasClass("et-pb-range"),n=void 0===t.data("default")?"":"".concat(t.data("default")),a=e.find(".et-pb-reset-setting");i!==(o&&""!==n?"".concat(parseFloat(n)):n)?a.addClass("et-pb-reset-icon-visible"):a.removeClass("et-pb-reset-icon-visible")}function ce(e,t){e.find(".et_pb_setting_mobile").removeClass("et_pb_setting_mobile_active"),e.find(".et_pb_setting_mobile_".concat(t)).addClass("et_pb_setting_mobile_active"),e.find(".et_pb_mobile_settings_tab").removeClass("et_pb_mobile_settings_active_tab"),e.find('.et_pb_mobile_settings_tab[data-settings_tab="'.concat(t,'"]')).addClass("et_pb_mobile_settings_active_tab"),re(e)}function pe(t,i){$.findWhere({cid:i});var o=t.find(".et-pb-options-tabs-links"),n=t.find(".et-pb-options-tab"),a=t.find(".et-pb-affects"),l=t.find(".et-pb-responsive-affects"),d=t.find(".et_custom_margin_main"),r=t.find(".et_custom_margin"),c=t.find(".et-pb-option--font"),b=t.find(".et_builder_font_style"),u=t.find(".et_builder_font_weight, .et_pb_font_line_style_select, .et-pb-font-line-color-value"),g=t.find(".et_pb_select_placeholder"),h=t.find("select.et-pb-text-align-select"),f=t.find(".et_builder_text_align"),m=t.find(".et_pb_multiple_buttons_wrapper input"),v=t.find(".et_builder_multiple_buttons_button"),w=t.find(".et-pb-range"),y=t.find(".et-pb-range-input"),k=t.find(".et-pb-options-tab-advanced").find(".et-pb-main-setting"),C=t.find(".et-pb-custom-color-picker"),S=t.find(".et-pb-choose-custom-color-button"),j=t.find(".et-pb-option-container--select_with_option_groups select"),T=t.find(".et_pb_yes_no_button_wrapper"),V=t.find(".et_pb_yes_no_button"),U=t.find(".et_pb_yes_no_button_wrapper select"),O=t.find(".et-pb-validate-unit"),A=t.find(".et_options_list:not(.et_conditional_logic)"),M=t.find(".et_conditional_logic"),L=t.find(".et_select_animation"),E=t.find(".et-preset-container"),D=t.find(".et-pb-option--background, .et-pb-option--background-field"),I=t.find("input.regular-text.et_pb_setting_mobile"),P="et_pb_hidden",R=t.find(".et-pb-options-tab-custom_css .et-pb-option"),H=t.find(".et-pb-mobile-settings-toggle"),N=t.find(".et_pb_mobile_settings_tabs"),B=t.find(".et_pb_checkboxes_wrapper"),z=B.find('input[type="checkbox"]'),F="section"===t.data("module_type")?t.find("#et_pb_background_color"):"",W=t.find("#et_pb_gutter_width"),J=t.find("#et_pb_google_api_key"),K=t.find(".et_pb_update_google_key"),q=t.find("#et_pb_field_id"),Y=t.find(".et_pb_contains_tabbed_subtoggle");function Z(e,t,i){var o=e.parents(".et_options_list_row");t&&(o=e.parent().find(".et_options_list_row").last());var n=o.clone();n.find(".et_options_list_checked").removeClass("et_options_list_checked"),i&&n.find("input[type=text]").val(""),n.insertAfter(o),n.find("input[type=text]").trigger("focus")}function X(t,i){var o=[];i.val(""),t.find("input[type=text]").each((function(){var t=e(this),i=t.prev(".et_options_list_checked").length>0,n={value:t.val(),checked:0};""!==n.value&&(i&&(n.checked=1),o.push(n))})),i.val(JSON.stringify(o))}function Q(t,i,o,n){var a=null;switch(t){case"checkbox":case"radio":case"select":var s;switch(t){case"checkbox":s=o.et_pb_checkbox_options;break;case"radio":s=o.et_pb_radio_options;break;case"select":s=o.et_pb_select_options}var l=function(e){""===e&&(e="[]");var t;return t=(t=(t=(t=e.replace(/%22/g,'"')).replace(/%91/g,"[")).replace(/%92/g,"\\")).replace(/%93/g,"]"),JSON.parse(t)}(s);a=e(""),e.each(l,(function(t,o){var n=e('"));a.append(n),""!==i&&a.val(i)}));break;default:a=e(''))}return a.addClass("et_conditional_logic_value"),a}function ee(t){var i=t.find("textarea"),o=[];t.find(".et_options_list_row").each((function(){var t=e(this),i=t.find(".et_conditional_logic_field").val(),n=t.find(".et_conditional_logic_condition").val(),a=t.find(".et_conditional_logic_value"),s=a.val(),l=t.find(".et_conditional_logic_field").find("option:selected").data("type"),d=!_.includes(["radio","select","checkbox"],l)&&s,r={field:i,condition:n,value:s};!1!==d&&t.attr("data-selected-value",d),o.push(r),a.prop("disabled",!1),_.includes(["is empty","is not empty"],n)&&a.prop("disabled",!0)})),i.val(JSON.stringify(o))}J.length&&(K.attr("href",et_pb_options.options_page_url),""===et_pb_options.google_api_key?(J.addClass("et_pb_hidden_field"),K.text(K.data("empty_text")).addClass("et_pb_no_field_visible")):J.val(et_pb_options.google_api_key)),""!==F&&""!==et_pb_options.page_section_bg_color&&(""===F.val()&&(F.val(et_pb_options.page_section_bg_color),F.trigger("change")),F.data("default",et_pb_options.page_section_bg_color)),W&&""!==et_pb_options.page_gutter_width&&(W.siblings(".et-pb-main-setting").data("default",et_pb_options.page_gutter_width),W.data("default",et_pb_options.page_gutter_width)),Y.length&&Y.each((function(){var t=e(this),i=t.find(".subtoggle_tabs_nav");if(!(i.length<1||i.find(".subtoggle_tabs_nav_item").length<1)){var o="".concat(100/i.find(".subtoggle_tabs_nav_item").length,"%");i.find(".subtoggle_tabs_nav_item").css({width:o}),e(i.find(".subtoggle_tabs_nav_item a")[0]).addClass("et-bb-active-sub-tab"),e(t.find(".et_pb_tabbed_subtoggle")[0]).addClass("et-bb-active-subtoggle"),i.find(".subtoggle_tabs_nav_item a").on("click",(function(i){i.preventDefault();var o=e(this),n=o.data("tab_id");t.find(".subtoggle_tabs_nav_item a").removeClass("et-bb-active-sub-tab"),o.addClass("et-bb-active-sub-tab"),t.find(".et_pb_tabbed_subtoggle").removeClass("et-bb-active-subtoggle"),t.find("[data-tab_id='".concat(n,"']")).addClass("et-bb-active-subtoggle")}))}})),N.length&&N.each((function(){var t=e(this).closest(".et-pb-option"),i=t.find(".et_pb_mobile_last_edited_field").val(),o=t.find(".et_pb_setting_mobile");if(o.length&&o.each((function(){var t=e(this),i=t.data("device"),o="desktop"!==i&&void 0!==t.data("has_saved_value")?t.data("has_saved_value"):"no",n=t.attr("type"),a="tablet"===i?t.siblings('input[type="'.concat(n,'"].et_pb_setting_mobile_desktop')).val():t.siblings('input[type="'.concat(n,'"].et_pb_setting_mobile_tablet')).val();"desktop"!==i&&("no"===o&&t.val(a),t.data("default",a))})),void 0!==i&&""!==i){var n=i.split("|");if(void 0===n[0]||"on"!==n[0])return;t.find(".et-pb-mobile-settings-toggle").addClass("et-pb-mobile-icon-visible et-pb-mobile-settings-active"),t.toggleClass("et_pb_has_mobile_settings"),void 0!==n[1]&&""!==n[1]&&ce(t,n[1])}})),H.on("click",(function(){var t=e(this),i=t.closest(".et-pb-option"),o=i.find(".et_pb_mobile_last_edited_field"),n=o.val(),a=""!==n?n.split("|"):[],s=void 0!==a[1]&&""!==a[1]?a[1]:"desktop",l=i.find(".et-pb-reset-setting");return t.toggleClass("et-pb-mobile-settings-active"),i.toggleClass("et_pb_has_mobile_settings"),ce(i,s),i.addClass("et_pb_animate_options"),setTimeout((function(){i.removeClass("et_pb_animate_options")}),500),i.hasClass("et_pb_has_mobile_settings")?(l.data("device",s),a[0]="on"):(l.data("device","all"),a[0]="off",ce(i,"desktop")),a[1]=void 0!==a[1]?a[1]:"",o.val("".concat(a[0],"|").concat(a[1])).trigger("et_pb_setting:change"),!1})),N.find("a").on("click",(function(){var t=e(this),i=t.closest(".et-pb-option-container"),o=t.data("settings_tab"),n=i.find(".et_pb_mobile_last_edited_field");return t.closest(".et_pb_mobile_settings_tabs").find("a").removeClass("et_pb_mobile_settings_active_tab"),t.addClass("et_pb_mobile_settings_active_tab"),i.find(".et_pb_setting_mobile").removeClass("et_pb_setting_mobile_active"),i.find(".et_pb_setting_mobile_".concat(o)).addClass("et_pb_setting_mobile_active"),i.find(".et-pb-reset-setting").data("device",o),n.val("on|".concat(o)),re(i),!1})),B.length&&B.each((function(){var t,i,o=e(this),n=o.find("input.et-pb-main-setting").val(),a=o.find('input[type="checkbox"]');""!==n&&(t=n.split("|"),i=0,a.each((function(){"on"===t[i]&&e(this).prop("checked",!0);i++})))})),z.on("click",(function(){var t,i,o=e(this),n=e(this).attr("class"),a=o.closest(".et_pb_checkboxes_wrapper"),s=a.find(".et_pb_disabled_option"),l=a.find('input[type="checkbox"]'),_=a.find("input.et-pb-main-setting"),d=!0===o.prop("checked")?"on":"off",r=0,c=[];l.each((function(){e(this).hasClass(n)&&(t=r),r++,c.push("")})),(i=""!==_.val()?_.val().split("|"):c)[t]=d,_.val(i.join("|")),s.length&&("on"===i[0]&&"on"===i[1]&&"on"===i[2]?s.val("on"):s.val("off"))})),I.on("input change",(function(){de(e(this))})),C.each((function(){var t=e(this),i=t.val(),o=t.closest(".et-pb-custom-color-container"),n=t.closest(".et-pb-options-tab"),a=o.siblings(".et-pb-choose-custom-color-button"),s=void 0!==t.data("old-option-ref")&&""!==t.data("old-option-ref")?t.data("old-option-ref"):"",l=""!==s?n.find(".et-pb-option-".concat(s)):"",_=""!==l&&l.length?l.find("input"):"",d=o.find(".et-pb-color-picker-hex"),r=ve(d).toLowerCase();if(""!==_&&(""===i&&""!==_.val()&&(i=_.val()),_.val("")),""===i||i===r)return!0;o.removeClass(P),a.addClass(P),d.wpColorPicker("color",i)})),S.on("click",(function(){var t=e(this),i=t.siblings(".et-pb-custom-color-container"),o=i.find(".et-pb-color-picker-hex"),n=i.find(".et-pb-custom-color-picker");return t.addClass(P),i.removeClass(P),i.find(".wp-color-result").trigger("click"),n.val(o.wpColorPicker("color")),!1})),j.each((function(){var t=e(this).siblings("input.et-pb-main-setting"),i=t.val().split("|"),o=i.length>1?i[0]:"",n=i.length>1?i[1]:i[0];""===o&&(o=e(this).find(":selected").parent().attr("label"),t.val("".concat(o,"|").concat(n)).trigger("change")),e(this).val(n),e(this).on("change",(function(){var i=e(this).find(":selected").parent().attr("label")||"";t.val("".concat(i,"|").concat(e(this).val())).trigger("change")}))})),T.each((function(){var t=e(this),i=t.find(".et_pb_yes_no_button");"on"===t.find("select").val()?(i.removeClass("et_pb_off_state"),i.addClass("et_pb_on_state")):(i.removeClass("et_pb_on_state"),i.addClass("et_pb_off_state"))})),A.each((function(){var t,i=e(this),o=i.find("textarea"),n=o.val();if(i.on("keydown","input[type=text]",(function(e){"Enter"===e.key&&e.stopPropagation()})),i.on("keyup","input[type=text]",(function(n){clearTimeout(t),"Enter"===n.key&&Z(e(this),!1,!0),t=setTimeout((function(){X(i,o)}),500)})),i.on("click",".et-pb-add-sortable-option",(function(t){t.preventDefault(),Z(e(this),!0,!0)})),i.on("click",".et_options_list_copy",(function(t){t.preventDefault(),Z(e(this))})),i.on("click",".et_options_list_remove",(function(t){if(t.preventDefault(),1===i.find(".et_options_list_row").length)return i.find(".et_options_list_row").first().find("input[type=text]").val(""),void X(i,o);e(this).parents(".et_options_list_row").remove(),X(i,o)})),i.on("click",".et_options_list_check",(function(t){t.preventDefault();var n=e(this);n.parent().hasClass("et_options_list_row_radio")&&i.find(".et_options_list_check").not(n).removeClass("et_options_list_checked"),n.toggleClass("et_options_list_checked"),X(i,o)})),!n){var a=parseInt(i.parents("[data-parent-cid]").attr("data-parent-cid")),s=$.findWhere({cid:a}),l=!_.isUndefined(s.attributes.et_pb_checkbox_checked)&&"on"===s.attributes.et_pb_checkbox_checked,d=_.isUndefined(s.attributes.et_pb_field_title)?"":s.attributes.et_pb_field_title;n=JSON.stringify([{value:d,checked:!0===l?1:0}]),o.val(n),"checkbox"===s.attributes.et_pb_field_type&&i.find(".et_options_list_row_checkbox").length>0&&setTimeout((function(){e("#et_pb_field_title").val("")}),0)}!function(t,i,o){if(""===o||_.isUndefined(o))return;var n=t.find(".et_options_list_row").first(),a=e("
")),o.trigger("et_pb_main_tab:changed")}))})),l.removeClass(s),n.find("li").eq(i).addClass(s),e(".et-pb-options-tabs").animate({scrollTop:0},400,"swing")),!1})),n.each((function(){var t=e(this).find(".et-pb-options-toggle-enabled"),i="et-pb-option-toggle-content-open",o="et-pb-option-toggle-content-closed",n="et-pb-option-toggle-content";t.find("h3").on("click",(function(){var s=e(this),l=s.siblings(".".concat(n)),_=s.closest(".et-pb-options-toggle-container"),d=t.filter(".".concat(i)),r=d.find(".".concat(n));_.hasClass(i)||(d.removeClass(i).addClass(o),r.slideToggle(300),_.removeClass(o).addClass(i),l.slideToggle(300,(function(){le(a)})))}))})),d.length&&(d.each((function(){xe(e(this))})),d.on("et_main_custom_margin:change",(function(){xe(e(this))}))),r.on("change",(function(){var t=e(this),i=void 0!==t.data("device")?t.data("device"):"all",o=t.closest(".et_margin_padding"),n=o.closest(".et-pb-option-container").find(".et-pb-mobile-settings-toggle"),a="all"===i?o.find(".et_custom_margin_main"):o.find(".et_custom_margin_main.et_pb_setting_mobile_".concat(i)),s="all"===i?".et_custom_margin":".et_custom_margin.et_pb_setting_mobile_".concat(i),l="",_=t.closest(".et-pb-option").data("option_name"),d={custom_padding:"padding",custom_margin:"margin"};o.find(s).each((function(){l+="".concat(Se(e(this).val(),e(this).hasClass("auto_important"),void 0,d[_]).trim(),"|")})),"|||"===(l=l.slice(0,-1))?l="":n.addClass("et-pb-mobile-icon-visible"),a.val(l).trigger("et_pb_setting:change"),de(a)})),b.on("click",(function(){var t=e(this),i=t.closest(".et_builder_font_styles"),o=t.data("button_name");t.closest(".et-pb-option-container--font");return t.toggleClass("et_font_style_active"),_.forEach([["uppercase","capitalize"],["underline","line_through"]],(function(e){-1!==_.indexOf(e,o)&&_.forEach(e,(function(e){e!==o&&i.find(".et_builder_".concat(e,"_font")).removeClass("et_font_style_active")}))})),ue(t.closest(".et-pb-option-container--font")),je(t.closest(".et-pb-option--font")),!1})),u.on("change",(function(){ue(e(this).closest(".et-pb-option-container--font"))})),c.on("click",".et-pb-settings-option-select li",(function(t){var i=e(this),o=i.closest(".et-pb-option--font"),n=o.find(".et-pb-settings-option-select-advanced"),a=i.data("value");if(!_.isUndefined(a)){if(e(t.target).closest(".et-pb-user-font-marker").length>0)return void G("delete_font",a);ue(o,a),ge(n),"default"!==a&&$e(a),je(o,!1)}})),c.on("click",".et-pb-font-upload-button",(function(t){G("upload_font",e(t.target).closest(".et-pb-option--font").data("option_name"))})),c.on("input",".et-pb-menu-filter",(function(){var t=e(this).val(),i=e(this).closest(".et-pb-settings-option-select-advanced"),o=i.find(".select-option-item");""!==t?i.addClass("et_pb_menu_search_active"):i.removeClass("et_pb_menu_search_active"),o.removeClass("et_pb_hidden_item");var n=_.filter(o,(function(i){return-1===e(i).text().toLowerCase().search(t.toLowerCase())}));e(n).addClass("et_pb_hidden_item")})),c.each((function(){je(e(this),!1,!0)})),g.on("click",(function(){var t=e(this),i=t.closest(".et-pb-select-font-outer"),o=i.find(".et-pb-settings-option-select-advanced"),n=o.find(".select-option-item"),a=i.find(".et-pb-menu-filter");o.addClass("et_pb_menu_active"),o.removeClass("et_pb_menu_search_active"),n.removeClass("et_pb_hidden_item"),a.val(""),o.animate({scrollTop:0},0);var s=t.offset(),l=e(window).height(),_=e(window).scrollTop(),d=500>l?l-50:500,r=s.top-_-20,c=l-r;c "))}))}(t)}function He(){return e.ajax({type:"POST",url:et_pb_options.ajaxurl,dataType:"json",data:{action:"et_pb_current_user_can_lock",et_admin_load_nonce:et_pb_options.et_admin_load_nonce},beforeSend:function(){v.trigger("et-pb-loading:started")},complete:function(){v.trigger("et-pb-loading:ended")}})}function Ne(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}function Be(){return"object"===("undefined"==typeof YoastSEO?"undefined":a(YoastSEO))&&YoastSEO.hasOwnProperty("app")}function ze(){return 0 \[/g,"[")).replace(/\]<\/p>/g,"]")).replace(/\]
")),r="fail");else{var c=new s.SavedTemplates(e),p=new s.TemplatesView({collection:c});N["".concat(o,"_").concat(i,"_").concat(a,"_").concat(l)]=e,n.append(p.render().el),r="success"}"include_global"===t&&"not_global"===i&&Ae("include_global","global",o,n,a,l,_,r)}})}function Me(t){var i=JSON.parse(et_pb_options.layout_categories),o='"}function Le(t,i,o,n,a){void 0===N["".concat(t,"_layouts")]||a?e.ajax({type:"POST",url:et_pb_options.ajaxurl,data:{action:"et_pb_show_all_layouts",et_layouts_built_for_post_type:n,et_admin_load_nonce:et_pb_options.et_admin_load_nonce,et_load_layouts_type:t},beforeSend:function(){a||v.trigger("et-pb-loading:started")},complete:function(){a||v.trigger("et-pb-loading:ended")},success:function(e){a||o.find(".et-pb-main-settings.".concat(i)).append(e),N["".concat(t,"_layouts")]=e}}):o.find(".et-pb-main-settings.".concat(i)).append(N["".concat(t,"_layouts")])}function Ee(t,i,o){if(!t.hasClass("et-pb-options-tabs-links-active")){var n=void 0!==t.closest(".et-pb-options-tabs-links").data("specialty_columns")?t.closest(".et-pb-options-tabs-links").data("specialty_columns"):0;e(".et-pb-options-tabs-links li").removeClass("et-pb-options-tabs-links-active"),t.addClass("et-pb-options-tabs-links-active"),e(".et-pb-main-settings.active-container").css({display:"block",opacity:1}).stop(!0,!0).animate({opacity:0},300,(function(){e(this).css("display","none"),e(this).removeClass("active-container"),e(".".concat(t.data("open_tab"))).addClass("active-container").css({display:"block",opacity:0}).stop(!0,!0).animate({opacity:1},300)})),void 0!==t.data("content_loaded")||t.hasClass("et-pb-new-module")||"layout"===i||(Ae("include_global","",i,e(".".concat(t.data("open_tab"))),o,n,"all"),t.data("content_loaded","true"))}}function De(t,i){var o=et_pb_options.template_post_id;e.ajax({type:"POST",url:et_pb_options.ajaxurl,data:{action:"et_pb_add_template_meta",et_admin_load_nonce:et_pb_options.et_admin_load_nonce,et_meta_value:i,et_custom_field:t,et_post_id:o}})}function Ie(t){var i=k.getView(t),o=i.model.get("et_pb_global_module"),n=i.model.get("type"),a="row_inner"===n?"row":n,s=V.generateCompleteShortcode(t,a,"ignore_global",!1,!0),l=_.isEmpty(h[o])?[]:h[o];void 0!==o&&""!==o&&("row_inner"===n&&(s=(s=s.replace(/et_pb_row_inner/g,"et_pb_row")).replace(/et_pb_column_inner/g,"et_pb_column")),e.ajax({type:"POST",url:et_pb_options.ajaxurl,data:{action:"et_pb_update_layout",et_admin_load_nonce:et_pb_options.et_admin_load_nonce,et_layout_content:s,et_template_post_id:o,et_layout_type:n,et_unsynced_options:JSON.stringify(l)}}))}function Pe(e){for(var t=e,i="";!_.isUndefined(t.model.get("parent"))&&""===i;)t=k.getView(t.model.get("parent")),i=""!==i||_.isUndefined(t.model.get("et_pb_global_module"))?i:t.model.get("cid");return i}function Re(){var t=e(".et_pb_modal_settings_container");t.find(".et-pb-options-tabs .et-pb-options-tab:first-child").css({display:"block",opacity:1}),e(".et_pb_modal_settings_container").hasClass("et_pb_hide_general_tab")?(t.find(".et-pb-options-tabs-links li").removeClass("et-pb-options-tabs-links-active"),t.find(".et-pb-options-tabs .et-pb-options-tab").css({display:"none",opacity:0}),t.hasClass("et_pb_hide_advanced_tab")?(t.find(".et-pb-options-tabs-links li.et_pb_options_tab_custom_css").addClass("et-pb-options-tabs-links-active"),t.find(".et-pb-options-tabs .et-pb-options-tab.et-pb-options-tab-custom_css").css({display:"block",opacity:1})):(t.find(".et-pb-options-tabs-links li.et_pb_options_tab_advanced").addClass("et-pb-options-tabs-links-active"),t.find(".et-pb-options-tabs .et-pb-options-tab.et-pb-options-tab-advanced").css({display:"block",opacity:1}))):t.find(".et-pb-options-tabs .et-pb-options-tab.et-pb-options-tab-general").css({display:"block",opacity:1}),function(t){t.find(".et-pb-options-tab:visible").each((function(){var t=e(this);t.find(".et-pb-option:visible").length||t.append('
/g,"]")).replace(/
\n\[/g,"[")}O.remove(),M.hasClass("et_pb_builder_is_used")&&(L.show(),Q()),A.on("click",(function(t){t.preventDefault();var i,o=e(this),n=o.hasClass("et_pb_builder_is_used"),a=e("#et_pb_fb_cta");if(n)G("deactivate_builder");else{i=ee("content"),E.val(i);var s=getUserSetting("editor");"html"!==s&&(e("#content-html").trigger("click"),setUserSetting("editor",s)),V.reInitialize(),I.val("on"),L.show(),o.text(o.data("editor")),P.toggleClass("et_pb_post_body_hidden"),o.toggleClass("et_pb_builder_is_used"),v.trigger("et-activate-builder"),Q(),a.addClass("et_pb_ready"),e("form#post").append('')}})),e("#et_pb_fb_cta").on("click",(function(t){t.preventDefault(),e("html").fadeOut(),e("form#post").append('')),A.hasClass("et_pb_builder_is_used")||(E.val(ee("content")),V.reInitialize(),I.val("on")),e(window).off("beforeunload").delay(500).queue((function(){var t=e("#save-action #save-post");0===t.length&&(t=e("#publishing-action #publish")),t.trigger("click")}))})).on("contextmenu",(function(){e.ajax({type:"POST",url:e("#post").attr("action"),data:e("#post").serializeArray()})})),function(){var t,i,o,n,s,l,d,r,c,p,b,u=e("#et_pb_last_post_modified"),g=u.val(),h=e("#post_ID").val(),f=void 0!==window.autosaveL10n&&window.autosaveL10n.blog_id,m=!1,w=!0,y=!1,k="https:"===window.location.protocol,C=wpCookies.get("wp-saving-post"),S=300,x=!1;!function(){var e=Math.random().toString(),t=!1;try{window.sessionStorage.setItem("wp-test",e),t=window.sessionStorage.getItem("wp-test")===e,window.sessionStorage.removeItem("wp-test")}catch(e){}p=t}();var j=function(e,t){var i=function(e){var t=!1;return e=e||"wp",p&&f&&(t=(t=sessionStorage.getItem("".concat(e,"-autosave-").concat(f)))?JSON.parse(t):{}),t}(t);if(!i||!h)return!1;if(e)i["post_".concat(h)]=e;else{if(!i.hasOwnProperty("post_".concat(h)))return!1;delete i["post_".concat(h)]}return function(e,t){var i;return t=t||"wp",!(!p||!f)&&(i="".concat(t,"-autosave-").concat(f),sessionStorage.setItem(i,JSON.stringify(e)),null!==sessionStorage.getItem(i))}(i,t)};function $(){wpCookies.get("et-saved-post-".concat(h,"-fb"))&&(j(!1,"wp"),wpCookies.get("et-editing-post-".concat(h,"-fb"))||wpCookies.remove("et-saved-post-".concat(h,"-fb"),et_pb_options.cookie_path,!1,k))}C==="".concat(h,"-saved")&&(wpCookies.set("et-saved-post-".concat(h,"-bb"),"bb",S,et_pb_options.cookie_path,!1,k),wpCookies.set("et-recommend-sync-post-".concat(h,"-bb"),"bb",30,et_pb_options.cookie_path,!1,k)),wpCookies.set("et-editor-available-post-".concat(h,"-bb"),"bb",1800,et_pb_options.cookie_path,!1,k),$(),i=function(){return"on"===e("#et_pb_use_builder").val()},b=function(e){e?(wpCookies.remove("et-saved-post-".concat(h,"-bb"),et_pb_options.cookie_path,!1,k),wpCookies.set("et-saving-post-".concat(h,"-bb"),"bb",S,et_pb_options.cookie_path,!1,k)):(wpCookies.remove("et-saving-post-".concat(h,"-bb"),et_pb_options.cookie_path,!1,k),wpCookies.set("et-saved-post-".concat(h,"-bb"),"bb",S,et_pb_options.cookie_path,!1,k))};var T,U=_.isUndefined(wp.autosave)?"":wp.autosave.getCompareString();l=function(){if(i()&&(w=!1,wpCookies.get("et-editing-post-".concat(h,"-bb")))){if(!function(){if(_.isUndefined(wp.heartbeat)||_.isUndefined(wp.autosave))return!1;var e=wp.autosave.getPostData("local"),t=wp.autosave.getCompareString(e);return void 0===T&&(T=U),t!==T&&(T=t,!0)}())return!1;setTimeout((function(){x||(y=!0,b(!0),_.isUndefined(wp.heartbeat)||_.isUndefined(wp.autosave)||wp.autosave.server.triggerSave())}),0)}},d=function(){if(!i())return!1;var t=e("#post_ID").val(),o="https:"===window.location.protocol;if(w=!0,!wpCookies.get("et-editing-post-".concat(t,"-fb")))return!1;if(_.isUndefined(wp.heartbeat)||_.isUndefined(wp.autosave))return!1;var n=0;if(!function e(){var i=wpCookies.get("et-syncing-post-".concat(t,"-fb")),o=wpCookies.get("et-syncing-post-".concat(t,"-bb"));return n>=5||!i&&!o?(v.trigger("et-pb-loading:ended"),!1):(v.trigger("et-pb-loading:started"),n++,setTimeout(e,1e3),!0)}()){wpCookies.set("et-syncing-post-".concat(t,"-bb"),"bb",30,et_pb_options.cookie_path,!1,o),Ve("external editor was in use!"),Ve("trigger preloader"),v.trigger("et-pb-loading:started"),wp.autosave.server.tempBlockSave();var a=0;!function e(){var i=!1;if(wpCookies.get("et-saved-post-".concat(t,"-fb"))&&(i=!0),a>30&&(i=!0),a++,!_.isUndefined(wp.heartbeat)&&!_.isUndefined(wp.autosave)){if(wp.autosave.server.tempBlockSave(),v.trigger("et-pb-loading:started"),i)return Ve("calling wp.heartbeat.connectNow()"),m=!0,$(),setTimeout((function(){wp.heartbeat.connectNow()}),500),wpCookies.remove("et-saving-post-".concat(t,"-fb"),et_pb_options.cookie_path,!1,o),wpCookies.remove("et-saved-post-".concat(t,"-fb"),et_pb_options.cookie_path,!1,o),wpCookies.remove("et-syncing-post-".concat(t,"-bb"),et_pb_options.cookie_path,!1,o),wpCookies.remove("et-editing-post-".concat(t,"-fb"),et_pb_options.cookie_path,!1,o),!0;setTimeout(e,500)}}()}},c=function(){w&&!document.hasFocus()?l():!w&&document.hasFocus()&&d()},void 0!==document.hidden?(o="hidden",s="visibilitychange",n="visibilityState"):void 0!==document.msHidden?(o="msHidden",s="msvisibilitychange",n="msVisibilityState"):void 0!==document.webkitHidden&&(o="webkitHidden",s="webkitvisibilitychange",n="webkitVisibilityState"),window.addEventListener("beforeunload",(function(e){x=!0,wpCookies.remove("et-editing-post-".concat(h,"-bb"),et_pb_options.cookie_path,!1,k),wpCookies.remove("et-syncing-post-".concat(h,"-bb"),et_pb_options.cookie_path,!1,k),wpCookies.remove("et-saving-post-".concat(h,"-bb"),et_pb_options.cookie_path,!1,k),wpCookies.remove("et-editor-available-post-".concat(h,"-bb"),et_pb_options.cookie_path,!1,k)})),o&&e(document).on("".concat(s,".fb-heartbeat"),(function(e){i()&&("hidden"===document[n]?(l(),window.clearInterval(r)):(d(),document.hasFocus&&(r=window.setInterval(c,1e3))))})),document.hasFocus&&(r=window.setInterval(c,1e3)),d(),setInterval((function(){var e=wpCookies.get("et-recommend-sync-post-".concat(h,"-fb")),t=wpCookies.get("et-saved-post-".concat(h,"-fb"));e&&t&&(_.isUndefined(wp.heartbeat)||wp.heartbeat.connectNow(),wpCookies.remove("et-recommend-sync-post-".concat(h,"-fb"),et_pb_options.cookie_path,!1,k))}),3e3),e(document).on("heartbeat-send.bb-heartbeat",(function(t,o){i()&&(o.et={last_post_modified:g,built_by:"bb",post_id:h,force_check:m,force_autosave:!m&&y},m=!1,y&&void 0===o.wp_autosave&&(o.wp_autosave=wp.autosave.getPostData(),o.wp_autosave.content=ee("content"),o.wp_autosave._wpnonce=e("#_wpnonce").val()||""),"object"===a(o.wp_autosave)&&(o.wp_autosave.builder_settings=_.mapObject(_.indexBy(e(".et_pb_page_settings input.et_pb_value_updated").serializeArray(),"name"),(function(e,t){return e.value})),o.wp_autosave.et_fb_autosave_nonce=et_pb_options.et_fb_autosave_nonce,e(".et_pb_page_settings input.et_pb_value_updated").removeClass("et_pb_value_updated")),y&&void 0!==o.wp_autosave&&(y=!1))})),e(document).on("heartbeat-tick.bb-heartbeat",(function(o,n){if(i()){if(!_.isEmpty(n.et)&&!_.isEmpty(n.et.builder_settings_autosave)){var a=e(".et_pb_modal_overlay.et_pb_builder_settings").length;_.each(n.et.builder_settings_autosave,(function(t,i){if(e("#_".concat(i)).val(t),"et_pb_section_background_color"===i&&(et_pb_options.page_section_bg_color=t),"et_pb_page_gutter_width"===i&&(et_pb_options.page_gutter_width=t),"et_pb_color_palette"===i&&(et_pb_options.page_color_palette=t),a){var o=e('.et_pb_modal_overlay.et_pb_builder_settings div[data-id="'.concat(i,'"]'));switch(o.attr("data-type")){case"range":o.find(".range, .et-pb-range-input").val(t);break;case"color-alpha":o.find(".input-colorpicker").wpColorPicker("color",t);break;case"textarea":o.find("textarea").val(t);break;case"colorpalette":var n=t.split("|");o.find(".input-colorpalette-colorpicker").each((function(t,i){if(!_.isUndefined(n[t])){var a=n[t];e(i).val(a).wpColorPicker("color",a),o.find(".colorpalette-item-".concat(t+1)).css({backgroundColor:a})}}));break;case"yes_no_button":o.find(".et_pb_yes_no_button_wrapper");var s=o.find(".et_pb_yes_no_button");o.find("select").find('option[value="'.concat(t,'"]')).prop("selected",!0),"on"===t?s.removeClass("et_pb_off_state").addClass("et_pb_on_state"):s.removeClass("et_pb_on_state").addClass("et_pb_off_state");break;default:o.find("input").val(t)}}}))}if(n.wp_autosave&&b(!1),void 0===n.et)return!1;if(void 0!==n.et.post_modified&&(g=n.et.post_modified),void 0!==n.et.post_content){Ve("ext changes occured"),t=n.et.post_content;var s=e(".et_pb_modal_settings_container");s.length&&"module_settings"===s.attr("data-open_view")&&s.find(".et-pb-modal-close").trigger("click"),O()}else v.trigger("et-pb-loading:ended")}}));var O=function(){if(u.val(g),i()&&""!=t){v.trigger("et-pb-loading:started");var o=t;ae("content",o,"updating_to_latest_fb_content"),setTimeout((function(){var t=e("#et_pb_layout"),i=t.innerHeight();t.css({height:"".concat(i,"px")}),V.removeAllSections(),V.$el.find(".et_pb_section").remove(),V.enable_history=!1,V.createLayoutFromContent(Oe(o),"","",{is_reinit:"reinit"}),J.is_active_based_on_models()?(J.toggle_status(!0),Ue()):J.toggle_status(!1),t.css({height:"auto"}),v.trigger("et-pb-loading:ended"),setTimeout((function(){wpCookies.remove("et-editing-post-".concat(h,"-bb"),et_pb_options.cookie_path,!1,k)}),500)}),500)}}}(),e(document).on("tinymce-editor-init.autosave",(function(t,i){"content"===i.id&&e(document).off("tinymce-editor-init.autosave")}));var Ye={key:"et_pb_clipboard_",set:function(e,t){Ne()?(localStorage.setItem("".concat(this.key,"type"),LZString.compressToUTF16(e)),localStorage.setItem("".concat(this.key,"content"),LZString.compressToUTF16(t))):alert(et_pb_options.localstorage_unavailability_alert)},get:function(e){if(Ne()){var t=LZString.decompressFromUTF16(localStorage.getItem("".concat(this.key,"type"))),i=LZString.decompressFromUTF16(localStorage.getItem("".concat(this.key,"content")));return(void 0===e||e===t)&&i}alert(et_pb_options.localstorage_unavailability_alert)}},Ze=_.debounce(Ue,2e3);if(e(window).on("keydown",(function(i){if("on"===e("#et_pb_use_builder").val()){if(ze()||e(".et_pb_prompt_modal").is(":visible")){var o=e(".et-pb-modal-save"),n=e(".et_pb_prompt_proceed"),a=e("#et_pb_main_container a, #et_pb_toggle_builder");switch(i.which){case 13:if(e(".et-pb-option-container textarea, #et_pb_address, #et_pb_pin_address, .et-pb-color-picker-hex-has-preview").is(":focus"))return void e(".et-pb-color-picker-hex-has-preview:focus").wpColorPicker("close");a.trigger("blur"),(o.length||n.length)&&(n.length?n.trigger("click"):void 0!==o[1]?o[1].trigger("click"):o.trigger("click"));break;case 27:I()}}if(83===i.keyCode&&i.metaKey&&i.shiftKey&&!i.altKey||83===i.keyCode&&i.ctrlKey&&i.shiftKey&&!i.altKey)return i.preventDefault(),I(),void e("#save-post").trigger("click");if(83===i.keyCode&&i.metaKey&&!i.altKey||83===i.keyCode&&i.ctrlKey&&!i.altKey)return i.preventDefault(),I(),void t("#publish").trigger("click");var l=e(i.target);if(_.isUndefined(l)||!(l.is("input, textarea")||l.attr("contenteditable")||l.hasClass("et_disable_single_key_shortcuts"))){if(90===i.keyCode&&i.metaKey&&i.shiftKey&&!i.altKey||90===i.keyCode&&i.ctrlKey&&i.shiftKey&&!i.altKey)return i.preventDefault(),V.redo(i),!1;if(90===i.keyCode&&i.metaKey&&!i.altKey||90===i.keyCode&&i.ctrlKey&&!i.altKey)return i.preventDefault(),V.undo(i),!1;if(79===i.keyCode){if(ze())return;i.preventDefault(),e(".et_pb_builder_settings").length||e("#et_pb_layout .et-pb-app-settings-button").trigger("click")}else if(80===i.keyCode){if(i.preventDefault(),i.metaKey||i.ctrlKey)return e(".et-pb-modal-preview-template").length&&e(".et-pb-modal-preview-template").trigger("click"),!1;if(ze())return;e("div[data-et-core-portability]").hasClass("et-core-active")||e("#et_pb_layout .et-pb-app-portability-button").trigger("click")}else if(72===i.keyCode){if(ze())return;i.preventDefault(),e("#et_pb_layout .et-pb-layout-buttons-history").trigger("click")}else if(9===i.keyCode&&i.shiftKey){if(e(".et-pb-options-tabs-links").length||e(".et-pb-preview-screensize-switcher").length){var d=!(!e(".et-pb-modal-preview-template").length||!e(".et-pb-modal-preview-template").hasClass("active")),r=e(d?".et-pb-preview-screensize-switcher":".et-pb-options-tabs-links").find("li"),c=r.length,p=r[0];r.each((function(t){var i=d?e(this).find("a"):e(this),o=d?"active":"et-pb-options-tabs-links-active";i.hasClass(o)&&t!==c-1&&(p=r[t+1])})),e(p).length&&e(p).find("a").trigger("click")}}else if(67===i.keyCode&&(i.metaKey||i.ctrlKey)){if(h=We(g)){if(g.$el.hasClass("et-pb-column"))return;h.copy(i)}}else if(86===i.keyCode&&(i.metaKey||i.ctrlKey)){if(h=We(g))(E=g.$el).hasClass("et-pb-column")||E.hasClass("et_pb_section_fullwidth")&&!Ye.get("et_pb_clipboard_section")&&!E.find(".et_pb_module_block").length?h.pasteColumn(i):h.pasteAfter(i)}else if(88===i.keyCode&&(i.metaKey||i.ctrlKey)){if(h=We(g)){if(g.$el.hasClass("et-pb-column"))return;h.copy(i);var b=g.$el.hasClass("et_pb_module_block")?g.$el.find(".et-pb-remove"):g.$el.find("> .et-pb-controls .et-pb-remove");b.length&&(b.trigger("click"),g={},Ue())}}else if(68===i.keyCode){if(h=We(g)){if(g.$el.hasClass("et-pb-column"))return;var u="disabled";void 0===h.model.attributes.et_pb_disabled||"on"!==h.model.attributes.et_pb_disabled?(h.model.attributes.et_pb_disabled="on",g.$el.addClass("et_pb_disabled")):(h.model.attributes.et_pb_disabled="off",g.$el.removeClass("et_pb_disabled"),u="enabled"),h.updateGlobalModule(),V.allowHistorySaving(u,h.history_noun),V.saveAsShortcode()}}else if(76===i.keyCode){var h;if(h=We(g)){if(g.$el.hasClass("et-pb-column"))return;void 0===h.model.attributes.et_pb_locked||"on"!==h.model.attributes.et_pb_locked?h.lock(i):h.unlockItem(i),Ue()}}else if(83===i.keyCode)i.preventDefault(),_.isEmpty(g)||e(".et_pb_modal_overlay").length||(m.s=!0);else if(49!==i.keyCode&&50!==i.keyCode&&51!==i.keyCode||!m.s)if(82===i.keyCode)_.isEmpty(g)||e(".et_pb_modal_overlay").length||(m.r=!0);else if(67!==i.keyCode||i.metaKey||i.ctrlKey)if(49!==i.keyCode&&50!==i.keyCode&&51!==i.keyCode&&52!==i.keyCode&&53!==i.keyCode&&54!==i.keyCode&&55!==i.keyCode&&56!==i.keyCode&&57!==i.keyCode&&48!==i.keyCode&&189!==i.keyCode||!m.r&&!m.c){if(49===i.keyCode||50===i.keyCode||51===i.keyCode||52===i.keyCode||53===i.keyCode||54===i.keyCode||55===i.keyCode||56===i.keyCode||57===i.keyCode||48===i.keyCode||189===i.keyCode){if(!e("ul.et-pb-column-layouts").length)return;var f=e("ul.et-pb-column-layouts li");C=0;switch(i.keyCode){case 49:C=0;break;case 50:C=1;break;case 51:C=2;break;case 52:C=3;break;case 53:C=4;break;case 54:C=5;break;case 55:C=6;break;case 56:C=7;break;case 57:C=8;break;case 48:C=9;break;case 189:C=10}f.length&&f[C]&&e(f[C]).trigger("click")}else if("?"===i.key||191===i.keyCode){var v="help"===e(".et_pb_modal_settings_container").attr("data-open_view");if(e(".et-pb-modal-close").length&&e(".et-pb-modal-close").trigger("click"),v)return;I();var w=new s.ModalView({attributes:{"data-open_view":"help"},view:this});e("body").append(w.render().el)}}else{var y=(E=g.$el).closest(".et_pb_row");if(y.length){var C="4_4";switch(i.keyCode){case 49:C="4_4";break;case 50:C="1_2,1_2";break;case 51:C="1_3,1_3,1_3";break;case 52:C="1_4,1_4,1_4,1_4";break;case 53:C="2_3,1_3";break;case 54:C="1_3,2_3";break;case 55:C="1_4,3_4";break;case 56:C="3_4,1_4";break;case 57:C="1_2,1_4,1_4";break;case 48:C="1_4,1_4,1_2";break;case 189:C="1_4,1_2,1_4"}var S=k.getView(y.find(".et-pb-row-content").data("cid"));if(void 0!==S){var x=!1,j=!1,$=k.getView(S.model.attributes.parent);if(void 0!==$&&"column"===$.model.attributes.type){var T=3===$.model.attributes.specialty_columns?[49,50,51]:[49,50];if(-1===e.inArray(i.keyCode,T))return}var U={};if(m.r){if("on"===S.model.get("et_pb_parent_locked"))return;if(J.is_active()&&!J.is_user_has_permission(S.model.get("cid"),"add_row"))return void J.alert("has_no_permission");V.allowHistorySaving("added","row"),j=!0;var O=k.generateNewId(),A=void 0!==S.model.get("et_pb_global_module")&&""!==S.model.get("et_pb_global_module")?S.model.get("et_pb_global_module"):"",M=""!==A?S.model.get("cid"):"";$.collection.add([{type:"row",module_type:"row",cid:O,parent:$.model.get("cid"),view:S,appendAfter:S.$el,et_pb_global_parent:A,global_parent_cid:M,admin_label:et_pb_options.noun.row}]),U=k.getView(O)}else{if(void 0!==S.model.attributes.et_pb_global_module&&""!==S.model.attributes.et_pb_global_module||"row"===et_pb_options.layout_type&&"global"===et_pb_options.is_global_template)return;U=S,x=!0}var L={layout:C,is_structure_change:x,layout_specialty:""};k.changeColumnStructure(U,L,!0,j)}}}else _.isEmpty(g)||e(".et_pb_modal_overlay").length||(m.c=!0);else{if(e(".et_pb_modal_overlay").length)return;var E,D=(E=g.$el).closest(".et_pb_section");if(D.length)switch(i.keyCode){case 49:D.find(".et-pb-section-add-main").trigger("click");break;case 50:D.find(".et-pb-section-add-specialty").trigger("click");break;case 51:D.find(".et-pb-section-add-fullwidth").trigger("click")}}}}function I(){var t=e(".et-pb-modal-close"),i=e(".et-core-modal-close");t.length&&(void 0!==t[1]?t[1].trigger("click"):t.trigger("click")),i.length&&i.trigger("click"),e("body").removeClass("et-core-nbfc")}})),e(window).on("keyup",(function(e){83===e.keyCode?m.s=!1:82===e.keyCode?m.r=!1:67===e.keyCode&&m.c&&(m.c=!1,Ze())})),e("body").on("mouseover",".et-pb-right-click-trigger-overlay, .et-pb-controls, .et_pb_module_block, .et-pb-insert-module, .et-pb-row-add",(function(t){var i=e(t.target),o=i.closest(".et_pb_module_block");if(!o.length)if(i.closest(".et-pb-insert-module").length||i.closest(".et-pb-row-add").length)o=i.closest("div"),i.closest(".et-pb-row-add").length&&(o=o.find(".et-pb-row-content"));else{var n=i.closest(".et-pb-right-click-trigger-overlay").length?i.closest(".et-pb-right-click-trigger-overlay"):i.closest(".et-pb-controls");if(!n.length)return void(g={});var a=n.closest(".et_pb_row");if(a.length)o=a.find(".et-pb-row-content");else o=n.closest(".et_pb_section").find(".et-pb-section-content")}if(o.length){var s=k.getView(o.data("cid"));g=s}})),e("body").on("dblclick",".et-pb-right-click-trigger-overlay, .et-pb-controls, .et_pb_module_block",(function(t){var i=e(t.target);if(!i.closest("a").length){var o=i.closest(".et_pb_module_block");if(o.length)o.find(".et-pb-settings").trigger("click");else{i.closest(".et-pb-controls").length&&i.closest(".et-pb-controls").find(".et-pb-settings").trigger("click");var n=i.closest(".et-pb-right-click-trigger-overlay");if(n.length){var a=n.closest(".et_pb_row");if(a.length)a.find("> .et-pb-controls .et-pb-settings").trigger("click");else n.closest(".et_pb_section").find("> .et-pb-controls .et-pb-settings").trigger("click")}}}})),"0"===et_pb_options.is_divi_library){var Xe=e("#et-builder-app-settings-button-template").html();e("#et_pb_layout").prepend(Xe),e("#et_pb_layout").on("click",".et-pb-app-view-ab-stats-button",(function(t){t.preventDefault(),J.is_selecting_subject()?J.alert("select_ab_testing_subject_first"):J.is_selecting_goal()?J.alert("select_ab_testing_goal_first"):J.is_selecting_winner()?J.alert("select_ab_testing_winner_first"):e("#et_pb_layout_controls .et-pb-layout-buttons-view-ab-stats").trigger("click")})),e("#et_pb_layout").on("click",".et-pb-app-portability-button.et-core-disabled",(function(e){e.preventDefault(),J.is_selecting_subject()?J.alert("select_ab_testing_subject_first"):J.is_selecting_goal()?J.alert("select_ab_testing_goal_first"):J.is_selecting_winner()?J.alert("select_ab_testing_winner_first"):J.is_active()&&J.alert("cannot_import_export_layout_has_ab_testing")})),e("#et_pb_layout").on("click",".et-pb-app-settings-button",(function(t){t.preventDefault(),J.is_selecting_subject()?J.alert("select_ab_testing_subject_first"):J.is_selecting_goal()?J.alert("select_ab_testing_goal_first"):J.is_selecting_winner()?J.alert("select_ab_testing_winner_first"):e("#et_pb_layout_controls .et-pb-layout-buttons-settings").trigger("click")}))}else e("#toplevel_page_et_divi_options, #toplevel_page_et_divi_options > a").addClass("wp-has-current-submenu wp-menu-open").removeClass("wp-not-current-submenu");if(Be()){var Qe=function(){YoastSEO.app.registerPlugin("ET_PB_Yoast_Content",{status:"ready"}),YoastSEO.app.registerModification("content",this.et_pb_update_content,"ET_PB_Yoast_Content",5)};Qe.prototype.et_pb_update_content=function(t){var i=F||et_pb_options.yoast_content;return e(".et-pb-yoast-loading").remove(),i},new Qe}e(window).on("resize",(function(){var t=e(".et_pb_prompt_modal.et_pb_auto_centerize_modal");t.length&&(t.removeAttr("style"),(0,n.default)(t,".et_pb_prompt_buttons"))})),e(window).on("load",(function(){setTimeout((function(){var t=e("#et_pb_toggle_builder"),i=e("#et_pb_fb_cta");t.addClass("et_pb_ready"),t.hasClass("et_pb_builder_is_used")&&i.addClass("et_pb_ready")}),250)})),e(window).on("mousedown",(function(t){var i=e(".et-pb-settings-option-select-advanced.et_pb_menu_active");e(t.target).closest(".et-pb-settings-option-select-advanced").length<1&&i.length>0&&ge(i)}))})),window.et_builder=window.et_builder||{},void 0!==window.YoastShortcodePlugin&&(window.YoastShortcodePlugin.prototype.bindElementEvents=function(){var e=document.getElementById("content")||!1,t=this;e&&(e.addEventListener("keydown",this.loadShortcodes.bind(this,this.declareReloaded.bind(this))),e.addEventListener("change",this.loadShortcodes.bind(this,this.declareReloaded.bind(this)))),"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",(function(e){e.editor.on("change",(function(){t.loadShortcodes.bind(t,t.declareReloaded.bind(t))()}))}))}),document.addEventListener("DOMContentLoaded",(function(){var t,i={tabs:{},padding:{},yes_no_button:{},multiple_buttons:{},font_buttons:{},text_align_buttons:{},select:{},font_line_styles:{},animation_buttons:{},user_fonts:et_pb_options.user_fonts,font_weights:et_pb_options.supported_font_weights,options_icons:et_pb_options.all_svg_icons,background_tabs_nav:{},background_gradient_buttons:{},option_preview_buttons:{}};function o(){var t=e(".et_pb_modal_settings_container");t.find("div.mce-fullscreen").length&&setTimeout((function(){var e=t.innerHeight(),i=t.find(".mce-toolbar-grp").innerHeight()||0;t.find("iframe").height(e-i)}),100)}window.et_builder_template_options=i,s.Events.on("et-advanced-module-settings:render",(function(t){var i,o=t.$el.find("#et_pb_category_id"),n=t.$el.find("#et_pb_category_name");o.length&&n.length&&(i=o.find("option:selected").text().trim(),n.val(i),o.on("change",(function(){i=e(this).find("option:selected").text().trim(),n.val(i)})))})),t={fonts_template:function(t){return _.template(e("#et-builder-google-fonts-options-items").html())(window.et_builder_template_options.user_fonts)},fonts_weight_template:function(t){return _.template(e("#et-builder-font-weight-items").html())(window.et_builder_template_options.font_weights)},font_icon_list_template:function(){return e("#et-builder-font-icon-list-items").html()},font_down_icon_list_template:function(){return e("#et-builder-font-down-icon-list-items").html()},preview_tabs_output:function(){return e("#et-builder-preview-icons-template").html()},settings_tabs_output:function(t){var i=_.template(e("#et-builder-options-tabs-links-template").html());return window.et_builder_template_options.tabs.options=e.extend({},t),i(window.et_builder_template_options.tabs)},mobile_tabs_output:function(){return e("#et-builder-mobile-options-tabs-template").html()},options_template_output:function(t,i,o){var n=_.template(e("#et-builder-".concat(t,"-option-template")).html());return window.et_builder_template_options[t].options=e.extend({},i),_.isUndefined(o)||(window.et_builder_template_options[t].data=e.extend({},o)),n(window.et_builder_template_options[t])},options_text_align_buttons_output:function(t,i){var o=_.template(e("#et-builder-text-align-buttons-option-template").html());return window.et_builder_template_options.text_align_buttons.options=e.extend({},t),window.et_builder_template_options.text_align_buttons.type=i,o(window.et_builder_template_options.text_align_buttons)}},e.extend(window.et_builder,t),e("body").on("click",".et_pb_module_settings .mce-i-fullscreen",(function(){o()})),e(window).on("resize",(function(){o()})),e("body.wp-admin").on("click",'.et-pb-modal-container .mce-widget.mce-btn[aria-label="Fullscreen"] button',(function(){setTimeout((function(){e(window).trigger("resize")}),50)})),e(document).on("click",".et-pb-dynamic-content-fb-switch",(function(t){t.preventDefault(),e("#et_pb_fb_cta").trigger("click")}))}))}).call(this,i(0),i(0))},23:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(t,i){var o=e(window),n=e("#wpadminbar"),a=o.height(),s=t.outerHeight(),l=n.outerHeight(),_=0-s/2+l/2;s>a-l?t.css({top:"".concat(l+15,"px"),bottom:15,marginTop:0,minHeight:0}):t.css({top:"50%",marginTop:"".concat(_,"px")}),t.addClass("et_pb_auto_centerize_modal")};t.default=i}).call(this,i(0))}});