!function i(r,n,a){function s(t,e){if(!n[t]){if(!r[t]){var o="function"==typeof require&&require;if(!e&&o)return o(t,!0);if(c)return c(t,!0);throw(o=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",o}o=n[t]={exports:{}},r[t][0].call(o.exports,function(e){return s(r[t][1][e]||e)},o,o.exports,i,r,n,a)}return n[t].exports}for(var c="function"==typeof require&&require,e=0;e<a.length;e++)s(a[e]);return s}({1:[function(e,t,o){"use strict";function r(e){return(r="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})(e)}function i(e,t){for(var o,i=0;i<t.length;i++)(o=t[i]).enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(o){var i=u();return function(){var e,t=d(o);return e=i?(e=d(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),t=this,!(e=e)||"object"!==r(e)&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t):e}}function a(e){var i="function"==typeof Map?new Map:void 0;return(a=function(e){function t(){return c(e,arguments,d(this).constructor)}if(null===e||(o=e,-1===Function.toString.call(o).indexOf("[native code]")))return e;var o;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(e))return i.get(e);i.set(e,t)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l(t,e)})(e)}function c(){return(c=u()?Reflect.construct:function(e,t,o){var i=[null];i.push.apply(i,t);i=new(Function.bind.apply(e,i));return o&&l(i,o.prototype),i}).apply(null,arguments)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p,f,h,m="STORE20",v=3,b=function(){function e(){return s(this,e),t.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(e,a(Error));var t=n(e);return e}(),g=function(e){return e.replace(/ /g,"")},y=(p=S,(f=[{key:"reinitializeStore",value:function(){return this.settings.editor.refreshAppMarketData(),this.initializeStore()}},{key:"addCartButton",value:function(){this.settings.customHeaderButtons.add("kv-ee-cart_button",'<div><i class="fa fa-shopping-cart"></i><span class="kv-ee-cartContent pl-1"></span></div>'),window.storeCartButton=!0}},{key:"onSiteChanged",value:function(){this.settings.getPageUri("store/product-detail")?this.addCartButton():(this.settings.customHeaderButtons.remove("kv-ee-cart_button"),window.storeCartButton=!1)}},{key:"initializeStore",value:function(){var o=this;this.didGetStoreInfo=!1;var e=this.settings.resolveAppmarketApp(m);return this.storeInitializingPromise=e.then(function(e){if(!e)throw new Error("Store has not been created");o.app=e,o.instanceJwt=e&&e.instance_jwt,o.instanceId=e&&e.instance_id,o.shopApiUrl=o.getUrlByAppName(e.url,"st-shop-api"),o.storeApiUrl=o.getUrlByAppName(e.url,"st-edit-api"),o.shopUrl=o.getUrlByAppName(e.url,"st-shop");var t=window.self!==window.top;if(o.settings.getPageUri("store/product-detail")&&70<=e.setup_status)o.settings.addScriptFromAppmarketApp(m),o.addCartButton(),o.settings.customHeaderButtons.forEach("kv-ee-cart_button",function(e){o.cartButton=e,o.cartButton.length=1,o.didCartInitialization||o.initializeCart()}),o.data.needToCreateStore=!1,o.data.needToSetup=!1,o.settings.getAllChildFeatures().forEach(function(e){return e.doStoreDataCall(!0)});else{if(!t)throw new b;o.settings.getAllChildFeatures().forEach(function(e){e.doStoreDataCall(!1),e.renderOverlay&&e.renderOverlay()})}}).then(function(){return Promise.all(o.app?[o.fetchStoreSettings()]:[])}).then(function(){o.didGetStoreInfo=!0,o.settings.getAllChildFeatures().forEach(function(e){return e.onDidGetStoreInfo(!0)})}).catch(function(e){o.didGetStoreInfo=!0;var t=e.constructor===b;o.data.needToCreateStore=!t,o.data.needToSetup=!0,o.settings.getAllChildFeatures().forEach(function(e){return e&&e.onInitError&&e.onInitError(t)}),t||console.warn("CATCHERR",e)}),this.storeInitializingPromise}},{key:"initializeCart",value:function(){var e;this.cartButton&&!this.didCartInitialization&&(this.didCartInitialization=!0,window.AMStore=window.AMStore||{q:[],init:function(){window.AMStore.q.push(["init",arguments])},reInit:function(){window.AMStore.q.push(["reInit",arguments])},addToCart:function(){window.AMStore.q.push(["addToCart",arguments])},openShoppingCart:function(){window.AMStore.q.push(["openShoppingCart",arguments])},closeShoppingCart:function(){window.AMStore.q.push(["closeShoppingCart",arguments])}},window.AMStore)&&(window.AMStore.init({testMode:this.isTestMode,isPublished:!1,instanceJwt:this.instanceJwt,domain:this.shopUrl,openCartAutomatically:!0,language:window._site&&window._site.language,style:this.colors,elements:{amountLabel:this.cartButton.querySelectorAll(".kv-ee-cartContent"),cart:""}}),(e=[this.cartButton,document.querySelector("header .kv-ee-button-cart")].filter(Boolean)).length&&e.forEach(function(e){e.addEventListener("click",function(){window.AMStore.openShoppingCart()})}))}},{key:"dispose",value:function(){this.settings.customHeaderButtons.remove("kv-ee-cart_button")}},{key:"afterRenderCustomHeaderButton",value:function(){}},{key:"getUrlByAppName",value:function(e,t){e=e.match(/^https?:\/\/[^/]+/i);return 0<e.length?e[0].replace("st-shop",t):null}},{key:"fetchStoreSettings",value:function(){var t=this;return this.fetch("".concat(this.shopApiUrl,"/v1.0/settings?instanceId=").concat(encodeURIComponent(this.instanceId))).then(function(e){return e.json()}).then(function(e){t.data.currencySymbol=e.supportedCurrencies&&e.supportedCurrencies.items[0].symbol,t.data.currencyCode=e.supportedCurrencies&&e.supportedCurrencies.items[0].code,t.builderApi.editor&&!t.config.isThumbnail&&t.builderApi.editor.storeModelProperty("currencySymbol",t.data.currencySymbol,!1,!0)})}},{key:"formatPrice",value:function(e){var t=e.basePrice&&e.basePrice.toFixed(2),o=e.price&&e.price.toFixed(2),e=e.discountPercentage;return{productPrice:t,discountedPrice:o,discountPercentage:e=e&&!Number.isInteger(e)?e.toFixed(2):e}}},{key:"createOrSetupStoreCTA",value:function(e,t){var o=this;this.productListLoader=e.querySelector(".kv-ee-productListLoader"),this.productListRow=e.querySelector(".kv-ee-storeProductRow");var i,r=e.querySelector(".kv-ee-ui-sortable");r&&this.settings.editor&&!this.isForPreview&&(r.innerHTML+='<div class="kv-edit-selector kv-ee-d-none" data-control-type="remote-list"><div class="kv-edit-selector-buttons"><i class="material-icons kv-editor-button" data-icon-type="settings">settings</i></div></div>',i=e.querySelector(".kv-edit-selector"),r.classList.add("kv-ee-createStoreArea"),r.addEventListener("mouseover",function(){r.classList.add("kv-hover"),i.classList.remove("kv-ee-d-none")}),r.addEventListener("mouseout",function(){r.classList.remove("kv-hover"),i.classList.add("kv-ee-d-none")}),(e=e.querySelectorAll(".kv-control"))&&e.forEach(function(e){e.classList.add("kv-ee-d-none")}),(e=r.querySelectorAll(".kv-ee-content-image"))&&e.forEach(function(e){var t=e.getAttribute("data-src-retina");t&&(e.setAttribute("style",'background-image:url("'.concat(t,'")')),e.className="kv-ee-content-image")}),i&&i.addEventListener("click",function(){o.createStore(t)}))}},{key:"createStore",value:function(){var o=this,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){o.reinitializeStore()};this.productListLoader&&this.productListLoader.classList.remove("kv-ee-d-none"),this.productListRow&&this.productListRow.classList.add("kv-ee-d-none");function e(){o.settings.editor.showDashboard(m,{onClose:function(){var e=o.data,t=e.needToCreateStore,e=e.needToSetup;i({needToCreateStore:t,needToSetup:e})},onSetupReady:function(){o.data.needToCreateStore=!1,o.data.needToSetup=!1},route:"",queryParams:{ee:1},fullscreen:!0})}this.data.needToCreateStore?this.settings.editor.ensureSavedSite(function(){o.settings.editor.createStore(e)}):e()}},{key:"getDemoData",value:function(){return[{id:"0000",name:this.builderApi.localize("editorTemplates.features.store.demoProductTitle"),title:this.builderApi.localize("editorTemplates.features.store.demoProductTitle"),description:this.builderApi.localize("editorTemplates.features.store.demoProductDescription"),shortDescription:this.builderApi.localize("editorTemplates.features.store.demoProductDescription"),sku:null,stock:null,discountPercentage:10,banner:this.builderApi.localize("editorTemplates.features.store.productBanner1"),image:{value:"https://images.unsplash.com/photo-1494261951946-b0c26b70410c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=7148f93943d52d36939fd621c24b2d44&auto=format&fit=crop&w=500&q=60"},discountedPrice:63,productPrice:58.33,basePrice:63,price:58.33,deepLink:{title:this.builderApi.localize("editorTemplates.layouts.store.addToCart"),href:this.settings.getPageUri("store/product-detail")+"/"},isTaxable:!0,isPickup:!1,productType:1,images:[{source:"https://images.unsplash.com/photo-1494261951946-b0c26b70410c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=7148f93943d52d36939fd621c24b2d44&auto=format&fit=crop&w=500&q=60",sizes:null,isStock:!0}],productCategoryIds:null,options:this.getDemoOptionData(),taxExPrice:46.5,taxExFromPrice:50,originalPrice:46.5,originalFromPrice:50},{id:"1111",name:this.builderApi.localize("editorTemplates.features.store.demoProductTitle"),title:this.builderApi.localize("editorTemplates.features.store.demoProductTitle"),description:this.builderApi.localize("editorTemplates.features.store.demoProductDescription"),shortDescription:this.builderApi.localize("editorTemplates.features.store.demoProductDescription"),sku:null,stock:null,discountPercentage:0,banner:null,image:{value:"https://images.unsplash.com/photo-1494498902093-87f291949d17?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=cc45a906096bd3d1a8ff018e75d4f43a&auto=format&fit=crop&w=500&q=60"},images:[{source:"https://images.unsplash.com/photo-1494498902093-87f291949d17?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=cc45a906096bd3d1a8ff018e75d4f43a&auto=format&fit=crop&w=500&q=60",sizes:null,isStock:!0}],deepLink:{title:this.builderApi.localize("editorTemplates.layouts.store.addToCart"),href:this.settings.getPageUri("store/product-detail")+"/"},options:null,discountedPrice:70,productPrice:58.33},{id:"0000",name:this.builderApi.localize("editorTemplates.features.store.demoProductTitle"),title:this.builderApi.localize("editorTemplates.features.store.demoProductTitle"),description:this.builderApi.localize("editorTemplates.features.store.demoProductDescription"),shortDescription:this.builderApi.localize("editorTemplates.features.store.demoProductDescription"),sku:null,stock:null,discountPercentage:null,banner:null,image:{value:"https://images.unsplash.com/photo-1494261951946-b0c26b70410c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=7148f93943d52d36939fd621c24b2d44&auto=format&fit=crop&w=500&q=60"},images:[{source:"https://images.unsplash.com/photo-1494261951946-b0c26b70410c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=7148f93943d52d36939fd621c24b2d44&auto=format&fit=crop&w=500&q=60",sizes:null,isStock:!0}],deepLink:{title:this.builderApi.localize("editorTemplates.layouts.store.addToCart"),href:this.settings.getPageUri("store/product-detail")+"/"},options:null,discountedPrice:100,productPrice:100}]}},{key:"getDemoOptionData",value:function(){return[{optionId:"2985",name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName1"),variantType:1,choices:[{choiceId:"12058",inStock:!0,name:"#0000ff",color:"#0000ff",productId:"pv_146412_12058",selected:!1},{choiceId:"12059",inStock:!0,name:"#000",color:"#000",productId:"pv_146412_12059",selected:!1},{choiceId:"12060",inStock:!0,name:"#556b2f",color:"#556b2f",productId:"pv_146412_12060",selected:!1},{choiceId:"12061",inStock:!1,name:"#ffffff",color:"#ffffff",productId:"pv_146412_12061",selected:!1}]},{optionId:"2986",name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName3"),variantType:2,choices:[{choiceId:"12062",inStock:!0,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName3Choice1"),color:"",productId:"pv_146412_12062",selected:!1,hover:null},{choiceId:"12063",inStock:!0,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName3Choice2"),color:"",productId:"pv_146412_12063",selected:!1,hover:null},{choiceId:"12064",inStock:!0,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName3Choice3"),color:"",productId:"pv_146412_12064",selected:!1,hover:null},{choiceId:"12065",inStock:!1,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName3Choice4"),color:"",productId:"pv_146412_12065",selected:!1,hover:null}]},{optionId:"2987",name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName2"),variantType:3,choices:[{choiceId:"12066",inStock:!0,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName2Choice1"),color:"",productId:"pv_146412_12066",selected:!1,hover:null},{choiceId:"12067",inStock:!0,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName2Choice2"),color:"",productId:"pv_146412_12067",selected:!1,hover:null},{choiceId:"12068",inStock:!0,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName2Choice3"),color:"",productId:"pv_146412_12068",selected:!1,hover:null},{choiceId:"12069",inStock:!0,name:this.builderApi.localize("editorTemplates.features.productDemoData.variantName2Choice4"),color:"",productId:"pv_146412_12069",selected:!1,hover:null}]}]}}])&&i(p.prototype,f),h&&i(p,h),S);function S(e,t){var o=this;s(this,S),this.settings=this.builderApi=e,this.fetch=e.fetch,this.isTestMode=window.self!==window.top||!!this.settings.editor,this.isForPreview=e.isForPreview,this.isRuntimeSite=t.isRuntimeSite,this.config=t,this.localPickupFulfillmentType=v;var i,r,n,a=e.getGlobalColorsWithContrast&&e.getGlobalColorsWithContrast();a?this.colors={buttonColor:g(a.buttonBackground),buttonTextColor:g(a.buttonText),backgroundColor:g(a.background),textColor:g(a.text),title:g(a.title)}:(r=(i=e.getGlobalColors()||{}).text,n=i.background,a=(i=(a=i.accent)&&a[0])&&"rgb(".concat(a[0].join(","),")"),i=i&&e.getTextColorForBackground&&e.getTextColorForBackground(i),r=r&&"rgb(".concat(r.join(","),")"),n=n&&"rgb(".concat(n.join(","),")"),this.colors={buttonColor:a,buttonTextColor:i,backgroundColor:n,textColor:r,title:r}),this.data={needToCreateStore:!0,needToSetup:!0},t.isThumbnail?this.data.needToCreateStore=!1:setTimeout(function(){return o.initializeStore()},1),window.storeCartButton&&this.addCartButton()}window.__features=window.__features||{},window.__features["store-core"]=y},{}]},{},[1]);;!function n(o,r,a){function s(t,e){if(!r[t]){if(!o[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(l)return l(t,!0);throw(i=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",i}i=r[t]={exports:{}},o[t][0].call(i.exports,function(e){return s(o[t][1][e]||e)},i,i.exports,n,o,r,a)}return r[t].exports}for(var l="function"==typeof require&&require,e=0;e<a.length;e++)s(a[e]);return s}({1:[function(e,t,i){"use strict";function o(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(i="Object"===i&&e.constructor?e.constructor.name:i)||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function r(e,t){for(var i,n=0;n<t.length;n++)(i=t[n]).enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s,l,u,d=(s=c,(l=[{key:"registerWindowEvent",value:function(){}},{key:"unregisterWindowEvent",value:function(){var e;"undefined"==typeof window||!window._zoomUpdateEvents||0<=(e=window._zoomUpdateEvents.indexOf(this.triggerWindowEvent))&&window._zoomUpdateEvents.splice(e,1)}},{key:"dispose",value:function(){this.recheckMode=null,this.unregisterWindowEvent()}},{key:"afterRender",value:function(e,t){var i,n,o=this;!t.parentElement||((n=(i=t.parentElement.parentElement).querySelectorAll("li"))||n.length)&&(this.builderApi.isInOnboarding()?i.classList.add("kv-ee-no-animation"):i.classList.remove("kv-ee-no-animation"),this.settings.isCarouselSection?setTimeout(function(){o.checkMobileMode(i),o.setHeaderHeight(e,t)},300):!this.builderApi.isInOnboarding()||t.offsetHeight?(this.checkMobileMode(i),this.setHeaderHeight(e,t),window.addEventListener("resize",function(){o.__resizeTimeout&&window.clearTimeout(o.__resizeTimeout),o.__resizeTimeout=window.setTimeout(function(){o.checkMobileMode(i),o.setHeaderHeight(e,t)},o.resizeWaitTimeout)}),this.recheckMode=this.builderApi.debounce(function(){o.checkMobileMode(i),o.setHeaderHeight(e,t)},300)):setTimeout(function(){o.checkMobileMode(i),o.setHeaderHeight(e,t)},2e3))}},{key:"setSectionPadding",value:function(e,t){e.nextElementSibling.querySelector(".kv-background").style.top=-t+"px"}},{key:"setHeaderHeightInternal",value:function(e,t){var i="navigation"===this.builderApi.controller.parentController.model.category&&this.isRuntimeSite;if(0<e.offsetHeight||i){i=this.builderApi.controller.parentController.model.layout.section.id;if("dubemo66"===i)return n=e.querySelector("header"),void(t.style.height=n.offsetHeight+"px");var n=(n=e.querySelector(".kv-ee-navigation")||e.querySelector("header")).offsetHeight,e=this.isPreviewOrPublishedWebsite&&"navigation-1"===i&&!this.settings.model._toggle["global.logo"]?Math.ceil(n+e.offsetHeight):Math.max(n,e.offsetHeight);t.style.height=e+"px",document.documentElement.style.setProperty("--navigation-height",e+"px")}}},{key:"setHeaderHeight",value:function(e,r){var a=this,e=e.model.isFloatingSection||!1===e.model.cover&&!0===e.model.fixedNavigation;r.parentElement&&e&&!this.settings.isCarouselSection&&function(){for(var e=r.parentElement.parentElement,t=r.querySelectorAll("img"),i=0;i<t.length;i++){var n=t[i].src,o=new window.Image;o.onload=function(){setTimeout(function(){a.setHeaderHeightInternal(r,e)})},o.src=n}a.setHeaderHeightInternal(r,e),setTimeout(function(){r.classList.contains("kv-scrolled")||a.setHeaderHeightInternal(r,e)},1e3)}()}},{key:"getNavigationWidth",value:function(e){var t=0;return e.forEach(function(e){t+=e.offsetWidth}),t+40}},{key:"determineContainerWidth",value:function(e,t){var i=e.querySelector("nav")||e,n=e.querySelector('[data-dynamic-navigation-element="logo"]'),o=e.querySelector('[data-dynamic-navigation-element="calltoactionbutton"]'),o=o?o.offsetWidth:0,n=n?n.offsetWidth:0,i=i.offsetWidth-o;return{containerSize:i,logoWidth:n,ctaWidth:o,headerWith:e.offsetWidth,navigationToWide:t+n+o>=e.offsetWidth-20,headerToWide:i+n>=e.offsetWidth}}},{key:"shouldMinimizeMenu",value:function(e){if(((null==e?void 0:e.clientWidth)||window.innerWidth)<this.mobileBreakpoint)return!0;var t=e.querySelectorAll(".kv-ee-menu-item-wrapper > li");this.currentElementWidth=this.getNavigationWidth(t);var i=this.determineContainerWidth(e,this.currentElementWidth),t=i.containerSize,e=i.headerToWide,i=i.navigationToWide;return t<100&&!this.builderApi.controller.getSiteController().hasSectionBasedNavigation()||e||i}},{key:"checkMobileMode",value:function(e){var t=(t=e.querySelector(".kv-ee-check-mobile"))||e;window.innerWidth<this.mobileBreakpoint?t.classList.contains("kv-ee-mobile")||t.classList.add("kv-ee-mobile"):(t.classList.remove("kv-ee-mobile"),e=this.shouldMinimizeMenu(e),t=t.classList,e&&t.add("kv-ee-mobile"),e||t.remove("kv-ee-mobile"))}},{key:"updateProperty",value:function(e,t,i){var n;"layout.section.id"!==t||(t=o((n=document.querySelector(".kv-page-content")).classList).find(function(e){return e.includes("with-navigation")}))&&(n.classList.remove(t),n.classList.add("kv-ee-with-"+i))}}])&&r(s.prototype,l),u&&r(s,u),c);function c(e,t){var i=this;(function(e){if(!(e instanceof c))throw new TypeError("Cannot call a class as a function")})(this),a(this,"getRenderModel",function(){return{}}),a(this,"triggerWindowEvent",function(){i.recheckMode&&i.recheckMode()}),this.isRuntimeSite=t.isRuntimeSite,this.builderApi=e,this.currentElementWidth=0,this.checkTimeout=0,this.settings=t;e=!this.editor&&window.self!==window.top;this.isPreviewOrPublishedWebsite=t.isRuntimeSite,this.mobileBreakpoint=991,this.resizeWaitTimeout=e?0:300,"undefined"!=typeof window&&(window._zoomUpdateEvents=window._zoomUpdateEvents||[],window._zoomUpdateEvents.push(this.triggerWindowEvent))}window.__features=window.__features||{},window.__features.navigation=d},{}]},{},[1]);;!function n(a,u,i){function o(t,e){if(!u[t]){if(!a[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(f)return f(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=u[t]={exports:{}},a[t][0].call(r.exports,function(e){return o(a[t][1][e]||e)},r,r.exports,n,a,u,i)}return u[t].exports}for(var f="function"==typeof require&&require,e=0;e<i.length;e++)o(i[e]);return o}({1:[function(e,t,r){"use strict";function n(e,t){for(var r,n=0;n<t.length;n++)(r=t[n]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}var a,u,i,o=(a=f,(u=[{key:"handler",value:function(e,t){var r,n=this;e&&t&&((r=window.MutationObserver||window.WebKitMutationObserver)?new r(function(e){e=e&&e[0];e&&"attributes"===e.type&&n.currentValue!==e.target.dataset.value&&(n.currentValue=e.target.dataset.value,t(e.target.dataset.value))}).observe(e,{attributes:!0}):e.addEventListener("DOMSubtreeModified",function(e){n.currentValue!==e.target.dataset.value&&(n.currentValue=e.target.dataset.value,t(e.target.dataset.value))},!1))}}])&&n(a.prototype,u),i&&n(a,i),f);function f(){(function(e){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function")})(this),this.currentValue=""}window.__features=window.__features||{},window.__features["select-box-handler"]=o},{}]},{},[1]);;!function o(a,i,n){function s(e,t){if(!i[e]){if(!a[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(u)return u(e,!0);throw(r=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",r}r=i[e]={exports:{}},a[e][0].call(r.exports,function(t){return s(a[e][1][t]||t)},r,r.exports,o,a,i,n)}return i[e].exports}for(var u="function"==typeof require&&require,t=0;t<n.length;t++)s(n[t]);return s}({1:[function(t,e,r){"use strict";function i(e,t){var r,o=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)),o}function c(o){for(var a,t=1;t<arguments.length;t++)a=null==arguments[t]?{}:arguments[t],t%2?i(Object(a),!0).forEach(function(t){var e,r;e=o,t=a[r=t],r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(a,t))});return o}function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=Array(e);r<e;r++)o[r]=t[r];return o}function a(t,e){for(var r,o=0;o<e.length;o++)(r=e[o]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}var s,u,d,l="STORE20",h=[0,5,10,15,20],f=(s=g,(u=[{key:"getLoadPromise",value:function(){return this.storeCore.appMarketPromise}},{key:"setDefaultValues",value:function(){var e=this,r=this.config.model,o=this.data.isSimpleLayout,a=o?this.simpleDefaultData:this.defaultData;Object.keys(a).forEach(function(t){e.data[t]=(void 0===r[t]||o?a:r)[t]})}},{key:"onDidGetStoreInfo",value:function(t){var e=this;this.productPromise&&this.productPromise.then(function(){e.data.showSectionLoader&&(e.data.showSectionLoader=!1),e.data.showResultLoader&&(e.data.showResultLoader=!1),e.view.render()}).catch(function(){e.onInitError(t)}).finally(function(){window.dispatchEvent(new Event("resize"))})}},{key:"doStoreDataCall",value:function(t){t?(t=void 0===(t=this.config.model.category)?this.data.category:t,this.productPromise=this.fetchProducts({categoryId:t})):this.productPromise=Promise.resolve()}},{key:"onInitError",value:function(){this.builderApi.editor&&(this.data.showSectionLoader=!1),this.view.render("onInitError")}},{key:"initializeForSection",value:function(t){t.placeholderData={}}},{key:"intializeTitle",value:function(t){this.data.title=t}},{key:"updateProperty",value:function(t,e,r){if(e.match(/numberOfProductsRows|showSortFilter|showCategoryFilter|showBuyNow|category/g)&&(this.data[e]=r),"cartButtonText"===e)return this.data.list.forEach(function(t){t.deepLink&&(t.deepLink.title=r)}),!1;if("category"===e)return this.resetPagination(),this.fetchProducts({categoryId:r}).then(function(){return t.render()}),!0;if("numberOfProductsRows"===e)return this.resetPagination(),this.fetchProducts({categoryId:this.data.category}).then(function(){return t.render()}),!0;if("layout.columns"===e)return this.data.numberOfCols=r,this.resetPagination(),this.fetchProducts({categoryId:this.data.category}).then(function(){return t.render()}),!0;if("layout.section.id"!==e||this.storeCore.data.needToSetup)return!1;e=t.controller.getSectionController().model;this.data.numberOfCols=e&&e.layout.columns;e=t.model.numberOfProductsRows;return this.data.numberOfProductsRows=1===this.data.numberOfCols&&-1===h.indexOf(e)||1<this.data.numberOfCols&&10<e?0:e,this.resetPagination(),this.fetchProducts({categoryId:this.data.category}).then(function(){return t.render()}),!0}},{key:"resetPagination",value:function(){this.data.currentPage=1,this.data.startProductIndex=1}},{key:"getDefaultValue",value:function(){return{currentPage:1,showResultLoader:!1}}},{key:"getRenderModel",value:function(t){this.data.topCategory!==this.data.category&&this.data.categoryList&&(this.data.topCategory=parseInt(this.data.category,10)||null,this.data.categoryTree=this.generateCategoryTree(this.data.categoryList,this.data.topCategory));var e=t.filterCategory||this.data.category;this.data.currentCategory=this.flattenCategoryTree(this.data.categoryTree,e);var r=this.data,e=r.currentCategory,r=r.topCategory;this.data.categoryHasParent=e&&0<e.length&&!!e[0].parentId&&e[0].id!==r||!!t.filterCategory&&parseInt(t.filterCategory,10)!==r,this.data.userSelectedCategoryHasParent=this.data.userSelectedCategory&&this.data.categoryHasParent,e&&0<e.length&&(this.data.lastCategoryName=e[e.length-1].name,this.data.parentCategory=null),e&&1<e.length&&(this.data.parentCategory=e[e.length-2]),1===t.sortByPrice?this.data.list.sort(function(t,e){return t.productPrice-e.productPrice}):2===t.sortByPrice&&this.data.list.sort(function(t,e){return e.productPrice-t.productPrice});for(var e=[{title:this.builderApi.localize("editorTemplates.features.store.categoryNone"),value:"0"},{title:this.builderApi.localize("editorTemplates.features.store.categoryPriceLowToHigh"),value:"1"},{title:this.builderApi.localize("editorTemplates.features.store.categoryPriceHighToLow"),value:"2"}],o=[],a=0;10==a;a++)o.push({title:a,value:a});return c(c(c(c(c({},this.getDefaultValue()),this.data),this.storeCore.data),t.placeholderData),{},{cartQuantityOptions:o,sortingOptions:e})}},{key:"afterRender",value:function(o,e,r){var t,a,i=this;this.shouldShowOverlay&&((n=document.createElement("div")).classList.add("kv-ee-demo-product-overlay-container"),t=this.builderApi.localize("editorTemplates.features.store.demoProductTitle"),a=this.builderApi.localize("editorTemplates.features.store.demoProductDescription"),n.innerHTML='<div class="kv-ee-demo-product-overlay"><div>'+t+"</div><div>"+a+"</div></div>",e.appendChild(n)),this.hasNoProductPage&&e.classList.add("kv-ee-no-product-page");e.querySelectorAll(".kv-ee-select-box").forEach(function(t){var e,r;e=t,r=o.sortByPrice,e&&r&&(e.dataset.value=r),i.selectBox.handler(t,function(t){var e;t&&("0"===t?e="":"1"===t?e="orderby=price":"2"===t&&(e="orderbydesc=price"),o.filterCategory="",o.sortByPrice=parseInt(t),i.resetPagination(),i.fetchProducts({sort:e}).then(function(){return o.render()}))})}),e.querySelectorAll(".kv-ee-categoryFilter").forEach(function(t){t.addEventListener("click",function(t){t.preventDefault(),i.data.userSelectedCategory=!0,o.filterCategory=t.target.attributes.getNamedItem("datavalue").value,i.fetchProducts({categoryId:o.filterCategory}).then(function(){return o.render()})})});var n=e.querySelector("#categoryDropDownContent");(function(t,e){if(e)for(var r=t.options,o=0;o<r.length;o++)if(parseInt(r[o].value)===e){t.selectedIndex=o;break}})(n,o.filterCategory),n&&n.addEventListener("change",function(t){t.preventDefault(),o.filterCategory=t&&t.target&&parseInt(t.target.value),i.fetchProducts({categoryId:o.filterCategory,contentControl:o}).then(function(){return o.render()})});var s=this.data.numberOfProducts,n=e.querySelector("#paginationButtonLeft");n&&n.addEventListener("click",function(t){t.preventDefault();t=parseInt(r.currentPage)||1;i.data.currentPage=t-1;t=(i.data.currentPage-1)*parseInt(s);e.scrollIntoView(),i.fetchProducts({numberOfProducts:s,categoryId:o.filterCategory||"",offset:t,contentControl:o}).then(function(){return o.render()})});n=e.querySelector("#paginationButtonRight");n&&n.addEventListener("click",function(t){t.preventDefault();t=parseInt(r.currentPage)||1;i.data.currentPage=t+1;t*=parseInt(s);e.scrollIntoView(),i.fetchProducts({numberOfProducts:s,categoryId:o.filterCategory||"",offset:t,contentControl:o}).then(function(){return o.render()})}),window.NodeList.prototype.text=function(e){this.forEach(function(t){t.textContent=e})},this.storeCore.initializeCart(),this.config.isRuntimeSite&&e.querySelectorAll(".kv-ee-addToCartBtn").forEach(function(t){var e=t.getAttribute("pid");t.addEventListener("click",function(t){t.preventDefault(),window.AMStore.addToCart(e,1)})});n=e.querySelectorAll(".kv-list-item-controls");n&&n.forEach(function(t){t.innerHTML='<li class="kv-edit kv-editor-button"><i class="material-icons">edit</i></li>'});n=e.querySelectorAll('*[data-type="item"]');n&&n.forEach(function(t){var e=t.querySelector(".kv-remove"),r=t.attributes.getNamedItem("pid").value.replace("p_","");e&&e.addEventListener("click",function(t){t.preventDefault(),i.deleteProductCall(r).then(function(t){t.success&&i.fetchProducts({numberOfProducts:s}).then(function(){i.settings.editor.getAllControlsForFeature(i).forEach(function(t){t.render()})})})});t=t.querySelector(".kv-edit");t&&t.addEventListener("click",function(t){t.preventDefault();t=70<=(null===(t=i.storeCore.app)||void 0===t?void 0:t.setup_status)?"product/detail/"+r:"";i.settings.editor.showDashboard(l,{route:t,queryParams:{ee:1},fullscreen:!0})})});n=e.querySelector(".kv-add-item-btn");n&&n.addEventListener("click",function(t){if(t.preventDefault(),i.builderApi.checkLimitation){var e=i.builderApi.checkLimitation("store_products");if(e&&e<=i.data.list.length)return void i.builderApi.openUpgradeDialog("store")}e=null!==(e=i.storeCore.data)&&void 0!==e&&e.needToSetup?"":"product/detail/";i.settings.editor.showDashboard(l,{onClose:function(){i.resetPagination()},route:e,queryParams:{ee:1},fullscreen:!0})}),(this.storeCore.data.needToCreateStore||this.storeCore.data.needToSetup)&&this.storeCore.createOrSetupStoreCTA(e,function(){i.storeCore.reinitializeStore()})}},{key:"renderOverlay",value:function(){this.shouldShowOverlay=!0}},{key:"fetchProducts",value:function(t){var n=this,a=t.categoryId,e=t.offset,s=void 0===e?0:e,u=t.sort;t.contentControl;return new Promise(function(r,o){function t(){var t,e=n.view.domElement;e&&(t=e.getBoundingClientRect(),e=window.innerHeight,t.top<e&&(n.finished=!0,n.scrollEvent&&window.removeEventListener("scroll",n.scrollEvent),function(){if(n.storeCore.shopApiUrl){var t=n.data,e=t.numberOfCols,r=t.numberOfProductsRows,o=t.category,t=["instanceId=".concat(encodeURIComponent(n.storeCore.instanceId))];0===s&&n.resetPagination();var i=n.view.model.cartButtonText;n.builderApi.localize("editorTemplates.layouts.store.addToCart"),n.data.numberOfProducts=r*e,t.push("limit=".concat(n.data.numberOfProducts)),t.push("excludeVariantDetails=true"),a?t.push("categoryId=".concat(a)):o&&t.push("categoryId=".concat(o)),0<s&&t.push("offset=".concat(s)),u&&t.push(u);t="".concat(n.storeCore.shopApiUrl,"/v1.0/product/all?").concat(t.join("&"));return n.fetch(t).then(function(t){return t.json()}).then(function(t){var e=t&&t.totalProductCount,a=n.settings.getPageUri("store/product-detail");a||(n.hasNoProductPage=!0);var r=t&&t.products&&t.products.map(function(t){var e=t.productCategoryIds,r=t.images&&t.images[0]&&t.images[0].source||"https://storage.googleapis.com/store-assets-bucket/Asset%203.png",o=a?{title:i||n.builderApi.localize("editorTemplates.layouts.store.addToCart"),href:n.settings.getPageUri("store/product-detail")+"/"+t.id}:{href:"#"};return c(c({id:t.id,title:t.name,categoryid:e,options:t.options},n.storeCore.formatPrice(t)),{},{banner:t.banner,image:{value:r},deepLink:o,isPickup:t.fulfillmentType===n.storeCore.localPickupFulfillmentType&&1===t.productType,isVariantAvailable:t.isVariantAvailable})});n.data.totalProductCount=e,n.data.list=r,n.data.categoryList=t&&t.categories,n.processDataListPagination(s),n.data.showResultLoader=!1,n.data.haveMultipleResult=1<n.data.totalProductCount,n.data.haveNoResult=0===n.data.totalProductCount}).catch(function(t){console.warn("store error: ",t)})}}().then(function(t){return r(t)}).catch(function(){o()})))}n.scrollEvent=t.bind(n),window.addEventListener("scroll",n.scrollEvent),t()})}},{key:"processDataListPagination",value:function(t){this.data.numberOfProducts||(this.data.numberOfProducts=this.defaultData.numberOfProducts);var e=this.data.list.length,r=e<this.data.numberOfProducts?e:e+t,o=Math.ceil(this.data.totalProductCount/this.data.numberOfProducts);this.data.productsPerPage=r,this.data.totalNumOfPages=o,this.data.startProductIndex=t+1,this.data.endProductIndex=e+t,this.data.showPrevPage=1!==this.data.startProductIndex,this.data.showNextPage=(o-1)*this.data.numberOfProducts>=t+this.data.numberOfProducts,this.data.showProductRangeIndex=this.data.startProductIndex!==this.data.endProductIndex,this.data.showProductPagination=0!==this.data.numberOfProductsRows&&1!==this.data.totalNumOfPages}},{key:"fetchStoreCategories",value:function(){var t=this;return this.storeCore.storeInitializingPromise?this.storeCore.storeInitializingPromise.then(function(){return t.fetch("".concat(t.storeCore.shopApiUrl,"/v1.0/product/category/dropdown-hierarchy?showAll=true&instanceId=").concat(encodeURIComponent(t.storeCore.instanceId))).then(function(t){return t.json()})}):Promise.resolve([])}},{key:"deleteProductCall",value:function(t){return this.fetch("".concat(this.storeCore.storeApiUrl,"/v1.0/product/").concat(t),{method:"DELETE",headers:{Authorization:"Bearer ".concat(this.storeCore.storeToken)}}).then(function(t){return t.json()})}},{key:"onLoadCategoryOptions",value:function(){var e=this;if(this.storeCore.shopApiUrl&&!this.storeCore.data.needToCreateStore&&!this.storeCore.data.needToSetup)return this.fetchStoreCategories().then(function(t){return[{label:e.builderApi.localize("editorTemplates.features.store.allProducts"),value:""}].concat(n(t))})}},{key:"findTopCategory",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.data.categoryList;if(!t)return e;var r=parseInt(t,10),o=0;if(e&&0<e.length)for(o=0;o<e.length;o++){var a=e[o];if(a.id===r)return a;a=this.findTopCategory(r,a.subCategories);if(a)return a}}},{key:"generateCategoryTree",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.data.categoryList,e=1<arguments.length?arguments[1]:void 0,r=[],o=0,a=t;if((a=e?[this.findTopCategory(e,t)]:a)&&0<a.length)for(o=0;o<a.length;o++){var i=a[o];r.push(i)}return r}},{key:"flattenCategoryTree",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.data.categoryTree,e=1<arguments.length?arguments[1]:void 0,r=2<arguments.length?arguments[2]:void 0;if(e){var o=parseInt(e,10),a=0;if(t&&0<t.length)for(a=0;a<t.length;a++){var i=r||[],n=t[a];if(n){if(n.id===o)return i.push(n),i;i=this.flattenCategoryTree(n.subCategories,o,i);if(i)return i}}}}},{key:"afterCloseDashboard",value:function(){var t,e,r=this;this.storeCore.data.needToCreateStore||(t=(e=this.config.model).numberOfProducts,e=e.category,this.fetchProducts({numberOfProducts:t,categoryId:e,offset:this.data.startProductIndex-1}).then(function(){r.settings.editor.getAllControlsForFeature(r).forEach(function(t){t.render()})}),this.settings.editor.refreshProperties())}},{key:"manageStoreSettingsClick",value:function(){this.storeCore.data.needToCreateStore||this.storeCore.data.needToSetup?this.storeCore.createStore():this.settings.editor.showDashboard(l,{route:"/",queryParams:{ee:1},fullscreen:!0})}},{key:"onCreateSection",value:function(){return Promise.resolve()}}])&&a(s.prototype,u),d&&a(s,d),g);function g(t,e,r){(function(t){if(!(t instanceof g))throw new TypeError("Cannot call a class as a function")})(this),this.builderApi=t,this.settings=t,this.config=e,this.storeCore=r["store-core"],this.selectBox=r["select-box-handler"],this.fetch=t.fetch,this.view=e.view,this.view.model.cartButtonText=this.view.model.cartButtonText||this.builderApi.localize("editorTemplates.layouts.store.addToCart"),this.defaultData={showSortFilter:!1,showCategoryFilter:!0,showBuyNow:!0,currencySymbol:"$",currencyCode:"USD",numberOfProductsRows:5,numberOfProducts:3,topCategory:null},this.simpleDefaultData={showSortFilter:!1,showCategoryFilter:!1,numberOfProductsRows:this.defaultData.numberOfProductsRows},t.editor&&!e.isThumbnail&&t.editor.storeModelProperty("showSectionLoader",!0,!1);var o=this.settings.controller.getSectionController().model,a=o&&o.layout.columns,r=o&&o.binding&&o.binding.category,o=o&&"simplestore"===o.category;this.data={category:r,showSectionLoader:!e.isThumbnail,list:n(this.storeCore.getDemoData()),totalProductCount:3,editMode:!!t.editor,singularItemsTranslation:this.builderApi.localize("editorTemplates.features.store.item"),pluralItemsTranslation:this.builderApi.localize("editorTemplates.features.store.items"),numberOfCols:a,startProductIndex:1,initialModelRender:!0,userSelectedCategory:!1,userSelectedCategoryHasParent:!1,categoryHasParent:!1,isSimpleLayout:o},this.setDefaultValues(),this.processDataListPagination(0,this.defaultData.numberOfProducts),this.storeCore&&this.storeCore.didGetStoreInfo&&this.storeCore.initializeStore()}window.__features=window.__features||{},window.__features.store=f},{}]},{},[1]);;!function r(i,a,o){function l(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=a[t]={exports:{}},i[t][0].call(n.exports,function(e){return l(i[t][1][e]||e)},n,n.exports,r,i,a,o)}return a[t].exports}for(var c="function"==typeof require&&require,e=0;e<o.length;e++)l(o[e]);return l}({1:[function(e,t,n){"use strict";function r(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}var i,a,o,l=(i=c,(a=[{key:"initializeForSection",value:function(){}},{key:"checkParent",value:function(e){var t=e&&e.className&&e.className.includes("kv-ee-")&&e.className;return!t||t.includes("kv-ee-toggle-dropdown")?{ele:e,parentType:"toggle"}:t.includes("kv-ee-select-item")?{ele:e,parentType:"select"}:void 0}},{key:"loadInitalSelectBoxState",value:function(e,t,n){var r,i,n=n&&n.querySelectorAll(".kv-ee-select-item");n&&n.length&&((r=e.value)?(n.forEach(function(e){e.dataset.value===r&&(i=e)}),i&&(t.innerHTML=i.innerHTML,i.classList.add("kv-ee-active-element"))):(n=n[0],t.innerHTML=n.innerHTML,n.classList.add("kv-ee-active-element")))}},{key:"afterRender",value:function(e,t){var n,a=this;this.element=t,this.isForPreview?console.debug("in preview mode"):(n=t.querySelectorAll(".kv-ee-select-box"))&&n.length&&(n.forEach(function(n){var r,i,e=n.dataset;!e||e.active&&"false"!==e.active||(e.active=!0,r=n.querySelector("span"),i=t.querySelector(".kv-ee-dropdown-internal"),a.loadInitalSelectBoxState(e,r,i),e=function(e){var t=e.target,e=a.checkParent(t),t=e.parentType,e=e.ele;"toggle"===t?i.classList.value.includes("open")?i.classList.remove("open"):i.classList.add("open"):"select"===t&&(i.classList.remove("open"),(t=i.querySelector(".kv-ee-active-element"))&&t.classList.remove("kv-ee-active-element"),n.dataset.value=e.dataset.value,r.innerHTML=e.innerHTML,e.classList.add("kv-ee-active-element"))},n.removeEventListener("click",e),n.addEventListener("click",e))}),n=function(e){e=e.target;e&&e.className&&e.className.includes("kv-ee-")||t.querySelectorAll(".kv-ee-select-box").forEach(function(e){e.querySelector(".kv-ee-dropdown-internal").classList.remove("open")})},document.removeEventListener("click",n),document.addEventListener("click",n))}}])&&r(i.prototype,a),o&&r(i,o),c);function c(e){(function(e){if(!(e instanceof c))throw new TypeError("Cannot call a class as a function")})(this),this.widgetId="",this.builderApi=e,this.isForPreview=e.isForPreview,this.isRuntimeSite=!e.editor}window.__features=window.__features||{},window.__features["select-box"]=l},{}]},{},[1]);; window._featureSettings={"store-core":{"settings":{"isGlobal":true}},"navigation":{"settings":{}},"select-box-handler":{"settings":{}},"store":{"settings":{"dependingGlobalFeatures":["store-core","select-box-handler"]}},"translations":{"editorTemplates.features.store.allProducts":"All Products","editorTemplates.features.store.demoStoreTitle":"This is demo data.","editorTemplates.features.store.demoStoreDescription":"Create a product to test your store in preview mode","editorTemplates.features.store.demoProductTitle":"Demo Product","editorTemplates.features.store.demoProductDescription":"This is a short demo introduction for an example store product. Create your first store product and see how it looks.","editorTemplates.features.store.productTitle1":"Project title 1","editorTemplates.features.store.productDescription1":"Project description 1","editorTemplates.features.store.productBanner1":"Popular","editorTemplates.features.store.productTitle2":"Project title 2","editorTemplates.features.store.productDescription2":"Project description 2","editorTemplates.features.store.productTitle3":"Project title 3","editorTemplates.features.store.productDescription3":"Project description 3","editorTemplates.features.store.item":"item","editorTemplates.features.store.items":"items","editorTemplates.features.store.percentOff":"% off","editorTemplates.features.store.categories":"Categories","editorTemplates.features.store.categoryNone":"None","editorTemplates.features.store.categoryPriceLowToHigh":"Price $ - $$","editorTemplates.features.store.categoryPriceHighToLow":"Price $$ - $","editorTemplates.layouts.store.addToCart":"Add to cart","editorTemplates.layouts.storeDetail.to":"to","editorTemplates.layouts.storeDetail.of":"of","editorTemplates.layouts.store.moreOptions":"More options","editorTemplates.layouts.store.options":"Options","editorTemplates.layouts.storeDetail.items":"items","editorTemplates.layouts.storelist.noProductsFoundFor":"No products found","editorTemplates.layouts.storelist.noProducts":"No products found"},"select-box":{"settings":{}}};