1 line
8.7 KiB
JavaScript
1 line
8.7 KiB
JavaScript
(self.webpackChunk=self.webpackChunk||[]).push([[19],{9745:(e,t,n)=>{"use strict";var o=n(743),i=n.n(o),r=n(538),a=n(2954),c=n(7409),u=n.n(c),s=n(1373),d=n.n(s),l=(n(9101),n(4837)),f=n.n(l),h=n(9948),m=n.n(h),p=n(4910),g=n.n(p),b=n(3786),v=n.n(b),y=n(4374),w=n.n(y),S=n(107),E=n.n(S),C=n(1888),M=n.n(C),k=n(4051),B=n.n(k);r.default.use(u()),r.default.use(BootstrapSass),r.default.use(a.ZP,{dictionary:{ar:f(),de:m(),fa:g(),fr:v(),nl:w(),tr:E(),hi_IN:M(),zh_CN:B()},events:"input|change|blur"}),r.default.filter("currency",(function(e,t){return i().formatMoney(e,t)})),r.default.component("vue-slider",(function(){return n.e(339).then(n.t.bind(n,9454,23))})),r.default.component("mini-cart-button",(function(){return n.e(339).then(n.bind(n,5572))})),r.default.component("mini-cart",(function(){return n.e(339).then(n.bind(n,8545))})),r.default.component("modal-component",(function(){return n.e(339).then(n.bind(n,4398))})),r.default.component("add-to-cart",(function(){return n.e(339).then(n.bind(n,1815))})),r.default.component("star-ratings",(function(){return n.e(339).then(n.bind(n,9113))})),r.default.component("quantity-btn",(function(){return n.e(339).then(n.bind(n,5461))})),r.default.component("quantity-changer",(function(){return n.e(339).then(n.bind(n,6210))})),r.default.component("proceed-to-checkout",(function(){return n.e(339).then(n.bind(n,792))})),r.default.component("compare-component-with-badge",(function(){return n.e(339).then(n.bind(n,4371))})),r.default.component("searchbar-component",(function(){return n.e(339).then(n.bind(n,4649))})),r.default.component("wishlist-component-with-badge",(function(){return n.e(339).then(n.bind(n,7637))})),r.default.component("mobile-header",(function(){return n.e(339).then(n.bind(n,4105))})),r.default.component("sidebar-header",(function(){return n.e(339).then(n.bind(n,8266))})),r.default.component("right-side-header",(function(){return n.e(339).then(n.bind(n,1892))})),r.default.component("sidebar-component",(function(){return n.e(339).then(n.bind(n,8687))})),r.default.component("product-card",(function(){return n.e(339).then(n.bind(n,5324))})),r.default.component("wishlist-component",(function(){return n.e(339).then(n.bind(n,138))})),r.default.component("carousel-component",(function(){return n.e(339).then(n.bind(n,4545))})),r.default.component("slider-component",(function(){return n.e(339).then(n.bind(n,6505))})),r.default.component("child-sidebar",(function(){return n.e(339).then(n.bind(n,3857))})),r.default.component("card-list-header",(function(){return n.e(339).then(n.bind(n,922))})),r.default.component("logo-component",(function(){return n.e(339).then(n.bind(n,1590))})),r.default.component("magnify-image",(function(){return n.e(339).then(n.bind(n,8254))})),r.default.component("image-search-component",(function(){return n.e(339).then(n.bind(n,5261))})),r.default.component("compare-component",(function(){return n.e(339).then(n.bind(n,506))})),r.default.component("shimmer-component",(function(){return n.e(339).then(n.bind(n,2970))})),r.default.component("responsive-sidebar",(function(){return n.e(339).then(n.bind(n,7399))})),r.default.component("product-quick-view",(function(){return n.e(339).then(n.bind(n,7980))})),r.default.component("product-quick-view-btn",(function(){return n.e(339).then(n.bind(n,6689))})),r.default.component("recently-viewed",(function(){return n.e(339).then(n.bind(n,9413))})),r.default.component("product-collections",(function(){return n.e(339).then(n.bind(n,2455))})),r.default.component("hot-category",(function(){return n.e(339).then(n.bind(n,7141))})),r.default.component("hot-categories",(function(){return n.e(339).then(n.bind(n,4570))})),r.default.component("popular-category",(function(){return n.e(339).then(n.bind(n,647))})),r.default.component("popular-categories",(function(){return n.e(339).then(n.bind(n,7383))})),r.default.component("velocity-overlay-loader",(function(){return n.e(339).then(n.bind(n,1006))})),r.default.component("vnode-injector",{functional:!0,props:["nodes"],render:function(e,t){return t.props.nodes}}),r.default.component("go-top",(function(){return n.e(339).then(n.t.bind(n,2265,23))})),$((function(){r.default.mixin(d()),r.default.mixin({data:function(){return{imageObserver:null,navContainer:!1,headerItemsCount:0,sharedRootCategories:[],responsiveSidebarTemplate:"",responsiveSidebarKey:Math.random(),baseUrl:getBaseUrl()}},methods:{redirect:function(e){e&&(window.location.href=e)},debounceToggleSidebar:function(e,t,n){var o=t.target;this.toggleSidebar(e,o,n)},toggleSidebar:function(e,t,n){var o=t.target;if("main-category"===Array.from(o.classList)[0]||"main-category"===Array.from(o.parentElement.classList)[0]){var i=$("#sidebar-level-".concat(e));i&&i.length>0&&("mouseover"===n?this.show(i):"mouseout"===n&&this.hide(i))}else if("category"===Array.from(o.classList)[0]||"category-icon"===Array.from(o.classList)[0]||"category-title"===Array.from(o.classList)[0]||"category-content"===Array.from(o.classList)[0]||"rango-arrow-right"===Array.from(o.classList)[0]){var r=o.closest("li");if(o.id||r.id.match("category-")){var a=$("#".concat(o.id?o.id:r.id," .sub-categories"));if(a&&a.length>0){var c=Array.from(a)[0];if(c=$(c),"mouseover"===n){this.show(c);var u=c.find(".sidebar");this.show(u)}else"mouseout"===n&&this.hide(c)}else{if("mouseout"===n)$("#".concat(e)).hide()}}}},show:function(e){e.show(),e.mouseleave((function(e){var t=e.target;$(t.closest(".sidebar")).hide()}))},hide:function(e){e.hide()},toggleButtonDisability:function(e){var t=e.event,n=e.actionType,o=t.target.querySelector("button[type=submit]");o&&(o.disabled=n)},onSubmit:function(e){var t=this;this.toggleButtonDisability({event:e,actionType:!0}),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave(),this.$validator.validateAll().then((function(n){n?e.target.submit():(t.toggleButtonDisability({event:e,actionType:!1}),eventBus.$emit("onFormError"))}))},isMobile,loadDynamicScript:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){loadDynamicScript(e,t)})),getDynamicHTML:function(e){var t,n,o=r.default.compile(e),i=o.render,a=o.staticRenderFns;t=this.$options.staticRenderFns.length>0?this.$options.staticRenderFns:this.$options.staticRenderFns=a;try{n=i.call(this,this.$createElement)}catch(e){console.log(this.__("error.something_went_wrong"))}return this.$options.staticRenderFns=t,n},getStorageValue:function(e){var t=window.localStorage.getItem(e);return t&&(t=JSON.parse(t)),t},setStorageValue:function(e,t){return window.localStorage.setItem(e,JSON.stringify(t)),!0}}}),window.app=new r.default({el:"#app",data:function(){return{loading:!1,modalIds:{},miniCartKey:0,quickView:!1,productDetails:[]}},mounted:function(){this.$validator.localize(document.documentElement.lang),this.addServerErrors(),this.loadCategories(),this.addIntersectionObserver()},methods:{onSubmit:function(e){var t=this;this.toggleButtonDisability({event:e,actionType:!0}),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave(),this.$validator.validateAll().then((function(n){n?e.target.submit():(t.toggleButtonDisability({event:e,actionType:!1}),eventBus.$emit("onFormError"))}))},toggleButtonDisable:function(e){for(var t=document.getElementsByTagName("button"),n=0;n<t.length;n++)t[n].disabled=e},addServerErrors:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=function(n){var o=[];n.split(".").forEach((function(e,t){t?o.push("["+e+"]"):o.push(e)}));var i=o.join(""),r=e.$validator.fields.find({name:i,scope:t});r&&e.$validator.errors.add({id:r.id,field:i,msg:serverErrors[n][0],scope:t})};for(var o in serverErrors)n(o)},addFlashMessages:function(){window.flashMessages.alertMessage&&window.alert(window.flashMessages.alertMessage)},showModal:function(e){this.$set(this.modalIds,e,!0)},loadCategories:function(){var e=this;this.$http.get("".concat(this.baseUrl,"/categories")).then((function(t){e.sharedRootCategories=t.data.categories,$("<style type='text/css'> .sub-categories{ min-height:".concat(30*t.data.categories.length,"px;} </style>")).appendTo("head")})).catch((function(e){console.error("Failed to load categories:",e)}))},addIntersectionObserver:function(){this.imageObserver=new IntersectionObserver((function(e,t){e.forEach((function(e){if(e.isIntersecting){var t=e.target;t.src=t.dataset.src}}))}))},showLoader:function(){this.loading=!0},hideLoader:function(){this.loading=!1}}})}))},9101:(e,t,n)=>{if(window._=n(6486),window.axios=n(9669),window.$=window.jQuery=n(9755),window.axios){window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var o=document.head.querySelector('meta[name="csrf-token"]');o?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=o.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token")}}},e=>{e.O(0,[339],(()=>{return t=9745,e(e.s=t);var t}));e.O()}]); |