| 1 |
(function(e){"use strict";var t={shouldReload:false,init:function(){elementor.channels.editor.on("section:activated",t.onAnimatedBoxSectionActivated);window.elementor.on("preview:loaded",(function(){elementor.$preview[0].contentWindow.UltimateStoreKitEditor=t;t.onPreviewLoaded()}));elementor.channels.editor.on("ultimateStoreKitBuilderSetting:applySinglePagePostOnPreview",t.ApplyPreviewPostId);elementor.channels.editor.on("saved",t.savedBuilder)},savedBuilder:function(){if(t.shouldReload){t.shouldReload=false;window.location.href=window.location.href}},ApplyPreviewPostId:function(){t.shouldReload=true;e("#elementor-panel-saver-button-publish").trigger("click")},onPreviewLoaded:function(){var t=e("#elementor-preview-iframe")[0].contentWindow.elementorFrontend;t.hooks.addAction("frontend/element_ready/widget",(function(t){t.find(".usk-elementor-template-edit-link").on("click",(function(t){window.open(e(this).attr("href"))}))}))}};e(window).on("elementor:init",t.init);window.UltimateStoreKitEditor=t;elementor.hooks.addFilter("panel/elements/regionViews",(function(e){jQuery(document).ready((function(){jQuery("body").append(`<style>.bdt-pro-unlock-icon:after{right: auto !important; left: 5px !important;}</style>`)}));if(UltimateStoreKitConfigEditor.pro_license_activated||UltimateStoreKitConfigEditor.promotional_widgets<=0)return e;var t,o=UltimateStoreKitConfigEditor.promotional_widgets,i=e.elements.options.collection,n=e.categories.options.collection,r=e.categories.view,l=e.elements.view,a,d=[];_.each(o,(function(e,t){i.add({name:e.name,title:e.title,icon:e.icon,categories:e.categories,editable:false})}));i.each((function(e){"ultimate-store-kit-pro"===e.get("categories")[0]&&d.push(e)}));a=n.findIndex({name:"ultimate-store-kit"});a&&n.add({name:"ultimate-store-kit-pro",title:"Ultimate Store Kit Pro",defaultActive:!1,items:d},{at:a+1});t={getWedgetOption:function(e){return o.find((function(t){return t.name==e}))},className:function(){var e="elementor-element-wrapper";if(!this.isEditable()){e+=" elementor-element--promotion"}return e},onMouseDown:function(){void this.constructor.__super__.onMouseDown.call(this);var e=this.getWedgetOption(this.model.get("name"));elementor.promotion.showDialog({title:sprintf(wp.i18n.__("%s","elementor"),this.model.get("title")),content:sprintf(wp.i18n.__("Use %s widget and dozens more pro features to extend your toolbox and build sites faster and better.","elementor"),this.model.get("title")),targetElement:this.el,position:{blockStart:"-7"},actionButton:{url:e.action_button.url,text:e.action_button.text,classes:e.action_button.classes||["elementor-button","elementor-button-success"]}})}};e.elements.view=l.extend({childView:l.prototype.childView.extend(t)});e.categories.view=r.extend({childView:r.prototype.childView.extend({childView:r.prototype.childView.prototype.childView.extend(t)})});return e}));e("iframe").load((function(){e("iframe").contents().find(".usk-template-builder-template").addClass("woocommerce woocommerce-page")}))})(jQuery); |