').html(i({color:"warning",icon:"exclamation-triangle",text:e}));break;case"success":t=l('
').html(i({color:"success",icon:"check",text:e}))}t.prependTo(this.$el.find('[data-vc-ui-element="panel-edit-element-tab"].vc_row.vc_active')),t.fadeIn(),this.message_box_timeout=window.setTimeout(function(){t.remove()},6e3)},changeTab:function(e){e&&e.preventDefault&&e.preventDefault(),e&&!e.isClearSearch&&this.clearSearch();e=l(e.currentTarget);e.parent().hasClass("vc_active")||(this.$el.find('[data-vc-ui-element="panel-tabs-controls"] .vc_active:not([data-vc-ui-element="panel-tabs-line-dropdown"])').removeClass("vc_active"),e.parent().addClass("vc_active"),this.$el.find('[data-vc-ui-element="panel-edit-element-tab"].vc_active').removeClass("vc_active"),this.$el.find(e.data("vcUiElementTarget")).addClass("vc_active"),this.$tabsMenu&&this.$tabsMenu.vcTabsLine("checkDropdownContainerActive"))}}),l.fn.vcAccordion.Constructor.prototype.collapseTemplate=function(a){var t,i,c,e=this.$element,s=0,n=this.getContainer().find("[data-vc-preview-handler]").each(function(){var e=l(this),a=e.data("vc.accordion");void 0===a&&(e.vcAccordion(),a=e.data("vc.accordion")),a&&a.setIndex&&a.setIndex(s++)}).filter(function(){var e=l(this).data("vc.accordion");return e.getTarget().hasClass(e.activeClass)}).filter(function(){return e[0]!==this});n.length&&l.fn.vcAccordion.call(n,"hide"),this.isActive()?l.fn.vcAccordion.call(e,"hide"):(l.fn.vcAccordion.call(e,"show"),t=e.closest(".vc_ui-list-bar-item"),i=e.closest("[data-template_id]"),c=i.closest("[data-vc-ui-element=panel-content]").parent(),setTimeout(function(){var e;Math.round(i.offset().top-c.offset().top)<0&&(e=Math.round(i.offset().top-c.offset().top+c.scrollTop()-t.height()),c.animate({scrollTop:e},400)),"function"==typeof a&&a(i,c)},400))}})(window.jQuery);
(o=>{window.vc.element_start_index=0,window.vc.AddElementUIPanelBackendEditor=vc.PanelView.vcExtendUI(vc.HelperPanelViewHeaderFooter).extend({el:"#vc_ui-panel-add-element",searchSelector:"#vc_elements_name_filter",prepend:!1,builder:"",events:{'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="panel-tab-control"]':"handleFiltering","click .vc_shortcode-link":"createElement","keyup #vc_elements_name_filter":"handleFiltering","search #vc_elements_name_filter":"handleFiltering","cut #vc_elements_name_filter":"handleFiltering","paste #vc_elements_name_filter":"handleFiltering","click [data-vc-manage-elements]":"openPresetWindow"},initialize:function(){window.vc.AddElementUIPanelBackendEditor.__super__.initialize.call(this),window.vc.events.on("vc:savePreset",this.updateAddElementPopUp.bind(this)),window.vc.events.on("vc:deletePreset",this.removePresetFromAddElementPopUp.bind(this))},render:function(e,t){return _.isUndefined(vc.ShortcodesBuilder)||(this.builder=new vc.ShortcodesBuilder),this.$el.is(":hidden")&&window.vc.closeActivePanel(),(window.vc.active_panel=this).prepend=!!_.isBoolean(t)&&t,this.place_after_id=!!_.isString(t)&&t,this.model=!!_.isObject(e)&&e,this.$content=this.$el.find('[data-vc-ui-element="panel-add-element-list"]'),this.$buttons=o('[data-vc-ui-element="add-element-button"]',this.$content),this.buildFiltering(),this.$el.find('[data-vc-ui-element="panel-tab-control"]').eq(0).click(),this.show(),this.$el.find('[data-vc-ui-element="panel-tabs-controls"]').vcTabsLine("moveTabs"),vc.is_mobile||o(this.searchSelector).trigger("focus"),vc.AddElementUIPanelBackendEditor.__super__.render.call(this)},buildFiltering:function(){var e,t,i,n='[data-vc-ui-element="add-element-button"]',a=this._getNotIn(this.model?this.model.get("shortcode"):"");o(this.searchSelector).val(""),this.$content.addClass("vc_filter-all"),this.$content.attr("data-vc-ui-filter","*"),t=!(!(e=this.model?this.model.get("shortcode"):"vc_column")||_.isUndefined(vc.getMapped(e).as_parent))&&vc.getMapped(e).as_parent,_.isObject(t)?(i=[],_.isString(t.only)&&i.push(_.reduce(t.only.replace(/\s/,"").split(","),function(e,t){return e+(_.isEmpty(e)?"":",")+'[data-element="'+t.trim()+'"]'},"")),_.isString(t.except)&&i.push(_.reduce(t.except.replace(/\s/,"").split(","),function(e,t){return e+':not([data-element="'+t.trim()+'"])'},"")),n+=i.join(",")):a&&(n=a),!1===e||_.isUndefined(vc.getMapped(e).allowed_container_element)||(!1===vc.getMapped(e).allowed_container_element?n+=":not([data-is-container=true])":_.isString(vc.getMapped(e).allowed_container_element)&&(n+=":not([data-is-container=true]), [data-element="+vc.getMapped(e).allowed_container_element+"]")),this.$buttons.removeClass("vc_visible").addClass("vc_inappropriate"),o(n,this.$content).removeClass("vc_inappropriate").addClass("vc_visible"),this.hideEmptyFilters()},hideEmptyFilters:function(){var e=this;this.$el.find('[data-vc-ui-element="panel-add-element-tab"].vc_active').removeClass("vc_active"),this.$el.find('[data-vc-ui-element="panel-add-element-tab"]:first').addClass("vc_active"),this.$el.find("[data-filter]").each(function(){o(o(this).data("filter")+".vc_visible:not(.vc_inappropriate)",e.$content).length?o(this).parent().show():o(this).parent().hide()})},_getNotIn:_.memoize(function(n){return'[data-vc-ui-element="add-element-button"]:not('+_.reduce(vc.map,function(e,t){var i=_.isEmpty(e)?"":",";return _.isObject(t.as_child)?(_.isString(t.as_child.only)&&!_.contains(t.as_child.only.replace(/\s/,"").split(","),n)&&(e+=i+"[data-element="+t.base+"]"),_.isString(t.as_child.except)&&_.contains(t.as_child.except.replace(/\s/,"").split(","),n)&&(e+=i+"[data-element="+t.base+"]")):!1===t.as_child&&(e+=i+"[data-element="+t.base+"]"),e},"")+")"}),handleFiltering:function(e){"cut"==e.type||"paste"===e.type?setTimeout(function(){this.filterElements(e)}.bind(this),0):(e?(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()):e=window.event,this.filterElements(e))},filterElements:function(e){var t=o(e.currentTarget),i='[data-vc-ui-element="add-element-button"]',n=o(this.searchSelector).val(),a=(this.$content.removeClass("vc_filter-all"),o('[data-vc-ui-element="panel-add-element-tab"].vc_active').removeClass("vc_active"),t.is("[data-filter]")?(t.parent().addClass("vc_active"),i+=t=t.data("filter"),"*"===t?this.$content.addClass("vc_filter-all"):this.$content.removeClass("vc_filter-all"),this.$content.attr("data-vc-ui-filter",t.replace(".js-category-","")),o(this.searchSelector).val("")):n.length?(i+=":containsi('"+n+"'):not('.vc_element-deprecated')",this.$content.attr("data-vc-ui-filter","name:"+n)):(n.length,o('[data-vc-ui-element="panel-tab-control"][data-filter="*"]').parent().addClass("vc_active"),this.$content.attr("data-vc-ui-filter","*").addClass("vc_filter-all")),o(".vc_visible",this.$content).removeClass("vc_visible"),o(i,this.$content).addClass("vc_visible"),n.length&&13===(e.keyCode||e.which)&&1===(t=o(".vc_visible:not(.vc_inappropriate)",this.$content)).length&&t.find("[data-vc-clickable]").click(),!1),i=o(".vc-panel-no-results-message");this.$content.find(".wpb-content-layouts").each(function(){var e=o(this);0
{window.vc.ExtendPresets={settingsMenuSelector:'[data-vc-ui-element="settings-dropdown-list"]',settingsButtonSelector:'[data-vc-ui-element="settings-dropdown-button"]',settingsDropdownSelector:'[data-vc-ui-element="settings-dropdown"]',settingsPresetId:null,uiEvents:{init:"addEvents",render:"hideDropdown",afterRender:"afterRenderActions"},afterRenderActions:function(){this.untaintSettingsPresetData(),this.showDropdown()},hideDropdown:function(){this.$el.find('[data-vc-ui-element="settings-dropdown"]').hide()},showDropdown:function(){var t=this.model.get("shortcode");window.vc_settings_show&&"vc_column"!==t&&this.$el.find('[data-vc-ui-element="settings-dropdown"]').show()},showDropdownMenu:function(){var t=this.model.get("shortcode"),e=r(this);e.data("vcSettingsMenuLoaded")&&t===e.data("vcShortcodeName")||this.reloadSettingsMenuContent()},addEvents:function(){var t=this.$el.find(".vc_edit-form-tab.vc_active"),e=this.model.get("shortcode"),i=this;r(document).off("beforeMinimize.vc.paramWindow",this.minimizeButtonSelector).on("beforeMinimize.vc.paramWindow",this.minimizeButtonSelector,function(){t.find(".vc_ui-prompt-presets .vc_ui-prompt-close").trigger("click")}),r(document).off("close.vc.paramWindow",this.closeButtonSelector).on("beforeClose.vc.paramWindow",this.closeButtonSelector,function(){t.find(".vc_ui-prompt-presets .vc_ui-prompt-close").trigger("click")}),r(document).off("show.vc.accordion",this.settingsButtonSelector).on("show.vc.accordion",this.settingsButtonSelector,function(){var t=r(this);t.data("vcSettingsMenuLoaded")&&e===t.data("vcShortcodeName")||i.reloadSettingsMenuContent()})},saveSettingsAjaxData:function(t,e,i,s){return{action:"vc_action_save_settings_preset",shortcode_name:t,is_default:i?1:0,vc_inline:!0,title:e,data:s,_vcnonce:window.vcAdminNonce}},saveSettings:function(t,e){var i=this.model.get("shortcode"),s=JSON.stringify(this.getParamsForSettingsPreset());if(void 0!==t&&t.length)return void 0===e&&(e=!1),this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.saveSettingsAjaxData(i,t,e,s),context:this}).done(function(t){t.success&&(this.setSettingsMenuContent(t.html),this.settingsPresetId=t.id,this.untaintSettingsPresetData())}).always(this.resetAjax),this.ajax},fetchSaveSettingsDialogAjaxData:function(){return{action:"vc_action_render_settings_preset_title_prompt",vc_inline:!0,_vcnonce:window.vcAdminNonce}},fetchSaveSettingsDialog:function(e){var i=this.$el.find(".vc_ui-panel-content-container");i.find(".vc_ui-prompt-presets").length?void 0!==e&&e(!1):(this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.fetchSaveSettingsDialogAjaxData()}).done(function(t){t.success&&(i.prepend(t.html),void 0!==e)&&e(!0)}).fail(function(){void 0!==e&&e(!1)}).always(this.resetAjax))},showSaveSettingsDialog:function(t){var d=this;this.isSettingsPresetDefault=!!t,this.fetchSaveSettingsDialog(function(t){var s,n,a=d.$el.find(".vc_ui-panel-content-container"),o=a.find(".vc_ui-prompt-presets"),c=o.find(".textfield"),e=(a.find(".vc_ui-prompt.vc_visible").removeClass("vc_visible"),o.find("[data-vc-view-settings-preset]"));"undefined"!==window.vc_vendor_settings_presets[d.model.get("shortcode")]?e.removeAttr("disabled"):e.attr("disabled","disabled"),o.addClass("vc_visible"),c.trigger("focus"),a.addClass("vc_ui-content-hidden"),t&&(s=o.find("#vc_ui-save-preset-btn"),n=0,o.on("submit",function(){var i=c.val();return i.length&&d.saveSettings(i,d.isSettingsPresetDefault).done(function(t){var e=this.getParamsForSettingsPreset();c.val(""),d.setCustomButtonMessage(s,void 0,void 0,!0),vc.events.trigger("vc:savePreset",t.id,d.model.get("shortcode"),i,e),n=_.delay(function(){o.removeClass("vc_visible"),a.removeClass("vc_ui-content-hidden")},5e3)}).fail(function(){d.setCustomButtonMessage(s,window.i18nLocale.ui_danger,"danger",!0)}),!1}),o.on("click",".vc_ui-prompt-close",function(){return d.checkAjax(),o.removeClass("vc_visible"),a.removeClass("vc_ui-content-hidden"),d.clearCustomButtonMessage.call(this,s),n&&(window.clearTimeout(n),n=0),!1}),r(".edit-form-info").initializeTooltips())})},loadSettingsAjaxData:function(t){return{action:"vc_action_get_settings_preset",vc_inline:!0,id:t,_vcnonce:window.vcAdminNonce}},loadSettings:function(e){return this.panelInit=!1,this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.loadSettingsAjaxData(e),context:this}).done(function(t){t.success&&(this.settingsPresetId=e,this.applySettingsPreset(t.data))}).always(this.resetAjax),this.ajax},saveAsDefaultSettingsAjaxData:function(t,e){return{action:"vc_action_set_as_default_settings_preset",shortcode_name:t,id:e,vc_inline:!0,_vcnonce:window.vcAdminNonce}},saveAsDefaultSettings:function(t,e){var i=this.model.get("shortcode"),t=t||this.settingsPresetId;t?(this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.saveAsDefaultSettingsAjaxData(i,t),context:this}).done(function(t){t.success&&(this.setSettingsMenuContent(t.html),this.untaintSettingsPresetData(),e)&&e()}).always(this.resetAjax)):this.showSaveSettingsDialog(!0)},restoreDefaultSettingsAjaxData:function(t){return{action:"vc_action_restore_default_settings_preset",shortcode_name:t,vc_inline:!0,_vcnonce:window.vcAdminNonce}},restoreDefaultSettings:function(){var t=this.model.get("shortcode");this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.restoreDefaultSettingsAjaxData(t),context:this}).done(function(t){t.success&&this.setSettingsMenuContent(t.html)}).always(this.resetAjax)},setSettingsMenuContent:function(t){var e=this.$el.find(this.settingsButtonSelector),i=this.$el.find(this.settingsMenuSelector),s=this.model.get("shortcode"),n=this;e.data("vcShortcodeName",s),i.html(t),window.vc_presets_data&&0'),this.buildsettingsListContent(t),t.appendTo(s),t.addClass("vc_visible"),s.addClass("vc_ui-content-hidden"),i=function(){return t.remove(),s.removeClass("vc_ui-content-hidden"),!1},t.off("click.vc1").on("click.vc1","[data-vc-load-settings-preset]",function(t){e.loadSettings(r(t.currentTarget).data("vcLoadSettingsPreset")),i()}),t.off("click.vc4").on("click.vc4","[data-vc-set-default-settings-preset]",function(){e.saveAsDefaultSettings(r(this).data("vcSetDefaultSettingsPreset"),function(){e.buildsettingsListContent(t)})}),t.off("click.vc3").on("click.vc3",".vc_ui-prompt-close",function(){i(),e.checkAjax()}))},buildsettingsListContent:function(t){var s=vc.template(''),n=t.find("[data-vc-presets-list-content]");n.empty(),_.each(window.vc_presets_data.presets[0],function(t,e){var i=t;0{window.vc.ExtendTemplates={fetchSaveTemplateDialogAjaxData:function(){return{action:"vc_action_render_settings_templates_prompt",vc_inline:!0,_vcnonce:window.vcAdminNonce}},fetchSaveTemplateDialog:function(t){var n=this.$el.find(".vc_ui-panel-content-container");if(!n.find(".vc_ui-prompt-templates").length)return this.checkAjax(),this.ajax=e.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.fetchSaveTemplateDialogAjaxData()}).done(function(e){e.success&&(n.prepend(e.html),void 0!==t)&&t(!0)}).always(this.resetAjax),this.ajax;void 0!==t&&t(!1)},showSaveTemplateDialog:function(){var c=this;this.fetchSaveTemplateDialog(function(e){var t,n,i=c.$el.find(".vc_ui-panel-content-container"),a=i.find(".vc_ui-prompt-templates"),o=a.find(".textfield");i.find(".vc_ui-prompt.vc_visible").removeClass("vc_visible"),a.addClass("vc_visible"),o.trigger("focus"),i.addClass("vc_ui-content-hidden"),e&&(t=0,n=a.find("#vc_ui-save-templates-btn"),a.on("submit",function(){var e=o.val();c.$el.find(c.settingsButtonSelector);return e.length&&(e={action:vc.templates_panel_view.save_template_action,template:vc.shortcodes.singleStringify(c.model.get("id"),"template"),template_name:e,vc_inline:!0,_vcnonce:window.vcAdminNonce},vc.templates_panel_view.reloadTemplateList(e,function(){o.val(""),c.setCustomButtonMessage(n,void 0,void 0,!0),t=_.delay(function(){a.removeClass("vc_visible"),i.removeClass("vc_ui-content-hidden")},5e3)},function(){c.setCustomButtonMessage(n,window.i18nLocale.ui_danger,"danger")})),!1}),a.on("click",".vc_ui-prompt-close",function(){return c.checkAjax(),a.removeClass("vc_visible"),i.removeClass("vc_ui-content-hidden"),c.clearCustomButtonMessage.call(this,n),t&&(window.clearTimeout(t),t=0),!1}))})}}})(window.jQuery);
(c=>{window.vc.EditElementPanelView=vc.PanelView.vcExtendUI(vc.HelperAjax).vcExtendUI(vc.ExtendPresets).vcExtendUI(vc.ExtendTemplates).vcExtendUI(vc.HelperPrompts).extend({panelName:"edit_element",el:"#vc_properties-panel",contentSelector:".vc_ui-panel-content.vc_properties-list",minimizeButtonSelector:'[data-vc-ui-element="button-minimize"]',closeButtonSelector:'[data-vc-ui-element="button-close"]',titleSelector:".vc_panel-title",tabsInit:!1,doCheckTabs:!0,$tabsMenu:!1,dependent_elements:{},mapped_params:{},draggable:!1,panelInit:!1,$spinner:!1,active_tab_index:0,buttonMessageTimeout:!1,notRequestTemplate:!1,requiredParamsInitialized:!1,currentModelParams:!1,customButtonMessageTimeout:!1,events:{"click [data-save=true]":"save","click [data-dismiss=panel]":"hide","mouseover [data-transparent=panel]":"addOpacity","click [data-transparent=panel]":"toggleOpacity","mouseout [data-transparent=panel]":"removeOpacity"},formRender:function(){var t=this,n=null;this.$el.find(".vc_edit-form-tab").on("input change",function(e){clearTimeout(n),vc.saveInProcess=!0,n=setTimeout(function(){t.save(e)},500)})},initialize:function(){_.bindAll(this,"setSize","setTabsSize","fixElContainment","hookDependent","resetAjax","removeAllPrompts"),this.on("setSize",this.setResize,this),this.on("render",this.resetMinimize,this),this.on("render",this.setTitle,this),this.on("render",this.prepareContentBlock,this),window.vc_auto_save&&this.on("afterRender",this.formRender,this),this.on("afterRender",function(){c(".edit-form-info").initializeTooltips(),this.reInitJsFunctions()},this)},reInitJsFunctions:function(){try{window.vc.frame_window&&window.vc.frame_window.vc_js&&vc.events.on("shortcodeView:updated",window.vc.frame_window.vc_js)}catch(e){console.error("Failed to execute window.vc.frame_window.vc_js function in reInitJsFunctions(): ",e)}},setCustomButtonMessage:function(e,t,n,i){return void 0===e&&(e=this.$el.find('[data-vc-ui-element="button-save"]')),void 0===i&&(i=!1),this.clearCustomButtonMessage=_.bind(this.clearCustomButtonMessage,this),!i&&!vc.frame_window||this.customButtonMessageTimeout||(void 0===t&&(t=window.i18nLocale.ui_saved),void 0===n&&(n="success"),i=e.html(),e.addClass("vc_ui-button-"+n+" vc_ui-button-undisabled").removeClass("vc_ui-button-action").data("vcCurrentTextHtml",i).data("vcCurrentTextType",n).html(t),_.delay(this.clearCustomButtonMessage.bind(this,e),5e3),this.customButtonMessageTimeout=!0),this},clearCustomButtonMessage:function(e){var t,n;this.customButtonMessageTimeout&&(window.clearTimeout(this.customButtonMessageTimeout),n=e.data("vcCurrentTextHtml")||"Save",t=e.data("vcCurrentTextType"),e.html(n).removeClass("vc_ui-button-"+t+" vc_ui-button-undisabled").addClass("vc_ui-button-action"),this.customButtonMessageTimeout=!1)},render:function(e,t,n){this.$el.is(":hidden")&&vc.closeActivePanel(),t&&(this.notRequestTemplate=!0),this.model=e,this.currentModelParams=this.model.get("params"),(vc.active_panel=this).resetMinimize(),this.clicked=!1,this.$el.css("height","auto"),this.$el.css("maxHeight","75vh"),t=this.model.setting("params")||[],this.$el.attr("data-vc-shortcode",this.model.get("shortcode")),this.tabsInit=!1,this.panelInit=!1,this.active_tab_index=0,this.requiredParamsInitialized=!1,this.mapped_params={},this.dependent_elements={},_.each(t,function(e){this.mapped_params[e.param_name]=e},this),this.trigger("render"),this.show(),this.checkAjax();e=this.model.get("id");return this.isEditElementPanelCache(e)?this.buildParamsContent(window.vc.EditElementPanelCache[e]):this.ajax=c.ajax({type:"POST",url:window.ajaxurl,data:this.ajaxData(n),context:this}).done(this.buildParamsContent).always(this.resetAjax),this},prepareContentBlock:function(){this.$content=this.notRequestTemplate?this.$el:this.$el.find(this.contentSelector).removeClass("vc_with-tabs"),this.$content.empty(),this.$spinner=c(''),this.$content.prepend(this.$spinner)},buildParamsContent:function(e){var t,n,i=this.model.get("id"),a=(this.setEditElementPanelCache(i,e),(e=(i=c(e)).find('[data-vc-ui-element="panel-tabs-controls"]')).find(".vc_edit-form-tab-control:first-child").addClass("vc_active"),t=this.$el.find('[data-vc-ui-element="panel-header-content"]'),(n=i.find('[data-vc-ui-element="panel-edit-element-tab"]'))&&n.addClass("visually-hidden"),t&&t.addClass("visually-hidden"),this.$content.html(i).append("