@salla.sa/twilight-components 2.13.26 → 2.13.27

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 (200) hide show
  1. package/dist/cjs/{index-96c545df.js → index-44391cfe.js} +58 -1
  2. package/dist/cjs/{index-96c545df.js.map → index-44391cfe.js.map} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/salla-add-product-button_47.cjs.entry.js +1 -1
  5. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  6. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-conditional-fields.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-offer.cjs.entry.js +147 -56
  17. package/dist/cjs/salla-offer.cjs.entry.js.map +1 -1
  18. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-products-slider.cjs.entry.js +12 -1
  24. package/dist/cjs/salla-products-slider.cjs.entry.js.map +1 -1
  25. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  26. package/dist/cjs/twilight.cjs.js +2 -2
  27. package/dist/collection/components/salla-offer/interfaces.js +16 -1
  28. package/dist/collection/components/salla-offer/interfaces.js.map +1 -1
  29. package/dist/collection/components/salla-offer/salla-offer.js +150 -65
  30. package/dist/collection/components/salla-offer/salla-offer.js.map +1 -1
  31. package/dist/collection/components/salla-products-slider/salla-products-slider.js +11 -0
  32. package/dist/collection/components/salla-products-slider/salla-products-slider.js.map +1 -1
  33. package/dist/components/salla-offer.js +151 -57
  34. package/dist/components/salla-offer.js.map +1 -1
  35. package/dist/components/salla-products-slider.js +11 -0
  36. package/dist/components/salla-products-slider.js.map +1 -1
  37. package/dist/esm/{index-9a9b1e67.js → index-79837019.js} +58 -1
  38. package/dist/esm/{index-9a9b1e67.js.map → index-79837019.js.map} +1 -1
  39. package/dist/esm/loader.js +3 -3
  40. package/dist/esm/salla-add-product-button_47.entry.js +1 -1
  41. package/dist/esm/salla-advertisement.entry.js +1 -1
  42. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  43. package/dist/esm/salla-apps-icons.entry.js +1 -1
  44. package/dist/esm/salla-conditional-fields.entry.js +1 -1
  45. package/dist/esm/salla-contacts.entry.js +1 -1
  46. package/dist/esm/salla-filters-widget.entry.js +1 -1
  47. package/dist/esm/salla-filters.entry.js +1 -1
  48. package/dist/esm/salla-installment.entry.js +1 -1
  49. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  50. package/dist/esm/salla-notification-item.entry.js +1 -1
  51. package/dist/esm/salla-notifications.entry.js +1 -1
  52. package/dist/esm/salla-offer.entry.js +147 -56
  53. package/dist/esm/salla-offer.entry.js.map +1 -1
  54. package/dist/esm/salla-order-summary.entry.js +1 -1
  55. package/dist/esm/salla-payments.entry.js +1 -1
  56. package/dist/esm/salla-price-range.entry.js +1 -1
  57. package/dist/esm/salla-product-options.entry.js +1 -1
  58. package/dist/esm/salla-products-list.entry.js +1 -1
  59. package/dist/esm/salla-products-slider.entry.js +12 -1
  60. package/dist/esm/salla-products-slider.entry.js.map +1 -1
  61. package/dist/esm/salla-social.entry.js +1 -1
  62. package/dist/esm/twilight.js +3 -3
  63. package/dist/esm-es5/index-79837019.js +5 -0
  64. package/dist/esm-es5/index-79837019.js.map +1 -0
  65. package/dist/esm-es5/loader.js +1 -1
  66. package/dist/esm-es5/loader.js.map +1 -1
  67. package/dist/esm-es5/salla-add-product-button_47.entry.js +1 -1
  68. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  69. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  70. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  71. package/dist/esm-es5/salla-conditional-fields.entry.js +1 -1
  72. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  73. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  74. package/dist/esm-es5/salla-filters.entry.js +1 -1
  75. package/dist/esm-es5/salla-installment.entry.js +1 -1
  76. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  77. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  78. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  79. package/dist/esm-es5/salla-offer.entry.js +1 -1
  80. package/dist/esm-es5/salla-offer.entry.js.map +1 -1
  81. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  82. package/dist/esm-es5/salla-payments.entry.js +1 -1
  83. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  84. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  85. package/dist/esm-es5/salla-products-list.entry.js +1 -1
  86. package/dist/esm-es5/salla-products-slider.entry.js +1 -1
  87. package/dist/esm-es5/salla-products-slider.entry.js.map +1 -1
  88. package/dist/esm-es5/salla-social.entry.js +1 -1
  89. package/dist/esm-es5/twilight.js +1 -1
  90. package/dist/esm-es5/twilight.js.map +1 -1
  91. package/dist/twilight/{p-94ad2e62.entry.js → p-03f23525.entry.js} +2 -2
  92. package/dist/twilight/{p-e218f9e3.entry.js → p-080bbb5b.entry.js} +2 -2
  93. package/dist/twilight/{p-dcd5ddbe.system.entry.js → p-0ed91e2a.system.entry.js} +2 -2
  94. package/dist/twilight/{p-f30e7de2.entry.js → p-199114a5.entry.js} +2 -2
  95. package/dist/twilight/{p-26807b00.system.entry.js → p-230e06da.system.entry.js} +2 -2
  96. package/dist/twilight/{p-26ccfdb9.system.entry.js → p-26fd0612.system.entry.js} +2 -2
  97. package/dist/twilight/{p-5775cbdb.entry.js → p-34751048.entry.js} +2 -2
  98. package/dist/twilight/{p-97a6c220.system.entry.js → p-390d5cbb.system.entry.js} +2 -2
  99. package/dist/twilight/{p-c7f23f03.entry.js → p-3c32b61c.entry.js} +2 -2
  100. package/dist/twilight/p-4390fbcd.system.entry.js +5 -0
  101. package/dist/twilight/{p-f5cd04ef.entry.js → p-46ccba25.entry.js} +2 -2
  102. package/dist/twilight/{p-ed382e13.system.entry.js → p-52ff730a.system.entry.js} +2 -2
  103. package/dist/twilight/p-5b579b17.entry.js +5 -0
  104. package/dist/twilight/p-5b579b17.entry.js.map +1 -0
  105. package/dist/twilight/{p-09708e69.entry.js → p-5bc4cd9e.entry.js} +2 -2
  106. package/dist/twilight/p-69245750.system.js +5 -0
  107. package/dist/twilight/{p-d3266fdb.system.js.map → p-69245750.system.js.map} +1 -1
  108. package/dist/twilight/p-6a8a9ec7.system.entry.js +5 -0
  109. package/dist/twilight/p-6a8a9ec7.system.entry.js.map +1 -0
  110. package/dist/twilight/{p-19338c46.entry.js → p-6b4d6c03.entry.js} +2 -2
  111. package/dist/twilight/{p-4923a67f.system.entry.js → p-6d2ad7ef.system.entry.js} +2 -2
  112. package/dist/twilight/{p-52e80e00.system.entry.js → p-7686e7fd.system.entry.js} +2 -2
  113. package/dist/twilight/{p-d41dfff7.entry.js → p-76920369.entry.js} +2 -2
  114. package/dist/twilight/{p-d5e825e0.entry.js → p-7dc1b3c7.entry.js} +2 -2
  115. package/dist/twilight/{p-98df3e02.system.entry.js → p-7ff9dda0.system.entry.js} +2 -2
  116. package/dist/twilight/{p-06371bb0.entry.js → p-85993e98.entry.js} +2 -2
  117. package/dist/twilight/{p-e6bb10f0.entry.js → p-85cbfc81.entry.js} +2 -2
  118. package/dist/twilight/{p-0b502ded.system.entry.js → p-962d53a3.system.entry.js} +2 -2
  119. package/dist/twilight/{p-b568dcc3.entry.js → p-9c38d0c5.entry.js} +2 -2
  120. package/dist/twilight/{p-244fdaa3.system.entry.js → p-9ff06235.system.entry.js} +2 -2
  121. package/dist/twilight/{p-1d8dea0d.system.entry.js → p-a00e5e28.system.entry.js} +2 -2
  122. package/dist/twilight/p-a0dabf35.system.js +6 -0
  123. package/dist/twilight/p-a0dabf35.system.js.map +1 -0
  124. package/dist/twilight/p-a2813bc2.entry.js +5 -0
  125. package/dist/twilight/p-a2813bc2.entry.js.map +1 -0
  126. package/dist/twilight/{p-e7aa06ff.entry.js → p-b6a073de.entry.js} +2 -2
  127. package/dist/twilight/{p-5ab9e320.system.entry.js → p-bea45f66.system.entry.js} +2 -2
  128. package/dist/twilight/{p-7fc43537.entry.js → p-befee3a2.entry.js} +2 -2
  129. package/dist/twilight/{p-5cf571e0.entry.js → p-c9a82718.entry.js} +2 -2
  130. package/dist/twilight/{p-65f0067f.entry.js → p-cd86b571.entry.js} +2 -2
  131. package/dist/twilight/{p-27e67445.system.entry.js → p-d6a5a331.system.entry.js} +2 -2
  132. package/dist/twilight/{p-9afefe3a.system.entry.js → p-da0686ae.system.entry.js} +2 -2
  133. package/dist/twilight/{p-d1b7315f.system.entry.js → p-e39cd40e.system.entry.js} +2 -2
  134. package/dist/twilight/p-e64a8b4d.system.entry.js +5 -0
  135. package/dist/twilight/p-e64a8b4d.system.entry.js.map +1 -0
  136. package/dist/twilight/{p-bb77d0d9.system.entry.js → p-e6a7f1f0.system.entry.js} +2 -2
  137. package/dist/twilight/{p-2919b445.system.entry.js → p-f3d5458e.system.entry.js} +2 -2
  138. package/dist/twilight/p-fafedb13.js +6 -0
  139. package/dist/twilight/p-fafedb13.js.map +1 -0
  140. package/dist/twilight/{p-93a0c3f0.entry.js → p-fc8e9b7f.entry.js} +2 -2
  141. package/dist/twilight/twilight.esm.js +1 -1
  142. package/dist/twilight/twilight.esm.js.map +1 -1
  143. package/dist/twilight/twilight.js +1 -1
  144. package/dist/types/components/salla-offer/interfaces.d.ts +65 -38
  145. package/dist/types/components/salla-offer/salla-offer.d.ts +26 -16
  146. package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +1 -0
  147. package/dist/types/components.d.ts +6 -4
  148. package/package.json +5 -5
  149. package/dist/esm-es5/index-9a9b1e67.js +0 -5
  150. package/dist/esm-es5/index-9a9b1e67.js.map +0 -1
  151. package/dist/twilight/p-294dad80.js +0 -6
  152. package/dist/twilight/p-294dad80.js.map +0 -1
  153. package/dist/twilight/p-5add79da.system.entry.js +0 -5
  154. package/dist/twilight/p-65a4715d.entry.js +0 -5
  155. package/dist/twilight/p-65a4715d.entry.js.map +0 -1
  156. package/dist/twilight/p-66da3f43.system.entry.js +0 -5
  157. package/dist/twilight/p-66da3f43.system.entry.js.map +0 -1
  158. package/dist/twilight/p-78b1292d.system.entry.js +0 -5
  159. package/dist/twilight/p-78b1292d.system.entry.js.map +0 -1
  160. package/dist/twilight/p-c8c265d7.entry.js +0 -5
  161. package/dist/twilight/p-c8c265d7.entry.js.map +0 -1
  162. package/dist/twilight/p-d3266fdb.system.js +0 -5
  163. package/dist/twilight/p-eebd57c0.system.js +0 -6
  164. package/dist/twilight/p-eebd57c0.system.js.map +0 -1
  165. /package/dist/twilight/{p-94ad2e62.entry.js.map → p-03f23525.entry.js.map} +0 -0
  166. /package/dist/twilight/{p-e218f9e3.entry.js.map → p-080bbb5b.entry.js.map} +0 -0
  167. /package/dist/twilight/{p-dcd5ddbe.system.entry.js.map → p-0ed91e2a.system.entry.js.map} +0 -0
  168. /package/dist/twilight/{p-f30e7de2.entry.js.map → p-199114a5.entry.js.map} +0 -0
  169. /package/dist/twilight/{p-26807b00.system.entry.js.map → p-230e06da.system.entry.js.map} +0 -0
  170. /package/dist/twilight/{p-26ccfdb9.system.entry.js.map → p-26fd0612.system.entry.js.map} +0 -0
  171. /package/dist/twilight/{p-5775cbdb.entry.js.map → p-34751048.entry.js.map} +0 -0
  172. /package/dist/twilight/{p-97a6c220.system.entry.js.map → p-390d5cbb.system.entry.js.map} +0 -0
  173. /package/dist/twilight/{p-c7f23f03.entry.js.map → p-3c32b61c.entry.js.map} +0 -0
  174. /package/dist/twilight/{p-5add79da.system.entry.js.map → p-4390fbcd.system.entry.js.map} +0 -0
  175. /package/dist/twilight/{p-f5cd04ef.entry.js.map → p-46ccba25.entry.js.map} +0 -0
  176. /package/dist/twilight/{p-ed382e13.system.entry.js.map → p-52ff730a.system.entry.js.map} +0 -0
  177. /package/dist/twilight/{p-09708e69.entry.js.map → p-5bc4cd9e.entry.js.map} +0 -0
  178. /package/dist/twilight/{p-19338c46.entry.js.map → p-6b4d6c03.entry.js.map} +0 -0
  179. /package/dist/twilight/{p-4923a67f.system.entry.js.map → p-6d2ad7ef.system.entry.js.map} +0 -0
  180. /package/dist/twilight/{p-52e80e00.system.entry.js.map → p-7686e7fd.system.entry.js.map} +0 -0
  181. /package/dist/twilight/{p-d41dfff7.entry.js.map → p-76920369.entry.js.map} +0 -0
  182. /package/dist/twilight/{p-d5e825e0.entry.js.map → p-7dc1b3c7.entry.js.map} +0 -0
  183. /package/dist/twilight/{p-98df3e02.system.entry.js.map → p-7ff9dda0.system.entry.js.map} +0 -0
  184. /package/dist/twilight/{p-06371bb0.entry.js.map → p-85993e98.entry.js.map} +0 -0
  185. /package/dist/twilight/{p-e6bb10f0.entry.js.map → p-85cbfc81.entry.js.map} +0 -0
  186. /package/dist/twilight/{p-0b502ded.system.entry.js.map → p-962d53a3.system.entry.js.map} +0 -0
  187. /package/dist/twilight/{p-b568dcc3.entry.js.map → p-9c38d0c5.entry.js.map} +0 -0
  188. /package/dist/twilight/{p-244fdaa3.system.entry.js.map → p-9ff06235.system.entry.js.map} +0 -0
  189. /package/dist/twilight/{p-1d8dea0d.system.entry.js.map → p-a00e5e28.system.entry.js.map} +0 -0
  190. /package/dist/twilight/{p-e7aa06ff.entry.js.map → p-b6a073de.entry.js.map} +0 -0
  191. /package/dist/twilight/{p-5ab9e320.system.entry.js.map → p-bea45f66.system.entry.js.map} +0 -0
  192. /package/dist/twilight/{p-7fc43537.entry.js.map → p-befee3a2.entry.js.map} +0 -0
  193. /package/dist/twilight/{p-5cf571e0.entry.js.map → p-c9a82718.entry.js.map} +0 -0
  194. /package/dist/twilight/{p-65f0067f.entry.js.map → p-cd86b571.entry.js.map} +0 -0
  195. /package/dist/twilight/{p-27e67445.system.entry.js.map → p-d6a5a331.system.entry.js.map} +0 -0
  196. /package/dist/twilight/{p-9afefe3a.system.entry.js.map → p-da0686ae.system.entry.js.map} +0 -0
  197. /package/dist/twilight/{p-d1b7315f.system.entry.js.map → p-e39cd40e.system.entry.js.map} +0 -0
  198. /package/dist/twilight/{p-bb77d0d9.system.entry.js.map → p-e6a7f1f0.system.entry.js.map} +0 -0
  199. /package/dist/twilight/{p-2919b445.system.entry.js.map → p-f3d5458e.system.entry.js.map} +0 -0
  200. /package/dist/twilight/{p-93a0c3f0.entry.js.map → p-fc8e9b7f.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"salla-offer.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,aAAa,GAAG,khBAAkhB;;MCmB3hB,UAAU;EAErB;;;;;sBA2B+B,EAAE;;;;iCAMQ,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;8BAC1D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC;iCAC7C,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC;8BAC5C,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,8BAA8B,CAAC;6BACzB,CAAC,QAAQ,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,QAAQ,EAAE,CAAC;;IAnC/H,KAAK,CAAC,IAAI,CAAC,Q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AI,CAAC,IAAI,IAClD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAC5B;QACC,IAAI,CAAA;GACT;;;;;;;","names":["h"],"sources":["src/components/salla-offer/salla-offer.scss?tag=salla-offer","src/components/salla-offer/salla-offer.tsx"],"sourcesContent":[".s-offer-wrapper .s-slider-block__title {\n h2 {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: #f87171;\n\n &::before {\n font-family: \"sallaicons\";\n content: \"\\ee30\" !important;\n position: absolute;\n top: 1rem;\n font-size: 3rem;\n font-weight: 400;\n line-height: 1;\n color: #fef2f2;\n }\n }\n}\n\n.s-offer-bank-wrapper-sinlge-item{\n display: flex;\n align-items: center !important;\n gap: 14px;\n}\n\n.s-offer-bank-wrapper {\n display: flex !important;\n width: 100% !important;\n}\n\n// .s-offer-bank-wrapper {\n // \n// }","import { Component, Element, Prop, State, h } from '@stencil/core';\nimport { Offer, Category, Product, Discount, Currency, Bank, Payment } from \"./interfaces\"\n\n\n/**\n * `salla-offer` is a StencilJS component that displays offers, categories, products, banks, and discount information.\n * It uses the `salla-slider` component for carousel functionality.\n *\n * @slot category - The slot for customizing the category entry layout.\n * \n * @csspart custom - Custom CSS part to target specific elements in the component.\n *\n * @example\n * <salla-offer product-id=\"123\"></salla-offer>\n */\n@Component({\n tag: 'salla-offer',\n styleUrl: 'salla-offer.scss',\n})\nexport class SallaOffer {\n\n constructor() {\n // Language\n salla.lang.onLoaded(() => {\n this.offer_with_price_text = salla.lang.get('pages.offer.with_price');\n this.with_discount_text = salla.lang.get('pages.products.with_a_discount');\n this.product_discount_text = salla.lang.get('pages.products.discount');\n this.special_offer_text = salla.lang.get('pages.products.special_offer');\n this.buy_quantity_text(\"\");\n })\n\n salla.onReady(() => {\n //let's make our component smart by getting the product id from the config if it's not passed\n this.productId = this.productId || (salla.url.is_page('product.single') ? salla.config.get('page.id') : null)\n this.userCurrency = salla.config.get('user.currency');\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || '<a href={url} class=\"s-offer-slide-cat-entry\"><i class={icon}></i><h4>{name}</h4></a>';\n }\n\n\n /**\n * Product id with the special offer tobe fetched.\n */\n @Prop({ mutable: true, reflect: true }) productId: number;\n\n // Declare component state variables\n @State() offer: Offer;\n @State() offersList: Offer[] = [];\n @State() userCurrency: Currency;\n @State() isMultipleBank: boolean;\n @State() title?: string;\n\n // Default translated texts\n @State() offer_with_price_text: string = salla.lang.get('pages.offer.with_price', { price: '' });\n @State() with_discount_text: string = salla.lang.get('pages.products.with_a_discount')\n @State() product_discount_text: string = salla.lang.get('pages.products.discount')\n @State() special_offer_text: string = salla.lang.get('pages.products.special_offer')\n @State() buy_quantity_text: (quantity: string) => string = (quantity) => salla.lang.get('pages.offer.buy_quantity', { quantity })\n\n // Reference to the host element\n @Element() host: HTMLElement;\n\n private categorySlot: string;\n\n /**\n * Generates content for the categories section.\n *\n * @param offeredCategories - An array of Category objects.\n * @returns An array of HTML elements representing categories.\n */\n private getCategoriesSection(offeredCategories: Category[]) {\n return offeredCategories.map((category: Category) => {\n return <div class=\"s-offer-slide-one-sixth swiper-slide\" innerHTML={this.categorySlot\n .replace(/\\{url\\}/g, category.url)\n .replace(/\\{icon\\}/g, category.icon)\n .replace(/\\{name\\}/g, category.name)}></div>\n })\n }\n\n /**\n * Generates content for the products section.\n *\n * @param offeredProducts - An array of Product objects.\n * @returns An array of HTML elements representing products.\n */\n private getProductSection(offeredProducts: Product[]) {\n return offeredProducts.map((product: Product) =>\n <div class=\"s-offer-slide-one-fourth\">\n <salla-product-card shadow-on-hover product={product}></salla-product-card>\n </div>\n )\n }\n\n /**\n * Generates content for the bank section.\n *\n * @param offeredBank - An array of Bank objects.\n * @param name - The title of the current offer.\n * @param description - The description of the current offer.\n * @returns An array of HTML elements representing banks.\n */\n private getBankSection(offeredBank: Bank[], name: string, description: string) {\n return offeredBank.map((bank: Bank) =>\n <div class={{ \"s-offer-slide-one-sixth\": this.isMultipleBank, \"s-offer-bank-wrapper-sinlge-item\": !this.isMultipleBank }}>\n <div class={{ \"s-offer-bank-wrapper\": true, \"s-offer-slide-one-sixth\": !this.isMultipleBank, \"s-offer-bank-wrapper-multi-spacer\": this.isMultipleBank }}>\n <div class=\"s-offer-bank-logo\">\n <img src={bank.logo || salla.url.cdn('images/s-empty.png')} data-src={bank.logo} alt={bank.name + \" offer\"} />\n </div>\n <ul class=\"s-offer-bank-payment-wrapper\">\n {bank.payments.map((payment: Payment) => {\n return <li class=\"s-offer-bank-payment-single\">\n <img\n src={salla.url.cdn('images/payment/' + payment + '_mini.png') || salla.url.cdn('images/s-empty.png')}\n data-src={salla.url.cdn('images/payment/' + payment + '_mini.png')}\n alt=\"payment\" />\n </li>\n })}\n </ul>\n {this.isMultipleBank ?\n <p class=\"s-offer-bank-payment-discount-percent\">\n {this.product_discount_text + bank.percent}%\n </p>\n : \"\"}\n </div>\n {!this.isMultipleBank ?\n <div class=\"s-offer-bank-message s-offer-slide-one-fourth\">\n <h2>{name}</h2>\n <p>{description}</p>\n </div>\n : \"\"}\n </div>\n )\n }\n\n /**\n * Generates content for the discount table section.\n *\n * @param discountTable - An array of Discount objects.\n * @returns An array of HTML elements representing discounts_table.\n */\n private getDiscountTableSection(discountTable: Discount[]) {\n return discountTable.map((discount: Discount) => {\n return <div class=\"s-offer-slide-one-fourth\">\n <div class=\"s-offer-slide-offer-entry\">\n <div class=\"s-offer-slide-offer-entry-price-quantity-container\">\n <p class=\"s-offer-slide-offer-entry-quantity\">{this.buy_quantity_text(discount.quantity_text)}</p>\n {discount.show_discounted_price ?\n <div class=\"s-offer-slide-offer-entry-price\">\n <span>{this.offer_with_price_text}</span>\n <span class=\"s-offer-slide-offer-entry-price-amount\">{salla.helpers.money(discount.price)}</span> {this.userCurrency?.symbol}\n </div> : \"\"}\n </div>\n <p class=\"s-offer-slide-offer-entry-price-amount-percent\">{this.with_discount_text}\n (<span>{discount.percent}</span>)</p>\n </div>\n </div>\n })\n }\n\n render() {\n if (!this.productId) {\n salla.logger.error('salla-offer::Can\\'t render the component without product-id!');\n return;\n }\n if (!this.offersList.length) return null;\n const offer: Offer = this.offersList[0];\n this.isMultipleBank = !!offer && !!offer.get.banks && offer.get.banks.length > 1;\n return (\n <div class=\"s-offer-wrapper\">\n <p class=\"s-offer-corner-badge\">{this.special_offer_text}</p>\n <salla-slider\n type=\"carousel\"\n block-title={this.isMultipleBank ? offer.name : null}\n block-subTitle={this.isMultipleBank ? offer.message : null}\n id=\"offer-slider\">\n <div slot='items'>\n {\n [!!offer.get.categories ? this.getCategoriesSection(offer.get.categories) :\n !!offer.get.products ? this.getProductSection(offer.get.products) :\n !!offer.get.banks ? this.getBankSection(offer.get.banks, offer.name, offer.message) : '',\n !!offer.get.discounts_table ?\n this.getDiscountTableSection(offer.get.discounts_table) :\n \"\"]}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n componentWillLoad() {\n return this.productId\n ? salla.api.product.offers(this.productId).then(resp =>\n this.offersList = resp.data\n )\n : null\n }\n\n}\n"],"version":3}
1
+ {"file":"salla-offer.entry.cjs.js","mappings":";;;;;;;;;AAAA,IAAY,QAGX;AAHD,WAAY,QAAQ;EAClB,4CAAgC,CAAA;EAChC,yBAAa,CAAA;AACf,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,IAAY,SAMX;AAND,WAAY,SAAS;EACnB,wCAA2B,CAAA;EAC3B,wCAA2B,CAAA;EAC3B,+CAAkC,CAAA;EAClC,0BAAa,CAAA;EACb,qCAAwB,CAAA;AAC1B,CAAC,EANW,SAAS,KAAT,SAAS;;ACLrB,MAAM,aAAa,GAAG,khBAAkhB;;MCmB3hB,UAAU;EAErB;;;gCA0BuC,2BAA2B;sBAGnC,EAAE;;0BAEE,KAAK;;;;uBAKR,KAAK;qBACP,KAAK;iCAGM,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;8BAC1D,KAAK,CAAC,IAAI,CAAC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B,GAAG,OAAO,GAAG,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,cACrF,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAAC,EAC7D,GAAG,EAAC,SAAS,GAAG,CACf,CAAA;KACN,CAAC,CACC,EACJ,IAAI,CAAC,cAAc;MAClBA,eAAG,KAAK,EAAC,uCAAuC,IAC7C,IAAI,CAAC,qBAAqB,GAAI,SAAS,CAAC,OAAqB,CAAC,OAAO,MACpE;QACF,EAAE,CACF,EACL,CAAC,IAAI,CAAC,cAAc;MACnBA,iBAAK,KAAK,EAAC,+CAA+C,IACxDA,oBAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAM,EACnCA,mBAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAK,CACnC;QACJ,EAAE,CACF,CACP,CAAA;GACF;;;;;;;EAQO,0BAA0B;IAChC,OAAQ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAA+B,CAAC,SAAS;OACjE,GAAG,CAAC,CAAC,QAAkB,KAAKA,iBAAK,KAAK,EAAC,0BAA0B,IAChEA,iBAAK,KAAK,EAAC,2BAA2B,IACpCA,iBAAK,KAAK,EAAC,oDAAoD,IAC7DA,eAAG,KAAK,EAAC,oCAAoC,IAAE,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAK,CAMzF,EACNA,eAAG,KAAK,EAAC,gDAAgD,IAAE,IAAI,CAAC,kBAAkB,OAC/EA,sBAAO,QAAQ,CAAC,UAAU,CAAQ,MAAK,CACtC,CACF,CACL,CAAA;GACJ;;;;;;;","names":["h"],"sources":["src/components/salla-offer/interfaces.ts","src/components/salla-offer/salla-offer.scss?tag=salla-offer","src/components/salla-offer/salla-offer.tsx"],"sourcesContent":["export enum PageType {\n ProductDetail = \"product.single\",\n Cart = \"cart\"\n}\n\nexport enum OfferType {\n Conditional = \"conditional\",\n PercentageOrFixed = \"fixed\",\n DiscountsTable = \"discounts_table\",\n Bank = \"bank\",\n BuyXGetY = \"buy_x_get_y\"\n}\n\n\nexport interface DiscountDetailFixed {\n discount_type: \"fixed\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailFreeProduct {\n discount_type: \"free_product\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailConditional extends Array<DiscountDetailFixed | DiscountDetailFreeProduct> {}\n\nexport interface DiscountDetailPercentageFixed {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n ends_at: number;\n min_spend: number;\n discount_value: number;\n}\n\nexport interface Discount {\n quantity: number;\n percentage: number;\n}\n\nexport interface DiscountDetailTable {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n discounts: Discount[];\n}\n\nexport interface BankOffer {\n logo: string;\n percent: string;\n payments: string[];\n}\n\nexport interface BuyXGetYDetail {\n ends_at: number;\n buy: {\n source: \"product\" | \"category\";\n source_value: number[];\n quantity: number;\n };\n get: {\n source: \"products\" | \"category\";\n source_value: number[];\n type: \"free_product\" | \"percentage\" | \"fixed\";\n value: number;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n };\n}\n\nexport interface Offer {\n id: number;\n title: string;\n description: string;\n type: OfferType | \"conditional\" | \"fixed\" | \"discounts_table\" | \"bank\" | \"buy_x_get_y\";\n details: DiscountDetailConditional | DiscountDetailPercentageFixed | DiscountDetailTable | BankOffer | BuyXGetYDetail;\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id?: string;\n id_?: number;\n name?: string;\n url?: string;\n icon?: string;\n sub_categories?: Category[];\n items?: any[] | null;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n",".s-offer-wrapper .s-slider-block__title {\n h2 {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: #f87171;\n\n &::before {\n font-family: \"sallaicons\";\n content: \"\\ee30\" !important;\n position: absolute;\n top: 1rem;\n font-size: 3rem;\n font-weight: 400;\n line-height: 1;\n color: #fef2f2;\n }\n }\n}\n\n.s-offer-bank-wrapper-sinlge-item{\n display: flex;\n align-items: center !important;\n gap: 14px;\n}\n\n.s-offer-bank-wrapper {\n display: flex !important;\n width: 100% !important;\n}\n\n// .s-offer-bank-wrapper {\n // \n// }","import { Component, Element, Prop, State, h } from '@stencil/core';\nimport { Offer, Category, Product, Discount, Currency, BuyXGetYDetail, PageType, OfferType, BankOffer, DiscountDetailTable } from './interfaces';\n\n\n/**\n * `salla-offer` is a StencilJS component that displays offers, categories, products, banks, and discount information.\n * It uses the `salla-slider` component for carousel functionality.\n *\n * @slot category - The slot for customizing the category entry layout.\n * \n * @csspart custom - Custom CSS part to target specific elements in the component.\n *\n * @example\n * <salla-offer product-id=\"123\"></salla-offer>\n */\n@Component({\n tag: 'salla-offer',\n styleUrl: 'salla-offer.scss',\n})\nexport class SallaOffer {\n\n constructor() {\n // Language\n salla.lang.onLoaded(() => {\n this.offer_with_price_text = salla.lang.get('pages.offer.with_price');\n this.with_discount_text = salla.lang.get('pages.products.with_a_discount');\n this.product_discount_text = salla.lang.get('pages.products.discount');\n this.special_offer_text = salla.lang.get('pages.products.special_offer');\n this.buy_quantity_text(0);\n })\n\n salla.onReady(() => {\n this.currentPage = salla.config.get('page.slug')\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || '<a href={url} class=\"s-offer-slide-cat-entry\"><i class={icon}></i><h4>{name}</h4></a>';\n }\n\n /**\n * Custom Card Component for the Salla Products List.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products List.\n *\n * @example\n * <salla-products-list product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-list product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n // Declare component state variables\n @State() offersList: Offer[] = [];\n @State() userCurrency: Currency;\n @State() isMultipleBank: boolean = false;\n @State() title?: string;\n @State() currentPage: string;\n @State() hasCustomComponent: boolean;\n\n @State() isBankOffer: boolean = false;\n @State() canRender: boolean = false;\n\n // Default translated texts\n @State() offer_with_price_text: string = salla.lang.get('pages.offer.with_price', { price: '' });\n @State() with_discount_text: string = salla.lang.get('pages.products.with_a_discount')\n @State() product_discount_text: string = salla.lang.get('pages.products.discount')\n @State() special_offer_text: string = salla.lang.get('pages.products.special_offer')\n @State() buy_quantity_text: (quantity: number) => string = (quantity) => salla.lang.get('pages.offer.buy_quantity', { quantity })\n\n // Reference to the host element\n @Element() host: HTMLElement;\n\n private categorySlot: string;\n\n private getEndpointByPageName(): string {\n return {\n [PageType.Cart]: `offers/cart/${salla.storage.get('cart.id')}`,\n [PageType.ProductDetail]: `offers/product/${salla.config.get('page.id')}`,\n }[this.currentPage] || \"offers\";\n }\n\n componentWillLoad() {\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n let offers = this.getOffersFromStorage();\n if (offers) {\n return offers.then(offersFromStorage => this.offersList = offersFromStorage);\n }\n\n return salla.api.request(this.getEndpointByPageName())\n .then((res) => {\n if (!(this.offersList = res.data).length) {\n throw new Error('salla-offers:: There is no offers!');\n }\n //we support these offers only\n const offer = this.offersList.find(offer => [OfferType.Bank, OfferType.BuyXGetY, OfferType.DiscountsTable].includes(offer.type as any));\n if (!offer) {\n throw new Error('salla-offers:: Offer type not supported yet!');\n }\n //because there is no need for special handling for discounts table, just skip the other cases\n if (offer.type === OfferType.DiscountsTable) {\n return this.offersList = [offer];\n }\n\n //if it's banks offer, we need to include the other banks overs\n if ((this.isBankOffer = offer.type === OfferType.Bank)) {\n this.offersList = this.offersList.filter(offer => offer.type === OfferType.Bank);\n this.isMultipleBank = this.offersList.length > 1;\n return this.offersList;\n }\n //BuyXGetY offers\n const getY = (offer.details as BuyXGetYDetail).get;\n\n return getY.source === 'products'\n //todo:: avoid this request, and the handling for the products, just use `salla-products-slider` and don't forget to pass the customcard\n ? salla.product.api.fetch({ source: \"selected\", source_value: getY.source_value })\n .then((response: any) => {\n getY.products = response.data;\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n })//set the products\n : salla.product.api.categories()//get all categories in one query, then extract only the selected one, instead of sending multi requests\n .then((res) => {\n getY.categories = this.findCategories(res.data, getY.source_value);\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n });\n })\n .then((offers: Offer[]) => {\n salla.storage.set(this.getStorageKey(), { offers, stored_at: new Date().getTime() });\n this.canRender = true;\n })\n }\n\n\n findCategories(categories: Category[], ids: any[]): Category[] {\n let found: Category[] = [];\n\n for (const category of categories) {\n if (ids.includes(category.id_ || category.id)) { //here we are using || because we are planning to drop `id_`\n found.push(category);\n }\n if (category.sub_categories?.length > 0) {\n found = found.concat(this.findCategories(category.sub_categories, ids));\n }\n }\n\n return found;\n }\n\n //todo::add to the key params, to make sure it will support multi offers in the same page if it's wanted\n getStorageKey(): string {\n return `s-offers-${salla.config.get('page.slug').replace('.', '_')}-${salla.lang.getLocale()}-${salla.config.currency().code}`;\n }\n\n getOffersFromStorage(): null | Promise<Offer[]> {\n let storageOffers = salla.storage.get(this.getStorageKey());\n //if the offers not existed, or it has been stored before 10 minutes from now, ignore it;\n if (!storageOffers || storageOffers.stored_at < (new Date().getTime() - 10 * 60 * 1000)) {\n salla.storage.remove(this.getStorageKey());\n return null;\n }\n this.canRender = true;\n\n //return it as resolve to support .then\n return Promise.resolve(storageOffers.offers);\n }\n\n render() {\n if (!this.offersList.length || !this.canRender) return null;\n const offer: Offer = this.offersList[0];\n const titles = (!this.isBankOffer || this.isMultipleBank)\n ? { 'block-title': offer.title, 'block-subTitle': offer.description }\n : {}\n return (\n <div class=\"s-offer-wrapper\">\n {this.isBankOffer && <p class=\"s-offer-corner-badge\">{this.special_offer_text}</p>}\n {/* discounts table is not a slider, it's a table🤔 */}\n {/* single bank offer is not a slider, it's a dom without slider🤔 */}\n <salla-slider type=\"carousel\" id=\"offer-slider\" {...titles}>\n <div slot='items'>\n {this.renderSectionForOfferType(offer.type)}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n private renderSectionForOfferType(offerType: OfferType | string) {\n if (this.isBankOffer) {\n return this.renderBankSection();\n }\n if (offerType == OfferType.BuyXGetY) {\n return this.renderBuyXGetYSection();\n }\n\n return this.renderDiscountTableSection();\n }\n\n /**\n * Generates content for the categories section.\n *\n * @param offeredCategories - An array of Category objects.\n * @returns An array of HTML elements representing categories.\n */\n private getCategoriesSection(category: Category) {\n return <div class=\"s-offer-slide-one-sixth swiper-slide\" innerHTML={this.categorySlot\n .replace(/\\{url\\}/g, category.url)\n .replace(/\\{icon\\}/g, category.icon || \"sicon-store\")\n .replace(/\\{name\\}/g, category.name)}></div>\n }\n\n private renderBuyXGetYSection() {\n const details = (this.offersList[0].details as BuyXGetYDetail)\n return [\n details.get.products?.map((product: Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n details.get.categories?.map((category: Category) => this.getCategoriesSection(category))\n ];\n }\n\n /**\n * Generates content for the bank section.\n *\n * @param offeredBank - An array of Bank objects.\n * @param name - The title of the current offer.\n * @param description - The description of the current offer.\n * @returns An array of HTML elements representing banks.\n * \n * TODO: loop over the list and filter bank types and pass it to this function\n */\n private renderBankSection() {\n return this.offersList.map((bankOffer: Offer) =>\n <div class={{ \"s-offer-slide-one-sixth\": this.isMultipleBank, \"s-offer-bank-wrapper-sinlge-item\": !this.isMultipleBank }}>\n <div class={{ \"s-offer-bank-wrapper\": true, \"s-offer-slide-one-sixth\": !this.isMultipleBank, \"s-offer-bank-wrapper-multi-spacer\": this.isMultipleBank }}>\n <div class=\"s-offer-bank-logo\">\n <img src={(bankOffer.details as BankOffer).logo || salla.url.cdn('images/s-empty.png')} data-src={(bankOffer.details as BankOffer).logo} alt={bankOffer.title + \" offer\"} />\n </div>\n <ul class=\"s-offer-bank-payment-wrapper\">\n {(bankOffer.details as BankOffer).payments.map((payment: string) => {\n return <li class=\"s-offer-bank-payment-single\">\n <img\n src={salla.url.cdn('images/payment/' + payment + '.png') || salla.url.cdn('images/s-empty.png')}\n data-src={salla.url.cdn('images/payment/' + payment + '.png')}\n alt=\"payment\" />\n </li>\n })}\n </ul>\n {this.isMultipleBank ?\n <p class=\"s-offer-bank-payment-discount-percent\">\n {this.product_discount_text + (bankOffer.details as BankOffer).percent}%\n </p>\n : \"\"}\n </div>\n {!this.isMultipleBank ?\n <div class=\"s-offer-bank-message s-offer-slide-one-fourth\">\n <h2>{this.offersList[0].title}</h2>\n <p>{this.offersList[0].description}</p>\n </div>\n : \"\"}\n </div>\n )\n }\n\n /**\n * Generates content for the discount table section.\n *\n * @param discountTable - An array of Discount objects.\n * @returns An array of HTML elements representing discounts_table.\n */\n private renderDiscountTableSection() {\n return (this.offersList[0].details as DiscountDetailTable).discounts\n .map((discount: Discount) => <div class=\"s-offer-slide-one-fourth\">\n <div class=\"s-offer-slide-offer-entry\">\n <div class=\"s-offer-slide-offer-entry-price-quantity-container\">\n <p class=\"s-offer-slide-offer-entry-quantity\">{this.buy_quantity_text(discount.quantity)}</p>\n {/* {discount.show_discounted_price ?\n <div class=\"s-offer-slide-offer-entry-price\">\n <span>{this.offer_with_price_text}</span>\n <span class=\"s-offer-slide-offer-entry-price-amount\">{salla.helpers.money(discount.price)}</span> {this.userCurrency?.symbol}\n </div> : \"\"} */}\n </div>\n <p class=\"s-offer-slide-offer-entry-price-amount-percent\">{this.with_discount_text}\n (<span>{discount.percentage}</span>)</p>\n </div>\n </div>\n )\n }\n\n}\n"],"version":3}
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
  const check = require('./check-771d889f.js');
10
10
 
11
11
  const iconFileArchive = `<!-- Generated by IcoMoon.io -->
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
 
10
10
  const sallaPaymentsCss = ":host{display:block}";
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
 
10
10
  const sallaPriceRangeCss = ":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%}";
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
  const check = require('./check-771d889f.js');
10
10
  const camera = require('./camera-82e553eb.js');
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
  const anime_es = require('./anime.es-78730411.js');
10
10
  const Helper = require('./Helper-02c18740.js');
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
  const Helper = require('./Helper-02c18740.js');
10
10
 
11
11
  const sallaProductsSliderCss = "";
@@ -55,6 +55,17 @@ const SallaProductsSlider = class {
55
55
  });
56
56
  });
57
57
  }
58
+ componentDidRender() {
59
+ let processedCount = 0;
60
+ const intervalId = setInterval(() => {
61
+ var _a;
62
+ (_a = this.host.querySelectorAll('[loading="lazy"]')) === null || _a === void 0 ? void 0 : _a.forEach(img => img.removeAttribute('loading'));
63
+ processedCount++;
64
+ if (processedCount >= 10) {
65
+ clearInterval(intervalId);
66
+ }
67
+ }, 1000);
68
+ }
58
69
  isSourceWithoutValue() {
59
70
  return ['offers', 'latest', 'sales'].includes(this.getSource());
60
71
  }
@@ -1 +1 @@
1
- {"file":"salla-products-slider.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,EAAE;;MCQpB,mBAAmB;;;;;;;;;;;;gCAiFS,2BAA2B;;;;;kBAUxC,EAAE;;;EAG5B,iBAAiB;IACf,OAAOA,aAAM,CAAC,mBAAmB,CAAC,CAAC,OAAO;MACxC,IAAI,CAAC,kBAAkB,GAAG,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;MACnF,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;QAC5B,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,6CAA6C,IAAI,CAAC,SAAS,EAC3E,GAAG,CAAC,CAAC;QACP,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;OACtB;MACD,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;MAE1E,IAAI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AAQ,IAAI,qBAAqB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,eACxE,IAAI,CAAC,QAAQ,EACxB,IAAI,EAAC,UAAU,iBACF,IAAI,CAAC,UAAU,oBACZ,IAAI,CAAC,QAAQ,qBACZ,IAAI,CAAC,aAAa,EACnC,YAAY,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,IAE1DA,iBAAK,IAAI,EAAC,OAAO,IACd,MAAA,IAAI,CAAC,YAAY,0CAAE,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CACzD,CACO,CACV,EACP;GACH;;;;;;;","names":["Helper","h","Host"],"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';\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-products-slider',\n styleUrl: 'salla-products-slider.scss'\n})\n\n//todo:: extends this component from salla-products-list or the opposite\nexport class SallaProductsSlider {\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 * autoplay option for products slider\n */\n @Prop({ mutable: true }) autoplay: boolean\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' | 'wishlist';\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 * Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.sliderConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) sliderConfig: any;\n\n /**\n * Custom Card Component for the Salla Products Slider.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products Slider.\n *\n * @example\n * <salla-products-slider product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-slider product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n @Element() host: HTMLElement;\n //todo:: support limit, default =10, make sure that maximum is 32,\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 componentWillLoad() {\n return Helper.onSallaReadyPromise((resolve) => {\n this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());\n if (!this.sourceValueIsValid) {\n salla.logger.warn(`source-value prop is required for source [${this.getSource()\n }]`);\n return resolve(true);\n }\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n\n if (this.source === 'json') {\n this.productsData = this.getSourceValue();\n this.isReady = true\n return resolve(true);\n }\n\n if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled'))) {\n this.isReady = false\n return resolve(true);\n }\n\n return Helper.fetchProducts(this.getSource(), this.getSourceValue(), this.limit).then(response => {\n this.productsData = response.data\n this.isReady = true\n salla.event.emit('salla-products-slider::products.fetched', response.data);\n resolve(response);\n });\n });\n }\n\n private isSourceWithoutValue() {\n return ['offers', 'latest', 'sales'].includes(this.getSource());\n }\n\n private getItemHTML(product) {\n\n //as a request they don't want to let the user to open the product details\n //todo:: find a better way to handle this request\n this.getSource() === 'landing-page' && (product.url = '');\n if (this.hasCustomComponent && this.productCardComponent.toLowerCase() == 'custom-salla-product-card') {\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 if (this.hasCustomComponent) {\n const customElem = document.createElement(this.productCardComponent);\n customElem.setAttribute('product', JSON.stringify(product));\n customElem.setAttribute('source', this.getSource());\n customElem.setAttribute('source-value', this.getSourceValue());\n\n return <div class=\"s-products-slider-card\" innerHTML={customElem.outerHTML} />;\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 canRender() {\n return this.sourceValueIsValid && this.isReady;\n }\n\n private getSource() {\n return Helper.getProductsSource(this.source);\n }\n\n private getSourceValue() {\n return Helper.getProductsSourceValue(this.source, this.sourceValue);\n }\n\n render() {\n if (!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 auto-play={this.autoplay}\n type=\"carousel\"\n block-title={this.blockTitle}\n block-subTitle={this.subTitle}\n display-all-url={this.displayAllUrl}\n sliderConfig={this.sliderConfig ? this.sliderConfig : null}\n >\n <div slot=\"items\">\n {this.productsData?.map(product => this.getItemHTML(product))}\n </div>\n </salla-slider>\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"salla-products-slider.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,sBAAsB,GA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AY,GAAG,IAAI,IAE1DA,iBAAK,IAAI,EAAC,OAAO,IACd,MAAA,IAAI,CAAC,YAAY,0CAAE,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CACzD,CACO,CACV,EACP;GACH;;;;;;;","names":["Helper","h","Host"],"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';\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-products-slider',\n styleUrl: 'salla-products-slider.scss'\n})\n\n//todo:: extends this component from salla-products-list or the opposite\nexport class SallaProductsSlider {\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 * autoplay option for products slider\n */\n @Prop({ mutable: true }) autoplay: boolean\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' | 'wishlist';\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 * Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.sliderConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) sliderConfig: any;\n\n /**\n * Custom Card Component for the Salla Products Slider.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products Slider.\n *\n * @example\n * <salla-products-slider product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-slider product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n @Element() host: HTMLElement;\n //todo:: support limit, default =10, make sure that maximum is 32,\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 componentWillLoad() {\n return Helper.onSallaReadyPromise((resolve) => {\n this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());\n if (!this.sourceValueIsValid) {\n salla.logger.warn(`source-value prop is required for source [${this.getSource()\n }]`);\n return resolve(true);\n }\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n\n if (this.source === 'json') {\n this.productsData = this.getSourceValue();\n this.isReady = true\n return resolve(true);\n }\n\n if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled'))) {\n this.isReady = false\n return resolve(true);\n }\n\n return Helper.fetchProducts(this.getSource(), this.getSourceValue(), this.limit).then(response => {\n this.productsData = response.data\n this.isReady = true\n salla.event.emit('salla-products-slider::products.fetched', response.data);\n resolve(response);\n });\n });\n }\n componentDidRender() {\n let processedCount = 0;\n const intervalId = setInterval(() => {\n this.host.querySelectorAll('[loading=\"lazy\"]')?.forEach(img => img.removeAttribute('loading'));\n processedCount++;\n if (processedCount >= 10) {\n clearInterval(intervalId);\n }\n }, 1000);\n }\n\n private isSourceWithoutValue() {\n return ['offers', 'latest', 'sales'].includes(this.getSource());\n }\n\n private getItemHTML(product) {\n\n //as a request they don't want to let the user to open the product details\n //todo:: find a better way to handle this request\n this.getSource() === 'landing-page' && (product.url = '');\n if (this.hasCustomComponent && this.productCardComponent.toLowerCase() == 'custom-salla-product-card') {\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 if (this.hasCustomComponent) {\n const customElem = document.createElement(this.productCardComponent);\n customElem.setAttribute('product', JSON.stringify(product));\n customElem.setAttribute('source', this.getSource());\n customElem.setAttribute('source-value', this.getSourceValue());\n\n return <div class=\"s-products-slider-card\" innerHTML={customElem.outerHTML} />;\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 canRender() {\n return this.sourceValueIsValid && this.isReady;\n }\n\n private getSource() {\n return Helper.getProductsSource(this.source);\n }\n\n private getSourceValue() {\n return Helper.getProductsSourceValue(this.source, this.sourceValue);\n }\n\n render() {\n if (!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 auto-play={this.autoplay}\n type=\"carousel\"\n block-title={this.blockTitle}\n block-subTitle={this.subTitle}\n display-all-url={this.displayAllUrl}\n sliderConfig={this.sliderConfig ? this.sliderConfig : null}\n >\n <div slot=\"items\">\n {this.productsData?.map(product => this.getItemHTML(product))}\n </div>\n </salla-slider>\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
  const twitter = require('./twitter-102aab2d.js');
10
10
 
11
11
  const instagram = `<!-- Generated by IcoMoon.io -->
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-96c545df.js');
8
+ const index = require('./index-44391cfe.js');
9
9
  const appGlobals = require('./app-globals-cdf64ffe.js');
10
10
  require('./_commonjsHelpers-691dd63b.js');
11
11
 
@@ -23,7 +23,7 @@ const patchBrowser = () => {
23
23
 
24
24
  patchBrowser().then(options => {
25
25
  appGlobals.globalScripts();
26
- return index.bootstrapLazy(JSON.parse("[[\"salla-offer.cjs\",[[0,\"salla-offer\",{\"productId\":[1538,\"product-id\"],\"offer\":[32],\"offersList\":[32],\"userCurrency\":[32],\"isMultipleBank\":[32],\"title\":[32],\"offer_with_price_text\":[32],\"with_discount_text\":[32],\"product_discount_text\":[32],\"special_offer_text\":[32],\"buy_quantity_text\":[32]}]]],[\"salla-products-slider.cjs\",[[0,\"salla-products-slider\",{\"blockTitle\":[1,\"block-title\"],\"subTitle\":[1,\"sub-title\"],\"sliderId\":[1,\"slider-id\"],\"displayAllUrl\":[1,\"display-all-url\"],\"autoplay\":[1028],\"source\":[1537],\"sourceValue\":[1,\"source-value\"],\"limit\":[1026],\"sliderConfig\":[520,\"slider-config\"],\"productCardComponent\":[1,\"product-card-component\"],\"productsData\":[32],\"isReady\":[32],\"sourceValueIsValid\":[32],\"hasCustomComponent\":[32],\"apiUrl\":[32],\"parsedSourceValue\":[32]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectDonationAmount\":[32],\"selectAmount\":[32],\"isCustomDonation\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"reportValidity\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-filters.cjs\",[[0,\"salla-filters\",{\"filters\":[1040],\"isSidebarOpen\":[32],\"filtersData\":[32],\"apply\":[32],\"reset\":[32],\"getFilters\":[64],\"applyFilters\":[64],\"resetFilters\":[64]}]]],[\"salla-notifications.cjs\",[[0,\"salla-notifications\",{\"loadMoreText\":[1,\"load-more-text\"],\"itemPerPage\":[2,\"item-per-page\"],\"notifications\":[32],\"pagination\":[32],\"hasInfiniteScroll\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"no_notifications_trans\":[32],\"load_more_text_trans\":[32]}]]],[\"salla-order-summary.cjs\",[[0,\"salla-order-summary\",{\"orderId\":[514,\"order-id\"],\"codeCopied\":[32],\"noItemFound\":[32],\"order_items\":[32]}]]],[\"salla-advertisement.cjs\",[[0,\"salla-advertisement\",{\"position\":[32],\"advertisements\":[32],\"advertIcon\":[32],\"currentSlug\":[32]}]]],[\"salla-app-install-alert.cjs\",[[0,\"salla-app-install-alert\",{\"data\":[32],\"ctaLink\":[32],\"open\":[32],\"closing\":[32]}]]],[\"salla-apps-icons.cjs\",[[0,\"salla-apps-icons\",{\"hideTitle\":[4,\"hide-title\"],\"appsTitle\":[1,\"apps-title\"],\"vertical\":[4],\"apps\":[32]}]]],[\"salla-contacts.cjs\",[[0,\"salla-contacts\",{\"contactsTitle\":[1025,\"contacts-title\"],\"hideTitle\":[4,\"hide-title\"],\"isHeader\":[4,\"is-header\"],\"horizontal\":[4],\"iconsOnly\":[4,\"icons-only\"],\"contacts\":[32],\"iconsList\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32],\"mispayActive\":[32],\"installment_sheria_text\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-payments.cjs\",[[0,\"salla-payments\",{\"withSbc\":[4,\"with-sbc\"],\"sbcId\":[1,\"sbc-id\"],\"withMadeInKsa\":[4,\"with-made-in-ksa\"],\"payments\":[32],\"placeholderImage\":[32]}]]],[\"salla-products-list.cjs\",[[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"autoload\":[1028],\"loadMoreText\":[1,\"load-more-text\"],\"productCardComponent\":[1,\"product-card-component\"],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"endOfText\":[32],\"failedLoadMore\":[32],\"currentPage\":[32],\"currentCategoryIdFilter\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}]]],[\"salla-social.cjs\",[[0,\"salla-social\",{\"links\":[32],\"iconsList\":[32]}]]],[\"salla-filters-widget.cjs\",[[4,\"salla-filters-widget\",{\"withLoadMore\":[1028,\"with-load-more\"],\"filtersData\":[16],\"option\":[16],\"isOpen\":[32],\"isShowMore\":[32],\"showMoreLabel\":[32],\"showLessLabel\":[32],\"page\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]],[\"salla-notification-item.cjs\",[[0,\"salla-notification-item\",{\"notification\":[16]}]]],[\"salla-price-range.cjs\",[[0,\"salla-price-range\",{\"minPrice\":[1032,\"min-price\"],\"maxPrice\":[1032,\"max-price\"],\"option\":[16],\"filtersData\":[520,\"filters-data\"],\"min\":[32],\"max\":[32],\"priceOptions\":[32],\"moreThanLabel\":[32],\"lessThanLabel\":[32],\"toLabel\":[32],\"fromLabel\":[32],\"typing\":[32],\"debounce\":[32],\"reset\":[64]}]]],[\"salla-add-product-button_47.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"widgetTitle\":[1,\"widget-title\"],\"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]}],[0,\"salla-menu\",{\"source\":[1],\"sourceValue\":[1,\"source-value\"],\"topnav\":[4],\"useReactLink\":[4,\"use-react-link\"],\"menus\":[32],\"hasCustomComponent\":[32],\"setMenuContent\":[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\"],\"inline\":[516],\"withoutReload\":[4,\"without-reload\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"isModalOpen\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"hasError\":[32],\"errorMessage\":[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-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"template\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"storePrice\":[32],\"theDeveloper\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32],\"isRtl\":[32]}],[0,\"salla-comments\",{\"itemId\":[2,\"item-id\"],\"loadMoreText\":[1,\"load-more-text\"],\"hideForm\":[4,\"hide-form\"],\"type\":[1],\"comments\":[32],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"noComments\":[32],\"comment_title\":[32],\"comment_name\":[32],\"placeholder_text\":[32]}],[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-profile\",{\"customFields\":[1,\"custom-fields\"],\"userData\":[32],\"userDefinedFields\":[32],\"disableAction\":[32],\"first_name_trans\":[32],\"last_name_trans\":[32],\"birthday_trans\":[32],\"birthday_placeholder_trans\":[32],\"gender_trans\":[32],\"gender_placeholder_trans\":[32],\"male_trans\":[32],\"female_trans\":[32],\"email_trans\":[32],\"mobile_trans\":[32],\"save_btn_trans\":[32],\"drag_and_drop_trans\":[32],\"browse_trans\":[32],\"email_required_trans\":[32],\"invalid_email_trans\":[32],\"setCustomFields\":[64]}],[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],\"maxWords\":[2,\"max-words\"],\"showAction\":[4,\"show-action\"],\"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],\"refresh\":[64]}],[0,\"salla-breadcrumb\",{\"items\":[1],\"breadcrumbs\":[32],\"currentPage\":[32],\"isRtl\":[32]}],[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],\"loadMoreText\":[1,\"load-more-text\"],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[0,\"salla-maintenance-alert\",{\"title\":[32],\"message\":[32],\"buttonTitle\":[32]}],[4,\"salla-quantity-input\",{\"cartItemId\":[8,\"cart-item-id\"],\"quantity\":[32],\"fireChangeEvent\":[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-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],\"hasError\":[32],\"errorMessage\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[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]}],[0,\"salla-comment-item\",{\"comment\":[16],\"has_bought_trans\":[32],\"rated_trans\":[32],\"waiting_approval_trans\":[32],\"has_order_trans\":[32]}],[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\"]]],[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]}],[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-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-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]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[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\"],\"cartId\":[1025,\"cart-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"applePayOnly\":[1028,\"apple-pay-only\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[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-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],\"windowWidth\":[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]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"autofocus\":[516],\"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],\"type\":[513],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}]]]]"), options);
26
+ return index.bootstrapLazy(JSON.parse("[[\"salla-offer.cjs\",[[0,\"salla-offer\",{\"productCardComponent\":[1,\"product-card-component\"],\"offersList\":[32],\"userCurrency\":[32],\"isMultipleBank\":[32],\"title\":[32],\"currentPage\":[32],\"hasCustomComponent\":[32],\"isBankOffer\":[32],\"canRender\":[32],\"offer_with_price_text\":[32],\"with_discount_text\":[32],\"product_discount_text\":[32],\"special_offer_text\":[32],\"buy_quantity_text\":[32]}]]],[\"salla-products-slider.cjs\",[[0,\"salla-products-slider\",{\"blockTitle\":[1,\"block-title\"],\"subTitle\":[1,\"sub-title\"],\"sliderId\":[1,\"slider-id\"],\"displayAllUrl\":[1,\"display-all-url\"],\"autoplay\":[1028],\"source\":[1537],\"sourceValue\":[1,\"source-value\"],\"limit\":[1026],\"sliderConfig\":[520,\"slider-config\"],\"productCardComponent\":[1,\"product-card-component\"],\"productsData\":[32],\"isReady\":[32],\"sourceValueIsValid\":[32],\"hasCustomComponent\":[32],\"apiUrl\":[32],\"parsedSourceValue\":[32]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectDonationAmount\":[32],\"selectAmount\":[32],\"isCustomDonation\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"reportValidity\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-filters.cjs\",[[0,\"salla-filters\",{\"filters\":[1040],\"isSidebarOpen\":[32],\"filtersData\":[32],\"apply\":[32],\"reset\":[32],\"getFilters\":[64],\"applyFilters\":[64],\"resetFilters\":[64]}]]],[\"salla-notifications.cjs\",[[0,\"salla-notifications\",{\"loadMoreText\":[1,\"load-more-text\"],\"itemPerPage\":[2,\"item-per-page\"],\"notifications\":[32],\"pagination\":[32],\"hasInfiniteScroll\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"no_notifications_trans\":[32],\"load_more_text_trans\":[32]}]]],[\"salla-order-summary.cjs\",[[0,\"salla-order-summary\",{\"orderId\":[514,\"order-id\"],\"codeCopied\":[32],\"noItemFound\":[32],\"order_items\":[32]}]]],[\"salla-advertisement.cjs\",[[0,\"salla-advertisement\",{\"position\":[32],\"advertisements\":[32],\"advertIcon\":[32],\"currentSlug\":[32]}]]],[\"salla-app-install-alert.cjs\",[[0,\"salla-app-install-alert\",{\"data\":[32],\"ctaLink\":[32],\"open\":[32],\"closing\":[32]}]]],[\"salla-apps-icons.cjs\",[[0,\"salla-apps-icons\",{\"hideTitle\":[4,\"hide-title\"],\"appsTitle\":[1,\"apps-title\"],\"vertical\":[4],\"apps\":[32]}]]],[\"salla-contacts.cjs\",[[0,\"salla-contacts\",{\"contactsTitle\":[1025,\"contacts-title\"],\"hideTitle\":[4,\"hide-title\"],\"isHeader\":[4,\"is-header\"],\"horizontal\":[4],\"iconsOnly\":[4,\"icons-only\"],\"contacts\":[32],\"iconsList\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32],\"mispayActive\":[32],\"installment_sheria_text\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-payments.cjs\",[[0,\"salla-payments\",{\"withSbc\":[4,\"with-sbc\"],\"sbcId\":[1,\"sbc-id\"],\"withMadeInKsa\":[4,\"with-made-in-ksa\"],\"payments\":[32],\"placeholderImage\":[32]}]]],[\"salla-products-list.cjs\",[[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"autoload\":[1028],\"loadMoreText\":[1,\"load-more-text\"],\"productCardComponent\":[1,\"product-card-component\"],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"endOfText\":[32],\"failedLoadMore\":[32],\"currentPage\":[32],\"currentCategoryIdFilter\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}]]],[\"salla-social.cjs\",[[0,\"salla-social\",{\"links\":[32],\"iconsList\":[32]}]]],[\"salla-filters-widget.cjs\",[[4,\"salla-filters-widget\",{\"withLoadMore\":[1028,\"with-load-more\"],\"filtersData\":[16],\"option\":[16],\"isOpen\":[32],\"isShowMore\":[32],\"showMoreLabel\":[32],\"showLessLabel\":[32],\"page\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]],[\"salla-notification-item.cjs\",[[0,\"salla-notification-item\",{\"notification\":[16]}]]],[\"salla-price-range.cjs\",[[0,\"salla-price-range\",{\"minPrice\":[1032,\"min-price\"],\"maxPrice\":[1032,\"max-price\"],\"option\":[16],\"filtersData\":[520,\"filters-data\"],\"min\":[32],\"max\":[32],\"priceOptions\":[32],\"moreThanLabel\":[32],\"lessThanLabel\":[32],\"toLabel\":[32],\"fromLabel\":[32],\"typing\":[32],\"debounce\":[32],\"reset\":[64]}]]],[\"salla-add-product-button_47.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"widgetTitle\":[1,\"widget-title\"],\"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]}],[0,\"salla-menu\",{\"source\":[1],\"sourceValue\":[1,\"source-value\"],\"topnav\":[4],\"useReactLink\":[4,\"use-react-link\"],\"menus\":[32],\"hasCustomComponent\":[32],\"setMenuContent\":[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\"],\"inline\":[516],\"withoutReload\":[4,\"without-reload\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"isModalOpen\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"hasError\":[32],\"errorMessage\":[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-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"template\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"storePrice\":[32],\"theDeveloper\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32],\"isRtl\":[32]}],[0,\"salla-comments\",{\"itemId\":[2,\"item-id\"],\"loadMoreText\":[1,\"load-more-text\"],\"hideForm\":[4,\"hide-form\"],\"type\":[1],\"comments\":[32],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"noComments\":[32],\"comment_title\":[32],\"comment_name\":[32],\"placeholder_text\":[32]}],[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-profile\",{\"customFields\":[1,\"custom-fields\"],\"userData\":[32],\"userDefinedFields\":[32],\"disableAction\":[32],\"first_name_trans\":[32],\"last_name_trans\":[32],\"birthday_trans\":[32],\"birthday_placeholder_trans\":[32],\"gender_trans\":[32],\"gender_placeholder_trans\":[32],\"male_trans\":[32],\"female_trans\":[32],\"email_trans\":[32],\"mobile_trans\":[32],\"save_btn_trans\":[32],\"drag_and_drop_trans\":[32],\"browse_trans\":[32],\"email_required_trans\":[32],\"invalid_email_trans\":[32],\"setCustomFields\":[64]}],[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],\"maxWords\":[2,\"max-words\"],\"showAction\":[4,\"show-action\"],\"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],\"refresh\":[64]}],[0,\"salla-breadcrumb\",{\"items\":[1],\"breadcrumbs\":[32],\"currentPage\":[32],\"isRtl\":[32]}],[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],\"loadMoreText\":[1,\"load-more-text\"],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[0,\"salla-maintenance-alert\",{\"title\":[32],\"message\":[32],\"buttonTitle\":[32]}],[4,\"salla-quantity-input\",{\"cartItemId\":[8,\"cart-item-id\"],\"quantity\":[32],\"fireChangeEvent\":[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-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],\"hasError\":[32],\"errorMessage\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[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]}],[0,\"salla-comment-item\",{\"comment\":[16],\"has_bought_trans\":[32],\"rated_trans\":[32],\"waiting_approval_trans\":[32],\"has_order_trans\":[32]}],[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\"]]],[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]}],[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-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-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]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[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\"],\"cartId\":[1025,\"cart-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"applePayOnly\":[1028,\"apple-pay-only\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[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-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],\"windowWidth\":[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]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"autofocus\":[516],\"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],\"type\":[513],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}]]]]"), options);
27
27
  });
28
28
 
29
29
  exports.setNonce = index.setNonce;
@@ -1,2 +1,17 @@
1
- export {};
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ export var PageType;
5
+ (function (PageType) {
6
+ PageType["ProductDetail"] = "product.single";
7
+ PageType["Cart"] = "cart";
8
+ })(PageType || (PageType = {}));
9
+ export var OfferType;
10
+ (function (OfferType) {
11
+ OfferType["Conditional"] = "conditional";
12
+ OfferType["PercentageOrFixed"] = "fixed";
13
+ OfferType["DiscountsTable"] = "discounts_table";
14
+ OfferType["Bank"] = "bank";
15
+ OfferType["BuyXGetY"] = "buy_x_get_y";
16
+ })(OfferType || (OfferType = {}));
2
17
  //# sourceMappingURL=interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/components/salla-offer/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface Offer {\n id: number;\n name: string;\n message: string;\n expiry_date?: string;\n formatted_date?: string;\n offer_type: string;\n status: string;\n buy: {\n type: string;\n quantity: number;\n products: any[];\n };\n get: {\n categories?: Category[]\n discounts_table?: Array<Discount>;\n products?: Product[];\n banks: Bank[];\n type: string;\n discount_type: string;\n };\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id: number;\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface Bank {\n id?: number;\n name?: string;\n logo?: string;\n percent?: string;\n payments: Payment[];\n}\n\nexport interface Payment {\n id?: number;\n name?: string;\n url?: string;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n\nexport interface Discount {\n show_discounted_price?: boolean;\n price?: number;\n regular_price?: number;\n quantity_text?: string;\n quantity?: string;\n percent?: string;\n text?: string;\n}"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/components/salla-offer/interfaces.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;EAClB,4CAAgC,CAAA;EAChC,yBAAa,CAAA;AACf,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;EACnB,wCAA2B,CAAA;EAC3B,wCAA2B,CAAA;EAC3B,+CAAkC,CAAA;EAClC,0BAAa,CAAA;EACb,qCAAwB,CAAA;AAC1B,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB","sourcesContent":["export enum PageType {\n ProductDetail = \"product.single\",\n Cart = \"cart\"\n}\n\nexport enum OfferType {\n Conditional = \"conditional\",\n PercentageOrFixed = \"fixed\",\n DiscountsTable = \"discounts_table\",\n Bank = \"bank\",\n BuyXGetY = \"buy_x_get_y\"\n}\n\n\nexport interface DiscountDetailFixed {\n discount_type: \"fixed\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailFreeProduct {\n discount_type: \"free_product\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailConditional extends Array<DiscountDetailFixed | DiscountDetailFreeProduct> {}\n\nexport interface DiscountDetailPercentageFixed {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n ends_at: number;\n min_spend: number;\n discount_value: number;\n}\n\nexport interface Discount {\n quantity: number;\n percentage: number;\n}\n\nexport interface DiscountDetailTable {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n discounts: Discount[];\n}\n\nexport interface BankOffer {\n logo: string;\n percent: string;\n payments: string[];\n}\n\nexport interface BuyXGetYDetail {\n ends_at: number;\n buy: {\n source: \"product\" | \"category\";\n source_value: number[];\n quantity: number;\n };\n get: {\n source: \"products\" | \"category\";\n source_value: number[];\n type: \"free_product\" | \"percentage\" | \"fixed\";\n value: number;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n };\n}\n\nexport interface Offer {\n id: number;\n title: string;\n description: string;\n type: OfferType | \"conditional\" | \"fixed\" | \"discounts_table\" | \"bank\" | \"buy_x_get_y\";\n details: DiscountDetailConditional | DiscountDetailPercentageFixed | DiscountDetailTable | BankOffer | BuyXGetYDetail;\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id?: string;\n id_?: number;\n name?: string;\n url?: string;\n icon?: string;\n sub_categories?: Category[];\n items?: any[] | null;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n"]}