!function(e,t,r,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a.parcelRequire443e&&a.parcelRequire443e,c=i.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(t,r){if(!c[t]){if(!e[t]){var n="function"==typeof a.parcelRequire443e&&a.parcelRequire443e;if(!r&&n)return n(t,!0);if(i)return i(t,!0);if(u&&"string"==typeof t)return u(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var s=c[t]=new l.Module(t);e[t][0].call(s.exports,d,s,s.exports,this)}return c[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:l(t)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=c,l.parent=i,l.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return a.parcelRequire443e}}),a.parcelRequire443e=l;for(var s=0;s<t.length;s++)l(t[s]);var d=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=d:"function"==typeof define&&define.amd&&define((function(){return d}))}({"6RdRz":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js"),o=e("@swc/helpers/lib/_async_to_generator.js"),a=n.interopDefault(o),i=e("@swc/helpers/lib/_to_consumable_array.js"),c=n.interopDefault(i),u=e("regenerator-runtime"),l=n.interopDefault(u);window.appInitializer=function(){hashProductMap(window.DukaanData.DUKAAN_CATALOG),fetchCouponsAndOffersOnIndex(),window.HEADER_HEIGHT=84,window.MENU_HEIGHT=DukaanData.STORE_MENU.length>0?48:0,window.ALL_CATEGORY_HEIGHT=-16,document.documentElement.style.setProperty("--header-height","".concat(window.HEADER_HEIGHT,"px")),document.documentElement.style.setProperty("--menu-height","".concat(window.MENU_HEIGHT,"px")),document.documentElement.style.setProperty("--all-category-height","".concat(window.ALL_CATEGORY_HEIGHT,"px")),fetchProductCoupons(getProductIdsFromCategories(DukaanData.DUKAAN_CATALOG));var e,t=function(e){customTag("category-sidebar-item-load-point",(function(t){!function(e,t){var r=document.getElementById("categories-sidebar-item-template");t.forEach((function(t){var n=document.importNode(r.content,!0);n.querySelector("[data-category-sidebar-item-name]").textContent=t.name,n.querySelector("[data-category-sidebar-item-count]").textContent="(".concat(t.product_count,")"),n.querySelector("[data-category-item-name-id]").setAttribute("name",t.uuid),n.querySelector("[data-category-item-scroll-click]").setAttribute("onclick","handleClickScroll(event, '".concat(t.uuid,"')")),e.appendChild(n)}))}(t,e)}))},r=function(e){customTag("category-dropdown-items-load-point",(function(t){!function(e,t){var r=document.getElementById("categories-dropdown-item-template");t.forEach((function(t){var n=document.importNode(r.content,!0);n.querySelector("[data-category-sidebar-item-name]").textContent=t.name,n.querySelector("[data-category-sidebar-item-count]").textContent=t.product_count,n.querySelector("[data-category-item-name-id]").setAttribute("name",t.uuid),n.querySelector("[data-category-item-scroll-click]").setAttribute("onclick","handleClickScroll(event, '".concat(t.uuid,"')")),e.appendChild(n)}))}(t,e)}))},n=!1,o=DukaanData.DUKAAN_CATALOG_PROPS.offset,i=DukaanData.DUKAAN_CATALOG_PROPS.offset,c=DukaanData.DUKAAN_CATALOG_PROPS.maxCount,u=!0,s=!1,d=function(){document.querySelectorAll("category-sidebar-item-load-point .shimmer").forEach((function(e){return e.remove()})),document.querySelector("category-sidebar-item-load-point > .categories-sidebar-item").classList.add("active"),window.addEventListener("scroll",handleScroll,!1),window.addEventListener("scroll",y,!0)},f=(e=(0,a.default)(l.default.mark((function e(){var a,y,p,m,g,v;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=2;break}return e.abrupt("return");case 2:return n=!0,e.next=5,fetch("".concat(window.DukaanData.CLIENT_API2_ENDPOINT,"/api/store/buyer/").concat(window.DukaanData.DUKAAN_STORE.link,"/bestseller/v3/?offset=").concat(i));case 5:return a=e.sent,e.next=8,null==a?void 0:a.json();case 8:if(y=e.sent,p=(y||{}).results,g=null==(m=void 0===p?[]:p)?void 0:m.length,v=null==m?void 0:m.filter((function(e){return e.products.length>0})),hashProductMap(v),hashCategory(v),renderBestSellers(v,9),t(v),r(v),s){e.next=33;break}if(!(i<c)){e.next=30;break}if(!(g<o)){e.next=24;break}return d(),u=!1,s&&removeScroller({observeThis:"bestseller-observer"}),e.abrupt("return");case 24:u=!0,i+=o,n=!1,f(),e.next=31;break;case 30:d(),g<o?(u=!1,s&&removeScroller({observeThis:"bestseller-observer"})):h();case 31:e.next=34;break;case 33:g<o?(u=!1,s&&removeScroller({observeThis:"bestseller-observer"})):(u=!0,i+=o,n=!1);case 34:n=!1;case 35:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),h=function(){s=!0,applyScroller({loading:n,hasMore:u,cb:f,observeThis:"bestseller-observer",loadPoint:document.querySelector("best-seller-load-point")})},y=function(e){var t=document.querySelector(".mobileCategoriesList");null!=t&&(e.target.querySelector("body")&&e.target.querySelector("body").getBoundingClientRect().top>-100?t.querySelector(".categoriesButton").classList.add("active"):t.querySelector(".categoriesButton").classList.remove("active"))};t(DukaanData.DUKAAN_CATALOG.filter((function(e){return e.products.length>0}))),f().then((function(){return rightArrowShow()})),druidStorePageView()},window.renderCategoryButtonItems=function(e){var t=(0,c.default)(DukaanData.DUKAAN_CATALOG),r=document.getElementById("category-button-item-template"),n=e.querySelector("category-button-items-load-point");n.replaceChildren(),r&&n&&t.forEach((function(e){var t=document.importNode(r.content,!0);t&&(t.querySelector("[data-category-button-category-href").setAttribute("href","#".concat(e.uuid)),t.querySelector("[data-category-item-scroll-click]").setAttribute("onclick","closeCategoryList(event, '".concat(e.uuid,"')")),t.querySelector("[data-category-button-category-name").textContent=e.name,t.querySelector("[data-category-button-product-count").textContent=e.product_count),n.appendChild(t)}))},window.openCategoryList=function(){var e=document.getElementById("categoryPopupWrapper");e.replaceChildren();var t=document.getElementById("category-popup"),r=document.importNode(t.content,!0);renderCategoryButtonItems(r),e.appendChild(r),document.body.style.overflow="hidden"},window.closeCategoryList=function(e,t){document.getElementById("popover-modal").classList.add("display-none"),document.body.style.overflow="initial",window.handleClickScroll(e,t)},window.handleScroll=function(){var e=document.querySelectorAll(".category-section");null==e||e.forEach((function(e){if(e.getBoundingClientRect().top<window.HEADER_HEIGHT+window.MENU_HEIGHT+window.ALL_CATEGORY_HEIGHT){var t,r,n=null==e||null===(t=e.attributes)||void 0===t||null===(r=t.id)||void 0===r?void 0:r.value,o=document.getElementsByName(n),a=document.getElementById("categoryListStickyID");document.querySelectorAll(".categories-sidebar-item").forEach((function(e){return e.classList.remove("active")})),document.querySelectorAll(".categories-dropdown-item").forEach((function(e){return e.classList.remove("active")})),o.forEach((function(e){return e.classList.add("active")})),null==a||a.scrollTo(o[1].offsetLeft-200,0),(null==a?void 0:a.scrollLeft)>50?document.querySelector(".leftIcon").classList.remove("hidden"):document.querySelector(".leftIcon").classList.add("hidden"),rightArrowShow()}}))},window.handleClickScroll=function(e,t){e.preventDefault(),document.querySelector(".category-dropdown").classList.contains("hidden")||(document.querySelector(".categorySvgDown").classList.toggle("hidden"),document.querySelector(".categorySvgUp").classList.toggle("hidden"));var r=document.getElementById(t).offsetTop-(window.HEADER_HEIGHT+window.MENU_HEIGHT+window.ALL_CATEGORY_HEIGHT-1);window.scrollTo({top:r,behavior:"smooth"})},window.handleShowAllCategoryDropdown=function(e){e.stopPropagation();var t=document.querySelector(".category-dropdown");document.querySelector(".categorySvgDown").classList.toggle("hidden"),document.querySelector(".categorySvgUp").classList.toggle("hidden"),t.classList.toggle("hidden"),document.body.addEventListener("click",(function(){t.classList.add("hidden")}))},window.rightArrowShow=function(){var e=document.querySelector(".category"),t=document.getElementById("categoryListStickyID"),r=document.querySelector(".allCategories");t.scrollWidth+r.clientWidth>e.clientWidth?document.querySelector(".rightIcon").classList.remove("hidden"):document.querySelector(".rightIcon").classList.add("hidden")},window.handleright=function(){var e=document.getElementById("categoryListStickyID"),t=e.clientWidth-200;e.scrollBy({left:t,behavior:"smooth"}),document.querySelector(".leftIcon").classList.remove("hidden")},window.handleleft=function(){document.getElementById("categoryListStickyID").scrollTo({left:0,behavior:"smooth"}),document.querySelector(".leftIcon").classList.add("hidden")}},{"@swc/helpers/lib/_async_to_generator.js":"9E0Rj","@swc/helpers/lib/_to_consumable_array.js":"eWwLC","regenerator-runtime":"3HP44","@parcel/transformer-js/src/esmodule-helpers.js":"jFRmm"}],"9E0Rj":[function(e,t,r){"use strict";function n(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function c(e){n(i,o,a,c,u,"next",e)}function u(e){n(i,o,a,c,u,"throw",e)}c(void 0)}))}}},{}],eWwLC:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return n.default(e)||o.default(e)||i.default(e)||a.default()};var n=c(e("./_array_without_holes")),o=c(e("./_iterable_to_array")),a=c(e("./_non_iterable_spread")),i=c(e("./_unsupported_iterable_to_array"));function c(e){return e&&e.__esModule?e:{default:e}}},{"./_array_without_holes":"lxPrq","./_iterable_to_array":"9CZA6","./_non_iterable_spread":"8SU2Y","./_unsupported_iterable_to_array":"iaXcf"}],lxPrq:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){if(Array.isArray(e))return o.default(e)};var n,o=(n=e("./_array_like_to_array"))&&n.__esModule?n:{default:n}},{"./_array_like_to_array":"3lL3q"}],"3lL3q":[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},{}],"9CZA6":[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}},{}],"8SU2Y":[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=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.")}},{}],iaXcf:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){if(!e)return;if("string"==typeof e)return o.default(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o.default(e,t)};var n,o=(n=e("./_array_like_to_array"))&&n.__esModule?n:{default:n}},{"./_array_like_to_array":"3lL3q"}],"3HP44":[function(e,t,r){var n=function(e){"use strict";var t,r=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]},n=function(e,t,r,n){var o=t&&t.prototype instanceof a?t:a,i=Object.create(o.prototype),c=new h(n||[]);return i._invoke=s(e,r,c),i},o=function(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}},a=function(){},i=function(){},c=function(){},u=function(e){["next","throw","return"].forEach((function(t){r(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function r(n,a,i,c){var u=o(e[n],e,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&g.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,c)}))}c(u.arg)}var n;this._invoke=function(e,o){function a(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(a,a):a()}},s=function(e,t,r){var n=E;return function(a,i){if(n===S)throw new Error("Generator is already running");if(n===A){if("throw"===a)throw i;return p()}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var u=T(c,r);if(u){if(u===x)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===E)throw n=A,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=S;var l=o(e,t,r);if("normal"===l.type){if(n=r.done?A:L,l.arg===x)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=A,r.method="throw",r.arg=l.arg)}}},d=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},f=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},h=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)},y=function(e){if(e){var r=e[w];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(g.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:p}},p=function(){return{value:t,done:!0}},m=Object.prototype,g=m.hasOwnProperty,v="function"==typeof Symbol?Symbol:{},w=v.iterator||"@@iterator",_=v.asyncIterator||"@@asyncIterator",b=v.toStringTag||"@@toStringTag";try{r({},"")}catch(e){r=function(e,t,r){return e[t]=r}}e.wrap=n;var E="suspendedStart",L="suspendedYield",S="executing",A="completed",x={},q={};r(q,w,(function(){return this}));var C=Object.getPrototypeOf,O=C&&C(C(y([])));O&&O!==m&&g.call(O,w)&&(q=O);var I=c.prototype=a.prototype=Object.create(q);function T(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method))return x;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return x}var a=o(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,x;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,x):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,x)}return i.prototype=c,r(I,"constructor",c),r(c,"constructor",i),i.displayName=r(c,b,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,r(e,b,"GeneratorFunction")),e.prototype=Object.create(I),e},e.awrap=function(e){return{__await:e}},u(l.prototype),r(l.prototype,_,(function(){return this})),e.AsyncIterator=l,e.async=function(t,r,o,a,i){void 0===i&&(i=Promise);var c=new l(n(t,r,o,a),i);return e.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},u(I),r(I,b,"Generator"),r(I,w,(function(){return this})),r(I,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=y,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(f),!e)for(var r in this)"t"===r.charAt(0)&&g.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var r=function(r,o){return i.type="throw",i.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o};if(this.done)throw e;for(var n=this,o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=g.call(a,"catchLoc"),u=g.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,x):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),x},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),f(r),x}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;f(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:y(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),x}},e}(t.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{}],jFRmm:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach((function(r){"default"===r||"__esModule"===r||t.hasOwnProperty(r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})})),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["6RdRz"],"6RdRz");