PageSourceSearch

https://amoraspace.com/wp-content/plugins/cmsmasters-elementor-add…products.e23ba8b8212f95ca692c.bundle.min.js

js amoraspace.com collected 2026-10-07 14:05:16 UTC 15,725 bytes, 2 lines download raw bytes

1/*! cmsmasters-elementor-addon - v1.21.2 - 15-02-2026 */
2"use strict";(self.webpackChunkcmsmasters_elementor_addon=self.webpackChunkcmsmasters_elementor_addon||[]).push([[2893],{5898:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class _default extends elementorModules.ViewModule{__construct(e){super.__construct(e),this.$element=e.widget,this.controls=e.controls,this.type=!!e.type&&e.type,"custom"===this.type&&(this.container=e.container?e.container:null,this.translateNames=e.translateNames?e.translateNames:[]),"document"===this.type&&(this.documents=e.documents?e.documents:{}),this.contentGap=44,this.elementorDocument="data-elementor-id",this.handles={}}getDefaultSettings(){const e="elementor-document-handle",t={handle:e,handleWrap:`${e}-wrapper`,handleInner:`${e}-inner`,handleTitle:`${e}__title`,widgetContainer:"elementor-element",widgetTemplate:"cmsmasters-widget-template",parentDocument:"cmsmasters-parent-document",templateStyles:"cmsmasters-template-styles",editMode:"elementor-edit-mode"};return{classes:t,selectors:{handle:`.${t.handle}`,handleWrap:`.${t.handleWrap}`,handleInner:`.${t.handleInner}`,handleTitle:`.${t.handleTitle}`,editMode:`.${t.editMode}`}}}getDefaultElements(){if("document"===this.type)return;const e={$widgetContainer:this.$element};return this.container&&(e.$widgetContainer=this.container),e}onInit(){super.onInit(),this.createTemplateHandles()}createTemplateHandles(){switch(this.type){case"document":this.createControlDocumentHandles();break;case"listing":this.createControlTemplateHandles();break;case"custom":this.createRepeaterTemplateHandles();break;default:this.createWidgetTemplateHandles()}}createControlDocumentHandles(){const{classes:e,selectors:t}=this.getSettings();Object.values(this.documents).forEach((s=>{const n=s.$element;if(n.hasClass(e.editMode))return;if(n.children(t.handle).length)return;const i=jQuery("<div>",{class:e.handle}),o=n.data("elementor-title");i.append(this.getHandleInner(s,o)),n.prepend(i)}))}getHandleInner(e,t){const{classes:s}=this.getSettings(),n=jQuery("<i>",{class:"eicon-edit"}),i="document"!==this.type?cmsmastersElementorFrontend.translate(t):t,o=jQuery("<div>",{class:s.handleTitle}).text(cmsmastersElementorFrontend.translate("edit_element",[i]));return jQuery("<div>",{class:s.handleInner}).append(n,o).on("click",(()=>this.onDocumentHandleClick(e)))}createControlTemplateHandles(){const{classes:e,selectors:t}=this.getSettings(),s=this.elements.$widgetContainer.closest(".elementor").not(t.editMode);if(s.length&&s.data("elementor-id"))return;const n=jQuery("<div>",{class:e.handle});Object.entries(this.controls).forEach((t=>{let[s,i]=t;this.elements.$widgetContainer.addClass(e.handleWrap);const o=this.$element.find(`[${this.elementorDocument}=${i}]`).first();n.append(this.getHandleInner(o,s))})),this.elements.$widgetContainer.prepend(n)}createRepeaterTemplateHandles(){const{classes:e}=this.getSettings();Array.from(this.elements.$widgetContainer).forEach((t=>{const s=jQuery(t),n=jQuery("<div>",{class:e.handle}),i=s.find(`[${this.elementorDocument}]`).first();if(!i.length)return;const o=this.translateNames.indexOf(`saved_${i.data("elementor-type")}`);if(0>o)return;i.addClass(e.handleWrap);const a=this.translateNames[o];n.append(this.getHandleInner(i,a)),i.prepend(n)}))}createWidgetTemplateHandles(){const{classes:e,selectors:t}=this.getSettings(),s=this.elements.$widgetContainer.closest(".elementor").not(t.editMode);s.length&&s.data("elementor-id")||Object.entries(this.controls).forEach((t=>{let[s,n]=t;const i=jQuery("<div>",{class:e.handle});this.elements.$widgetContainer.addClass(e.handleWrap);const o=this.$element.find(`[${this.elementorDocument}=${n}]`).first();i.append(this.getHandleInner(o,s)),o.prepend(i)}))}onDocumentHandleClick(e){const t="document"!==this.type?e.data("elementor-id"):e.getSettings("id"),s=elementorCommon.api.run("editor/documents/switch",{id:t,mode:"autosave"});"document"!==this.type&&s.finally((()=>this.initModal(e)))}async initModal(e){const{classes:t}=this.getSettings(),s=e.data("elementor-id"),n=elementor.$previewContents.find(`[
2id=${t.templateStyles}-${s}]`),i=elementor.$previewContents.find(`.elementor-${s}`).first();if(this.modal)return void this.modal.setMessage(i).show();let o=e;this.container&&(o=this.$element);const a=o.closest(`.elementor:not(.elementor-${s})`);let r=`${t.widgetTemplate}-modal`,l=!1;a.length&&(l=a.data("elementor-id")),l&&(r+=` ${t.parentDocument}-${l}`),window.DialogsManager||await elementorFrontend.utils.assetsLoader.load("script","dialog"),this.modal=elementorFrontend.getDialogsManager().createWidget("lightbox",{id:`${t.widgetTemplate}-${s}`,className:r,closeButton:!0,closeButtonClass:"eicon-close",preventScroll:!0,hide:{onBackgroundClick:!0,onEscKeyPress:!0},position:{enable:!1}});const{widgetContent:d}=this.modal.getElements();"listing"!==this.type&&d.width(`${e.outerWidth()+this.contentGap}px`),this.modal.setMessage(i).show(),setTimeout((()=>{n.remove()}),1e3),this.modal.on("hide",(()=>{d.css("opacity",.5),setTimeout((()=>{this.modal.setMessage(""),l?elementorCommon.api.run("editor/documents/switch",{id:l,mode:"autosave"}).finally((()=>{this.createTemplateHandles(),elementor.dynamicTags.cleanCache(),setTimeout((()=>{this.modal.destroy(),jQuery(document).find(`[data-id=${this.$element.data("id")}]`).trigger("click")}),1e3)})):this.modal.destroy()}))}))}}t.default=_default},4190:(e,t,s)=>{var n=s(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(s(7674)),o=n(s(9945)),a=n(s(2277)),r=n(s(2533)),l=n(s(5898)),d=n(s(7537));const m=s(2363);class Products extends a.default{__construct(){super.__construct(...arguments),this.handles=null,this.templateControls=["cmsmasters_template_id"],this.reLayoutDebounce=m.debounce(this.reLayoutDebounce.bind(this)),this.onResize=this.onResize.bind(this),this.keydownHelper=new r.default}getDefaultSettings(){const e=super.getDefaultSettings(...arguments);return Object.assign(e,{selectors:{wrapper:".woocommerce",product:"li.product",products:"ul.products",orderby:"select.orderby",resultCount:".woocommerce-result-count",layoutColumns:".cmsmasters-woo-products__header-layout-column",wrapperColumns:".cmsmasters-woo-products__header-layout"}})}getDefaultElements(){const{selectors:e}=this.getSettings(),t=this;return{$variable:this.findElement(".woocommerce"),get $wrapper(){return t.findElement(e.wrapper)},get $product(){return t.findElement(e.product)},get $products(){return t.findElement(e.products)},get $resultCount(){return t.findElement(e.resultCount)},get $orderby(){return t.findElement(e.orderby)},get $layoutColumns(){return t.findElement(e.layoutColumns)},get $WrapperColumns(){return t.findElement(e.layoutColumns)}}}bindEvents(){const{selectors:e}=this.getSettings(),t=this.getElementSettings("query_control_prefix");"current_query"!==this.getElementSettings(`${t}_post_type`)&&(this.findElement(".woocommerce-ordering").off("change"),this.$element.off("change"),this.$element.on("change",e.orderby,this.onOrderby.bind(this))),document.addEventListener("wpfAjaxStart",this.onWBWFilter.bind(this)),elementorFrontend.elements.$window.on("resize",this.onResize),this.on("ajaxInsertHTML:after",(()=>{this.$element.find(".elementor-element").each(((e,t)=>{elementorFrontend.elementsHandler.runReadyTrigger(t)}))})),this.on("ajaxInsertHTML:after",this.reLayout.bind(this)),this.bindElementChange(["columns_gap","masonry","rows_gap"],this.initMasonry.bind(this)),this.bindElementChange(["border_columns_type","border_vertical_width","columns","columns_gap"],this.initBorderColumn.bind(this)),this.bindElementChange(["border_columns_type","border_horizontal_width"],this.initBorderRow.bind(this))}onInit(){super.onInit(),this.initHandles(),this.elements.$variable.length&&(this.initPagination(),this.reLayout(),this.initAjaxWidget(),this.setCacheDefault(),"yes"===this.getElementSettings("show_layout")&&this.setCustomLayout(),this.runFunctionOnAjax(),this.on("ajaxInsertHTML:after",(()=>{"yes"===this.getElementSettings("show_layout")&&(this.elements.$layoutColumns.removeClass("active"),this.hideCustomLayoutVariations())})))}runFunctionOnAjax(){const{selectors:e}=this.getSettings();null!==localStorage.getItem(`cmsmasters-custom-layout-${this.getID()}`)&&"NaN"!==localStorage.getItem(`cmsmasters-custom-layout-${this.getID()}`)&&void 0!==localStorage.getItem(`cmsmasters-custom-layout-${this.getID()}`)&&"undefined"!==localStorage.getItem(`cmsmasters-custom-layout-${this.getID()}`)||localStorage.setItem(`cmsmasters-custom-layout-${this.getID()}`,!1);let t=JSON.parse(localStorage.getItem(`cmsmasters-custom-layout-${this.getID()}`));this.keydownHelper.bindAccessibleClick(jQuery(document),(e=>{jQuery(e.target).closest(this.elements.$layoutColumns).length&&(t=JSON.parse(localStorage.getItem(`cmsmasters-custom-layout-${this.getID()}`)))}),{delegateSelector:e.layoutColumns}),jQuery(document).ajaxStop((()=>{t&&localStorage.setItem(`cmsmasters-custom-layout-${this.getID()}`,parseInt(t)),this.$element.find(".elementor-element").each(((e,t)=>{elementorFrontend.elementsHandler.runReadyTrigger(t)})),this.elements.$layoutColumns.removeClass("active"),this.reLayout()}))}getDeviceSetting(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"desktop";const s=this.getElementSettings();return elementorFrontend.getDeviceSetting(t,s,e)}setCustomLayout(){const{selectors:e}=this.getSettings();this.keydownHelper.bindAccessibleClick(jQuery(document),(e=>{if(jQuery(e.target).closest(this.elements.$layoutColumns).length){const t=jQuery(e.target),s=window.elementorFrontend.getCurrentDeviceMode(),n=this.getDeviceSetting("columns",s),i=this.elements.$products;if(t.hasClass("active"))i.css("grid-template-columns","repeat("+n+", minmax(0, 1fr))"),t.removeClass("active"),localStorage.setItem(`cmsmasters-custom-layout-${this.getID()}`,!1),this.initMasonry(n),this.initBorderColumn(n),this.initBorderRow(n);else{const e=t.data("layout");e&&(i.css("grid-template-columns","repeat("+e+", minmax(0, 1fr))"),this.initMasonry(e),this.initBorderColumn(e),this.initBorderRow(e)),this.elements.$layoutColumns.removeClass("active"),t.addClass("active"),localStorage.setItem(`cmsmasters-custom-layout-${this.getID()}`,e)}}}),{delegateSelector:e.layoutColumns})}hideCustomLayoutVariations(){const e=this.elements.$wrapper.get(0).offsetWidth,t=window.elementorFrontend.getCurrentDeviceMode(),s=this.getDeviceSetting("columns",t);this.elements.$layoutColumns.each(((t,n)=>{const i=jQuery(n),o=i.data("layout"),a=parseInt(localStorage.getItem(`cmsmasters-custom-layout-${this.getID()}`));let r="",l="";if(e<=600?(r=2>=o,l=2>=a):e>600&&e<=800?(r=3>=o,l=3>=a):e>800&&e<=1100?(r=4>=o&&2<=o,l=4>=a&&2<=a):e>1100&&e<=1400?(r=5>=o&&2<=o,l=5>=a&&2<=a):1400<e&&(r=3<=o,l=3<=a),r?i.show():(i.hide(),i.removeClass("active"),(null==a||null!=a&&!l)&&(this.elements.$products.css("grid-template-columns","repeat("+s+", minmax(0, 1fr))"),setTimeout((()=>{this.initMasonry(s),this.initBorderColumn(s),this.initBorderRow(s)}),300))),null!=a){this.elements.$layoutColumns.filter('[data-layout="'+a+'"]').length>0&&l&&o===a&&(i.addClass("active"),this.elements.$products.css("grid-template-columns","repeat("+a+", minmax(0, 1fr))"),setTimeout((()=>{this.initMasonry(a),this.initBorderColumn(a),this.initBorderRow(a)}),300))}}))}initPagination(){this.pagination=new o.default(this),this.pagination.on("updatePage",this.onUpdatePage.bind(this)),this.pagination.on("click",this.onPagination.bind(this))}reLayout(){"yes"===this.getElementSettings("show_layout")?this.hideCustomLayoutVariations():(this.initMasonry(this.getColumns()),this.initBorderColumn(this.getColumns()),this.initBorderRow(this.getColumns()))}initMasonry(e){if(this.removeMasonry(),!this.isMasonry())return;const t=parseInt(getComputedStyle(this.$element.get(0)).getPropertyValue("--cmsmasters-gap-row"));e||(e=this.getColumns()),new elementorModules.utils.Masonry({container:elementorFrontend.elements.$body,items:this.elements.$product,columnsCount:e,verticalSpaceBetween:t}).run()}removeMasonry(){this.elements.$product.css({marginTop:""})}isMasonry(){return 1<this.getColumns()&&Boolean(this.getElementSettings("masonry"))}getColumns(){return Number(this.getCurrentDeviceSetting("columns"))}initBorderColumn(e){this.borderColumns?this.borderColumns.update():(e||(e=this.getColumns()),this.borderColumns=new d.default({$container:()=>this.elements.$products,$items:()=>this.elements.$product,columns:()=>e,widget:this}))}initBorderRow(e){e||(e=this.getColumns());const t=this.getCurrentDeviceSetting("border_horizontal_width"),s=this.getElementSettings("border_columns_type");this.elements.$product.removeClass("separator-vertical"),s&&t&&this.elements.$product.filter(`:not(:nth-last-of-type(-n+${e}))`).addClass("separator-vertical")}initAjaxWidget(){this.ajaxWidget=new i.default({ajaxVarsDefault:{query_vars:{paged:this.pagination.getPagedCurrent()},attributes:{orderby:this.elements.$orderby.val()}},cacheAllow:!0,widget:this}),this.ajaxWidget.on("response/success",this.responseSuccess.bind(this)),this.ajaxWidget.on("response/fail",this.responseFail.bind(this))}setCacheDefault(){this.ajaxWidget.setCache(this.elements.$variable.get(0).outerHTML)}onOrderby(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),this.ajaxWidget.isRequestFree()&&(this.ajaxMethod="orderby",this.pagination.setPage(1),this.ajaxWidget.setAjaxVars("attributes.orderby",this.elements.$orderby.val()),this.ajaxWidget.request())}onPagination(){if(!this.ajaxWidget.isRequestFree())return;this.pagination.isLoadMore()||this.pagination.isInfiniteScroll()?this.ajaxMethod="load-more":this.ajaxMethod="pagination";
2new URLSearchParams(location.search).forEach(function(e,t){this.ajaxWidget.setAjaxVars(`attributes.${t}`,e)}.bind(this)),this.ajaxWidget.request()}onUpdatePage(e){this.ajaxWidget.isRequestFree()&&this.ajaxWidget.setAjaxVars("query_vars.paged",e)}onWBWFilter(){m.saveParameters({[this.pagination.getPagedName()]:!1})}responseSuccess(){this.trigger("ajaxInsertHTML:before"),this.ajaxInsertHTML(),this.trigger("ajaxInsertHTML:after"),this.pagination.onSuccess(),this.saveState()}saveState(){if(!this.pagination.isSaveState())return;const e={};if("orderby"===this.ajaxMethod){const t=`cmsmasters-orderby-${this.getID()}`,{default_orderby:s}=elementorCmsmastersFrontendConfig.woocommerce,n=this.elements.$orderby.val();e[t]=s!==n&&n}m.saveParameters(e)}responseFail(){this.pagination.onFail()}ajaxInsertHTML(){const e=this.ajaxWidget.getResponseData(),t=jQuery(e),s=t.find(".elementor-invisible"),{selectors:n}=this.getSettings(),{selectors:i}=this.pagination.getSettings();if(1<=s.length){const e=s.data("settings"),t=e.animation||"none";if("none"!==t){const n=e._animation_delay||e.animation_delay||0;setTimeout((()=>{s.removeClass("elementor-invisible").addClass(`animated ${t}`)}),n)}else s.removeClass("elementor-invisible")}if("load-more"===this.ajaxMethod){this.elements.$products.append(t.find(n.products).contents());const e=t.find(i.root);e.find(i.linkLoadMore).length?this.pagination.elements.$root.replaceWith(e):this.pagination.elements.$root.remove(),this.elements.$resultCount.replaceWith(t.find(n.resultCount))}else this.elements.$variable.html(t.contents())}onResize(){this.resetLayout(),this.reLayoutDebounce()}resetLayout(){this.borderColumns.clear(),this.removeMasonry()}reLayoutDebounce(){this.reLayout()}unbindEvents(){elementorFrontend.elements.$window.off("resize",this.onResize)}initHandles(){if(!elementorFrontend.isEditMode())return;const e={};this.templateControls.forEach((t=>{const s=this.getElementSettings(t);if(!s)return!1;e[t]=s})),this.handles=new l.default({widget:this.$element,controls:e,type:"listing"})}}t.default=Products}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.