@salla.sa/twilight-components 2.11.110 → 2.11.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/README.md +48 -42
  2. package/dist/cjs/{app-globals-c392da62.js → app-globals-38ac4fe8.js} +2 -2
  3. package/dist/cjs/{app-globals-c392da62.js.map → app-globals-38ac4fe8.js.map} +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/salla-add-product-button_40.cjs.entry.js +74 -24
  6. package/dist/cjs/salla-add-product-button_40.cjs.entry.js.map +1 -1
  7. package/dist/cjs/salla-filters-widget.cjs.entry.js +5 -27
  8. package/dist/cjs/salla-filters-widget.cjs.entry.js.map +1 -1
  9. package/dist/cjs/salla-filters.cjs.entry.js +8 -4
  10. package/dist/cjs/salla-filters.cjs.entry.js.map +1 -1
  11. package/dist/cjs/salla-price-range.cjs.entry.js +109 -37
  12. package/dist/cjs/salla-price-range.cjs.entry.js.map +1 -1
  13. package/dist/cjs/salla-products-list.cjs.entry.js +85 -59
  14. package/dist/cjs/salla-products-list.cjs.entry.js.map +1 -1
  15. package/dist/cjs/salla-products-slider.cjs.entry.js +12 -4
  16. package/dist/cjs/salla-products-slider.cjs.entry.js.map +1 -1
  17. package/dist/cjs/twilight.cjs.js +2 -2
  18. package/dist/collection/components/salla-filters/salla-filters.js +8 -4
  19. package/dist/collection/components/salla-filters/salla-filters.js.map +1 -1
  20. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +5 -27
  21. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js.map +1 -1
  22. package/dist/collection/components/salla-login-modal/intefaces.js.map +1 -1
  23. package/dist/collection/components/salla-login-modal/salla-login-modal.js +1 -1
  24. package/dist/collection/components/salla-login-modal/salla-login-modal.js.map +1 -1
  25. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +14 -1
  26. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js.map +1 -1
  27. package/dist/collection/components/salla-price-range/salla-price-range.js +152 -148
  28. package/dist/collection/components/salla-price-range/salla-price-range.js.map +1 -1
  29. package/dist/collection/components/salla-products-list/salla-products-list.js +85 -59
  30. package/dist/collection/components/salla-products-list/salla-products-list.js.map +1 -1
  31. package/dist/collection/components/salla-products-slider/salla-products-slider.js +29 -5
  32. package/dist/collection/components/salla-products-slider/salla-products-slider.js.map +1 -1
  33. package/dist/collection/components/salla-verify/salla-verify.css +12 -0
  34. package/dist/collection/components/salla-verify/salla-verify.js +59 -21
  35. package/dist/collection/components/salla-verify/salla-verify.js.map +1 -1
  36. package/dist/components/index.js +1 -1
  37. package/dist/components/index.js.map +1 -1
  38. package/dist/components/salla-filters-widget2.js +5 -27
  39. package/dist/components/salla-filters-widget2.js.map +1 -1
  40. package/dist/components/salla-filters.js +8 -4
  41. package/dist/components/salla-filters.js.map +1 -1
  42. package/dist/components/salla-login-modal.js +1 -1
  43. package/dist/components/salla-login-modal.js.map +1 -1
  44. package/dist/components/salla-maintenance-alert.js +14 -1
  45. package/dist/components/salla-maintenance-alert.js.map +1 -1
  46. package/dist/components/salla-price-range2.js +113 -43
  47. package/dist/components/salla-price-range2.js.map +1 -1
  48. package/dist/components/salla-products-list.js +85 -59
  49. package/dist/components/salla-products-list.js.map +1 -1
  50. package/dist/components/salla-products-slider.js +13 -5
  51. package/dist/components/salla-products-slider.js.map +1 -1
  52. package/dist/components/salla-verify2.js +60 -22
  53. package/dist/components/salla-verify2.js.map +1 -1
  54. package/dist/esm/{app-globals-663240cc.js → app-globals-3a81b4f2.js} +2 -2
  55. package/dist/esm/{app-globals-663240cc.js.map → app-globals-3a81b4f2.js.map} +1 -1
  56. package/dist/esm/loader.js +2 -2
  57. package/dist/esm/salla-add-product-button_40.entry.js +74 -24
  58. package/dist/esm/salla-add-product-button_40.entry.js.map +1 -1
  59. package/dist/esm/salla-filters-widget.entry.js +5 -27
  60. package/dist/esm/salla-filters-widget.entry.js.map +1 -1
  61. package/dist/esm/salla-filters.entry.js +8 -4
  62. package/dist/esm/salla-filters.entry.js.map +1 -1
  63. package/dist/esm/salla-price-range.entry.js +109 -37
  64. package/dist/esm/salla-price-range.entry.js.map +1 -1
  65. package/dist/esm/salla-products-list.entry.js +85 -59
  66. package/dist/esm/salla-products-list.entry.js.map +1 -1
  67. package/dist/esm/salla-products-slider.entry.js +12 -4
  68. package/dist/esm/salla-products-slider.entry.js.map +1 -1
  69. package/dist/esm/twilight.js +2 -2
  70. package/dist/esm-es5/{app-globals-663240cc.js → app-globals-3a81b4f2.js} +2 -2
  71. package/dist/{twilight/p-dcfa0f39.system.js.map → esm-es5/app-globals-3a81b4f2.js.map} +1 -1
  72. package/dist/esm-es5/loader.js +1 -1
  73. package/dist/esm-es5/loader.js.map +1 -1
  74. package/dist/esm-es5/salla-add-product-button_40.entry.js +4 -4
  75. package/dist/esm-es5/salla-add-product-button_40.entry.js.map +1 -1
  76. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  77. package/dist/esm-es5/salla-filters-widget.entry.js.map +1 -1
  78. package/dist/esm-es5/salla-filters.entry.js +1 -1
  79. package/dist/esm-es5/salla-filters.entry.js.map +1 -1
  80. package/dist/esm-es5/salla-price-range.entry.js +2 -2
  81. package/dist/esm-es5/salla-price-range.entry.js.map +1 -1
  82. package/dist/esm-es5/salla-products-list.entry.js +2 -2
  83. package/dist/esm-es5/salla-products-list.entry.js.map +1 -1
  84. package/dist/esm-es5/salla-products-slider.entry.js +1 -1
  85. package/dist/esm-es5/salla-products-slider.entry.js.map +1 -1
  86. package/dist/esm-es5/twilight.js +1 -1
  87. package/dist/esm-es5/twilight.js.map +1 -1
  88. package/dist/twilight/{p-6948b825.js → p-1edec127.js} +2 -2
  89. package/dist/twilight/{p-6948b825.js.map → p-1edec127.js.map} +1 -1
  90. package/dist/twilight/{p-7c6638f5.system.entry.js → p-2739ddc5.system.entry.js} +2 -2
  91. package/dist/twilight/p-2739ddc5.system.entry.js.map +1 -0
  92. package/dist/twilight/p-3212e42c.entry.js +5 -0
  93. package/dist/twilight/p-3212e42c.entry.js.map +1 -0
  94. package/dist/twilight/{p-6404a9a5.system.js → p-37389934.system.js} +2 -2
  95. package/dist/twilight/{p-6404a9a5.system.js.map → p-37389934.system.js.map} +1 -1
  96. package/dist/twilight/{p-dcfa0f39.system.js → p-38496eab.system.js} +2 -2
  97. package/dist/{esm-es5/app-globals-663240cc.js.map → twilight/p-38496eab.system.js.map} +1 -1
  98. package/dist/twilight/p-3f03d17c.system.entry.js +5 -0
  99. package/dist/twilight/p-3f03d17c.system.entry.js.map +1 -0
  100. package/dist/twilight/p-46b7f931.system.entry.js +5 -0
  101. package/dist/twilight/p-46b7f931.system.entry.js.map +1 -0
  102. package/dist/twilight/p-54783694.system.entry.js +5 -0
  103. package/dist/twilight/p-54783694.system.entry.js.map +1 -0
  104. package/dist/twilight/{p-1e4abb42.system.entry.js → p-9a1231a6.system.entry.js} +2 -2
  105. package/dist/twilight/p-9a1231a6.system.entry.js.map +1 -0
  106. package/dist/twilight/{p-9713044b.entry.js → p-b766115a.entry.js} +2 -2
  107. package/dist/twilight/p-b766115a.entry.js.map +1 -0
  108. package/dist/twilight/p-cd5cb2f7.entry.js +5 -0
  109. package/dist/twilight/p-cd5cb2f7.entry.js.map +1 -0
  110. package/dist/twilight/p-d7a62fb3.system.entry.js +5 -0
  111. package/dist/twilight/p-d7a62fb3.system.entry.js.map +1 -0
  112. package/dist/twilight/p-def222e1.entry.js +5 -0
  113. package/dist/twilight/p-def222e1.entry.js.map +1 -0
  114. package/dist/twilight/p-e393f123.entry.js +5 -0
  115. package/dist/twilight/p-e393f123.entry.js.map +1 -0
  116. package/dist/twilight/p-e3dc0687.entry.js +5 -0
  117. package/dist/twilight/p-e3dc0687.entry.js.map +1 -0
  118. package/dist/twilight/twilight.esm.js +1 -1
  119. package/dist/twilight/twilight.esm.js.map +1 -1
  120. package/dist/twilight/twilight.js +1 -1
  121. package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +0 -7
  122. package/dist/types/components/salla-login-modal/intefaces.d.ts +1 -0
  123. package/dist/types/components/salla-maintenance-alert/salla-maintenance-alert.d.ts +3 -0
  124. package/dist/types/components/salla-price-range/salla-price-range.d.ts +16 -10
  125. package/dist/types/components/salla-products-list/salla-products-list.d.ts +2 -2
  126. package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +5 -1
  127. package/dist/types/components/salla-verify/salla-verify.d.ts +6 -1
  128. package/dist/types/components.d.ts +14 -8
  129. package/package.json +4 -4
  130. package/dist/twilight/p-1e4abb42.system.entry.js.map +0 -1
  131. package/dist/twilight/p-3b1a0059.entry.js +0 -5
  132. package/dist/twilight/p-3b1a0059.entry.js.map +0 -1
  133. package/dist/twilight/p-41b3e09d.entry.js +0 -5
  134. package/dist/twilight/p-41b3e09d.entry.js.map +0 -1
  135. package/dist/twilight/p-4a743b5e.system.entry.js +0 -5
  136. package/dist/twilight/p-4a743b5e.system.entry.js.map +0 -1
  137. package/dist/twilight/p-62c1b309.entry.js +0 -5
  138. package/dist/twilight/p-62c1b309.entry.js.map +0 -1
  139. package/dist/twilight/p-6349125a.entry.js +0 -5
  140. package/dist/twilight/p-6349125a.entry.js.map +0 -1
  141. package/dist/twilight/p-7c6638f5.system.entry.js.map +0 -1
  142. package/dist/twilight/p-8ee37cc6.entry.js +0 -5
  143. package/dist/twilight/p-8ee37cc6.entry.js.map +0 -1
  144. package/dist/twilight/p-9713044b.entry.js.map +0 -1
  145. package/dist/twilight/p-9e27da8e.system.entry.js +0 -5
  146. package/dist/twilight/p-9e27da8e.system.entry.js.map +0 -1
  147. package/dist/twilight/p-b1f8b436.system.entry.js +0 -5
  148. package/dist/twilight/p-b1f8b436.system.entry.js.map +0 -1
  149. package/dist/twilight/p-c9cdaea6.system.entry.js +0 -5
  150. package/dist/twilight/p-c9cdaea6.system.entry.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import{r as t,c as s,h as i,H as e,g as a}from"./p-3c7d3f26.js";import{F as l,a as r}from"./p-d3cc3770.js";const n=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";const o=class{constructor(i){t(this,i);this.changed=s(this,"changed",7);this.isReady=false;this.filters=undefined;this.isSidebarOpen=undefined;this.filtersData={};this.apply=undefined;this.reset=undefined;salla.event.on("filters::hidden",(()=>this.host.style.display="none"));salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply");this.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let s={};this.filters=t.map((t=>{t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price_range:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;t.inputType=l.CHECKBOX;if(t.key=="rating"){t.inputType=l.RADIO;let{max:s,min:i}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=i||t<=s))}if(this.filtersData[t.key]){s[t.key]=this.filtersData[t.key]}return t}));this.filtersData=s}))}connectedCallback(){try{let t=new URLSearchParams(window.location.search).get("filters");this.filtersData=t?JSON.parse(decodeURIComponent(t)):{}}catch(t){salla.logger.warn("failed to get filters from url",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady){return}window.scrollTo({top:0,behavior:"smooth"});setTimeout((()=>{window.history.pushState({},"",salla.url.addParamToUrl("filters",encodeURIComponent(JSON.stringify(this.filtersData))));salla.event.emit("salla-filters::changed",this.filtersData);this.changed.emit(this.filtersData)}),300)}async resetFilters(){this.filtersData={};this.host.childNodes.forEach((t=>t.reset&&t.reset()));salla.event.emit("salla-filters::reset");return this.applyFilters()}handleOptionChange(t,s,i){if(s.type===r.RANGE){this.filtersData[s.key]=i;return}let e=t.target.checked;if(t.target.type==l.RADIO){e&&(this.filtersData[s.key]=i);e||delete this.filtersData[s.key];return}this.filtersData[s.key]=this.filtersData[s.key]||[];if(e){this.filtersData[s.key].push(i);return}this.filtersData[s.key]=this.filtersData[s.key].filter((t=>t!=i))}render(){var t,s;return i(e,null,(t=this.filters)===null||t===void 0?void 0:t.map((t=>i("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:s,value:i}})=>this.handleOptionChange(t,s,i)}))),((s=this.filters)===null||s===void 0?void 0:s.length)&&i("div",{class:"s-filters-footer"},i("salla-button",{color:"primary",onClick:()=>this.applyFilters()},this.apply),i("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)))}componentDidLoad(){this.isReady=true}get host(){return a(this)}};o.style=n;export{o as salla_filters};
5
+ //# sourceMappingURL=p-cd5cb2f7.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sallaFiltersCss","SallaFilters","constructor","hostRef","this","isReady","salla","event","on","host","style","display","lang","onLoaded","apply","get","reset","filters","freshFilterData","map","filter","label","category_id","brand_id","rating","price_range","key","inputType","FilterOptionInputType","CHECKBOX","RADIO","max","min","values","stars","filtersData","connectedCallback","URLSearchParams","window","location","search","JSON","parse","decodeURIComponent","e","logger","warn","message","async","scrollTo","top","behavior","setTimeout","history","pushState","url","addParamToUrl","encodeURIComponent","stringify","emit","changed","childNodes","forEach","widget","applyFilters","handleOptionChange","option","value","type","FilterOptionTypes","RANGE","isChecked","target","checked","push","val","render","h","Host","_a","onChanged","detail","_b","length","class","color","onClick","fill","resetFilters","componentDidLoad"],"sources":["./src/components/salla-filters/salla-filters.scss?tag=salla-filters","./src/components/salla-filters/salla-filters.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.s-rating-stars-small {\n line-height: 12px;\n}\n.s-filters-radio{\n background-image: none !important;\n}","import { Component, Element, h, Event, EventEmitter, Host, Method, Prop, State } from '@stencil/core';\nimport { Filter, FilterOptionInputType, FilterOptionTypes } from \"./interfaces\";\n\n//todo::\n\n\n@Component({\n tag: 'salla-filters',\n styleUrl: 'salla-filters.scss',\n})\nexport class SallaFilters {\n\n constructor() {\n salla.event.on('filters::hidden', () => this.host.style.display = 'none');\n\n salla.lang.onLoaded(() => {\n this.apply = salla.lang.get('pages.checkout.apply');\n this.reset = salla.lang.get('pages.categories.filters_reset');\n });\n\n salla.event.on('filters::fetched', ({ filters }) => {\n this.host.style.display = '';\n let freshFilterData = {};\n this.filters = filters\n .map((filter: Filter) => {\n filter.label = {\n category_id: salla.lang.get('common.titles.categories'),\n brand_id: salla.lang.get('common.titles.brands'),\n rating: salla.lang.get('pages.categories.filter_rating'),\n price_range: salla.lang.get('pages.categories.filter_price'),\n }[filter.key] || filter.label;\n filter.inputType = FilterOptionInputType.CHECKBOX;\n if (filter.key == 'rating') {\n filter.inputType = FilterOptionInputType.RADIO;\n //@ts-ignore\n let { max, min } = filter.values;\n //@ts-ignore\n filter.values = [5, 4, 3, 2, 1].filter(stars => stars >= min || stars <= max)\n }\n\n //when getting new filters, maybe less than we had, so let's get from the old one, only what is existed now.\n if (this.filtersData[filter.key]) {\n freshFilterData[filter.key] = this.filtersData[filter.key];\n }\n\n return filter;\n });\n this.filtersData = freshFilterData;\n });\n }\n\n connectedCallback() {\n try {\n let filters = (new URLSearchParams(window.location.search)).get('filters')\n this.filtersData = filters ? JSON.parse(decodeURIComponent(filters)) : {};\n } catch (e) {\n salla.logger.warn('failed to get filters from url', e.message);\n }\n }\n\n @Element() host: HTMLElement;\n @Prop({ reflect: true, mutable: true }) filters?: Filter[];\n private isReady = false;//to avoid triggering the changed event\n @State() isSidebarOpen: boolean;\n @State() filtersData: object = {}\n @State() apply: string;\n @State() reset: string;\n @Event() changed: EventEmitter;\n\n //TODO:: move all @methods into one section\n @Method()\n async getFilters() {\n return this.filtersData;\n }\n\n @Method()\n async applyFilters() {\n if (!this.isReady) {\n return;\n }\n //todo:: why we need this🤔\n window.scrollTo({top: 0,behavior: 'smooth'});\n setTimeout(() => {\n window.history.pushState({}, '', salla.url.addParamToUrl('filters', encodeURIComponent(JSON.stringify(this.filtersData))));\n salla.event.emit('salla-filters::changed', this.filtersData);\n this.changed.emit(this.filtersData);\n }, 300);\n }\n\n @Method()\n async resetFilters() {\n this.filtersData = {};\n this.host.childNodes.forEach((widget: HTMLSallaFiltersWidgetElement) => widget.reset && widget.reset())\n salla.event.emit('salla-filters::reset');\n return this.applyFilters();\n }\n\n /**\n * @param {{target:HTMLInputElement}} event\n * @param option\n * @param value\n * @private\n */\n private handleOptionChange(event, option: Filter, value) {\n if (option.type === FilterOptionTypes.RANGE) {\n this.filtersData[option.key] = value;\n return;\n }\n let isChecked = event.target.checked;\n if (event.target.type == FilterOptionInputType.RADIO) {\n isChecked && (this.filtersData[option.key] = value);\n isChecked || (delete this.filtersData[option.key]);\n return;\n }\n\n //it's checkbox\n this.filtersData[option.key] = this.filtersData[option.key] || [];\n if (isChecked) {\n this.filtersData[option.key].push(value);\n return;\n }\n this.filtersData[option.key] = this.filtersData[option.key].filter(val => val != value);\n }\n\n render() {\n return <Host>\n {this.filters?.map(option => <salla-filters-widget\n option={option}\n filtersData={this.filtersData}\n onChanged={({ detail: { event, option, value } }) => this.handleOptionChange(event, option, value)} />)}\n\n {this.filters?.length && <div class=\"s-filters-footer\">\n <salla-button color='primary' onClick={() => this.applyFilters()}>{this.apply}</salla-button>\n <salla-button color='gray' fill='outline' onClick={() => this.resetFilters()}>{this.reset}</salla-button>\n </div>}\n </Host>;\n }\n\n componentDidLoad() {\n this.isReady = true;\n }\n}\n\n"],"mappings":";;;2GAAA,MAAMA,EAAkB,gH,MCUXC,EAAY,MAEvBC,YAAAC,G,2CAkDQC,KAAAC,QAAU,M,qEAEa,G,0CAnD7BC,MAAMC,MAAMC,GAAG,mBAAmB,IAAMJ,KAAKK,KAAKC,MAAMC,QAAU,SAElEL,MAAMM,KAAKC,UAAS,KAClBT,KAAKU,MAAQR,MAAMM,KAAKG,IAAI,wBAC5BX,KAAKY,MAAQV,MAAMM,KAAKG,IAAI,iCAAiC,IAG/DT,MAAMC,MAAMC,GAAG,oBAAoB,EAAGS,cACp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q,CAK1FyE,mBACErF,KAAKC,QAAU,I"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ System.register(["./p-5ee0461b.system.js"],(function(e){"use strict";var t,s,r,i;return{setters:[function(e){t=e.r;s=e.h;r=e.H;i=e.g}],execute:function(){var u="";var o=e("salla_products_slider",function(){function e(e){var s=this;t(this,e);this.blockTitle=undefined;this.subTitle=undefined;this.sliderId=undefined;this.displayAllUrl=undefined;this.source=undefined;this.sourceValue=undefined;this.limit=undefined;this.productsData=undefined;this.isReady=undefined;this.sourceValueIsValid=undefined;this.hasCustomComponent=undefined;this.apiUrl="";this.parsedSourceValue=undefined;salla.onReady((function(){s.sourceValueIsValid=!!(s.sourceValue||["latest","offers"].includes(s.getSource()))}));if(!this.sourceValueIsValid){salla.logger.warn("source-value prop is required for source [".concat(this.getSource(),"]"));return}this.hasCustomComponent=!!customElements.get("custom-salla-product-card")}e.prototype.getItemHTML=function(e){if(this.hasCustomComponent){return s("div",{class:"s-products-slider-card"},s("custom-salla-product-card",{product:e,source:this.getSource(),"source-value":this.getSourceValue()}))}return s("div",{class:"s-products-slider-card"},s("salla-product-card",{"show-quantity":this.getSource()=="landing-page","hide-add-btn":this.getSource()=="landing-page","shadow-on-hover":true,product:e}))};e.prototype.getUrlPrefix=function(){var e="";if(this.limit){e="&per_page=".concat(this.limit>32?32:this.limit)}return e};e.prototype.getApiUrl=function(){if(this.getSource()==="json"){return}var e=this.getUrlPrefix();if(["offers","latest"].includes(this.getSource())){return salla.url.api("products?source=".concat(this.getSource()).concat(e))}if(["related","landing-page"].includes(this.getSource())){return salla.url.api("products?source=".concat(this.getSource(),"&source_value=").concat(this.getSourceValue()).concat(e))}try{return salla.url.api("products?source=".concat(this.getSource(),"&source_value[]=").concat(this.getSourceValue().join("&source_value[]=")).concat(e))}catch(e){salla.logger.warn('source-value prop should be array of ids ex source-value="[1,2,3]" for the source ['.concat(this.getSource(),"]"));this.sourceValueIsValid=false}};e.prototype.getSource=function(){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","landing-page":"landing-page","product.index.tag":"tags"}[this.source||salla.config.get("page.slug")]||this.source||"latest"};e.prototype.getSourceValue=function(){if(!["search","json"].includes(this.getSource())){if(Array.isArray(JSON.parse(this.sourceValue))&&JSON.parse(this.sourceValue).length){return JSON.parse(this.sourceValue)}if(typeof JSON.parse(this.sourceValue)=="number"){return[JSON.parse(this.sourceValue)]}}return this.sourceValue||salla.config.get("page.id")};e.prototype.canRender=function(){return this.sourceValueIsValid&&this.isReady};e.prototype.componentWillLoad=function(){var e=this;if(this.source==="json"){this.productsData=this.getSourceValue();this.isReady=true;return}salla.api.request(this.getApiUrl(),null,"get").then((function(t){e.productsData=t.data;e.isReady=true}))};e.prototype.render=function(){var e=this;var t;if(this.getSource()=="related"&&!salla.config.get("store.settings.product.related_products_enabled")||!this.canRender()){return}return s(r,{class:"s-products-slider-wrapper"},s("salla-slider",{class:"s-products-slider-slider",id:this.sliderId||"s-products-slider-".concat(Math.random().toString(36).substr(2,9)),type:"carousel","block-title":this.blockTitle,"block-subTitle":this.subTitle,"display-all-url":this.displayAllUrl},s("div",{slot:"items"},(t=this.productsData)===null||t===void 0?void 0:t.map((function(t){return e.getItemHTML(t)})))))};Object.defineProperty(e.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());o.style=u}}}));
5
+ //# sourceMappingURL=p-d7a62fb3.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sallaProductsSliderCss","SallaProductsSlider","exports","class_1","hostRef","_this","this","salla","onReady","sourceValueIsValid","sourceValue","includes","getSource","logger","warn","concat","hasCustomComponent","customElements","get","prototype","getItemHTML","product","h","class","source","getSourceValue","getUrlPrefix","urlPrefix","limit","getApiUrl","prefixes","url","api","join","e","config","Array","isArray","JSON","parse","length","canRender","isReady","componentWillLoad","productsData","request","then","res","data","render","Host","id","sliderId","Math","random","toString","substr","type","blockTitle","subTitle","displayAllUrl","slot","_a","map"],"sources":["src/components/salla-products-slider/salla-products-slider.scss?tag=salla-products-slider","src/components/salla-products-slider/salla-products-slider.tsx"],"sourcesContent":[".s-products-slider{\n &-wrapper{\n\n }\n &-slider{\n\n }\n &-card{\n\n }\n}","import {Component, Host, h, Prop, Element, State} from '@stencil/core';\n\n@Component({\n tag: 'salla-products-slider',\n styleUrl: 'salla-products-slider.scss'\n})\nexport class SallaProductsSlider {\n constructor() {\n salla.onReady(() => {\n this.sourceValueIsValid = !!(this.sourceValue || ['latest', 'offers'].includes(this.getSource()));\n });\n if (!this.sourceValueIsValid) {\n salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`);\n return;\n }\n this.hasCustomComponent = !!customElements.get('custom-salla-product-card');\n }\n\n @Element() host: HTMLElement;\n //todo:: support limit, default =10, make sure that maximum is 32,\n\n /**\n * Title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() blockTitle: string;\n\n /**\n * Sub title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() subTitle: string;\n\n /**\n * Slider Id, if not provided will be generated automatically\n * @type {string}\n * @default ''\n * */\n @Prop() sliderId: string;\n\n /**\n * Display 'ALL' URL\n * @type {string}\n * @default ''\n * */\n @Prop() displayAllUrl: string;\n\n /**\n * Source of the products, if api will get the products from the API, if json will get the products from the products prop\n * @type {string}\n * @default ''\n * */\n @Prop({\n reflect: true,\n mutable: true\n }) source: 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'tags' | 'selected' | 'offers' | 'landing-page';\n\n /**\n * The source value, cloud be different values as following:\n * - array of ids when `source` in ['categories', 'brands', 'tags', 'selected']\n * - products payload when `source` = 'json'\n * - product_id when `source` = 'related'\n *\n * @type {string}\n * */\n @Prop() sourceValue: string;\n\n /**\n * Limit for number of products in the list.\n */\n @Prop({mutable: true}) limit: number;\n\n \n @State() productsData: any;\n @State() isReady: boolean;\n @State() sourceValueIsValid: boolean;\n @State() hasCustomComponent: boolean;\n @State() apiUrl: string = '';\n @State() parsedSourceValue: any;\n\n private getItemHTML(product) {\n if (this.hasCustomComponent) {\n return <div class=\"s-products-slider-card\">\n <custom-salla-product-card product={product} source={this.getSource()} source-value={this.getSourceValue()}/>\n </div>;\n }\n\n return <div class=\"s-products-slider-card\">\n <salla-product-card\n show-quantity={this.getSource() == 'landing-page'}\n hide-add-btn={this.getSource() == 'landing-page'}\n shadow-on-hover={true}\n product={product}/>\n </div>;\n }\n\n private getUrlPrefix() {\n let urlPrefix = '';\n if (this.limit) {\n urlPrefix = `&per_page=${this.limit > 32 ? 32 : this.limit}`;\n }\n return urlPrefix;\n }\n\n getApiUrl() {\n if (this.getSource() === 'json') {\n return;\n }\n let prefixes = this.getUrlPrefix();\n if (['offers', 'latest'].includes(this.getSource())) {\n return salla.url.api(`products?source=${this.getSource()}${prefixes}`);\n }\n if (['related', 'landing-page'].includes(this.getSource())) {\n return salla.url.api(`products?source=${this.getSource()}&source_value=${this.getSourceValue()}${prefixes}`);\n }\n\n try {\n return salla.url.api(`products?source=${this.getSource()}&source_value[]=${this.getSourceValue().join('&source_value[]=')}${prefixes}`);\n } catch (e) {\n salla.logger.warn(`source-value prop should be array of ids ex source-value=\"[1,2,3]\" for the source [${this.getSource()}]`);\n this.sourceValueIsValid = false;\n }\n }\n private getSource(){\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n }[this.source || salla.config.get('page.slug')] || this.source ||'latest';\n }\n\n private getSourceValue() {\n if (!['search', 'json'].includes(this.getSource())) {\n if (Array.isArray(JSON.parse(this.sourceValue)) && JSON.parse(this.sourceValue).length) {\n return JSON.parse(this.sourceValue);\n }\n\n if (typeof JSON.parse(this.sourceValue) == 'number') {\n return [JSON.parse(this.sourceValue)];\n }\n }\n return this.sourceValue || salla.config.get('page.id');\n }\n private canRender() {\n return this.sourceValueIsValid && this.isReady;\n }\n\n componentWillLoad() {\n if (this.source === 'json') {\n this.productsData = this.getSourceValue();\n this.isReady = true\n return;\n }\n salla.api.request(this.getApiUrl(), null, 'get').then(res => {\n this.productsData = res.data\n this.isReady = true\n })\n }\n\n render() {\n if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled')) || !this.canRender()) {\n return;\n }\n return (\n <Host class=\"s-products-slider-wrapper\">\n <salla-slider\n class=\"s-products-slider-slider\"\n id={this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`}\n type=\"carousel\"\n block-title={this.blockTitle}\n block-subTitle={this.subTitle}\n display-all-url={this.displayAllUrl}\n >\n <div slot=\"items\">\n {this.productsData?.map((product) =>\n this.getItemHTML(product)\n )}\n </div>\n </salla-slider>\n </Host>\n );\n }\n\n}\n"],"mappings":";;;0JAAA,IAAMA,EAAyB,G,ICMlBC,EAAmBC,EAAA,mCAC9B,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,K,0TAwE0B,G,iCAvExBC,MAAMC,SAAQ,WACZH,EAAKI,sBAAwBJ,EAAKK,aAAe,CAAC,SAAU,UAAUC,SAASN,EAAKO,a,IAEtF,IAAKN,KAAKG,mBAAoB,CAC5BF,MAAMM,OAAOC,KAAK,6CAAAC,OAA6CT,KAAKM,YAAW,MAC/E,M,CAEFN,KAAKU,qBAAuBC,eAAeC,IAAI,4B,CAmEzCf,EAAAgB,UAAAC,YAAA,SAAYC,GAClB,GAAIf,KAAKU,mBAAoB,CAC3B,OAAOM,EAAA,OAAKC,MAAM,0BAChBD,EAAA,6BAA2BD,QAASA,EAASG,OAAQlB,KAAKM,YAAW,eAAgBN,KAAKmB,mB,CAI9F,OAAOH,EAAA,OAAKC,MAAM,0BAChBD,EAAA,sCACiBhB,KAAKM,aAAe,eAAc,eACnCN,KAAKM,aAAe,eAAc,kBAC/B,KACjBS,QAASA,I,EAIPlB,EAAAgB,UAAAO,aAAA,WACN,IAAIC,EAAY,GAChB,GAA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AAO,CAAC4B,KAAKC,MAAMjC,KAAKI,a,EAG5B,OAAOJ,KAAKI,aAAeH,MAAM4B,OAAOjB,IAAI,U,EAEtCf,EAAAgB,UAAAsB,UAAA,WACN,OAAOnC,KAAKG,oBAAsBH,KAAKoC,O,EAGzCvC,EAAAgB,UAAAwB,kBAAA,eAAAtC,EAAAC,KACE,GAAIA,KAAKkB,SAAW,OAAQ,CAC1BlB,KAAKsC,aAAetC,KAAKmB,iBACzBnB,KAAKoC,QAAU,KACf,M,CAEFnC,MAAMyB,IAAIa,QAAQvC,KAAKuB,YAAa,KAAM,OAAOiB,MAAK,SAAAC,GACpD1C,EAAKuC,aAAeG,EAAIC,KACxB3C,EAAKqC,QAAU,I,KAInBvC,EAAAgB,UAAA8B,OAAA,eAAA5C,EAAAC,K,MACE,GAAKA,KAAKM,aAAe,YAAcL,MAAM4B,OAAOjB,IAAI,qDAAwDZ,KAAKmC,YAAa,CAChI,M,CAEF,OACEnB,EAAC4B,EAAI,CAAC3B,MAAM,6BACVD,EAAA,gBACEC,MAAM,2BACN4B,GAAI7C,KAAK8C,UAAY,qBAAArC,OAAqBsC,KAAKC,SAASC,SAAS,IAAIC,OAAO,EAAG,IAC/EC,KAAK,WAAU,cACFnD,KAAKoD,WAAU,iBACZpD,KAAKqD,SAAQ,kBACZrD,KAAKsD,eAEtBtC,EAAA,OAAKuC,KAAK,UACPC,EAAAxD,KAAKsC,gBAAY,MAAAkB,SAAA,SAAAA,EAAEC,KAAI,SAAC1C,GACvB,OAAAhB,EAAKe,YAAYC,EAAjB,M,yHA/KkB,I"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import{r as s,h as t,H as e,g as r}from"./p-3c7d3f26.js";const i="";const a=class{constructor(t){s(this,t);this.blockTitle=undefined;this.subTitle=undefined;this.sliderId=undefined;this.displayAllUrl=undefined;this.source=undefined;this.sourceValue=undefined;this.limit=undefined;this.productsData=undefined;this.isReady=undefined;this.sourceValueIsValid=undefined;this.hasCustomComponent=undefined;this.apiUrl="";this.parsedSourceValue=undefined;salla.onReady((()=>{this.sourceValueIsValid=!!(this.sourceValue||["latest","offers"].includes(this.getSource()))}));if(!this.sourceValueIsValid){salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`);return}this.hasCustomComponent=!!customElements.get("custom-salla-product-card")}getItemHTML(s){if(this.hasCustomComponent){return t("div",{class:"s-products-slider-card"},t("custom-salla-product-card",{product:s,source:this.getSource(),"source-value":this.getSourceValue()}))}return t("div",{class:"s-products-slider-card"},t("salla-product-card",{"show-quantity":this.getSource()=="landing-page","hide-add-btn":this.getSource()=="landing-page","shadow-on-hover":true,product:s}))}getUrlPrefix(){let s="";if(this.limit){s=`&per_page=${this.limit>32?32:this.limit}`}return s}getApiUrl(){if(this.getSource()==="json"){return}let s=this.getUrlPrefix();if(["offers","latest"].includes(this.getSource())){return salla.url.api(`products?source=${this.getSource()}${s}`)}if(["related","landing-page"].includes(this.getSource())){return salla.url.api(`products?source=${this.getSource()}&source_value=${this.getSourceValue()}${s}`)}try{return salla.url.api(`products?source=${this.getSource()}&source_value[]=${this.getSourceValue().join("&source_value[]=")}${s}`)}catch(s){salla.logger.warn(`source-value prop should be array of ids ex source-value="[1,2,3]" for the source [${this.getSource()}]`);this.sourceValueIsValid=false}}getSource(){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","landing-page":"landing-page","product.index.tag":"tags"}[this.source||salla.config.get("page.slug")]||this.source||"latest"}getSourceValue(){if(!["search","json"].includes(this.getSource())){if(Array.isArray(JSON.parse(this.sourceValue))&&JSON.parse(this.sourceValue).length){return JSON.parse(this.sourceValue)}if(typeof JSON.parse(this.sourceValue)=="number"){return[JSON.parse(this.sourceValue)]}}return this.sourceValue||salla.config.get("page.id")}canRender(){return this.sourceValueIsValid&&this.isReady}componentWillLoad(){if(this.source==="json"){this.productsData=this.getSourceValue();this.isReady=true;return}salla.api.request(this.getApiUrl(),null,"get").then((s=>{this.productsData=s.data;this.isReady=true}))}render(){var s;if(this.getSource()=="related"&&!salla.config.get("store.settings.product.related_products_enabled")||!this.canRender()){return}return t(e,{class:"s-products-slider-wrapper"},t("salla-slider",{class:"s-products-slider-slider",id:this.sliderId||`s-products-slider-${Math.random().toString(36).substr(2,9)}`,type:"carousel","block-title":this.blockTitle,"block-subTitle":this.subTitle,"display-all-url":this.displayAllUrl},t("div",{slot:"items"},(s=this.productsData)===null||s===void 0?void 0:s.map((s=>this.getItemHTML(s))))))}get host(){return r(this)}};a.style=i;export{a as salla_products_slider};
5
+ //# sourceMappingURL=p-def222e1.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sallaProductsSliderCss","SallaProductsSlider","constructor","hostRef","salla","onReady","this","sourceValueIsValid","sourceValue","includes","getSource","logger","warn","hasCustomComponent","customElements","get","getItemHTML","product","h","class","source","getSourceValue","getUrlPrefix","urlPrefix","limit","getApiUrl","prefixes","url","api","join","e","config","Array","isArray","JSON","parse","length","canRender","isReady","componentWillLoad","productsData","request","then","res","data","render","Host","id","sliderId","Math","random","toString","substr","type","blockTitle","subTitle","displayAllUrl","slot","_a","map"],"sources":["./src/components/salla-products-slider/salla-products-slider.scss?tag=salla-products-slider","./src/components/salla-products-slider/salla-products-slider.tsx"],"sourcesContent":[".s-products-slider{\n &-wrapper{\n\n }\n &-slider{\n\n }\n &-card{\n\n }\n}","import {Component, Host, h, Prop, Element, State} from '@stencil/core';\n\n@Component({\n tag: 'salla-products-slider',\n styleUrl: 'salla-products-slider.scss'\n})\nexport class SallaProductsSlider {\n constructor() {\n salla.onReady(() => {\n this.sourceValueIsValid = !!(this.sourceValue || ['latest', 'offers'].includes(this.getSource()));\n });\n if (!this.sourceValueIsValid) {\n salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`);\n return;\n }\n this.hasCustomComponent = !!customElements.get('custom-salla-product-card');\n }\n\n @Element() host: HTMLElement;\n //todo:: support limit, default =10, make sure that maximum is 32,\n\n /**\n * Title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() blockTitle: string;\n\n /**\n * Sub title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() subTitle: string;\n\n /**\n * Slider Id, if not provided will be generated automatically\n * @type {string}\n * @default ''\n * */\n @Prop() sliderId: string;\n\n /**\n * Display 'ALL' URL\n * @type {string}\n * @default ''\n * */\n @Prop() displayAllUrl: string;\n\n /**\n * Source of the products, if api will get the products from the API, if json will get the products from the products prop\n * @type {string}\n * @default ''\n * */\n @Prop({\n reflect: true,\n mutable: true\n }) source: 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'tags' | 'selected' | 'offers' | 'landing-page';\n\n /**\n * The source value, cloud be different values as following:\n * - array of ids when `source` in ['categories', 'brands', 'tags', 'selected']\n * - products payload when `source` = 'json'\n * - product_id when `source` = 'related'\n *\n * @type {string}\n * */\n @Prop() sourceValue: string;\n\n /**\n * Limit for number of products in the list.\n */\n @Prop({mutable: true}) limit: number;\n\n \n @State() productsData: any;\n @State() isReady: boolean;\n @State() sourceValueIsValid: boolean;\n @State() hasCustomComponent: boolean;\n @State() apiUrl: string = '';\n @State() parsedSourceValue: any;\n\n private getItemHTML(product) {\n if (this.hasCustomComponent) {\n return <div class=\"s-products-slider-card\">\n <custom-salla-product-card product={product} source={this.getSource()} source-value={this.getSourceValue()}/>\n </div>;\n }\n\n return <div class=\"s-products-slider-card\">\n <salla-product-card\n show-quantity={this.getSource() == 'landing-page'}\n hide-add-btn={this.getSource() == 'landing-page'}\n shadow-on-hover={true}\n product={product}/>\n </div>;\n }\n\n private getUrlPrefix() {\n let urlPrefix = '';\n if (this.limit) {\n urlPrefix = `&per_page=${this.limit > 32 ? 32 : this.limit}`;\n }\n return urlPrefix;\n }\n\n getApiUrl() {\n if (this.getSource() === 'json') {\n return;\n }\n let prefixes = this.getUrlPrefix();\n if (['offers', 'latest'].includes(this.getSource())) {\n return salla.url.api(`products?source=${this.getSource()}${prefixes}`);\n }\n if (['related', 'landing-page'].includes(this.getSource())) {\n return salla.url.api(`products?source=${this.getSource()}&source_value=${this.getSourceValue()}${prefixes}`);\n }\n\n try {\n return salla.url.api(`products?source=${this.getSource()}&source_value[]=${this.getSourceValue().join('&source_value[]=')}${prefixes}`);\n } catch (e) {\n salla.logger.warn(`source-value prop should be array of ids ex source-value=\"[1,2,3]\" for the source [${this.getSource()}]`);\n this.sourceValueIsValid = false;\n }\n }\n private getSource(){\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n }[this.source || salla.config.get('page.slug')] || this.source ||'latest';\n }\n\n private getSourceValue() {\n if (!['search', 'json'].includes(this.getSource())) {\n if (Array.isArray(JSON.parse(this.sourceValue)) && JSON.parse(this.sourceValue).length) {\n return JSON.parse(this.sourceValue);\n }\n\n if (typeof JSON.parse(this.sourceValue) == 'number') {\n return [JSON.parse(this.sourceValue)];\n }\n }\n return this.sourceValue || salla.config.get('page.id');\n }\n private canRender() {\n return this.sourceValueIsValid && this.isReady;\n }\n\n componentWillLoad() {\n if (this.source === 'json') {\n this.productsData = this.getSourceValue();\n this.isReady = true\n return;\n }\n salla.api.request(this.getApiUrl(), null, 'get').then(res => {\n this.productsData = res.data\n this.isReady = true\n })\n }\n\n render() {\n if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled')) || !this.canRender()) {\n return;\n }\n return (\n <Host class=\"s-products-slider-wrapper\">\n <salla-slider\n class=\"s-products-slider-slider\"\n id={this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`}\n type=\"carousel\"\n block-title={this.blockTitle}\n block-subTitle={this.subTitle}\n display-all-url={this.displayAllUrl}\n >\n <div slot=\"items\">\n {this.productsData?.map((product) =>\n this.getItemHTML(product)\n )}\n </div>\n </salla-slider>\n </Host>\n );\n }\n\n}\n"],"mappings":";;;yDAAA,M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AA,SAAAA,EAAEC,KAAK1C,GACvBX,KAAKU,YAAYC,O"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import{r as t,c as i,h as s,H as e}from"./p-3c7d3f26.js";const r=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";const h=class{constructor(s){t(this,s);this.changed=i(this,"changed",7);this.minPrice=1e3;this.maxPrice=5e3;this.option=undefined;this.filtersData=undefined;this.min=0;this.max=1e4;this.minthumb=0;this.maxthumb=0;this.priceOptions=undefined;this.generatePriceOptions()}async reset(){var t,i;this.minInput.value=`${((i=(t=this.option)===null||t===void 0?void 0:t.values)===null||i===void 0?void 0:i.min)||0}`;this.maxInput.value=`${this.max}`}generatePriceOptions(){const t=this.max;let i=Math.floor(t/100);if(i<1){i=Math.floor(t/10)}let s=Math.floor(t/2);let e=Math.floor(t/3*2);this.priceOptions=[i,s,e];console.log(`Price options for max price ${t}: ${this.priceOptions.join(", ")}`)}getPriceLabel(t){if(t==Math.floor(this.max/100)){return`اقل من ${salla.money(t)}`}else if(t==Math.floor(this.max/2)){return`${salla.money(this.priceOptions[0])} الى ${salla.money(this.priceOptions[2])}`}else{return`أكثر من ${salla.money(t)}`}}handleMinMaxPrice(t,i){const[s,e,r]=this.priceOptions;switch(i){case s:this.minPrice=0;this.maxPrice=s;break;case e:this.minPrice=s;this.maxPrice=r;break;case r:this.minPrice=r;this.maxPrice=this.max;break;default:throw new Error(`Invalid price option: ${i}`)}this.minInput.value=`${this.minPrice}`;this.maxInput.value=`${this.maxPrice}`;this.changedEventHandler(t)}async changedEventHandler(t,i=false){let s=t?t.target.value*1:null;if(i){this.minInputValidation(s);this.minthumb=(this.minPrice-this.min)/(this.max-this.min)*100}else{this.maxInputValidation(s);this.maxthumb=100-(this.maxPrice-this.min)/(this.max-this.min)*100}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}})}minInputValidation(t){if(t&&(t>this.max||t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}}maxInputValidation(t){if(t&&(t<this.min||t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}if(t){this.maxPrice=t}}isChecked(t){if(t==Math.floor(this.max/100)){return this.minPrice==0&&this.maxPrice==t}if(t==Math.floor(this.max/2)){return this.minPrice==this.priceOptions[0]&&this.maxPrice==this.priceOptions[2]}if(t==Math.floor(this.max/3*2)){return this.minPrice==t&&this.maxPrice==this.max}}render(){return s(e,null,this.priceOptions&&this.priceOptions.map(((t,i)=>s("label",{class:"s-filters-label",htmlFor:`${t}-${i}`},s("input",{id:`${t}-${i}`,name:"price",type:"radio",checked:this.isChecked(t),class:"s-filters-radio",onChange:i=>this.handleMinMaxPrice(i,t)}),this.getPriceLabel(t)))),s("div",{class:"flex justify-center items-center"},s("div",{class:"relative max-w-xl w-full"},s("div",{class:"s-price-range-inputs"},s("div",{class:"s-price-range-relative"},s("div",{class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{type:"number",maxlength:"5",ref:t=>this.minInput=t,onInput:t=>this.changedEventHandler(t,true),placeholder:"من",class:"s-price-range-number-input"})),s("div",{class:"s-price-range-gray-text"}," -"),s("div",{class:"s-price-range-relative"},s("div",{class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{type:"number",maxlength:"5",placeholder:"الى",ref:t=>this.maxInput=t,onInput:t=>this.changedEventHandler(t),class:"s-price-range-number-input","aria-describedby":"price-currency"}))))))}componentDidLoad(){var t;if(this.filtersData&&((t=this.filtersData)===null||t===void 0?void 0:t.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max;this.maxInput.value=`${this.maxPrice}`;this.minInput.value=`${this.minPrice}`}this.isReady=true}};h.style=r;export{h as salla_price_range};
5
+ //# sourceMappingURL=p-e393f123.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sallaPriceRangeCss","SallaPriceRange","constructor","hostRef","this","generatePriceOptions","async","minInput","value","_b","_a","option","values","min","maxInput","max","MAX_PRICE","option1","Math","floor","option2","option3","priceOptions","console","log","join","getPriceLabel","price","salla","money","handleMinMaxPrice","event","firstOption","secondOption","thirdOption","minPrice","maxPrice","Error","changedEventHandler","isMin","target","minInputValidation","minthumb","maxInputValidation","maxthumb","isReady","changed","emit","isChecked","render","h","Host","map","index","class","htmlFor","id","name","type","checked","onChange","e","config","currency","symbol","maxlength","ref","el","onInput","placeholder","componentDidLoad","filtersData"],"sources":["./src/components/salla-price-range/salla-price-range.scss?tag=salla-price-range","./src/components/salla-price-range/salla-price-range.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n\n.rtl, [dir=\"rtl\"] {\n .rtl-range-slider {\n transform: rotateY(180deg);\n }\n\n .rtl-range-numbers{\n flex-direction: row-reverse;\n }\n\n .form-select, select{\n background-position: left 0.5rem center;\n padding-right: 12px;\n } \n\n // divide\n.menu-divide {\n li {\n &:not(:last-child) {\n &:after {\n left: 0;\n right: auto;\n }\n }\n }\n}\n}\n\ninput[type=range]::-webkit-slider-thumb {\n pointer-events: all;\n width: 24px;\n height: 24px;\n -webkit-appearance: none;\n}\n\n[type='checkbox']:checked{\n background-size: 80%;\n}","import { Component, Host, h, State, Prop, Event, Method } from '@stencil/core';\nimport { Filter } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-price-range',\n styleUrl: 'salla-price-range.scss',\n})\nexport class SallaPriceRange {\n constructor() {\n this.generatePriceOptions();\n }\n @Prop({ mutable: true }) minPrice = 1000;\n @Prop({ mutable: true }) maxPrice = 5000;\n @Prop({ reflect: true }) option: Filter;\n @Prop({ reflect: true }) filtersData: any;\n @State() min = 0;\n @State() max = 10000;\n\n @State() minthumb = 0;\n @State() maxthumb = 0;\n @State() priceOptions: any;\n\n @Event() changed: any;\n\n isReady: Boolean;\n rightHandle: HTMLDivElement;\n leftHandle: HTMLDivElement;\n activeBar: HTMLDivElement;\n minInput: HTMLInputElement;\n maxInput: HTMLInputElement;\n\n @Method()\n async reset() {\n //@ts-ignore\n this.minInput.value = `${this.option?.values?.min || 0}`;\n this.maxInput.value = `${this.max}`;\n }\n\n private generatePriceOptions() {\n const MAX_PRICE = this.max;\n let option1 = Math.floor(MAX_PRICE / 100);\n if (option1 < 1) {\n option1 = Math.floor(MAX_PRICE / 10);\n }\n let option2 = Math.floor(MAX_PRICE / 2);\n let option3 = Math.floor((MAX_PRICE / 3) * 2);\n this.priceOptions = [option1, option2, option3];\n\n // to be removed\n console.log(`Price options for max price ${MAX_PRICE}: ${this.priceOptions.join(', ')}`);\n }\n private getPriceLabel(price) {\n if (price == Math.floor(this.max / 100)) {\n return `اقل من ${salla.money(price)}`;\n } else if (price == Math.floor(this.max / 2)) {\n return `${salla.money(this.priceOptions[0])} الى ${salla.money(this.priceOptions[2])}`;\n } else {\n return `أكثر من ${salla.money(price)}`;\n }\n }\n\n private handleMinMaxPrice(event: Event, option: string): void {\n const [firstOption, secondOption, thirdOption] = this.priceOptions;\n switch (option) {\n case firstOption:\n this.minPrice = 0;\n this.maxPrice = firstOption;\n break;\n case secondOption:\n this.minPrice = firstOption;\n this.maxPrice = thirdOption;\n break;\n case thirdOption:\n this.minPrice = thirdOption;\n this.maxPrice = this.max;\n break;\n default:\n throw new Error(`Invalid price option: ${option}`);\n }\n\n // Update the input values\n this.minInput.value = `${this.minPrice}`;\n this.maxInput.value = `${this.maxPrice}`;\n this.changedEventHandler(event);\n }\n\n private async changedEventHandler(event, isMin = false) {\n\n let value = event ? event.target.value * 1 : null\n if (isMin) {\n this.minInputValidation(value);\n this.minthumb = ((this.minPrice - this.min) / (this.max - this.min)) * 100;\n } else {\n this.maxInputValidation(value)\n this.maxthumb = 100 - (((this.maxPrice - this.min) / (this.max - this.min)) * 100);\n }\n\n\n this.isReady && this.changed.emit({\n event: event,\n option: this.option,\n value: { max: this.maxPrice, min: this.minPrice }\n })\n }\n\n\n minInputValidation(value) {\n if (value && (value > this.max || value > this.maxPrice)) {\n // this.minPrice = this.maxPrice;\n return;\n }\n\n if (value < this.min) {\n this.minPrice = this.min;\n return;\n }\n\n if (value) {\n this.minPrice = value;\n }\n }\n\n maxInputValidation(value) {\n if (value && (value < this.min || value < this.minPrice)) {\n // this.maxPrice = this.minPrice;\n return;\n }\n if (value > this.max) {\n this.maxPrice = this.max;\n return;\n }\n\n if (value) {\n this.maxPrice = value;\n }\n }\n private isChecked(option) {\n if (option == Math.floor(this.max / 100)) {\n return this.minPrice == 0 && this.maxPrice == option;\n }\n if (option == Math.floor(this.max / 2)) {\n return this.minPrice == this.priceOptions[0] && this.maxPrice == this.priceOptions[2];\n }\n if (option == Math.floor((this.max / 3) * 2)) {\n\n return this.minPrice == option && this.maxPrice == this.max;\n }\n }\n\n\n render() {\n return (\n <Host>\n {\n this.priceOptions && this.priceOptions.map((option, index) => {\n return <label class=\"s-filters-label\" htmlFor={`${option}-${index}`}>\n <input\n id={`${option}-${index}`}\n name=\"price\"\n type=\"radio\"\n checked={this.isChecked(option)}\n class=\"s-filters-radio\"\n onChange={e => this.handleMinMaxPrice(e, option)}\n />\n {this.getPriceLabel(option)}\n </label>\n })\n }\n\n\n <div class=\"flex justify-center items-center\">\n <div class=\"relative max-w-xl w-full\">\n <div class=\"s-price-range-inputs\">\n <div class=\"s-price-range-relative\">\n <div class=\"s-price-range-currency\"> {salla.config.currency().symbol}</div>\n <input\n type=\"number\"\n maxlength=\"5\"\n ref={el => this.minInput = el}\n onInput={(event) => this.changedEventHandler(event, true)}\n // value={this.minPrice}\n placeholder=\"من\"\n class=\"s-price-range-number-input\"\n />\n </div>\n\n <div class=\"s-price-range-gray-text\"> -</div>\n <div class=\"s-price-range-relative\">\n <div class=\"s-price-range-currency\"> {salla.config.currency().symbol}</div>\n <input type=\"number\" maxlength=\"5\"\n placeholder=\"الى\"\n ref={el => this.maxInput = el}\n onInput={(event) => this.changedEventHandler(event)}\n // value={this.maxPrice}\n class=\"s-price-range-number-input\" aria-describedby=\"price-currency\" />\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n componentDidLoad() {\n if (this.filtersData && this.filtersData?.price) {\n this.minPrice = this.filtersData.price.min;\n this.maxPrice = this.filtersData.price.max;\n this.maxInput.value = `${this.maxPrice}`;\n this.minInput.value = `${this.minPrice}`;\n }\n this.isReady = true;\n }\n}\n"],"mappings":";;;yDAAA,MAAMA,EAAqB,0nB,MCOdC,EAAe,MAC1BC,YAAAC,G,yDAGoC,I,cACA,I,0DAGrB,E,SACA,I,cAEK,E,cACA,E,4BAVlBC,KAAKC,sB,CAuBPC,c,QAEEF,KAAKG,SAASC,MAAQ,KAAGC,GAAAC,EAAAN,KAAKO,UAAM,MAAAD,SAAA,SAAAA,EAAEE,UAAM,MAAAH,SAAA,SAAAA,EAAEI,MAAO,IACrDT,KAAKU,SAASN,MAAQ,GAAGJ,KAAKW,K,CAGxBV,uBACN,MAAMW,EAAYZ,KAAKW,IACvB,IAAIE,EAAUC,KAAKC,MAAMH,EAAY,KACrC,GAAIC,EAAU,EAAG,CACfA,EAAUC,KAAKC,MAAMH,EAAY,G,CAEnC,IAAII,EAAUF,KAAKC,MAAMH,EAAY,GACrC,IAAIK,EAAUH,KAAKC,MAAOH,EAAY,EAAK,GAC3CZ,KAAKkB,aAAe,CAACL,EAASG,EAASC,GAGvCE,QAAQC,IAAI,+BAA+BR,MAAcZ,KAAKkB,aAAaG,KAAK,Q,CAE1EC,cAAcC,GACpB,GAAIA,GAAST,KAAKC,MAAMf,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AAKI,MAAM,0BACTJ,EAAA,OAAKI,MAAM,0BAAwB,IAAG1B,MAAMkC,OAAOC,WAAWC,QAC9Dd,EAAA,SACEQ,KAAK,SACLO,UAAU,IACVC,IAAKC,GAAM/D,KAAKG,SAAW4D,EAC3BC,QAAUrC,GAAU3B,KAAKkC,oBAAoBP,EAAO,MAEpDsC,YAAY,KACZf,MAAM,gCAIVJ,EAAA,OAAKI,MAAM,2BAAyB,MACpCJ,EAAA,OAAKI,MAAM,0BACTJ,EAAA,OAAKI,MAAM,0BAAwB,IAAG1B,MAAMkC,OAAOC,WAAWC,QAC9Dd,EAAA,SAAOQ,KAAK,SAASO,UAAU,IAC7BI,YAAY,MACZH,IAAKC,GAAM/D,KAAKU,SAAWqD,EAC3BC,QAAUrC,GAAU3B,KAAKkC,oBAAoBP,GAE7CuB,MAAM,6BAA4B,mBAAkB,uB,CASpEgB,mB,MACE,GAAIlE,KAAKmE,eAAe7D,EAAAN,KAAKmE,eAAW,MAAA7D,SAAA,SAAAA,EAAEiB,OAAO,CAC/CvB,KAAK+B,SAAW/B,KAAKmE,YAAY5C,MAAMd,IACvCT,KAAKgC,SAAWhC,KAAKmE,YAAY5C,MAAMZ,IACvCX,KAAKU,SAASN,MAAQ,GAAGJ,KAAKgC,WAC9BhC,KAAKG,SAASC,MAAQ,GAAGJ,KAAK+B,U,CAEhC/B,KAAKyC,QAAU,I"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import{r as s,c as t,h as i,H as e,g as h}from"./p-3c7d3f26.js";import{H as l}from"./p-dad8bacc.js";import{a as n,F as r}from"./p-d3cc3770.js";const a=":host{display:block}";const o=class{constructor(i){s(this,i);this.changed=t(this,"changed",7);this.initHeight=195;this.widgetTitle=undefined;this.withLoadMore=undefined;this.filtersData=undefined;this.option=undefined;this.isOpen=true;this.isShowMore=false}connectedCallback(){this.withLoadMore=Array.isArray(this.option.values)&&this.option.values.length>8;this.widgetTitle=this.option.label}componentDidLoad(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.initHeight}px`);this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async reset(){if(this.option.type===n.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((s=>s.checked=false))}async showMore(){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?`${this.widgetValues.scrollHeight}px`:`${this.initHeight}px`;setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen;l.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(s){if(![n.VALUES,n.MINIMUM,n.VARIANTS].includes(s.type)){return""}return s.values.map(((t,e)=>{let h=typeof t=="number"?t:t.key||t.value;return i("label",{class:"s-filters-label",htmlFor:`${s.key}-option-${e}`},i("input",{id:`${s.key}-option-${e}`,name:s.key,type:s.inputType,checked:this.isSelectedOption(s,h),class:`s-filters-${s.inputType}`,onChange:t=>this.changed.emit({event:t,option:s,value:h})}),this.getOptionLabel(s,t))}))}isSelectedOption(s,t){if(!this.filtersData||!this.filtersData[s.key]){return false}return s.inputType===r.CHECKBOX?this.filtersData[s.key].includes(t):this.filtersData[s.key]==t}getOptionLabel(s,t){if(s.key=="rating"){return i("salla-rating-stars",{size:"small",value:t})}let e=t.value||"null";return i("span",{class:"s-filters-option-name"},e)}render(){return i(e,{class:"s-filters-widget-container"},i("h3",{class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},i("span",null,this.widgetTitle),i("span",{class:`s-filters-widget-plusminus ${this.isOpen?"s-filters-widget-plusminus-active":""}`})),i("div",{class:"s-filters-widget-content",ref:s=>this.widgetContent=s},i("div",{class:"s-filters-widget-values",ref:s=>this.widgetValues=s},i("slot",null),this.option.type!==n.RANGE?this.renderFilterOption(this.option):i("salla-price-range",{onChanged:s=>this.changed.emit(s.detail),ref:s=>this.priceRange=s,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&i("a",{class:"s-filters-widget-more",onClick:()=>this.showMore()},!this.isShowMore?"عرض المزيد":"عرض أقل")))}get host(){return h(this)}};o.style=a;export{o as salla_filters_widget};
5
+ //# sourceMappingURL=p-e3dc0687.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sallaFiltersWidgetCss","SallaFiltersWidget","this","initHeight","connectedCallback","withLoadMore","Array","isArray","option","values","length","widgetTitle","label","componentDidLoad","widgetValues","scrollHeight","style","maxHeight","widgetContent","height","async","type","FilterOptionTypes","RANGE","priceRange","reset","from","host","querySelectorAll","forEach","input","checked","isShowMore","setTimeout","isOpen","Helper","toggleElementClassIf","renderFilterOption","VALUES","MINIMUM","VARIANTS","includes","map","filterOption","index","value","key","h","class","htmlFor","id","name","inputType","isSelectedOption","onChange","e","changed","emit","event","getOptionLabel","filtersData","FilterOptionInputType","CHECKBOX","size","render","Host","onClick","toggleWidget","ref","el","onChanged","detail","price","showMore"],"sources":["./src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","./src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import {Component, Host, h, Method, State, Prop, Event, Element} from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport {Filter, FilterOptionInputType, FilterOptionTypes} from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n @Prop({mutable: true}) widgetTitle: string;\n @Prop({mutable: true}) withLoadMore: boolean;\n @Prop({reflect: true}) filtersData: object;\n @Prop({reflect: true}) option: Filter;\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = Array.isArray(this.option.values) && this.option.values.length > 8;\n this.widgetTitle = this.option.label;\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${index}`}>\n <input\n id={`${option.key}-option-${index}`}\n name={option.key}\n type={option.inputType}\n //TODO:: debug more why sometimes it's not rendered as selected🤨\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-${option.inputType}`}\n onChange={e => this.changed.emit({event: e, option: option, value: value})}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n }\n\n private isSelectedOption(option: Filter, value) {\n if (!this.filtersData || !this.filtersData[option.key]) {\n return false\n }\n\n return option.inputType === FilterOptionInputType.CHECKBOX\n ? this.filtersData[option.key].includes(value)\n : this.filtersData[option.key] == value;\n }\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption}/>;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.widgetTitle}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`}/>\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot/>\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => this.changed.emit(event.detail)}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option}/>\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? 'عرض المزيد' : 'عرض أقل'}</a>\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":";;;+IAAA,MAAMA,EAAwB,uB,MCQjBC,EAAkB,M,0DAWrBC,KAAAC,WAAqB,I,oHACF,K,gBACI,K,CAI/BC,oBAEEF,KAAKG,aAAeC,MAAMC,QAAQL,KAAKM,OAAOC,SAAWP,KAAKM,OAAOC,OAAOC,OAAS,EACrFR,KAAKS,YAAcT,KAAKM,OAAOI,K,CAGjCC,mBACEX,KAAKY,aAAaC,aAAeb,KAAKC,aAAeD,KAAKG,aAAe,OACxEH,KAAKG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
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{p as e,b as a}from"./p-3c7d3f26.js";export{s as setNonce}from"./p-3c7d3f26.js";import{g as t}from"./p-6948b825.js";import"./p-f84bae34.js";const l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((e=>{t();return a(JSON.parse('[["p-9713044b",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-6349125a",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"source":[1537],"sourceValue":[1,"source-value"],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"urlPrefix":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-32908dae",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-3b1a0059",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-16e25100",[[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}]]],["p-bce1b49b",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-8f0fd469",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-41b3e09d",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-8ee37cc6",[[0,"salla-price-range",{"minPrice":[1026,"min-price"],"maxPrice":[1026,"max-price"],"min":[32],"max":[32],"minthumb":[32],"maxthumb":[32],"minTrigger":[64],"maxTrigger":[64],"minInputValidation":[64],"maxInputValidation":[64],"changeRightHandle":[64],"changeLeftHandle":[64]}]]],["p-62c1b309",[[4,"salla-filters-widget",{"widgetTitle":[1025,"widget-title"],"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-dc422f49",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]]]'),e)}));
4
+ import{p as e,b as a}from"./p-3c7d3f26.js";export{s as setNonce}from"./p-3c7d3f26.js";import{g as t}from"./p-1edec127.js";import"./p-f84bae34.js";const l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((e=>{t();return a(JSON.parse('[["p-b766115a",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-def222e1",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-32908dae",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-cd5cb2f7",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-16e25100",[[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}]]],["p-bce1b49b",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-8f0fd469",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-3212e42c",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-e393f123",[[0,"salla-price-range",{"minPrice":[1026,"min-price"],"maxPrice":[1026,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"minthumb":[32],"maxthumb":[32],"priceOptions":[32],"reset":[64]}]]],["p-e3dc0687",[[4,"salla-filters-widget",{"widgetTitle":[1025,"widget-title"],"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-dc422f49",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]]]'),e)}));
5
5
  //# sourceMappingURL=twilight.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","import","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.0.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":";;;kJAmBA,MAAMA,EAAe,KAkCjB,MAAMC,EAAaC,OAAOC,KAAKC,IAC/B,MAAMC,EAA6D,GAiBnE,GAAuBJ,IAAe,GAAI,CACtCI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BL,IAAeU,MAAKC,IAClBC,IACA,OAAOC,EAAcC,KAAAC,MAAA,2yfAAuCJ,EAAA"}
1
+ {"version":3,"names":["patchBrowser","importMeta","import","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.0.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":";;;kJAmBA,MAAMA,EAAe,KAkCjB,MAAMC,EAAaC,OAAOC,KAAKC,IAC/B,MAAMC,EAA6D,GAiBnE,GAAuBJ,IAAe,GAAI,CACtCI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BL,IAAeU,MAAKC,IAClBC,IACA,OAAOC,EAAcC,KAAAC,MAAA,kvfAAuCJ,EAAA"}
@@ -115,7 +115,7 @@ DOMTokenList
115
115
  var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
116
116
  var start = function() {
117
117
  // if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
118
- var url = new URL('./p-6404a9a5.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
118
+ var url = new URL('./p-37389934.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
119
119
  System.import(url.href);
120
120
  };
121
121
 
@@ -17,13 +17,6 @@ export declare class SallaFiltersWidget {
17
17
  reset(): Promise<void>;
18
18
  showMore(): Promise<void>;
19
19
  toggleWidget(): Promise<void>;
20
- /**
21
- * @param {currentTarget: HTMLSallaPriceRangeElement} event
22
- * @param option
23
- * @private
24
- */
25
- private handlePriceSelection;
26
- renderSliderOption(option: any): any;
27
20
  renderFilterOption(option: Filter): any;
28
21
  private isSelectedOption;
29
22
  private getOptionLabel;
@@ -4,6 +4,7 @@ export interface CustomField {
4
4
  description: string;
5
5
  type: string;
6
6
  required: boolean;
7
+ length: number;
7
8
  }
8
9
  export declare enum CustomFieldType {
9
10
  TEXT = "text",
@@ -1,7 +1,10 @@
1
1
  export declare class SallaMaintenanceAlert {
2
+ host: HTMLElement;
2
3
  title: string;
3
4
  message: string;
4
5
  buttonTitle: string;
5
6
  componentWillLoad(): void;
7
+ private closeAlert;
6
8
  render(): any;
9
+ componentDidLoad(): void;
7
10
  }
@@ -1,24 +1,30 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { Filter } from "../salla-filters/interfaces";
2
2
  export declare class SallaPriceRange {
3
+ constructor();
3
4
  minPrice: number;
4
5
  maxPrice: number;
6
+ option: Filter;
7
+ filtersData: any;
5
8
  min: number;
6
9
  max: number;
7
10
  minthumb: number;
8
11
  maxthumb: number;
9
- minPriceSelected: EventEmitter<number>;
10
- maxPriceSelected: EventEmitter<number>;
12
+ priceOptions: any;
13
+ changed: any;
11
14
  isReady: Boolean;
12
15
  rightHandle: HTMLDivElement;
13
16
  leftHandle: HTMLDivElement;
14
17
  activeBar: HTMLDivElement;
15
- componentWillLoad(): void;
16
- minTrigger(event?: any): Promise<void>;
17
- maxTrigger(event?: any): Promise<void>;
18
- minInputValidation(value: any): Promise<void>;
19
- maxInputValidation(value: any): Promise<void>;
20
- changeRightHandle(): Promise<void>;
21
- changeLeftHandle(): Promise<void>;
18
+ minInput: HTMLInputElement;
19
+ maxInput: HTMLInputElement;
20
+ reset(): Promise<void>;
21
+ private generatePriceOptions;
22
+ private getPriceLabel;
23
+ private handleMinMaxPrice;
24
+ private changedEventHandler;
25
+ minInputValidation(value: any): void;
26
+ maxInputValidation(value: any): void;
27
+ private isChecked;
22
28
  render(): any;
23
29
  componentDidLoad(): void;
24
30
  }
@@ -1,5 +1,4 @@
1
1
  export declare class SallaProductsList {
2
- constructor();
3
2
  connectedCallback(): void;
4
3
  setFilters(filters: any): Promise<void>;
5
4
  reload(): Promise<void>;
@@ -52,12 +51,13 @@ export declare class SallaProductsList {
52
51
  private isSourceWithoutValue;
53
52
  private animateItems;
54
53
  private createStatusDom;
54
+ private initBaseNextPageUrl;
55
55
  private buildNextPageUrl;
56
- private getUrlPrefix;
57
56
  private getSource;
58
57
  private getSourceValue;
59
58
  private loading;
60
59
  private getItemHTML;
60
+ private fetchProducts;
61
61
  private initiateInfiniteScroll;
62
62
  private canRender;
63
63
  render(): any;
@@ -40,14 +40,18 @@ export declare class SallaProductsSlider {
40
40
  * @type {string}
41
41
  * */
42
42
  sourceValue: string;
43
+ /**
44
+ * Limit for number of products in the list.
45
+ */
46
+ limit: number;
43
47
  productsData: any;
44
48
  isReady: boolean;
45
49
  sourceValueIsValid: boolean;
46
50
  hasCustomComponent: boolean;
47
- urlPrefix: string;
48
51
  apiUrl: string;
49
52
  parsedSourceValue: any;
50
53
  private getItemHTML;
54
+ private getUrlPrefix;
51
55
  getApiUrl(): any;
52
56
  private getSource;
53
57
  private getSourceValue;
@@ -13,6 +13,7 @@ export declare class SallaVerify {
13
13
  private timer;
14
14
  private resend;
15
15
  private otpInputs;
16
+ private firstOtpInput;
16
17
  private data;
17
18
  translationLoaded: boolean;
18
19
  host: HTMLElement;
@@ -42,8 +43,13 @@ export declare class SallaVerify {
42
43
  * to use: `salla.api.auth.verify` or `salla.profile.verify`
43
44
  */
44
45
  isProfileVerify: boolean;
46
+ private splitNumber;
47
+ private modifyNext;
48
+ private checkAllInputs;
45
49
  private handleKeyUp;
46
50
  private handlePaste;
51
+ private handleInput;
52
+ private handleFocus;
47
53
  /**
48
54
  * Get current code
49
55
  * @return {string}
@@ -60,6 +66,5 @@ export declare class SallaVerify {
60
66
  private resendCode;
61
67
  private submit;
62
68
  render(): any;
63
- private otpHandler;
64
69
  private myBody;
65
70
  }
@@ -980,14 +980,11 @@ export namespace Components {
980
980
  "iconSize": 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl';
981
981
  }
982
982
  interface SallaPriceRange {
983
- "changeLeftHandle": () => Promise<void>;
984
- "changeRightHandle": () => Promise<void>;
985
- "maxInputValidation": (value: any) => Promise<void>;
983
+ "filtersData": any;
986
984
  "maxPrice": number;
987
- "maxTrigger": (event?: any) => Promise<void>;
988
- "minInputValidation": (value: any) => Promise<void>;
989
985
  "minPrice": number;
990
- "minTrigger": (event?: any) => Promise<void>;
986
+ "option": Filter;
987
+ "reset": () => Promise<void>;
991
988
  }
992
989
  interface SallaProductAvailability {
993
990
  /**
@@ -1124,6 +1121,10 @@ export namespace Components {
1124
1121
  * @default ''
1125
1122
  */
1126
1123
  "displayAllUrl": string;
1124
+ /**
1125
+ * Limit for number of products in the list.
1126
+ */
1127
+ "limit": number;
1127
1128
  /**
1128
1129
  * Slider Id, if not provided will be generated automatically
1129
1130
  * @type {string}
@@ -2968,10 +2969,11 @@ declare namespace LocalJSX {
2968
2969
  "iconSize"?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl';
2969
2970
  }
2970
2971
  interface SallaPriceRange {
2972
+ "filtersData"?: any;
2971
2973
  "maxPrice"?: number;
2972
2974
  "minPrice"?: number;
2973
- "onMaxPriceSelected"?: (event: SallaPriceRangeCustomEvent<number>) => void;
2974
- "onMinPriceSelected"?: (event: SallaPriceRangeCustomEvent<number>) => void;
2975
+ "onChanged"?: (event: SallaPriceRangeCustomEvent<any>) => void;
2976
+ "option"?: Filter;
2975
2977
  }
2976
2978
  interface SallaProductAvailability {
2977
2979
  /**
@@ -3082,6 +3084,10 @@ declare namespace LocalJSX {
3082
3084
  * @default ''
3083
3085
  */
3084
3086
  "displayAllUrl"?: string;
3087
+ /**
3088
+ * Limit for number of products in the list.
3089
+ */
3090
+ "limit"?: number;
3085
3091
  /**
3086
3092
  * Slider Id, if not provided will be generated automatically
3087
3093
  * @type {string}