@salla.sa/twilight-components 2.14.208 → 2.14.210

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 (272) hide show
  1. package/dist/cjs/{app-globals-X1ZNXlE0.js → app-globals-D1HkMlpY.js} +3 -3
  2. package/dist/cjs/{app-globals-X1ZNXlE0.js.map → app-globals-D1HkMlpY.js.map} +1 -1
  3. package/dist/cjs/{index-Dtkjm2h9.js → index-DkZv_ITt.js} +4 -4
  4. package/dist/cjs/index-DkZv_ITt.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  35. package/dist/cjs/twilight.cjs.js +2 -2
  36. package/dist/components/index.js +2 -2
  37. package/dist/components/index.js.map +1 -1
  38. package/dist/esm/{app-globals-D3k1iPx0.js → app-globals-CL6N2XbY.js} +3 -3
  39. package/dist/esm/{app-globals-D3k1iPx0.js.map → app-globals-CL6N2XbY.js.map} +1 -1
  40. package/dist/esm/{index-Dyi802qv.js → index-B9zfrGy-.js} +4 -4
  41. package/dist/esm/index-B9zfrGy-.js.map +1 -0
  42. package/dist/esm/loader.js +3 -3
  43. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  44. package/dist/esm/salla-advertisement.entry.js +1 -1
  45. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  46. package/dist/esm/salla-apps-icons.entry.js +1 -1
  47. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  48. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  49. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  50. package/dist/esm/salla-contacts.entry.js +1 -1
  51. package/dist/esm/salla-filters-widget.entry.js +1 -1
  52. package/dist/esm/salla-filters.entry.js +1 -1
  53. package/dist/esm/salla-installment.entry.js +1 -1
  54. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  55. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  56. package/dist/esm/salla-metadata.entry.js +1 -1
  57. package/dist/esm/salla-notification-item.entry.js +1 -1
  58. package/dist/esm/salla-notifications.entry.js +1 -1
  59. package/dist/esm/salla-offer.entry.js +1 -1
  60. package/dist/esm/salla-order-summary.entry.js +1 -1
  61. package/dist/esm/salla-orders.entry.js +1 -1
  62. package/dist/esm/salla-payments.entry.js +1 -1
  63. package/dist/esm/salla-price-range.entry.js +1 -1
  64. package/dist/esm/salla-product-options.entry.js +1 -1
  65. package/dist/esm/salla-review-card.entry.js +1 -1
  66. package/dist/esm/salla-reviews-page.entry.js +1 -1
  67. package/dist/esm/salla-reviews.entry.js +1 -1
  68. package/dist/esm/salla-social.entry.js +1 -1
  69. package/dist/esm/salla-tooltip.entry.js +1 -1
  70. package/dist/esm/salla-verify.entry.js +1 -1
  71. package/dist/esm/salla-wallet.entry.js +1 -1
  72. package/dist/esm/twilight.js +3 -3
  73. package/dist/esm-es5/{app-globals-D3k1iPx0.js → app-globals-CL6N2XbY.js} +2 -2
  74. package/dist/esm-es5/{app-globals-D3k1iPx0.js.map → app-globals-CL6N2XbY.js.map} +1 -1
  75. package/dist/esm-es5/{index-Dyi802qv.js → index-B9zfrGy-.js} +3 -3
  76. package/dist/esm-es5/index-B9zfrGy-.js.map +1 -0
  77. package/dist/esm-es5/loader.js +2 -2
  78. package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
  79. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  80. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  81. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  82. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  83. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  84. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  85. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  86. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  87. package/dist/esm-es5/salla-filters.entry.js +1 -1
  88. package/dist/esm-es5/salla-installment.entry.js +1 -1
  89. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  90. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  91. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  92. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  93. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  94. package/dist/esm-es5/salla-offer.entry.js +1 -1
  95. package/dist/esm-es5/salla-order-summary.entry.js +1 -1
  96. package/dist/esm-es5/salla-orders.entry.js +2 -2
  97. package/dist/esm-es5/salla-payments.entry.js +1 -1
  98. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  99. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  100. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  101. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  102. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  103. package/dist/esm-es5/salla-social.entry.js +1 -1
  104. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  105. package/dist/esm-es5/salla-verify.entry.js +1 -1
  106. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  107. package/dist/esm-es5/twilight.js +1 -1
  108. package/dist/twilight/{p-2b10fab4.entry.js → p-016c10fb.entry.js} +2 -2
  109. package/dist/twilight/{p-d735e48f.system.entry.js → p-0317026f.system.entry.js} +2 -2
  110. package/dist/twilight/{p-DozcNexA.system.js.map → p-0d_kQ9S2.system.js.map} +1 -1
  111. package/dist/twilight/{p-054f639a.entry.js → p-0f36712b.entry.js} +2 -2
  112. package/dist/twilight/{p-13ceead7.entry.js → p-10450f95.entry.js} +2 -2
  113. package/dist/twilight/{p-b3d8df96.entry.js → p-109bd488.entry.js} +2 -2
  114. package/dist/twilight/{p-ef4e38f9.entry.js → p-11737427.entry.js} +2 -2
  115. package/dist/twilight/{p-bdf731c6.system.entry.js → p-141d608e.system.entry.js} +2 -2
  116. package/dist/twilight/{p-ad49190a.entry.js → p-1a05ba30.entry.js} +2 -2
  117. package/dist/twilight/{p-e1c12f34.system.entry.js → p-1d318152.system.entry.js} +2 -2
  118. package/dist/twilight/{p-77fb228b.system.entry.js → p-2b557022.system.entry.js} +2 -2
  119. package/dist/twilight/{p-9cf81120.entry.js → p-32d8b0d8.entry.js} +2 -2
  120. package/dist/twilight/{p-2d75bcfd.entry.js → p-340f68a0.entry.js} +2 -2
  121. package/dist/twilight/{p-8dd73cb0.entry.js → p-376dfef9.entry.js} +2 -2
  122. package/dist/twilight/{p-308a57ad.system.entry.js → p-3b77ca03.system.entry.js} +2 -2
  123. package/dist/twilight/{p-aee101f4.entry.js → p-403fb223.entry.js} +2 -2
  124. package/dist/twilight/{p-b3f7b17d.system.entry.js → p-41150019.system.entry.js} +2 -2
  125. package/dist/twilight/{p-451efff6.system.entry.js → p-4baf00b0.system.entry.js} +2 -2
  126. package/dist/twilight/{p-e4ba5375.entry.js → p-4ef5dd09.entry.js} +2 -2
  127. package/dist/twilight/p-5289ed8e.entry.js +5 -0
  128. package/dist/twilight/{p-2f4afe02.system.entry.js → p-6347a5b0.system.entry.js} +2 -2
  129. package/dist/twilight/{p-7bca197d.entry.js → p-636221b6.entry.js} +2 -2
  130. package/dist/twilight/{p-af7282f5.system.entry.js → p-653281a4.system.entry.js} +2 -2
  131. package/dist/twilight/{p-b8abfcba.entry.js → p-665363bf.entry.js} +2 -2
  132. package/dist/twilight/{p-d010322d.system.entry.js → p-68d05eee.system.entry.js} +2 -2
  133. package/dist/twilight/{p-d1f9f0d4.system.entry.js → p-6a635184.system.entry.js} +2 -2
  134. package/dist/twilight/{p-1b636780.entry.js → p-6aad6cb4.entry.js} +2 -2
  135. package/dist/twilight/{p-d02b53ab.system.entry.js → p-6d9ab6b2.system.entry.js} +2 -2
  136. package/dist/twilight/{p-e84b355d.system.entry.js → p-73f5743a.system.entry.js} +2 -2
  137. package/dist/twilight/{p-3a107644.entry.js → p-74fc980b.entry.js} +6 -6
  138. package/dist/twilight/{p-f67a5d7d.system.entry.js → p-77659cab.system.entry.js} +2 -2
  139. package/dist/twilight/{p-a2b16b1f.entry.js → p-84e5ee17.entry.js} +2 -2
  140. package/dist/twilight/{p-823c158b.entry.js → p-8d8c673e.entry.js} +2 -2
  141. package/dist/twilight/{p-BAjbLP7i.system.js.map → p-8dGPgsOh.system.js.map} +1 -1
  142. package/dist/twilight/{p-3085146e.system.entry.js → p-9a1e5035.system.entry.js} +2 -2
  143. package/dist/twilight/{p-a8b3c35d.system.entry.js → p-9f12aa4c.system.entry.js} +2 -2
  144. package/dist/twilight/{p-ex_KYFD8.system.js.map → p-AByk3i16.system.js.map} +1 -1
  145. package/dist/twilight/{p-CZ39OXVU.system.js.map → p-B-GJzOqi.system.js.map} +1 -1
  146. package/dist/twilight/{p-BtSC_xax.js → p-B35tp229.js} +2 -2
  147. package/dist/twilight/{p-BtSC_xax.js.map → p-B35tp229.js.map} +1 -1
  148. package/dist/twilight/{p-Dyi802qv.js → p-B9zfrGy-.js} +3 -3
  149. package/dist/twilight/p-B9zfrGy-.js.map +1 -0
  150. package/dist/twilight/{p-9UnMej88.system.js.map → p-BJcTPvoG.system.js.map} +1 -1
  151. package/dist/twilight/{p-BjBEtlu4.system.js.map → p-BdSDsY0h.system.js.map} +1 -1
  152. package/dist/twilight/{p-LFpG0snr.system.js.map → p-C-e1Jw4-.system.js.map} +1 -1
  153. package/dist/twilight/{p-BGLwhEoK.system.js.map → p-COlw8RJk.system.js.map} +1 -1
  154. package/dist/twilight/{p-DDaIlOWd.system.js.map → p-CS2V6Zb0.system.js.map} +1 -1
  155. package/dist/twilight/{p-DGGyTNoV.system.js.map → p-CYRQgB-o.system.js.map} +1 -1
  156. package/dist/twilight/{p-C0KOZ-QK.system.js.map → p-CdUUCLbU.system.js.map} +1 -1
  157. package/dist/twilight/{p-DRPJeZ46.system.js.map → p-CmjAi3Mq.system.js.map} +1 -1
  158. package/dist/twilight/{p-BDVdy69r.system.js.map → p-Cra5BxvA.system.js.map} +1 -1
  159. package/dist/twilight/{p-Di58TSfr.system.js.map → p-CtFBJVjz.system.js.map} +1 -1
  160. package/dist/twilight/{p-DkmOo3NX.system.js.map → p-CveA-SF1.system.js.map} +1 -1
  161. package/dist/twilight/{p-Ba5wgV20.system.js.map → p-D7wbJv0s.system.js.map} +1 -1
  162. package/dist/twilight/{p-D8phvMDV.system.js.map → p-DUCtsIba.system.js.map} +1 -1
  163. package/dist/twilight/{p-Ca03FSQF.system.js.map → p-DVf2q9qG.system.js.map} +1 -1
  164. package/dist/twilight/{p-0yVEfp8W.system.js.map → p-DXvv8H1v.system.js.map} +1 -1
  165. package/dist/twilight/{p-DP-LCBhT.system.js → p-DeoLdZdi.system.js} +2 -2
  166. package/dist/twilight/{p-DP-LCBhT.system.js.map → p-DeoLdZdi.system.js.map} +1 -1
  167. package/dist/twilight/{p-CrW7AY69.system.js.map → p-Dlf3xZ3W.system.js.map} +1 -1
  168. package/dist/twilight/{p-BP2UxnJi.system.js.map → p-DllTtq0G.system.js.map} +1 -1
  169. package/dist/twilight/{p-C-iRRaRr.system.js.map → p-Dotb2b0E.system.js.map} +1 -1
  170. package/dist/twilight/{p-rA1vzAd2.system.js → p-DptjJiwe.system.js} +3 -3
  171. package/dist/twilight/p-DptjJiwe.system.js.map +1 -0
  172. package/dist/twilight/{p-D7KyY0aM.system.js.map → p-F_vFBEkV.system.js.map} +1 -1
  173. package/dist/twilight/{p-DVSp6oMU.system.js.map → p-Oh4BAcs5.system.js.map} +1 -1
  174. package/dist/twilight/{p-BZUwUXBN.system.js.map → p-U21ESPkg.system.js.map} +1 -1
  175. package/dist/twilight/{p-162ed342.entry.js → p-a4c3b014.entry.js} +2 -2
  176. package/dist/twilight/{p-6472a2f6.system.entry.js → p-a612e6c5.system.entry.js} +2 -2
  177. package/dist/twilight/{p-c1c214f2.system.entry.js → p-abc05312.system.entry.js} +2 -2
  178. package/dist/twilight/{p-42e2df0c.entry.js → p-ba9b6282.entry.js} +2 -2
  179. package/dist/twilight/{p-c5e84065.system.entry.js → p-bafe2136.system.entry.js} +2 -2
  180. package/dist/twilight/{p-d5bfc087.entry.js → p-bd425feb.entry.js} +2 -2
  181. package/dist/twilight/{p-27844bd8.entry.js → p-c28c9c1e.entry.js} +2 -2
  182. package/dist/twilight/{p-f72cce5d.system.entry.js → p-ccb6e511.system.entry.js} +2 -2
  183. package/dist/twilight/{p-2d8fe9f8.system.entry.js → p-cdc9615c.system.entry.js} +2 -2
  184. package/dist/twilight/{p-1908f79d.system.entry.js → p-cff0c69f.system.entry.js} +2 -2
  185. package/dist/twilight/{p-8e4abc05.entry.js → p-d3aebdc0.entry.js} +2 -2
  186. package/dist/twilight/{p-c8160372.entry.js → p-d595f2a4.entry.js} +2 -2
  187. package/dist/twilight/{p-03d7034d.system.entry.js → p-d6e77b85.system.entry.js} +2 -2
  188. package/dist/twilight/{p-2258c85b.entry.js → p-d7440205.entry.js} +2 -2
  189. package/dist/twilight/{p-2de917dc.entry.js → p-d7b75097.entry.js} +2 -2
  190. package/dist/twilight/{p-bb4196a0.system.entry.js → p-de658198.system.entry.js} +3 -3
  191. package/dist/twilight/{p-35a8bf9e.system.entry.js → p-e2c78759.system.entry.js} +2 -2
  192. package/dist/twilight/{p-e1dddb9c.entry.js → p-e462e3a9.entry.js} +2 -2
  193. package/dist/twilight/{p-eb22a1c3.system.entry.js → p-e947f10d.system.entry.js} +2 -2
  194. package/dist/twilight/{p-69623bd1.system.entry.js → p-f36aed04.system.entry.js} +2 -2
  195. package/dist/twilight/{p-33ca396b.system.entry.js → p-f4491a18.system.entry.js} +2 -2
  196. package/dist/twilight/{p-3addffdd.system.entry.js → p-f4c14236.system.entry.js} +2 -2
  197. package/dist/twilight/{p-ccc8ef90.entry.js → p-f89d616a.entry.js} +2 -2
  198. package/dist/twilight/{p-bf0987ba.entry.js → p-fb11cd41.entry.js} +2 -2
  199. package/dist/twilight/{p-BGZ9TN09.system.js.map → p-gx5460HO.system.js.map} +1 -1
  200. package/dist/twilight/{p-DlRsQXmC.system.js.map → p-lWe6ALx2.system.js.map} +1 -1
  201. package/dist/twilight/{p-B2FNQ1HU.system.js → p-w-zV3b02.system.js} +2 -2
  202. package/dist/twilight/{p-B2FNQ1HU.system.js.map → p-w-zV3b02.system.js.map} +1 -1
  203. package/dist/twilight/{p-PMCRJOG8.system.js.map → p-xoz0vG5r.system.js.map} +1 -1
  204. package/dist/twilight/{p-DB26WFr0.system.js.map → p-z1DY6Zwx.system.js.map} +1 -1
  205. package/dist/twilight/{p-CQrFOU_W.system.js.map → p-zyHf_P3u.system.js.map} +1 -1
  206. package/dist/twilight/twilight.esm.js +1 -1
  207. package/dist/twilight/twilight.js +1 -1
  208. package/package.json +5 -5
  209. package/dist/cjs/index-Dtkjm2h9.js.map +0 -1
  210. package/dist/esm/index-Dyi802qv.js.map +0 -1
  211. package/dist/esm-es5/index-Dyi802qv.js.map +0 -1
  212. package/dist/twilight/p-1fc81fb2.entry.js +0 -5
  213. package/dist/twilight/p-Dyi802qv.js.map +0 -1
  214. package/dist/twilight/p-rA1vzAd2.system.js.map +0 -1
  215. /package/dist/twilight/{p-2b10fab4.entry.js.map → p-016c10fb.entry.js.map} +0 -0
  216. /package/dist/twilight/{p-d735e48f.system.entry.js.map → p-0317026f.system.entry.js.map} +0 -0
  217. /package/dist/twilight/{p-054f639a.entry.js.map → p-0f36712b.entry.js.map} +0 -0
  218. /package/dist/twilight/{p-13ceead7.entry.js.map → p-10450f95.entry.js.map} +0 -0
  219. /package/dist/twilight/{p-b3d8df96.entry.js.map → p-109bd488.entry.js.map} +0 -0
  220. /package/dist/twilight/{p-ef4e38f9.entry.js.map → p-11737427.entry.js.map} +0 -0
  221. /package/dist/twilight/{p-bdf731c6.system.entry.js.map → p-141d608e.system.entry.js.map} +0 -0
  222. /package/dist/twilight/{p-ad49190a.entry.js.map → p-1a05ba30.entry.js.map} +0 -0
  223. /package/dist/twilight/{p-e1c12f34.system.entry.js.map → p-1d318152.system.entry.js.map} +0 -0
  224. /package/dist/twilight/{p-77fb228b.system.entry.js.map → p-2b557022.system.entry.js.map} +0 -0
  225. /package/dist/twilight/{p-9cf81120.entry.js.map → p-32d8b0d8.entry.js.map} +0 -0
  226. /package/dist/twilight/{p-2d75bcfd.entry.js.map → p-340f68a0.entry.js.map} +0 -0
  227. /package/dist/twilight/{p-8dd73cb0.entry.js.map → p-376dfef9.entry.js.map} +0 -0
  228. /package/dist/twilight/{p-308a57ad.system.entry.js.map → p-3b77ca03.system.entry.js.map} +0 -0
  229. /package/dist/twilight/{p-aee101f4.entry.js.map → p-403fb223.entry.js.map} +0 -0
  230. /package/dist/twilight/{p-b3f7b17d.system.entry.js.map → p-41150019.system.entry.js.map} +0 -0
  231. /package/dist/twilight/{p-451efff6.system.entry.js.map → p-4baf00b0.system.entry.js.map} +0 -0
  232. /package/dist/twilight/{p-e4ba5375.entry.js.map → p-4ef5dd09.entry.js.map} +0 -0
  233. /package/dist/twilight/{p-1fc81fb2.entry.js.map → p-5289ed8e.entry.js.map} +0 -0
  234. /package/dist/twilight/{p-2f4afe02.system.entry.js.map → p-6347a5b0.system.entry.js.map} +0 -0
  235. /package/dist/twilight/{p-7bca197d.entry.js.map → p-636221b6.entry.js.map} +0 -0
  236. /package/dist/twilight/{p-af7282f5.system.entry.js.map → p-653281a4.system.entry.js.map} +0 -0
  237. /package/dist/twilight/{p-b8abfcba.entry.js.map → p-665363bf.entry.js.map} +0 -0
  238. /package/dist/twilight/{p-d010322d.system.entry.js.map → p-68d05eee.system.entry.js.map} +0 -0
  239. /package/dist/twilight/{p-d1f9f0d4.system.entry.js.map → p-6a635184.system.entry.js.map} +0 -0
  240. /package/dist/twilight/{p-1b636780.entry.js.map → p-6aad6cb4.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-d02b53ab.system.entry.js.map → p-6d9ab6b2.system.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-e84b355d.system.entry.js.map → p-73f5743a.system.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-3a107644.entry.js.map → p-74fc980b.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-f67a5d7d.system.entry.js.map → p-77659cab.system.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-a2b16b1f.entry.js.map → p-84e5ee17.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-823c158b.entry.js.map → p-8d8c673e.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-3085146e.system.entry.js.map → p-9a1e5035.system.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-a8b3c35d.system.entry.js.map → p-9f12aa4c.system.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-162ed342.entry.js.map → p-a4c3b014.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-6472a2f6.system.entry.js.map → p-a612e6c5.system.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-c1c214f2.system.entry.js.map → p-abc05312.system.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-42e2df0c.entry.js.map → p-ba9b6282.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-c5e84065.system.entry.js.map → p-bafe2136.system.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-d5bfc087.entry.js.map → p-bd425feb.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-27844bd8.entry.js.map → p-c28c9c1e.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-f72cce5d.system.entry.js.map → p-ccb6e511.system.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-2d8fe9f8.system.entry.js.map → p-cdc9615c.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-1908f79d.system.entry.js.map → p-cff0c69f.system.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-8e4abc05.entry.js.map → p-d3aebdc0.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-c8160372.entry.js.map → p-d595f2a4.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-03d7034d.system.entry.js.map → p-d6e77b85.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-2258c85b.entry.js.map → p-d7440205.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-2de917dc.entry.js.map → p-d7b75097.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-bb4196a0.system.entry.js.map → p-de658198.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-35a8bf9e.system.entry.js.map → p-e2c78759.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-e1dddb9c.entry.js.map → p-e462e3a9.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-eb22a1c3.system.entry.js.map → p-e947f10d.system.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-69623bd1.system.entry.js.map → p-f36aed04.system.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-33ca396b.system.entry.js.map → p-f4491a18.system.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-3addffdd.system.entry.js.map → p-f4c14236.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-ccc8ef90.entry.js.map → p-f89d616a.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-bf0987ba.entry.js.map → p-fb11cd41.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"p-DozcNexA.system.js","sources":["src/components/salla-installment/salla-installment.scss?tag=salla-installment","src/components/salla-installment/salla-installment.tsx"],"sourcesContent":["/*\n The whole installment methods is a third-party widgets,\n So there aren't a custom classes (as other components) to style them.\n*/\n\nsalla-installment:empty {\n display: none;\n}\n\n/*\n* Installment::Tabby\n*/\n#tabbyPromoWrapper {\n background: white;\n border-radius: 0.375rem;\n transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n margin-bottom: 20px;\n border: unset !important;\n font-weight: 500;\n\n .salla-y & {\n border: 1px solid var(--color-grey-dark);\n border-radius: 12px\n }\n\n &:hover {\n box-shadow: 0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;\n }\n\n #tabbyPromo {\n * {\n font-family: var(--font-main);\n }\n\n >div>div {\n max-width: none;\n //padding: 15px;\n box-shadow: none;\n border: none;\n }\n\n .tabby-promo-snippet {\n max-width: 100%;\n min-height: 100px;\n padding: 18px 20px;\n // border-color: var(--color-grey-dark);\n border: none !important;\n\n\n &__text,\n &__link {\n font-size: var(--font-sm);\n color: var(--color-text) !important;\n }\n\n &__link {\n font-weight: bold;\n }\n }\n }\n}\n\n.tabby-promo-wrapper {\n #tabby-promo {\n font-family: var(--font-main) !important;\n\n .tabby-promo {\n &__feature-title {\n font-size: var(--font-md);\n }\n\n &__feature-desc {\n font-size: var(--font-sm);\n line-height: 20px;\n }\n }\n }\n}\n\n/*\n* Installment::Tamara & Spotii\n*/\n.tamara-product-widget {\n margin-bottom: 20px;\n}\n\n.tamara-product-widget,\n.spotii-wrapper {\n min-height: 100px;\n position: relative;\n color: var(--main-text-color);\n font-size: var(--font-sm);\n line-height: 1.25;\n padding: 20px 20px 20px 115px !important;\n background: white;\n border-radius: 0.375rem;\n transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n border: unset !important;\n font-family: inherit !important;\n font-weight: 500;\n .salla-y & {\n border-radius: 12px;\n border: 1px solid var(--color-grey-dark);\n }\n\n &:hover {\n box-shadow: 0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;\n }\n\n .spotii-logo {\n float: left;\n margin: 0 0 0 -75px;\n }\n}\n\n.ltr .tamara-product-widget,\n.ltr .spotii-wrapper {\n text-align: left;\n padding: 18px 100px 18px 20px !important;\n\n .spotii-logo {\n float: right;\n margin: 0 -75px 0 0;\n }\n\n .spotii-product-widget {\n text-align: left !important;\n }\n}\n\n.spotii-wrapper {\n margin-bottom: 20px;\n\n .spotii-promo {\n font-size: var(--font-md);\n }\n\n .spotii-product-widget {\n font-size: var(--font-sm) !important;\n margin-top: 10px;\n }\n}\n\n.tamara-product-widget {\n .tamara-logo {\n position: absolute;\n left: 20px !important;\n top: 35px !important;\n margin: 0 !important;\n height: 24px !important;\n\n .ltr & {\n right: 20px !important;\n left: auto !important;\n }\n }\n\n span {\n font-family: var(--font-main);\n font-size: var(--font-sm);\n color: var(--color-text);\n\n &:last-child {\n display: block;\n position: relative;\n margin-top: 8px;\n }\n }\n}\n\n.tamara-popup {\n &__wrap {\n overflow: auto !important;\n }\n}\n\n// mispay and madfu and emkan\n// mispay, madfu, and emkan\n.s-installment-mispay-wrapper,\n.s-installment-madfu-wrapper,\n.s-installment-emkan-wrapper,\n.s-installment-rajehi-wrapper {\n // font-family: \"Noto Sans Arabic\", sans-serif;\n font-size: 14px;\n text-align: right;\n padding: 20px;\n gap: 42px;\n line-height: 22px;\n color: rgb(0, 0, 0);\n min-width: 100%;\n box-sizing: border-box;\n position: relative;\n background-color: white;\n border-radius: 10px;\n margin: 15px 0;\n display: flex;\n transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.s-installment-mispay-wrapper:hover,\n.s-installment-madfu-wrapper:hover,\n.s-installment-emkan-wrapper:hover,\n.s-installment-rajehi-wrapper:hover{\n box-shadow: 0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;\n}\n\n.s-installment-mispay-content,\n.s-installment-madfu-content,\n.s-installment-emkan-content,\n.s-installment-rajehi-content {\n display: flex;\n flex-direction: row-reverse;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n}\n\n.s-installment-mispay-content-text,\n.s-installment-madfu-content-text,\n.s-installment-emkan-content-text,\n.s-installment-rajehi-content-text {\n color: var(--main-text-color);\n font-size: 14px;\n font-weight: 500;\n margin: 0 16px 0 0;\n width: 80%;\n // position: absolute;\n left: 14px;\n text-align: left;\n}\n\n.s-installment-mispay-content img,\n.s-installment-madfu-content img,\n.s-installment-emkan-content img,\n.s-installment-rajehi-content img{\n height: 28px;\n width: 70px;\n display: inline-block;\n max-height: 100%;\n vertical-align: middle;\n fill: none;\n stroke: unset;\n width: auto;\n // position: absolute;\n}\n\n/* RTL Support */\n.rtl .s-installment-mispay-content-text,\n.rtl .s-installment-madfu-content-text,\n.rtl .s-installment-emkan-content-text,\n.rtl .s-installment-rajehi-content-text {\n right: 14px;\n text-align: right;\n margin: 0 0 0 16px;\n}\n\n.rtl .s-installment-mispay-content img,\n.rtl .s-installment-madfu-content img,\n.rtl .s-installment-emkan-content img,\n.rtl .s-installment-rajehi-content img{\n left: 14px !important;\n}\n\n.ltr .s-installment-mispay-content img,\n.ltr .s-installment-madfu-content img,\n.ltr .s-installment-emkan-content img,\n.ltr .s-installment-rajehi-content img {\n right: 14px !important;\n}\n\n\n.s-installment-rajehi-content img {\n width: 70px !important;\n height: 40px !important;;\n}\n\n.s-installment-emkan-content img {\n height: 35px !important;\n}\n\n","import { Component, Host, h, Prop, State, Element } from '@stencil/core';\n\n@Component({\n tag: 'salla-installment',\n styleUrl: 'salla-installment.scss',\n})\nexport class SallaInstallment {\n private tabbyBorderRemoved: boolean = false;\n private tabbyRemoveBorderTries: number = 0;\n @Element() host: HTMLElement;\n\n /**\n * Current product price\n */\n @Prop() price: string;\n /**\n * Language code\n */\n @Prop() language: string = salla.config.get('user.language_code');\n /**\n * Currency code\n */\n @Prop() currency: string = salla.config.get('user.currency_code');\n /**\n * Country code\n */\n @Prop() country: string = salla.config.get('user.country_code');\n\n @State() tabbyIsActive: boolean;\n @State() spotiiIsActive: boolean;\n @State() tamaraIsActive: null | { publicKey: string };\n @State() mispayActive: null | { merchantCode: string; publicKey: string };\n @State() emkanIsActive: boolean;\n @State() madfuActive: boolean;\n @State() rajehiIsActive?: { pointsPerRiyal: number };\n\n @State() installment_sheria_text: (key: string, replacement: object) => string = (key, replacement) => salla.lang.get(key, replacement);\n\n async componentWillLoad() {\n await salla.onReady();\n await salla.lang.onLoaded();\n this.currency = salla.config.get('user.currency_code') || 'SAR';\n this.language = salla.config.get('user.language_code') || 'ar';\n this.country = salla.config.get('user.country_code') || 'SA';\n\n const installmentOptions = [\n { key: 'pages.products.installments', installments: 3 },\n { key: 'pages.products.installments_emkan', installments: 5 },\n ];\n\n installmentOptions.forEach(option => {\n this.installment_sheria_text(option.key, {\n payment: salla.money(parseFloat(this.price)),\n amount: salla.money((parseFloat(this.price) / option.installments).toFixed(2)).replace(/\\.00$/, ''),\n installments: option.installments,\n });\n });\n\n const installment = salla.config.get('store.settings.installments');\n if (installment) {\n this.tamaraIsActive = installment.tamara;\n this.tabbyIsActive = installment.tabby;\n this.spotiiIsActive = installment.spotii;\n this.mispayActive = installment.mispay;\n this.emkanIsActive = installment.emkan;\n this.madfuActive = installment.madfu;\n this.rajehiIsActive = installment.mokafaa_alrajhi;\n }\n\n salla.event.on('product::price.updated', ({ data }) => {\n if (!data.price || data.price == this.price) {\n return;\n }\n this.price = data.price;\n this.renderInstallments(true);\n });\n }\n\n componentDidLoad() {\n this.renderInstallments();\n }\n\n render() {\n const isSAR = this.currency === 'SAR';\n\n if (!this.isValidPrice(this.price)) {\n return '';\n }\n return (\n <Host>\n {this.tamaraIsActive &&\n (this.tamaraIsActive?.publicKey ? (\n // Tamara widget v2\n <div class=\"mb-5\">\n <tamara-widget\n type=\"tamara-summary\"\n inline-type=\"2\"\n amount={this.price}\n ></tamara-widget>\n </div>\n ) : (\n // Tamara widget v1 fallback\n <div\n class=\"tamara-product-widget\"\n data-price={this.price}\n data-currency={this.currency}\n data-lang={this.language}\n data-payment-type=\"installment\"\n ></div>\n ))}\n\n {this.tabbyIsActive ? (\n <div id=\"tabbyPromoWrapper\">\n <div id=\"tabbyPromo\"></div>\n </div>\n ) : (\n ''\n )}\n\n {this.spotiiIsActive ? (\n <div class=\"spotii-wrapper\">\n {/*No need for the price, the price already in the page, and also tammara & tabby doesn't have price */}\n <div class=\"spotii-promo\"></div>\n </div>\n ) : (\n ''\n )}\n\n {this.shouldShowMispay() &&\n (this.mispayActive.publicKey ? (\n <div class=\"mb-5\">\n <mispay-widget amount={this.price} lang={this.language}></mispay-widget>\n </div>\n ) : (\n <div class=\"s-installment-mispay-wrapper\">\n <div class=\"s-installment-mispay-content\">\n <img src={salla.url.cdn('images/payment/png/mispay.png')} alt=\"mispay\" />\n <span class=\"s-installment-mispay-content-text\" innerHTML={this.installment_sheria_text('pages.products.installments',{\n payment: salla.money(parseFloat(this.price)),\n amount: salla.money((parseFloat(this.price) / 4).toFixed(2)),\n installments: 4,\n })}></span>\n </div>\n </div>\n ))}\n\n {this.emkanIsActive && this.currency === \"SAR\" ? (\n <div class=\"s-installment-emkan-wrapper\">\n <div class=\"s-installment-emkan-content\">\n <img src={salla.url.cdn('images/payment/png/emkan.png')} alt=\"emkan\" />\n <span class=\"s-installment-emkan-content-text\" innerHTML={this.installment_sheria_text('pages.products.installments_emkan', {\n payment: salla.money(parseFloat(this.price)),\n installments: 5,\n })}></span>\n </div>\n </div>\n ) : (\n ''\n )}\n {this.madfuActive && this.currency === \"SAR\" ? (\n <div class=\"s-installment-madfu-wrapper\">\n <div class=\"s-installment-madfu-content\">\n <img\n src={\n salla.url.cdn('images/payment/png/madfu.png')\n }\n alt=\"madfu\"\n />\n <span class=\"s-installment-madfu-content-text\">\n {salla.lang.get('pages.products.installments_madfu')}\n </span>\n </div>\n </div>\n ) : (\n ''\n )}\n\n {(isSAR && this.rajehiIsActive) ?\n <div class=\"s-installment-rajehi-wrapper\">\n <div class=\"s-installment-rajehi-content\">\n <img src={salla.url.cdn('images/payment/png/mokafaa_alrajhi_loyalty.png')} alt=\"mokafaa_alrajhi_loyalty\"/>\n\n <span class=\"s-installment-rajehi-content-text\">\n {salla.lang.get(\"pages.products.rajahi_earn_points\", {points: Math.floor(+this.price * this.rajehiIsActive.pointsPerRiyal)})}\n </span>\n\n </div>\n </div>\n\n : ''}\n </Host>\n );\n }\n\n renderInstallments(isUpdating: boolean = false) {\n if (!this.isValidPrice(this.price)) {\n return;\n }\n // Tamara\n if (this.tamaraIsActive) {\n this.loadTamara({isUpdating});\n }\n\n // tabby\n if (this.tabbyIsActive) {\n if (isUpdating) {\n // remove #tabbyPromoWrapper and re append it\n var oldTabbyWrapper = this.host.querySelector('#tabbyPromoWrapper');\n if (oldTabbyWrapper) {\n oldTabbyWrapper.remove();\n }\n\n var tabbyPromoWrapper = document.createElement('div');\n tabbyPromoWrapper.setAttribute('id', 'tabbyPromoWrapper');\n var tabbyPromo = document.createElement('div');\n tabbyPromo.setAttribute('id', 'tabbyPromo');\n tabbyPromoWrapper.appendChild(tabbyPromo);\n this.host.appendChild(tabbyPromoWrapper);\n\n var oldTabbyScript = document.querySelector(\n 'script[src=\"https://checkout.tabby.ai/tabby-promo.js\"]',\n );\n if (oldTabbyScript) {\n oldTabbyScript.remove();\n }\n }\n\n var tabbyScript = document.createElement('script');\n tabbyScript.setAttribute('src', 'https://checkout.tabby.ai/tabby-promo.js');\n document.head.appendChild(tabbyScript);\n tabbyScript.onload = () => {\n const TabbyPromo = window.TabbyPromo;\n new TabbyPromo({\n selector: '#tabbyPromo',\n currency: this.currency,\n price: this.price,\n lang: this.language,\n publicKey: salla.config.get('store.settings.installments.tabby.publicKey'),\n merchantCode: salla.config.get('store.settings.installments.tabby.merchantCode'),\n });\n document.querySelectorAll('.tabby-promo-snippet__logo').forEach(function (element) {\n element.setAttribute('aria-label', 'Tabby Logo');\n });\n };\n // this is a workaround to remove the default border and add margin\n this.removeTabbyBorder();\n }\n\n // Spotii\n if (this.spotiiIsActive) {\n if (isUpdating) {\n var oldSpotiiWrapper = this.host.querySelector('.spotii-wrapper');\n if (oldSpotiiWrapper) {\n oldSpotiiWrapper.remove();\n }\n\n var spotiiPromoWrapper = document.createElement('div');\n spotiiPromoWrapper.classList.add('spotii-wrapper');\n var spotiiPromo = document.createElement('div');\n spotiiPromo.classList.add('spotii-promo');\n spotiiPromoWrapper.appendChild(spotiiPromo);\n this.host.appendChild(spotiiPromoWrapper);\n var oldSpotiiScript = document.querySelector(\n 'script[src=\"' + salla.url.cdn('js/price-widget-ar-salla.js') + '\"]',\n );\n if (oldSpotiiScript) {\n oldSpotiiScript.remove();\n }\n }\n\n let amount = salla.money((Number(this.price) / 3).toFixed(2), false);\n let isRTL = salla.config.get('theme.is_rtl', true);\n window.spotiiConfig = {\n targetXPath: ['.spotii-wrapper'],\n renderToPath: ['.spotii-promo'],\n numberOfPayment: 3,\n currency: this.currency,\n templateLine: '${textOne} ${number} ${textTwo} ' + amount + '${logo} ${info}',\n //todo:: translate these\n textOne: isRTL ? 'جزء الدفع على' : 'Split it into',\n textTwo: isRTL ? 'أقساط متساوية بدون تكاليف اضافية بقيمة' : 'payments of',\n textThree: 'مع',\n price: this.price,\n // forcedShow: false,\n // merchantID: null,\n };\n\n var spotiiScript = document.createElement('script');\n spotiiScript.setAttribute('src', salla.url.cdn('js/price-widget-ar-salla.js'));\n document.head.appendChild(spotiiScript);\n // spotiiScript.onload = () => {\n // // setTimeout()\n // }\n }\n\n // Mispay\n if (this.shouldShowMispay() && this.mispayActive.publicKey) {\n this.loadExternalScript({\n position: 'head',\n src: `https://widget.mispay.co/v1/sdk.js?authorize=${this.mispayActive.publicKey}`,\n });\n }\n }\n\n private isValidPrice(price: string): boolean {\n const pricePattern = /^\\d+(\\.\\d{1,2})?$/;\n const isValid = pricePattern.test(price);\n const isGreaterThanZero = parseFloat(price) > 0;\n\n return isValid && isGreaterThanZero;\n }\n\n loadExternalScript({\n src,\n onLoad,\n position,\n }: {\n src: string;\n onLoad?: HTMLScriptElement['onload'];\n position: 'head' | 'body';\n }) {\n const script = document.createElement('script');\n script.src = src;\n script.onload = onLoad;\n document[position].appendChild(script);\n }\n\n loadTamara({ isUpdating }: { isUpdating: boolean }) {\n const isV2Enabled = !!this.tamaraIsActive?.publicKey;\n\n if (isUpdating) {\n setTimeout(() => {\n if (isV2Enabled) {\n return window.TamaraWidgetV2?.refresh();\n }\n\n // v1 fallback widget refresh\n window.TamaraProductWidget?.render();\n }, 300);\n } else {\n if (isV2Enabled) {\n const language_code = salla.config.get('user.language_code');\n const lang = ['ar', 'en'].includes(language_code) ? language_code : 'ar';\n // this used in case user change the currency to get the country code\n const countryCodeByCurrency = this.currency?.slice(0, -1);\n\n const country = ['SA', 'AE', 'KW', 'BH', 'OM', 'QA'].includes(countryCodeByCurrency)\n ? countryCodeByCurrency\n : null;\n\n if (!country) {\n console.error('Tamara: Country code is not supported', countryCodeByCurrency);\n } else {\n window.tamaraWidgetConfig = {\n lang,\n country,\n publicKey: this.tamaraIsActive.publicKey,\n style: {\n fontSize: '14px',\n },\n };\n\n this.loadExternalScript({\n position: 'head',\n src: 'https://cdn.tamara.co/widget-v2/tamara-widget.js',\n });\n }\n } else {\n // v1 fallback widget\n this.loadExternalScript({\n position: 'head',\n src: 'https://cdn.tamara.co/widget/product-widget.min.js',\n onLoad: () => {\n window.TamaraProductWidget.init({ lang: this.language });\n setTimeout(() => {\n window.TamaraProductWidget.render();\n }, 300);\n },\n });\n }\n }\n }\n\n shouldShowMispay() {\n return this.currency === 'SAR' && this.mispayActive;\n }\n\n /**\n * this is workaround to remove the default border and add margin\n * we will try to remove tabby border 5 times for 7.5 seconds\n */\n removeTabbyBorder() {\n if (this.tabbyBorderRemoved || this.tabbyRemoveBorderTries > 5) {\n return;\n }\n this.tabbyRemoveBorderTries++;\n setTimeout(() => {\n let promo: any = document.querySelector('#tabbyPromo>div>div');\n promo = promo && promo.shadowRoot\n ? promo.shadowRoot.querySelector('div[class^=\"styles__tabby-promo-snippet--\"]')\n : null;\n if (promo) {\n promo.style = 'border: none; margin: 15px 0!important;';\n this.tabbyBorderRemoved = true;\n } else {\n this.removeTabbyBorder();\n }\n }, this.tabbyRemoveBorderTries * 500);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAAA,MAAM,mBAAmB,GAAG,0kMAA0kM;;YCMzlM,gBAAgB,gCAAA,MAAA;MAJ7B,IAAA,WAAA,CAAA,OAAA,EAAA;;MAKU,QAAA,IAAkB,CAAA,kBAAA,GAAY,KAAK;MACnC,QAAA,IAAsB,CAAA,sBAAA,GAAW,CAAC;MAO1C;;MAEG;cACK,IAAQ,CAAA,QAAA,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;MACjE;;MAEG;cACK,IAAQ,CAAA,QAAA,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;MACjE;;MAEG;cACK,IAAO,CAAA,OAAA,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB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K,EAAE;MACT,gBAAA,KAAK,CAAC,KAAK,GAAG,yCAAyC;MACvD,gBAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI;;uBACzB;sBACL,IAAI,CAAC,iBAAiB,EAAE;;MAE5B,SAAC,EAAE,IAAI,CAAC,sBAAsB,GAAG,GAAG,CAAC;;;;;;;;;;;;"}
1
+ {"version":3,"file":"p-0d_kQ9S2.system.js","sources":["src/components/salla-installment/salla-installment.scss?tag=salla-installment","src/components/salla-installment/salla-installment.tsx"],"sourcesContent":["/*\n The whole installment methods is a third-party widgets,\n So there aren't a custom classes (as other components) to style them.\n*/\n\nsalla-installment:empty {\n display: none;\n}\n\n/*\n* Installment::Tabby\n*/\n#tabbyPromoWrapper {\n background: white;\n border-radius: 0.375rem;\n transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n margin-bottom: 20px;\n border: unset !important;\n font-weight: 500;\n\n .salla-y & {\n border: 1px solid var(--color-grey-dark);\n border-radius: 12px\n }\n\n &:hover {\n box-shadow: 0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;\n }\n\n #tabbyPromo {\n * {\n font-family: var(--font-main);\n }\n\n >div>div {\n max-width: none;\n //padding: 15px;\n box-shadow: none;\n border: none;\n }\n\n .tabby-promo-snippet {\n max-width: 100%;\n min-height: 100px;\n padding: 18px 20px;\n // border-color: var(--color-grey-dark);\n border: none !important;\n\n\n &__text,\n &__link {\n font-size: var(--font-sm);\n color: var(--color-text) !important;\n }\n\n &__link {\n font-weight: bold;\n }\n }\n }\n}\n\n.tabby-promo-wrapper {\n #tabby-promo {\n font-family: var(--font-main) !important;\n\n .tabby-promo {\n &__feature-title {\n font-size: var(--font-md);\n }\n\n &__feature-desc {\n font-size: var(--font-sm);\n line-height: 20px;\n }\n }\n }\n}\n\n/*\n* Installment::Tamara & Spotii\n*/\n.tamara-product-widget {\n margin-bottom: 20px;\n}\n\n.tamara-product-widget,\n.spotii-wrapper {\n min-height: 100px;\n position: relative;\n color: var(--main-text-color);\n font-size: var(--font-sm);\n line-height: 1.25;\n padding: 20px 20px 20px 115px !important;\n background: white;\n border-radius: 0.375rem;\n transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n border: unset !important;\n font-family: inherit !important;\n font-weight: 500;\n .salla-y & {\n border-radius: 12px;\n border: 1px solid var(--color-grey-dark);\n }\n\n &:hover {\n box-shadow: 0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;\n }\n\n .spotii-logo {\n float: left;\n margin: 0 0 0 -75px;\n }\n}\n\n.ltr .tamara-product-widget,\n.ltr .spotii-wrapper {\n text-align: left;\n padding: 18px 100px 18px 20px !important;\n\n .spotii-logo {\n float: right;\n margin: 0 -75px 0 0;\n }\n\n .spotii-product-widget {\n text-align: left !important;\n }\n}\n\n.spotii-wrapper {\n margin-bottom: 20px;\n\n .spotii-promo {\n font-size: var(--font-md);\n }\n\n .spotii-product-widget {\n font-size: var(--font-sm) !important;\n margin-top: 10px;\n }\n}\n\n.tamara-product-widget {\n .tamara-logo {\n position: absolute;\n left: 20px !important;\n top: 35px !important;\n margin: 0 !important;\n height: 24px !important;\n\n .ltr & {\n right: 20px !important;\n left: auto !important;\n }\n }\n\n span {\n font-family: var(--font-main);\n font-size: var(--font-sm);\n color: var(--color-text);\n\n &:last-child {\n display: block;\n position: relative;\n margin-top: 8px;\n }\n }\n}\n\n.tamara-popup {\n &__wrap {\n overflow: auto !important;\n }\n}\n\n// mispay and madfu and emkan\n// mispay, madfu, and emkan\n.s-installment-mispay-wrapper,\n.s-installment-madfu-wrapper,\n.s-installment-emkan-wrapper,\n.s-installment-rajehi-wrapper {\n // font-family: \"Noto Sans Arabic\", sans-serif;\n font-size: 14px;\n text-align: right;\n padding: 20px;\n gap: 42px;\n line-height: 22px;\n color: rgb(0, 0, 0);\n min-width: 100%;\n box-sizing: border-box;\n position: relative;\n background-color: white;\n border-radius: 10px;\n margin: 15px 0;\n display: flex;\n transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.s-installment-mispay-wrapper:hover,\n.s-installment-madfu-wrapper:hover,\n.s-installment-emkan-wrapper:hover,\n.s-installment-rajehi-wrapper:hover{\n box-shadow: 0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;\n}\n\n.s-installment-mispay-content,\n.s-installment-madfu-content,\n.s-installment-emkan-content,\n.s-installment-rajehi-content {\n display: flex;\n flex-direction: row-reverse;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n}\n\n.s-installment-mispay-content-text,\n.s-installment-madfu-content-text,\n.s-installment-emkan-content-text,\n.s-installment-rajehi-content-text {\n color: var(--main-text-color);\n font-size: 14px;\n font-weight: 500;\n margin: 0 16px 0 0;\n width: 80%;\n // position: absolute;\n left: 14px;\n text-align: left;\n}\n\n.s-installment-mispay-content img,\n.s-installment-madfu-content img,\n.s-installment-emkan-content img,\n.s-installment-rajehi-content img{\n height: 28px;\n width: 70px;\n display: inline-block;\n max-height: 100%;\n vertical-align: middle;\n fill: none;\n stroke: unset;\n width: auto;\n // position: absolute;\n}\n\n/* RTL Support */\n.rtl .s-installment-mispay-content-text,\n.rtl .s-installment-madfu-content-text,\n.rtl .s-installment-emkan-content-text,\n.rtl .s-installment-rajehi-content-text {\n right: 14px;\n text-align: right;\n margin: 0 0 0 16px;\n}\n\n.rtl .s-installment-mispay-content img,\n.rtl .s-installment-madfu-content img,\n.rtl .s-installment-emkan-content img,\n.rtl .s-installment-rajehi-content img{\n left: 14px !important;\n}\n\n.ltr .s-installment-mispay-content img,\n.ltr .s-installment-madfu-content img,\n.ltr .s-installment-emkan-content img,\n.ltr .s-installment-rajehi-content img {\n right: 14px !important;\n}\n\n\n.s-installment-rajehi-content img {\n width: 70px !important;\n height: 40px !important;;\n}\n\n.s-installment-emkan-content img {\n height: 35px !important;\n}\n\n","import { Component, Host, h, Prop, State, Element } from '@stencil/core';\n\n@Component({\n tag: 'salla-installment',\n styleUrl: 'salla-installment.scss',\n})\nexport class SallaInstallment {\n private tabbyBorderRemoved: boolean = false;\n private tabbyRemoveBorderTries: number = 0;\n @Element() host: HTMLElement;\n\n /**\n * Current product price\n */\n @Prop() price: string;\n /**\n * Language code\n */\n @Prop() language: string = salla.config.get('user.language_code');\n /**\n * Currency code\n */\n @Prop() currency: string = salla.config.get('user.currency_code');\n /**\n * Country code\n */\n @Prop() country: string = salla.config.get('user.country_code');\n\n @State() tabbyIsActive: boolean;\n @State() spotiiIsActive: boolean;\n @State() tamaraIsActive: null | { publicKey: string };\n @State() mispayActive: null | { merchantCode: string; publicKey: string };\n @State() emkanIsActive: boolean;\n @State() madfuActive: boolean;\n @State() rajehiIsActive?: { pointsPerRiyal: number };\n\n @State() installment_sheria_text: (key: string, replacement: object) => string = (key, replacement) => salla.lang.get(key, replacement);\n\n async componentWillLoad() {\n await salla.onReady();\n await salla.lang.onLoaded();\n this.currency = salla.config.get('user.currency_code') || 'SAR';\n this.language = salla.config.get('user.language_code') || 'ar';\n this.country = salla.config.get('user.country_code') || 'SA';\n\n const installmentOptions = [\n { key: 'pages.products.installments', installments: 3 },\n { key: 'pages.products.installments_emkan', installments: 5 },\n ];\n\n installmentOptions.forEach(option => {\n this.installment_sheria_text(option.key, {\n payment: salla.money(parseFloat(this.price)),\n amount: salla.money((parseFloat(this.price) / option.installments).toFixed(2)).replace(/\\.00$/, ''),\n installments: option.installments,\n });\n });\n\n const installment = salla.config.get('store.settings.installments');\n if (installment) {\n this.tamaraIsActive = installment.tamara;\n this.tabbyIsActive = installment.tabby;\n this.spotiiIsActive = installment.spotii;\n this.mispayActive = installment.mispay;\n this.emkanIsActive = installment.emkan;\n this.madfuActive = installment.madfu;\n this.rajehiIsActive = installment.mokafaa_alrajhi;\n }\n\n salla.event.on('product::price.updated', ({ data }) => {\n if (!data.price || data.price == this.price) {\n return;\n }\n this.price = data.price;\n this.renderInstallments(true);\n });\n }\n\n componentDidLoad() {\n this.renderInstallments();\n }\n\n render() {\n const isSAR = this.currency === 'SAR';\n\n if (!this.isValidPrice(this.price)) {\n return '';\n }\n return (\n <Host>\n {this.tamaraIsActive &&\n (this.tamaraIsActive?.publicKey ? (\n // Tamara widget v2\n <div class=\"mb-5\">\n <tamara-widget\n type=\"tamara-summary\"\n inline-type=\"2\"\n amount={this.price}\n ></tamara-widget>\n </div>\n ) : (\n // Tamara widget v1 fallback\n <div\n class=\"tamara-product-widget\"\n data-price={this.price}\n data-currency={this.currency}\n data-lang={this.language}\n data-payment-type=\"installment\"\n ></div>\n ))}\n\n {this.tabbyIsActive ? (\n <div id=\"tabbyPromoWrapper\">\n <div id=\"tabbyPromo\"></div>\n </div>\n ) : (\n ''\n )}\n\n {this.spotiiIsActive ? (\n <div class=\"spotii-wrapper\">\n {/*No need for the price, the price already in the page, and also tammara & tabby doesn't have price */}\n <div class=\"spotii-promo\"></div>\n </div>\n ) : (\n ''\n )}\n\n {this.shouldShowMispay() &&\n (this.mispayActive.publicKey ? (\n <div class=\"mb-5\">\n <mispay-widget amount={this.price} lang={this.language}></mispay-widget>\n </div>\n ) : (\n <div class=\"s-installment-mispay-wrapper\">\n <div class=\"s-installment-mispay-content\">\n <img src={salla.url.cdn('images/payment/png/mispay.png')} alt=\"mispay\" />\n <span class=\"s-installment-mispay-content-text\" innerHTML={this.installment_sheria_text('pages.products.installments',{\n payment: salla.money(parseFloat(this.price)),\n amount: salla.money((parseFloat(this.price) / 4).toFixed(2)),\n installments: 4,\n })}></span>\n </div>\n </div>\n ))}\n\n {this.emkanIsActive && this.currency === \"SAR\" ? (\n <div class=\"s-installment-emkan-wrapper\">\n <div class=\"s-installment-emkan-content\">\n <img src={salla.url.cdn('images/payment/png/emkan.png')} alt=\"emkan\" />\n <span class=\"s-installment-emkan-content-text\" innerHTML={this.installment_sheria_text('pages.products.installments_emkan', {\n payment: salla.money(parseFloat(this.price)),\n installments: 5,\n })}></span>\n </div>\n </div>\n ) : (\n ''\n )}\n {this.madfuActive && this.currency === \"SAR\" ? (\n <div class=\"s-installment-madfu-wrapper\">\n <div class=\"s-installment-madfu-content\">\n <img\n src={\n salla.url.cdn('images/payment/png/madfu.png')\n }\n alt=\"madfu\"\n />\n <span class=\"s-installment-madfu-content-text\">\n {salla.lang.get('pages.products.installments_madfu')}\n </span>\n </div>\n </div>\n ) : (\n ''\n )}\n\n {(isSAR && this.rajehiIsActive) ?\n <div class=\"s-installment-rajehi-wrapper\">\n <div class=\"s-installment-rajehi-content\">\n <img src={salla.url.cdn('images/payment/png/mokafaa_alrajhi_loyalty.png')} alt=\"mokafaa_alrajhi_loyalty\"/>\n\n <span class=\"s-installment-rajehi-content-text\">\n {salla.lang.get(\"pages.products.rajahi_earn_points\", {points: Math.floor(+this.price * this.rajehiIsActive.pointsPerRiyal)})}\n </span>\n\n </div>\n </div>\n\n : ''}\n </Host>\n );\n }\n\n renderInstallments(isUpdating: boolean = false) {\n if (!this.isValidPrice(this.price)) {\n return;\n }\n // Tamara\n if (this.tamaraIsActive) {\n this.loadTamara({isUpdating});\n }\n\n // tabby\n if (this.tabbyIsActive) {\n if (isUpdating) {\n // remove #tabbyPromoWrapper and re append it\n var oldTabbyWrapper = this.host.querySelector('#tabbyPromoWrapper');\n if (oldTabbyWrapper) {\n oldTabbyWrapper.remove();\n }\n\n var tabbyPromoWrapper = document.createElement('div');\n tabbyPromoWrapper.setAttribute('id', 'tabbyPromoWrapper');\n var tabbyPromo = document.createElement('div');\n tabbyPromo.setAttribute('id', 'tabbyPromo');\n tabbyPromoWrapper.appendChild(tabbyPromo);\n this.host.appendChild(tabbyPromoWrapper);\n\n var oldTabbyScript = document.querySelector(\n 'script[src=\"https://checkout.tabby.ai/tabby-promo.js\"]',\n );\n if (oldTabbyScript) {\n oldTabbyScript.remove();\n }\n }\n\n var tabbyScript = document.createElement('script');\n tabbyScript.setAttribute('src', 'https://checkout.tabby.ai/tabby-promo.js');\n document.head.appendChild(tabbyScript);\n tabbyScript.onload = () => {\n const TabbyPromo = window.TabbyPromo;\n new TabbyPromo({\n selector: '#tabbyPromo',\n currency: this.currency,\n price: this.price,\n lang: this.language,\n publicKey: salla.config.get('store.settings.installments.tabby.publicKey'),\n merchantCode: salla.config.get('store.settings.installments.tabby.merchantCode'),\n });\n document.querySelectorAll('.tabby-promo-snippet__logo').forEach(function (element) {\n element.setAttribute('aria-label', 'Tabby Logo');\n });\n };\n // this is a workaround to remove the default border and add margin\n this.removeTabbyBorder();\n }\n\n // Spotii\n if (this.spotiiIsActive) {\n if (isUpdating) {\n var oldSpotiiWrapper = this.host.querySelector('.spotii-wrapper');\n if (oldSpotiiWrapper) {\n oldSpotiiWrapper.remove();\n }\n\n var spotiiPromoWrapper = document.createElement('div');\n spotiiPromoWrapper.classList.add('spotii-wrapper');\n var spotiiPromo = document.createElement('div');\n spotiiPromo.classList.add('spotii-promo');\n spotiiPromoWrapper.appendChild(spotiiPromo);\n this.host.appendChild(spotiiPromoWrapper);\n var oldSpotiiScript = document.querySelector(\n 'script[src=\"' + salla.url.cdn('js/price-widget-ar-salla.js') + '\"]',\n );\n if (oldSpotiiScript) {\n oldSpotiiScript.remove();\n }\n }\n\n let amount = salla.money((Number(this.price) / 3).toFixed(2), false);\n let isRTL = salla.config.get('theme.is_rtl', true);\n window.spotiiConfig = {\n targetXPath: ['.spotii-wrapper'],\n renderToPath: ['.spotii-promo'],\n numberOfPayment: 3,\n currency: this.currency,\n templateLine: '${textOne} ${number} ${textTwo} ' + amount + '${logo} ${info}',\n //todo:: translate these\n textOne: isRTL ? 'جزء الدفع على' : 'Split it into',\n textTwo: isRTL ? 'أقساط متساوية بدون تكاليف اضافية بقيمة' : 'payments of',\n textThree: 'مع',\n price: this.price,\n // forcedShow: false,\n // merchantID: null,\n };\n\n var spotiiScript = document.createElement('script');\n spotiiScript.setAttribute('src', salla.url.cdn('js/price-widget-ar-salla.js'));\n document.head.appendChild(spotiiScript);\n // spotiiScript.onload = () => {\n // // setTimeout()\n // }\n }\n\n // Mispay\n if (this.shouldShowMispay() && this.mispayActive.publicKey) {\n this.loadExternalScript({\n position: 'head',\n src: `https://widget.mispay.co/v1/sdk.js?authorize=${this.mispayActive.publicKey}`,\n });\n }\n }\n\n private isValidPrice(price: string): boolean {\n const pricePattern = /^\\d+(\\.\\d{1,2})?$/;\n const isValid = pricePattern.test(price);\n const isGreaterThanZero = parseFloat(price) > 0;\n\n return isValid && isGreaterThanZero;\n }\n\n loadExternalScript({\n src,\n onLoad,\n position,\n }: {\n src: string;\n onLoad?: HTMLScriptElement['onload'];\n position: 'head' | 'body';\n }) {\n const script = document.createElement('script');\n script.src = src;\n script.onload = onLoad;\n document[position].appendChild(script);\n }\n\n loadTamara({ isUpdating }: { isUpdating: boolean }) {\n const isV2Enabled = !!this.tamaraIsActive?.publicKey;\n\n if (isUpdating) {\n setTimeout(() => {\n if (isV2Enabled) {\n return window.TamaraWidgetV2?.refresh();\n }\n\n // v1 fallback widget refresh\n window.TamaraProductWidget?.render();\n }, 300);\n } else {\n if (isV2Enabled) {\n const language_code = salla.config.get('user.language_code');\n const lang = ['ar', 'en'].includes(language_code) ? language_code : 'ar';\n // this used in case user change the currency to get the country code\n const countryCodeByCurrency = this.currency?.slice(0, -1);\n\n const country = ['SA', 'AE', 'KW', 'BH', 'OM', 'QA'].includes(countryCodeByCurrency)\n ? countryCodeByCurrency\n : null;\n\n if (!country) {\n console.error('Tamara: Country code is not supported', countryCodeByCurrency);\n } else {\n window.tamaraWidgetConfig = {\n lang,\n country,\n publicKey: this.tamaraIsActive.publicKey,\n style: {\n fontSize: '14px',\n },\n };\n\n this.loadExternalScript({\n position: 'head',\n src: 'https://cdn.tamara.co/widget-v2/tamara-widget.js',\n });\n }\n } else {\n // v1 fallback widget\n this.loadExternalScript({\n position: 'head',\n src: 'https://cdn.tamara.co/widget/product-widget.min.js',\n onLoad: () => {\n window.TamaraProductWidget.init({ lang: this.language });\n setTimeout(() => {\n window.TamaraProductWidget.render();\n }, 300);\n },\n });\n }\n }\n }\n\n shouldShowMispay() {\n return this.currency === 'SAR' && this.mispayActive;\n }\n\n /**\n * this is workaround to remove the default border and add margin\n * we will try to remove tabby border 5 times for 7.5 seconds\n */\n removeTabbyBorder() {\n if (this.tabbyBorderRemoved || this.tabbyRemoveBorderTries > 5) {\n return;\n }\n this.tabbyRemoveBorderTries++;\n setTimeout(() => {\n let promo: any = document.querySelector('#tabbyPromo>div>div');\n promo = promo && promo.shadowRoot\n ? promo.shadowRoot.querySelector('div[class^=\"styles__tabby-promo-snippet--\"]')\n : null;\n if (promo) {\n promo.style = 'border: none; margin: 15px 0!important;';\n this.tabbyBorderRemoved = true;\n } else {\n this.removeTabbyBorder();\n }\n }, this.tabbyRemoveBorderTries * 500);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAAA,MAAM,mBAAmB,GAAG,0kMAA0kM;;YCMzlM,gBAAgB,gCAAA,MAAA;MAJ7B,IAAA,WAAA,CAAA,OAAA,EAAA;;MAKU,QAAA,IAAkB,CAAA,kBAAA,GAAY,KAAK;MACnC,QAAA,IAAsB,CAAA,sBAAA,GAAW,CAAC;MAO1C;;MAEG;cACK,IAAQ,CAAA,QAAA,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;MACjE;;MAEG;cACK,IAAQ,CAAA,QAAA,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;MACjE;;MAEG;cACK,IAAO,CAAA,OAAA,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC;cAUtD,IAAA,CAAA,uBAAuB,GAAiD,CAAC,GAAG,EAAE,WAAW,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC;MAqXxI;MAnXC,IAAA,MAAM,iBAAiB,GAAA;MACrB,QAAA,MAAM,KAAK,CAAC,OAAO,EAAE;MACrB,QAAA,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE;MAC3B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAA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host{display:block}";const e=class{constructor(a){t(this,a);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}connectedCallback(){salla.onReady((()=>{this.data=salla.config.get("store.app_install_prompt");if(!this.isMobileOrTabletDevice())return;if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app");this.alertDelay=setTimeout((()=>this.open=true),3e3)}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(t=1024){const a=window.innerWidth<=t;const s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);const l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&a&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(()=>{this.closing=false;this.open=false}),{once:true})}render(){return this.data?a(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},a("div",null,a("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),a("div",{class:"s-app-install-alert-content"},a("h2",{class:"s-app-install-alert-title"},this.data.title),a("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",a("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),a("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},a("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};e.style=i;export{e as salla_app_install_alert};
5
- //# sourceMappingURL=p-054f639a.entry.js.map
4
+ import{r as t,h as a,H as s,g as l}from"./p-B9zfrGy-.js";const i=":host{display:block}";const e=class{constructor(a){t(this,a);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}connectedCallback(){salla.onReady((()=>{this.data=salla.config.get("store.app_install_prompt");if(!this.isMobileOrTabletDevice())return;if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app");this.alertDelay=setTimeout((()=>this.open=true),3e3)}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(t=1024){const a=window.innerWidth<=t;const s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);const l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&a&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(()=>{this.closing=false;this.open=false}),{once:true})}render(){return this.data?a(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},a("div",null,a("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),a("div",{class:"s-app-install-alert-content"},a("h2",{class:"s-app-install-alert-title"},this.data.title),a("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",a("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),a("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},a("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};e.style=i;export{e as salla_app_install_alert};
5
+ //# sourceMappingURL=p-0f36712b.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as a,H as t,g as l}from"./p-Dyi802qv.js";const r=":host{display:block}";const i=class{constructor(a){s(this,a);var t;this.apps=salla.config.get("store.apps");this.appSlot=((t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.innerHTML)||`<img alt={name} src={icon} />`;salla.onReady((()=>{this.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((()=>{this.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}getAppsArray(){return Object.entries(this.apps).map((([s,a])=>({name:s,value:a})))}componentWillLoad(){return new Promise((s=>salla.onReady(s)))}render(){const s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return a(t,{class:"s-apps-icons"},!this.hideTitle&&a("h3",null,this.appsTitle),a("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map(((s,t)=>a("a",{key:t,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:this.appSlot.replace(/\{icon\}/g,salla.url.cdn(`images/${s.name}.png`)).replace(/\{name\}/g,s.name)})))))}componentDidRender(){var s;(s=this.host.querySelector('[slot="app"]'))===null||s===void 0?void 0:s.remove()}get host(){return l(this)}};i.style=r;export{i as salla_apps_icons};
5
- //# sourceMappingURL=p-13ceead7.entry.js.map
4
+ import{r as s,h as a,H as t,g as l}from"./p-B9zfrGy-.js";const r=":host{display:block}";const i=class{constructor(a){s(this,a);var t;this.apps=salla.config.get("store.apps");this.appSlot=((t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.innerHTML)||`<img alt={name} src={icon} />`;salla.onReady((()=>{this.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((()=>{this.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}getAppsArray(){return Object.entries(this.apps).map((([s,a])=>({name:s,value:a})))}componentWillLoad(){return new Promise((s=>salla.onReady(s)))}render(){const s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return a(t,{class:"s-apps-icons"},!this.hideTitle&&a("h3",null,this.appsTitle),a("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map(((s,t)=>a("a",{key:t,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:this.appSlot.replace(/\{icon\}/g,salla.url.cdn(`images/${s.name}.png`)).replace(/\{name\}/g,s.name)})))))}componentDidRender(){var s;(s=this.host.querySelector('[slot="app"]'))===null||s===void 0?void 0:s.remove()}get host(){return l(this)}};i.style=r;export{i as salla_apps_icons};
5
+ //# sourceMappingURL=p-10450f95.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,c as i,h as t,H as e,g as l}from"./p-Dyi802qv.js";import{M as r}from"./p-DmgxDvXL.js";var h=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n`;const o="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";const a=class{constructor(t){s(this,t);this.verified=i(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((()=>{var s;this.translationLoaded=true;this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type);(s=this.modal)===null||s===void 0?void 0:s.setTitle(this.title)}));if(this.display=="inline"){this.modal={open:()=>"",close:()=>"",setTitle:()=>""};return}salla.event.on("profile::verification",(s=>{var i;let t=Array.isArray(s)?s[0]:s;this.isProfileVerify=true;this.open(t);this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type);(i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title)}));salla.event.on("modalClosed",(()=>{this.resendAfter=0;this.timer.innerHTML="30 : 00"}))}splitNumber(s){this.resetError();let i=s.data||s.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(s.target,i)}modifyNext(s,i){s.value=i[0];i=i.substring(1);if(s.nextElementSibling&&i.length){this.modifyNext(s.nextElementSibling,i)}else if(!s.nextElementSibling&&i.length===0){s.focus()}else if(s.nextElementSibling&&i.length===0){s.nextElementSibling.focus()}}checkAllInputs(){let s=true;for(let i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){s=false}}return s}handleKeyUp(s){var i,t,e,l;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(s.key)){return}let r=s.keyCode||s.charCode;if(s.target.value){(i=s.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(t=s.target.nextElementSibling)===null||t===void 0?void 0:t.select()}else if([8,46].includes(r)){(e=s.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(l=s.target.previousElementSibling)===null||l===void 0?void 0:l.select()}if(s.target.value.length>1){this.splitNumber(s)}}handlePaste(s){this.resetError();const i=salla.helpers.number(s.clipboardData.getData("text"))||"";let t=i.replace(/[^0-9]/g,"");t=t.substring(0,this.otpInputs.length);this.otpInputs.forEach((s=>s.value=""));this.modifyNext(this.otpInputs[0],t)}handleInput(s){this.resetError();salla.helpers.inputDigitsOnly(s.target);if(this.checkAllInputs()){setTimeout((()=>{this.toggleOTPSubmit()}),100)}}resetError(){this.hasError=false;this.errorMessage=""}handleFocus(s){var i;if(s.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(s.target.previousElementSibling.value==""){s.target.previousElementSibling.focus()}}async getCode(){return this.code.value}async open(s){var i,t;this.data=s;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(t=this.firstOtpInput)===null||t===void 0?void 0:t.addEventListener("input",(s=>this.splitNumber(s)));setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let s=[];this.otpInputs.forEach((i=>i.value&&s.push(i.value)));this.code.value=s.join("");if(s.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()}reset(){this.otpInputs.forEach((s=>s.value=""));this.code.value="";this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;let s=setInterval((()=>{if(this.resendAfter<=0){clearInterval(s);this.resend.style.display="block";this.resendMessage.style.display="none"}else{this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`;this.resendAfter--}}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((s=>s.value=""));this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}let s=Object.assign({code:this.code.value},this.data);return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(s):salla.auth.verify(s,this.supportWebAuth))).then((s=>this.verified.emit(s))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((s=>{var i,t,e;this.hasError=true;this.errorMessage=((e=(t=(i=s.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)===null||e===void 0?void 0:e.message)||salla.lang.get("common.errors.error_occurred");if(!s.response){console.log("Unexpected error",s)}else{salla.logger.error(s)}this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return this.display=="inline"?t(e,null,this.myBody()):t("salla-modal",{width:"xs",class:"s-verify",ref:s=>this.modal=s,"modal-title":this.title},t("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?h:r}),this.myBody())}myBody(){return t("div",{class:"s-verify-body",ref:s=>this.body=s},t("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),t("slot",{name:"mobile"}),t("slot",{name:"email"}),t("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:s=>this.code=s}),t("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((s=>t("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${s}`,class:{"s-verify-input":true,"s-has-error":this.hasError},onInput:s=>this.handleInput(s),onPaste:s=>this.handlePaste(s),onKeyUp:s=>this.handleKeyUp(s),onFocus:s=>this.handleFocus(s),required:true})))),this.hasError&&this.errorMessage?t("span",{class:"s-verify-error-message"},this.errorMessage):"",t("div",{slot:"footer",class:"s-verify-footer"},t("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:()=>this.submit(),ref:s=>this.btn=s},salla.lang.get("pages.profile.verify")),t("p",{class:"s-verify-resend-message",ref:s=>this.resendMessage=s},salla.lang.get("blocks.header.resend_after"),t("b",{class:"s-verify-timer",ref:s=>this.timer=s})),t("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:s=>this.resend=s},salla.lang.get("blocks.comments.submit"))),t("slot",{name:"after-footer"}))}get host(){return l(this)}};a.style=o;export{a as salla_verify};
5
- //# sourceMappingURL=p-b3d8df96.entry.js.map
4
+ import{r as s,c as i,h as t,H as e,g as r}from"./p-B9zfrGy-.js";import{M as l}from"./p-DmgxDvXL.js";var h=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n`;const o="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";const a=class{constructor(t){s(this,t);this.verified=i(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((()=>{var s;this.translationLoaded=true;this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type);(s=this.modal)===null||s===void 0?void 0:s.setTitle(this.title)}));if(this.display=="inline"){this.modal={open:()=>"",close:()=>"",setTitle:()=>""};return}salla.event.on("profile::verification",(s=>{var i;let t=Array.isArray(s)?s[0]:s;this.isProfileVerify=true;this.open(t);this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type);(i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title)}));salla.event.on("modalClosed",(()=>{this.resendAfter=0;this.timer.innerHTML="30 : 00"}))}splitNumber(s){this.resetError();let i=s.data||s.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(s.target,i)}modifyNext(s,i){s.value=i[0];i=i.substring(1);if(s.nextElementSibling&&i.length){this.modifyNext(s.nextElementSibling,i)}else if(!s.nextElementSibling&&i.length===0){s.focus()}else if(s.nextElementSibling&&i.length===0){s.nextElementSibling.focus()}}checkAllInputs(){let s=true;for(let i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){s=false}}return s}handleKeyUp(s){var i,t,e,r;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(s.key)){return}let l=s.keyCode||s.charCode;if(s.target.value){(i=s.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(t=s.target.nextElementSibling)===null||t===void 0?void 0:t.select()}else if([8,46].includes(l)){(e=s.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(r=s.target.previousElementSibling)===null||r===void 0?void 0:r.select()}if(s.target.value.length>1){this.splitNumber(s)}}handlePaste(s){this.resetError();const i=salla.helpers.number(s.clipboardData.getData("text"))||"";let t=i.replace(/[^0-9]/g,"");t=t.substring(0,this.otpInputs.length);this.otpInputs.forEach((s=>s.value=""));this.modifyNext(this.otpInputs[0],t)}handleInput(s){this.resetError();salla.helpers.inputDigitsOnly(s.target);if(this.checkAllInputs()){setTimeout((()=>{this.toggleOTPSubmit()}),100)}}resetError(){this.hasError=false;this.errorMessage=""}handleFocus(s){var i;if(s.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(s.target.previousElementSibling.value==""){s.target.previousElementSibling.focus()}}async getCode(){return this.code.value}async open(s){var i,t;this.data=s;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(t=this.firstOtpInput)===null||t===void 0?void 0:t.addEventListener("input",(s=>this.splitNumber(s)));setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let s=[];this.otpInputs.forEach((i=>i.value&&s.push(i.value)));this.code.value=s.join("");if(s.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()}reset(){this.otpInputs.forEach((s=>s.value=""));this.code.value="";this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;let s=setInterval((()=>{if(this.resendAfter<=0){clearInterval(s);this.resend.style.display="block";this.resendMessage.style.display="none"}else{this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`;this.resendAfter--}}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((s=>s.value=""));this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}let s=Object.assign({code:this.code.value},this.data);return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(s):salla.auth.verify(s,this.supportWebAuth))).then((s=>this.verified.emit(s))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((s=>{var i,t,e;this.hasError=true;this.errorMessage=((e=(t=(i=s.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)===null||e===void 0?void 0:e.message)||salla.lang.get("common.errors.error_occurred");if(!s.response){console.log("Unexpected error",s)}else{salla.logger.error(s)}this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return this.display=="inline"?t(e,null,this.myBody()):t("salla-modal",{width:"xs",class:"s-verify",ref:s=>this.modal=s,"modal-title":this.title},t("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?h:l}),this.myBody())}myBody(){return t("div",{class:"s-verify-body",ref:s=>this.body=s},t("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),t("slot",{name:"mobile"}),t("slot",{name:"email"}),t("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:s=>this.code=s}),t("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((s=>t("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${s}`,class:{"s-verify-input":true,"s-has-error":this.hasError},onInput:s=>this.handleInput(s),onPaste:s=>this.handlePaste(s),onKeyUp:s=>this.handleKeyUp(s),onFocus:s=>this.handleFocus(s),required:true})))),this.hasError&&this.errorMessage?t("span",{class:"s-verify-error-message"},this.errorMessage):"",t("div",{slot:"footer",class:"s-verify-footer"},t("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:()=>this.submit(),ref:s=>this.btn=s},salla.lang.get("pages.profile.verify")),t("p",{class:"s-verify-resend-message",ref:s=>this.resendMessage=s},salla.lang.get("blocks.header.resend_after"),t("b",{class:"s-verify-timer",ref:s=>this.timer=s})),t("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:s=>this.resend=s},salla.lang.get("blocks.comments.submit"))),t("slot",{name:"after-footer"}))}get host(){return r(this)}};a.style=o;export{a as salla_verify};
5
+ //# sourceMappingURL=p-109bd488.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as s,H as a,g as c}from"./p-Dyi802qv.js";import{w as e}from"./p-DWksgowB.js";import{M as n}from"./p-DmgxDvXL.js";var i=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>iphone</title>\n<path d="M15.053 27.613c0.133 0.12 0.28 0.213 0.44 0.28s0.333 0.107 0.507 0.107c0.36 0 0.693-0.135 0.947-0.387 0.12-0.135 0.213-0.28 0.28-0.44 0.080-0.16 0.107-0.333 0.107-0.507 0-0.347-0.147-0.695-0.387-0.947-0.507-0.493-1.387-0.493-1.893 0-0.12 0.12-0.213 0.267-0.28 0.44-0.067 0.16-0.107 0.333-0.107 0.507s0.040 0.347 0.107 0.507 0.16 0.305 0.28 0.44zM24 0h-16c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h16c2.205 0 4-1.795 4-4v-24c0-2.205-1.795-4-4-4zM25.333 28c0 0.736-0.599 1.333-1.333 1.333h-16c-0.735 0-1.333-0.597-1.333-1.333v-4h18.667zM25.333 21.333h-18.667v-17.333c0-0.735 0.599-1.333 1.333-1.333h16c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n`;var o=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n`;var l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>paper-plane-o</title>\n<path d="M31.5 0.482c0.375 0.268 0.554 0.696 0.482 1.143l-4.571 27.429c-0.054 0.339-0.268 0.625-0.571 0.804-0.161 0.089-0.357 0.143-0.554 0.143-0.143 0-0.286-0.036-0.429-0.089l-9.411-3.839-5.321 5.839c-0.214 0.25-0.518 0.375-0.839 0.375-0.143 0-0.286-0.018-0.411-0.071-0.446-0.179-0.732-0.607-0.732-1.071v-8.071l-8.429-3.446c-0.411-0.161-0.679-0.536-0.714-0.982-0.036-0.429 0.196-0.839 0.571-1.054l29.714-17.143c0.375-0.232 0.857-0.214 1.214 0.036zM25.393 27.25l3.946-23.625-25.607 14.768 6 2.446 15.411-11.411-8.536 14.232z"></path>\n</svg>\n`;const h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";const r=class{constructor(s){t(this,s);var a;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:i,whatsapp:e,phone:o,telegram:l,email:n};this.contactSlot=((a=this.host.querySelector('[slot="contact"]'))===null||a===void 0?void 0:a.innerHTML)||`<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>${!this.iconsOnly&&"<span class='unicode'>{value}</span>"}</a>`;salla.onReady((()=>{this.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((()=>{this.contactsTitle=this.contactsTitle||salla.lang.get("blocks.footer.social")}))}getContactsArray(){return Object.entries(this.contacts).filter((([t,s])=>s!=="")).map((([t,s])=>({type:t,value:s})))}getContactLink(t){const s=this.contacts[t];switch(t){case"phone":case"mobile":return`tel:${s}`;case"whatsapp":return salla.url.get("whatsapp/send");case"email":return`mailto:${s}`;case"telegram":return s.startsWith("https://t.me/")?s:`https://t.me/${s}`;default:return s}}getContactIcon(t){return this.iconsList[t]}componentWillLoad(){return new Promise((t=>salla.onReady(t)))}render(){const t=this.getContactsArray();if(!t||t.length==0){return}if(this.isHeader){return s(a,{class:"s-contacts s-contacts-header"},t.filter((t=>t.type=="phone"||t.type=="email")).map(((t,a)=>s("a",{href:this.getContactLink(t.type),key:a,class:"s-contacts-topnav-link"},t.type==="email"?t.value:[s("span",null,this.contactsTitle,": "),s("a",{class:"unicode",href:this.iconsList[t.type]},t.value)]))))}return s(a,{class:"s-contacts"},!this.hideTitle&&s("h3",{class:"s-contacts-title"},this.contactsTitle),s("div",{class:{"s-contacts-list":true,"s-contacts-list-horizontal":this.horizontal,"s-contacts-list-vertical":!this.horizontal,"s-contacts-list-icons-only":this.iconsOnly}},t.map(((t,a)=>s("div",{key:a,id:"contact-slot",innerHTML:this.contactSlot.replace(/\{icon\}/g,this.getContactIcon(t.type)).replace(/\{value\}/g,t.value.toString()).replace(/\{link\}/g,this.getContactLink(t.type))})))))}componentDidRender(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()}get host(){return c(this)}};r.style=h;export{r as salla_contacts};
5
- //# sourceMappingURL=p-ef4e38f9.entry.js.map
4
+ import{r as t,h as s,H as a,g as c}from"./p-B9zfrGy-.js";import{w as e}from"./p-DWksgowB.js";import{M as n}from"./p-DmgxDvXL.js";var i=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>iphone</title>\n<path d="M15.053 27.613c0.133 0.12 0.28 0.213 0.44 0.28s0.333 0.107 0.507 0.107c0.36 0 0.693-0.135 0.947-0.387 0.12-0.135 0.213-0.28 0.28-0.44 0.080-0.16 0.107-0.333 0.107-0.507 0-0.347-0.147-0.695-0.387-0.947-0.507-0.493-1.387-0.493-1.893 0-0.12 0.12-0.213 0.267-0.28 0.44-0.067 0.16-0.107 0.333-0.107 0.507s0.040 0.347 0.107 0.507 0.16 0.305 0.28 0.44zM24 0h-16c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h16c2.205 0 4-1.795 4-4v-24c0-2.205-1.795-4-4-4zM25.333 28c0 0.736-0.599 1.333-1.333 1.333h-16c-0.735 0-1.333-0.597-1.333-1.333v-4h18.667zM25.333 21.333h-18.667v-17.333c0-0.735 0.599-1.333 1.333-1.333h16c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n`;var o=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n`;var l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>paper-plane-o</title>\n<path d="M31.5 0.482c0.375 0.268 0.554 0.696 0.482 1.143l-4.571 27.429c-0.054 0.339-0.268 0.625-0.571 0.804-0.161 0.089-0.357 0.143-0.554 0.143-0.143 0-0.286-0.036-0.429-0.089l-9.411-3.839-5.321 5.839c-0.214 0.25-0.518 0.375-0.839 0.375-0.143 0-0.286-0.018-0.411-0.071-0.446-0.179-0.732-0.607-0.732-1.071v-8.071l-8.429-3.446c-0.411-0.161-0.679-0.536-0.714-0.982-0.036-0.429 0.196-0.839 0.571-1.054l29.714-17.143c0.375-0.232 0.857-0.214 1.214 0.036zM25.393 27.25l3.946-23.625-25.607 14.768 6 2.446 15.411-11.411-8.536 14.232z"></path>\n</svg>\n`;const h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";const r=class{constructor(s){t(this,s);var a;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:i,whatsapp:e,phone:o,telegram:l,email:n};this.contactSlot=((a=this.host.querySelector('[slot="contact"]'))===null||a===void 0?void 0:a.innerHTML)||`<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>${!this.iconsOnly&&"<span class='unicode'>{value}</span>"}</a>`;salla.onReady((()=>{this.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((()=>{this.contactsTitle=this.contactsTitle||salla.lang.get("blocks.footer.social")}))}getContactsArray(){return Object.entries(this.contacts).filter((([t,s])=>s!=="")).map((([t,s])=>({type:t,value:s})))}getContactLink(t){const s=this.contacts[t];switch(t){case"phone":case"mobile":return`tel:${s}`;case"whatsapp":return salla.url.get("whatsapp/send");case"email":return`mailto:${s}`;case"telegram":return s.startsWith("https://t.me/")?s:`https://t.me/${s}`;default:return s}}getContactIcon(t){return this.iconsList[t]}componentWillLoad(){return new Promise((t=>salla.onReady(t)))}render(){const t=this.getContactsArray();if(!t||t.length==0){return}if(this.isHeader){return s(a,{class:"s-contacts s-contacts-header"},t.filter((t=>t.type=="phone"||t.type=="email")).map(((t,a)=>s("a",{href:this.getContactLink(t.type),key:a,class:"s-contacts-topnav-link"},t.type==="email"?t.value:[s("span",null,this.contactsTitle,": "),s("a",{class:"unicode",href:this.iconsList[t.type]},t.value)]))))}return s(a,{class:"s-contacts"},!this.hideTitle&&s("h3",{class:"s-contacts-title"},this.contactsTitle),s("div",{class:{"s-contacts-list":true,"s-contacts-list-horizontal":this.horizontal,"s-contacts-list-vertical":!this.horizontal,"s-contacts-list-icons-only":this.iconsOnly}},t.map(((t,a)=>s("div",{key:a,id:"contact-slot",innerHTML:this.contactSlot.replace(/\{icon\}/g,this.getContactIcon(t.type)).replace(/\{value\}/g,t.value.toString()).replace(/\{link\}/g,this.getContactLink(t.type))})))))}componentDidRender(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()}get host(){return c(this)}};r.style=h;export{r as salla_contacts};
5
+ //# sourceMappingURL=p-11737427.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function c(t){try{l(n["throw"](t))}catch(t){s(t)}}function l(t){t.done?i(t.value):r(t.value).then(a,c)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(t){return function(e){return l([t,e])}}function l(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(n=1,r&&(s=c[0]&2?r["return"]:c[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,c[1])).done)return s;if(r=0,s)c=[c[0]&2,s.value];switch(c[0]){case 0:case 1:s=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;r=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){i.label=c[1];break}if(c[0]===6&&i.label<s[1]){i.label=s[1];s=c;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(c);break}if(s[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];r=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-rA1vzAd2.system.js","./p-D5o2VQTp.system.js"],(function(t){"use strict";var e,i,n,r,s;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H},function(t){s=t.a}],execute:function(){var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var c=":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%}";var l=t("salla_price_range",function(){function t(t){e(this,t);this.changed=i(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var n=0;n<this.option.values.length;n+=i){this.filterValues.push(this.option.values.slice(n,n+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return n(r,{key:"016667572b4b528fa05a03a836523f4529c5fab2"},this.filterValues.map((function(e,i){return n("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},n("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),n("span",{innerHTML:t.getPriceLabel(e)}))})),n("div",{key:"2d8ad2a22886c5a787697dadd03d9e0e7fad16e1",class:"flex justify-center items-center"},n("div",{key:"aefe92ec4aced7c86197ead104a729231f74f6d2",class:"relative max-w-xl w-full"},n("div",{key:"cbc8e3ea39aab76307710c376425ee846926da49",class:"s-price-range-inputs"},n("div",{key:"fde3f04bf10f7a95739a8828ca3d076ac1a2a4ad",class:"s-price-range-relative"},n("div",{key:"c52d1c22d394163f76beacec67f1061e50723e57",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"ac9ebe9ae4b92e4072286068211f6b3db5da5d99",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),n("div",{key:"b9405807f3173b1836815adc065573569ea0be1b",class:"s-price-range-gray-text"}," -"),n("div",{key:"192c6760eb0000dfb31f1000d95c7671307a3112",class:"s-price-range-relative"},n("div",{key:"16191bdbea372b8979e17e6f6abd733d4fba5941",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"0c1a13708d720d945eabaefca2ba9331f55859eb",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),n("salla-button",{key:"257c5c90ea65a6e46d492f2139196f1933c090f6",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},n("span",{key:"55abd22d4012068f243040a70659087cc32427bf",innerHTML:this.isRTL?s:a}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}());l.style=c}}}));
5
- //# sourceMappingURL=p-bdf731c6.system.entry.js.map
4
+ */System.register(["./p-DptjJiwe.system.js","./p-D5o2VQTp.system.js"],(function(t){"use strict";var e,i,n,r,s;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H},function(t){s=t.a}],execute:function(){var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var c=":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%}";var l=t("salla_price_range",function(){function t(t){e(this,t);this.changed=i(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var n=0;n<this.option.values.length;n+=i){this.filterValues.push(this.option.values.slice(n,n+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return n(r,{key:"016667572b4b528fa05a03a836523f4529c5fab2"},this.filterValues.map((function(e,i){return n("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},n("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),n("span",{innerHTML:t.getPriceLabel(e)}))})),n("div",{key:"2d8ad2a22886c5a787697dadd03d9e0e7fad16e1",class:"flex justify-center items-center"},n("div",{key:"aefe92ec4aced7c86197ead104a729231f74f6d2",class:"relative max-w-xl w-full"},n("div",{key:"cbc8e3ea39aab76307710c376425ee846926da49",class:"s-price-range-inputs"},n("div",{key:"fde3f04bf10f7a95739a8828ca3d076ac1a2a4ad",class:"s-price-range-relative"},n("div",{key:"c52d1c22d394163f76beacec67f1061e50723e57",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"ac9ebe9ae4b92e4072286068211f6b3db5da5d99",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),n("div",{key:"b9405807f3173b1836815adc065573569ea0be1b",class:"s-price-range-gray-text"}," -"),n("div",{key:"192c6760eb0000dfb31f1000d95c7671307a3112",class:"s-price-range-relative"},n("div",{key:"16191bdbea372b8979e17e6f6abd733d4fba5941",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"0c1a13708d720d945eabaefca2ba9331f55859eb",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),n("salla-button",{key:"257c5c90ea65a6e46d492f2139196f1933c090f6",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},n("span",{key:"55abd22d4012068f243040a70659087cc32427bf",innerHTML:this.isRTL?s:a}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}());l.style=c}}}));
5
+ //# sourceMappingURL=p-141d608e.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as e,g as t}from"./p-Dyi802qv.js";var i;(function(s){s["ProductDetail"]="product.single";s["Cart"]="cart"})(i||(i={}));var r;(function(s){s["Conditional"]="conditional";s["PercentageOrFixed"]="fixed";s["DiscountsTable"]="discounts_table";s["Bank"]="bank";s["BuyXGetY"]="buy_x_get_y";s["SpecialPrice"]="special_price"})(r||(r={}));const a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';const o=class{constructor(e){s(this,e);var t;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=s=>salla.lang.get("pages.offer.buy_quantity",{quantity:s});salla.lang.onLoaded((()=>{this.offer_with_price_text=salla.lang.get("pages.offer.with_price");this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text(0)}));salla.onReady((()=>{this.currentPage=salla.config.get("page.slug");this.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((t=this.host.querySelector('[slot="category"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}async getEndpointByPageName(){if(this.currentPage==i.Cart){const s=await Salla.cart.getCurrentCartId();return`offers/cart/${s}`}if(this.currentPage==i.ProductDetail){return`offers/product/${salla.config.get("page.id")}`}return"offers"}emitPromotionViewed(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const s={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[s])}emitPromotionClicked(s=1){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:s};salla.event.emit("promotion::clicked",[e])}componentWillLoad(){this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((s=>salla.onReady(s))).then((()=>{this.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(this.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((async()=>salla.api.request(await this.getEndpointByPageName()))).then((s=>{if(!(this.offersList=s.data).length){throw new Error("salla-offers:: There is no offers!")}const e=this.offersList.find((s=>[r.SpecialPrice,r.Bank,r.BuyXGetY,r.DiscountsTable].includes(s.type)));if(!e){throw new Error("salla-offers:: Offer type not supported yet!")}if(e.type===r.DiscountsTable){return this.offersList=[e]}if(this.isBankOffer=e.type===r.Bank){this.offersList=this.offersList.filter((s=>s.type===r.Bank));this.isMultipleBank=this.offersList.length>1;return this.offersList}if(e.type===r.SpecialPrice){const s=e.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((s=>{e.details.products=s.data;return this.offersList=[e]})):salla.product.api.categories().then((t=>{const i=this.findCategories(t.data,s.targets);e.details.categories=i;return this.offersList=[e]}))}const t=e.details.get;return t.source==="products"?salla.product.api.fetch({source:"selected",source_value:t.source_value}).then((s=>{t.products=s.data;e.details.get=t;return this.offersList=[e]})):salla.product.api.categories().then((s=>{t.categories=this.findCategories(s.data,t.source_value);e.details.get=t;return this.offersList=[e]}))})).then((s=>{salla.storage.set(this.getStorageKey(),{offers:s,stored_at:(new Date).getTime()});this.canRender=true})).catch((s=>{salla.logger.warn(s)}))}componentDidLoad(){let s=this.host.querySelector(".s-slider-block__title-nav");s===null||s===void 0?void 0:s.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()}findCategories(s,e){var t;let i=[];for(const r of s){if(e.includes(r.id_||r.id)){i.push(r)}if(((t=r.sub_categories)===null||t===void 0?void 0:t.length)>0){i=i.concat(this.findCategories(r.sub_categories,e))}}return i}getStorageKey(){try{const s=salla.config.get("page.slug").replace(".","_");const e=salla.lang.getLocale();const t=salla.config.currency().code;if(!s||!e||!t){throw new Error("Unable to get the storage key.")}return`s-offers-${s}-${salla.config.get("page.id")}-${e}-${t}`}catch(s){return""}}getOffersFromStorage(){let s=salla.storage.get(this.getStorageKey());if(!s||s.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(s.offers)}render(){if(!this.offersList.length||!this.canRender||!this.showOffer)return null;const s=this.offersList[0];const t=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:s.title;const i=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:s.description;const r={"block-title":t,"block-subTitle":i,"show-controls":this.isMultipleBank};return e("div",{class:"s-offer-wrapper",onClick:()=>this.emitPromotionClicked()},e("p",{class:"s-offer-corner-badge"},this.special_offer_text),e("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},r),e("div",{slot:"items"},this.renderSectionForOfferType(s.type))))}renderSectionForOfferType(s){if(this.isBankOffer){return this.renderBankSection()}if(s==r.SpecialPrice){return this.renderSpecialPriceSection()}if(s==r.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()}getCategoriesSection(s){return e("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,s.url).replace(/\{icon\}/g,s.icon||"sicon-store").replace(/\{name\}/g,s.name)})}renderBuyXGetYSection(){var s,t;const i=this.offersList[0].details;return[(s=i.get.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s})))),(t=i.get.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s)))]}renderBankSection(){return this.offersList.map((s=>e("div",{class:{"s-offer-slide-one-sixth":this.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!this.isMultipleBank}},e("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!this.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":this.isMultipleBank}},e("div",{class:"s-offer-bank-logo"},e("img",{src:s.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":s.details.logo,alt:s.title+" offer"})),e("ul",{class:"s-offer-bank-payment-wrapper"},s.details.payments.map((s=>e("li",{class:"s-offer-bank-payment-single"},e("img",{src:salla.url.cdn("images/payment/"+s+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+s+".png"),alt:"payment"}))))),this.isMultipleBank?e("p",{class:"s-offer-bank-payment-discount-percent"},`${this.product_discount_text} ${s.details.discount_value}${s.details.discount_type==="percentage"&&"%"}`):""),!this.isMultipleBank?e("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},e("h2",null,this.offersList[0].title),e("p",{innerHTML:this.generateBankDescription(this.offersList[0].description,s.details.discount_value)})):"")))}generateBankDescription(s,e){return s.replace(new RegExp(`${e} %`),`<span class="s-offer-bank-message-amount">${e} %</span>`)}renderDiscountTableSection(){var s;const t=this.offersList[0];let i=t.details.show_price_after_discount;return(s=this.offersList[0].details.discounts)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},e("div",{class:"s-offer-slide-offer-entry"},e("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},e("p",{class:"s-offer-slide-offer-entry-quantity"},this.buy_quantity_text(s.quantity)),i?e("div",{class:"s-offer-slide-offer-entry-price"},e("span",null,this.offer_with_price_text),e("span",{class:"s-offer-slide-offer-entry-price-amount"},s.discounted_amount)," ",e("span",null,this.userCurrency)):""),e("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},this.with_discount_text,"(",e("span",null,s.percentage,!!s.percentage&&"%"),")")))))}renderSpecialPriceSection(){var s,t;const i=this.offersList[0].details;return[i.apply_to==="product"&&((s=i.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s}))))),i.apply_to==="category"&&((t=i.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s))))]}get host(){return t(this)}};o.style=a;export{o as salla_offer};
5
- //# sourceMappingURL=p-ad49190a.entry.js.map
4
+ import{r as s,h as e,g as t}from"./p-B9zfrGy-.js";var i;(function(s){s["ProductDetail"]="product.single";s["Cart"]="cart"})(i||(i={}));var r;(function(s){s["Conditional"]="conditional";s["PercentageOrFixed"]="fixed";s["DiscountsTable"]="discounts_table";s["Bank"]="bank";s["BuyXGetY"]="buy_x_get_y";s["SpecialPrice"]="special_price"})(r||(r={}));const a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';const o=class{constructor(e){s(this,e);var t;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=s=>salla.lang.get("pages.offer.buy_quantity",{quantity:s});salla.lang.onLoaded((()=>{this.offer_with_price_text=salla.lang.get("pages.offer.with_price");this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text(0)}));salla.onReady((()=>{this.currentPage=salla.config.get("page.slug");this.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((t=this.host.querySelector('[slot="category"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}async getEndpointByPageName(){if(this.currentPage==i.Cart){const s=await Salla.cart.getCurrentCartId();return`offers/cart/${s}`}if(this.currentPage==i.ProductDetail){return`offers/product/${salla.config.get("page.id")}`}return"offers"}emitPromotionViewed(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const s={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[s])}emitPromotionClicked(s=1){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;const e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:s};salla.event.emit("promotion::clicked",[e])}componentWillLoad(){this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((s=>salla.onReady(s))).then((()=>{this.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(this.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((async()=>salla.api.request(await this.getEndpointByPageName()))).then((s=>{if(!(this.offersList=s.data).length){throw new Error("salla-offers:: There is no offers!")}const e=this.offersList.find((s=>[r.SpecialPrice,r.Bank,r.BuyXGetY,r.DiscountsTable].includes(s.type)));if(!e){throw new Error("salla-offers:: Offer type not supported yet!")}if(e.type===r.DiscountsTable){return this.offersList=[e]}if(this.isBankOffer=e.type===r.Bank){this.offersList=this.offersList.filter((s=>s.type===r.Bank));this.isMultipleBank=this.offersList.length>1;return this.offersList}if(e.type===r.SpecialPrice){const s=e.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((s=>{e.details.products=s.data;return this.offersList=[e]})):salla.product.api.categories().then((t=>{const i=this.findCategories(t.data,s.targets);e.details.categories=i;return this.offersList=[e]}))}const t=e.details.get;return t.source==="products"?salla.product.api.fetch({source:"selected",source_value:t.source_value}).then((s=>{t.products=s.data;e.details.get=t;return this.offersList=[e]})):salla.product.api.categories().then((s=>{t.categories=this.findCategories(s.data,t.source_value);e.details.get=t;return this.offersList=[e]}))})).then((s=>{salla.storage.set(this.getStorageKey(),{offers:s,stored_at:(new Date).getTime()});this.canRender=true})).catch((s=>{salla.logger.warn(s)}))}componentDidLoad(){let s=this.host.querySelector(".s-slider-block__title-nav");s===null||s===void 0?void 0:s.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()}findCategories(s,e){var t;let i=[];for(const r of s){if(e.includes(r.id_||r.id)){i.push(r)}if(((t=r.sub_categories)===null||t===void 0?void 0:t.length)>0){i=i.concat(this.findCategories(r.sub_categories,e))}}return i}getStorageKey(){try{const s=salla.config.get("page.slug").replace(".","_");const e=salla.lang.getLocale();const t=salla.config.currency().code;if(!s||!e||!t){throw new Error("Unable to get the storage key.")}return`s-offers-${s}-${salla.config.get("page.id")}-${e}-${t}`}catch(s){return""}}getOffersFromStorage(){let s=salla.storage.get(this.getStorageKey());if(!s||s.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(s.offers)}render(){if(!this.offersList.length||!this.canRender||!this.showOffer)return null;const s=this.offersList[0];const t=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:s.title;const i=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:s.description;const r={"block-title":t,"block-subTitle":i,"show-controls":this.isMultipleBank};return e("div",{class:"s-offer-wrapper",onClick:()=>this.emitPromotionClicked()},e("p",{class:"s-offer-corner-badge"},this.special_offer_text),e("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},r),e("div",{slot:"items"},this.renderSectionForOfferType(s.type))))}renderSectionForOfferType(s){if(this.isBankOffer){return this.renderBankSection()}if(s==r.SpecialPrice){return this.renderSpecialPriceSection()}if(s==r.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()}getCategoriesSection(s){return e("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,s.url).replace(/\{icon\}/g,s.icon||"sicon-store").replace(/\{name\}/g,s.name)})}renderBuyXGetYSection(){var s,t;const i=this.offersList[0].details;return[(s=i.get.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s})))),(t=i.get.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s)))]}renderBankSection(){return this.offersList.map((s=>e("div",{class:{"s-offer-slide-one-sixth":this.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!this.isMultipleBank}},e("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!this.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":this.isMultipleBank}},e("div",{class:"s-offer-bank-logo"},e("img",{src:s.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":s.details.logo,alt:s.title+" offer"})),e("ul",{class:"s-offer-bank-payment-wrapper"},s.details.payments.map((s=>e("li",{class:"s-offer-bank-payment-single"},e("img",{src:salla.url.cdn("images/payment/"+s+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+s+".png"),alt:"payment"}))))),this.isMultipleBank?e("p",{class:"s-offer-bank-payment-discount-percent"},`${this.product_discount_text} ${s.details.discount_value}${s.details.discount_type==="percentage"&&"%"}`):""),!this.isMultipleBank?e("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},e("h2",null,this.offersList[0].title),e("p",{innerHTML:this.generateBankDescription(this.offersList[0].description,s.details.discount_value)})):"")))}generateBankDescription(s,e){return s.replace(new RegExp(`${e} %`),`<span class="s-offer-bank-message-amount">${e} %</span>`)}renderDiscountTableSection(){var s;const t=this.offersList[0];let i=t.details.show_price_after_discount;return(s=this.offersList[0].details.discounts)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},e("div",{class:"s-offer-slide-offer-entry"},e("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},e("p",{class:"s-offer-slide-offer-entry-quantity"},this.buy_quantity_text(s.quantity)),i?e("div",{class:"s-offer-slide-offer-entry-price"},e("span",null,this.offer_with_price_text),e("span",{class:"s-offer-slide-offer-entry-price-amount"},s.discounted_amount)," ",e("span",null,this.userCurrency)):""),e("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},this.with_discount_text,"(",e("span",null,s.percentage,!!s.percentage&&"%"),")")))))}renderSpecialPriceSection(){var s,t;const i=this.offersList[0].details;return[i.apply_to==="product"&&((s=i.products)===null||s===void 0?void 0:s.map((s=>e("div",{class:"s-offer-slide-one-fourth"},this.hasCustomComponent?e(this.productCardComponent,{product:s}):e("salla-product-card",{"shadow-on-hover":true,product:s}))))),i.apply_to==="category"&&((t=i.categories)===null||t===void 0?void 0:t.map((s=>this.getCategoriesSection(s))))]}get host(){return t(this)}};o.style=a;export{o as salla_offer};
5
+ //# sourceMappingURL=p-1a05ba30.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,a,l,e){function s(t){return t instanceof l?t:new l((function(a){a(t)}))}return new(l||(l=Promise))((function(l,n){function r(t){try{c(e.next(t))}catch(t){n(t)}}function i(t){try{c(e["throw"](t))}catch(t){n(t)}}function c(t){t.done?l(t.value):s(t.value).then(r,i)}c((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var l={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},e,s,n,r;return r={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function i(t){return function(a){return c([t,a])}}function c(i){if(e)throw new TypeError("Generator is already executing.");while(r&&(r=0,i[0]&&(l=0)),l)try{if(e=1,s&&(n=i[0]&2?s["return"]:i[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,i[1])).done)return n;if(s=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:l.label++;return{value:i[1],done:false};case 5:l.label++;s=i[1];i=[0];continue;case 7:i=l.ops.pop();l.trys.pop();continue;default:if(!(n=l.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){l=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){l.label=i[1];break}if(i[0]===6&&l.label<n[1]){l.label=n[1];n=i;break}if(n&&l.label<n[2]){l.label=n[2];l.ops.push(i);break}if(n[2])l.ops.pop();l.trys.pop();continue}i=a.call(t,l)}catch(t){i=[6,t];s=0}finally{e=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-rA1vzAd2.system.js"],(function(t){"use strict";var a,l,e;return{setters:[function(t){a=t.r;l=t.h;e=t.H}],execute:function(){var s=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";var n=t("salla_wallet",function(){function t(t){var l=this;a(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){l.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return l(e,null,l("table",{class:"s-wallet-table"},l("tbody",{class:"s-wallet-table-tbody"},l("tr",{class:"s-table__tr"},l("td",null,l("div",{class:"s-wallet-table-balance-container"},l("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),l("div",null,l("div",{innerHTML:salla.money(this.balance)}),l("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("table",{class:"s-wallet-table"},l("thead",{class:"s-wallet-table-head"},l("tr",{class:"s-wallet-table-head-tr"},l("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),l("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return l("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&l("span",{class:"hidden md:inline-block"},"#",t.id),l("div",{class:"flex items-center md:hidden"},l("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&l("span",null,"#",t.order_id))))),l("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),l("div",{innerHTML:salla.money(t.amount)}))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),l("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),l("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&l("span",null,"#",t.order_id)))),l("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),l("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("div",null,l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),l("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&l("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&l("salla-tooltip",{text:t.description,targetId:t.id.toString()}),l("span",null,t.title)))))})))),l("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&l("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return l(e,null,l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("div",{class:"s-wallet-table-empty-state"},l("i",{class:"sicon-full-wallet"}),l("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),l("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}());n.style=s}}}));
5
- //# sourceMappingURL=p-e1c12f34.system.entry.js.map
4
+ */System.register(["./p-DptjJiwe.system.js"],(function(t){"use strict";var a,l,e;return{setters:[function(t){a=t.r;l=t.h;e=t.H}],execute:function(){var s=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";var n=t("salla_wallet",function(){function t(t){var l=this;a(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){l.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return l(e,null,l("table",{class:"s-wallet-table"},l("tbody",{class:"s-wallet-table-tbody"},l("tr",{class:"s-table__tr"},l("td",null,l("div",{class:"s-wallet-table-balance-container"},l("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),l("div",null,l("div",{innerHTML:salla.money(this.balance)}),l("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("table",{class:"s-wallet-table"},l("thead",{class:"s-wallet-table-head"},l("tr",{class:"s-wallet-table-head-tr"},l("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),l("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return l("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&l("span",{class:"hidden md:inline-block"},"#",t.id),l("div",{class:"flex items-center md:hidden"},l("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&l("span",null,"#",t.order_id))))),l("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),l("div",{innerHTML:salla.money(t.amount)}))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),l("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),l("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&l("span",null,"#",t.order_id)))),l("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),l("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("div",null,l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),l("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&l("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&l("salla-tooltip",{text:t.description,targetId:t.id.toString()}),l("span",null,t.title)))))})))),l("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&l("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return l(e,null,l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("div",{class:"s-wallet-table-empty-state"},l("i",{class:"sicon-full-wallet"}),l("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),l("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}());n.style=s}}}));
5
+ //# sourceMappingURL=p-1d318152.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-rA1vzAd2.system.js"],(function(t){"use strict";var s,i,a,e;return{setters:[function(t){s=t.r;i=t.h;a=t.H;e=t.g}],execute:function(){var l=":host{display:block}";var n=t("salla_payments",function(){function t(t){s(this,t);this.exclude=[]}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){var s,i,a;if(typeof t.exclude==="string"){try{t.exclude=JSON.parse(t.exclude)}catch(s){salla.logger.error("salla-payments:: failed to parse the exclude props!",t.exclude);t.exclude=[]}}t.placeholderImage=salla.url.cdn("images/s-empty.png");t.paymentSlot=((s=t.host.querySelector('[slot="payment"]'))===null||s===void 0?void 0:s.innerHTML)||'<li class="s-payments-list-item"><img class="lazy" width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src="{image}" alt={payment} /><li>');t.sbcSlot=((i=t.host.querySelector('[slot="sbc"]'))===null||i===void 0?void 0:i.innerHTML)||'<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>');t.codSlot=((a=t.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.innerHTML)||'<li class="s-payments-list-item"> <img width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src={image} class="lazy" alt="COD"/><li>');t.payments=salla.config.get("store.settings.payments")}))};t.prototype.render=function(){var t=this;var s=!this.exclude.includes("made-in-ksa")&&salla.config.get("store.settings.made_in_ksa");var e=this.exclude.includes("sbc")?null:salla.config.get("store.settings.certificate.id");return i(a,{key:"fae3f083dda2bd916cb0e3fdd69e3798d808a05f",class:"s-payments-list-wrap"},i("ul",{key:"9065dc9279b1c5b5db8d80633fb0c4545b132dd6",class:"s-payments-list"},s&&i("li",{key:"f02617f6e5fb21960c0a701b6da5038c05f6f188",class:"s-payments-list-item"},i("img",{key:"3f19093802ff680e306004a46404b1149dcbb4cb",class:"lazy",width:"100%",height:"100%",decoding:"async",loading:"lazy","data-src":salla.url.cdn("images/made-in-ksa.svg",58,58),alt:"made in KSA certified"})),this.payments.map((function(s){return s=="cod"?i("div",{id:"cod-slot",innerHTML:t.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png",58,58))}):i("div",{id:"payment-slot",innerHTML:t.paymentSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/".concat(s,"_mini.png"),58,58)).replace(/\{payment\}/g,s)})})),e&&i("div",{key:"e7cfab1162430980aec4348e61ebd1fe0e8acffd",id:"sbc-slot",innerHTML:this.sbcSlot.replace(/\{image\}/g,salla.url.cdn("images/sbc.png",58,58)).replace(/\{link\}/g,"https://eauthenticate.saudibusiness.gov.sa/certificate-details/".concat(e))})))};t.prototype.componentDidLoad=function(){var t;(t=document.lazyLoadInstance)===null||t===void 0?void 0:t.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((function(t){t.addEventListener("load",(function(){t.setAttribute("width","100%");t.setAttribute("height","100%")}))}))};t.prototype.componentDidRender=function(){var t,s,i;this.host.querySelectorAll("#payment-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#sbc-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#cod-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));(t=this.host.querySelector('[slot="payment"]'))===null||t===void 0?void 0:t.remove();(s=this.host.querySelector('[slot="sbc"]'))===null||s===void 0?void 0:s.remove();(i=this.host.querySelector('[slot="cod"]'))===null||i===void 0?void 0:i.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());n.style=l}}}));
5
- //# sourceMappingURL=p-77fb228b.system.entry.js.map
4
+ System.register(["./p-DptjJiwe.system.js"],(function(t){"use strict";var s,i,a,e;return{setters:[function(t){s=t.r;i=t.h;a=t.H;e=t.g}],execute:function(){var l=":host{display:block}";var n=t("salla_payments",function(){function t(t){s(this,t);this.exclude=[]}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){var s,i,a;if(typeof t.exclude==="string"){try{t.exclude=JSON.parse(t.exclude)}catch(s){salla.logger.error("salla-payments:: failed to parse the exclude props!",t.exclude);t.exclude=[]}}t.placeholderImage=salla.url.cdn("images/s-empty.png");t.paymentSlot=((s=t.host.querySelector('[slot="payment"]'))===null||s===void 0?void 0:s.innerHTML)||'<li class="s-payments-list-item"><img class="lazy" width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src="{image}" alt={payment} /><li>');t.sbcSlot=((i=t.host.querySelector('[slot="sbc"]'))===null||i===void 0?void 0:i.innerHTML)||'<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>');t.codSlot=((a=t.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.innerHTML)||'<li class="s-payments-list-item"> <img width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src={image} class="lazy" alt="COD"/><li>');t.payments=salla.config.get("store.settings.payments")}))};t.prototype.render=function(){var t=this;var s=!this.exclude.includes("made-in-ksa")&&salla.config.get("store.settings.made_in_ksa");var e=this.exclude.includes("sbc")?null:salla.config.get("store.settings.certificate.id");return i(a,{key:"fae3f083dda2bd916cb0e3fdd69e3798d808a05f",class:"s-payments-list-wrap"},i("ul",{key:"9065dc9279b1c5b5db8d80633fb0c4545b132dd6",class:"s-payments-list"},s&&i("li",{key:"f02617f6e5fb21960c0a701b6da5038c05f6f188",class:"s-payments-list-item"},i("img",{key:"3f19093802ff680e306004a46404b1149dcbb4cb",class:"lazy",width:"100%",height:"100%",decoding:"async",loading:"lazy","data-src":salla.url.cdn("images/made-in-ksa.svg",58,58),alt:"made in KSA certified"})),this.payments.map((function(s){return s=="cod"?i("div",{id:"cod-slot",innerHTML:t.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png",58,58))}):i("div",{id:"payment-slot",innerHTML:t.paymentSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/".concat(s,"_mini.png"),58,58)).replace(/\{payment\}/g,s)})})),e&&i("div",{key:"e7cfab1162430980aec4348e61ebd1fe0e8acffd",id:"sbc-slot",innerHTML:this.sbcSlot.replace(/\{image\}/g,salla.url.cdn("images/sbc.png",58,58)).replace(/\{link\}/g,"https://eauthenticate.saudibusiness.gov.sa/certificate-details/".concat(e))})))};t.prototype.componentDidLoad=function(){var t;(t=document.lazyLoadInstance)===null||t===void 0?void 0:t.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((function(t){t.addEventListener("load",(function(){t.setAttribute("width","100%");t.setAttribute("height","100%")}))}))};t.prototype.componentDidRender=function(){var t,s,i;this.host.querySelectorAll("#payment-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#sbc-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#cod-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));(t=this.host.querySelector('[slot="payment"]'))===null||t===void 0?void 0:t.remove();(s=this.host.querySelector('[slot="sbc"]'))===null||s===void 0?void 0:s.remove();(i=this.host.querySelector('[slot="cod"]'))===null||i===void 0?void 0:i.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());n.style=l}}}));
5
+ //# sourceMappingURL=p-2b557022.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as a,h as t,H as s,g as i}from"./p-Dyi802qv.js";const e="";const l=class{constructor(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(a){salla.log("Bad json passed via entityId prop")}}}getValue(a){if(a.type==="file"){return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`}if(a.type==="url"){return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`}if(a.type==="date"){const t=new Date(a.value);const s=String(t.getDate()).padStart(2,"0");const i=String(t.getMonth()+1).padStart(2,"0");const e=t.getFullYear();const l=`${s}/${i}/${e}`;return l}return a.value}async componentWillLoad(){var a,t;await salla.onReady();if(!((a=salla.config.get("store.features"))===null||a===void 0?void 0:a.includes("custom-fields"))){return salla.logger.error("feature custom-fields is not activated")}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return salla.logger.error("can't render salla-metadata without enity-id prop!")}await salla.lang.onLoaded();this.download=salla.lang.get("pages.thank_you.download");const s=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=(t=s.data[0])===null||t===void 0?void 0:t.sections}render(){if(!this.specs.length){return}return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return i(this)}};l.style=e;export{l as salla_metadata};
5
- //# sourceMappingURL=p-9cf81120.entry.js.map
4
+ import{r as a,h as t,H as s,g as e}from"./p-B9zfrGy-.js";const i="";const l=class{constructor(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(a){salla.log("Bad json passed via entityId prop")}}}getValue(a){if(a.type==="file"){return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`}if(a.type==="url"){return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`}if(a.type==="date"){const t=new Date(a.value);const s=String(t.getDate()).padStart(2,"0");const e=String(t.getMonth()+1).padStart(2,"0");const i=t.getFullYear();const l=`${s}/${e}/${i}`;return l}return a.value}async componentWillLoad(){var a,t;await salla.onReady();if(!((a=salla.config.get("store.features"))===null||a===void 0?void 0:a.includes("custom-fields"))){return salla.logger.error("feature custom-fields is not activated")}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return salla.logger.error("can't render salla-metadata without enity-id prop!")}await salla.lang.onLoaded();this.download=salla.lang.get("pages.thank_you.download");const s=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=(t=s.data[0])===null||t===void 0?void 0:t.sections}render(){if(!this.specs.length){return}return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return e(this)}};l.style=i;export{l as salla_metadata};
5
+ //# sourceMappingURL=p-32d8b0d8.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as i,h as e}from"./p-Dyi802qv.js";const t="";const a=class{constructor(e){i(this,e)}render(){return e("a",{key:"520d68ca6fa470b0da7713b896859b240d432ae5",href:this.notification.url,class:{"s-notifications-item":true,"s-notifications-item-shadow":true,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"4815fbc0bcb809aec2e6b5c96a447296393edbcc",class:"s-notifications-item-icon"},e("i",{key:"85aaa6309e4fad7d9529ded44ae0092b693e8c7c",class:{"s-notifications-item-icon sicon-bell-ring":true,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"9442cd27835596f2367ca8999f4b2c6f5ebb41bf",class:"s-notifications-item-content"},e("div",{key:"ea6556287f690c2882ef8429fe011d8085bc708d",class:"s-notifications-item-content-leading"},e("h4",{key:"e7d0e8f6771a4f2993bf857634368966f3fe6719"},this.notification.title),e("p",{key:"a461b30ddfcafb2f67dfe23e68682a4cd4d7999c"},this.notification.sub_title)),e("span",{key:"580d40cd67ef03f41f0a34252b7e7369fcfaabd9",class:"s-notifications-item-content-trailing"},e("i",{key:"42dd707f1f71492ccf5b371e680bc6074a712e08",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"8d3dafa9c9eef557402416e0492de965d9aa8342"},this.notification.date))))}};a.style=t;export{a as salla_notification_item};
5
- //# sourceMappingURL=p-2d75bcfd.entry.js.map
4
+ import{r as i,h as e}from"./p-B9zfrGy-.js";const t="";const a=class{constructor(e){i(this,e)}render(){return e("a",{key:"520d68ca6fa470b0da7713b896859b240d432ae5",href:this.notification.url,class:{"s-notifications-item":true,"s-notifications-item-shadow":true,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"4815fbc0bcb809aec2e6b5c96a447296393edbcc",class:"s-notifications-item-icon"},e("i",{key:"85aaa6309e4fad7d9529ded44ae0092b693e8c7c",class:{"s-notifications-item-icon sicon-bell-ring":true,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"9442cd27835596f2367ca8999f4b2c6f5ebb41bf",class:"s-notifications-item-content"},e("div",{key:"ea6556287f690c2882ef8429fe011d8085bc708d",class:"s-notifications-item-content-leading"},e("h4",{key:"e7d0e8f6771a4f2993bf857634368966f3fe6719"},this.notification.title),e("p",{key:"a461b30ddfcafb2f67dfe23e68682a4cd4d7999c"},this.notification.sub_title)),e("span",{key:"580d40cd67ef03f41f0a34252b7e7369fcfaabd9",class:"s-notifications-item-content-trailing"},e("i",{key:"42dd707f1f71492ccf5b371e680bc6074a712e08",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"8d3dafa9c9eef557402416e0492de965d9aa8342"},this.notification.date))))}};a.style=t;export{a as salla_notification_item};
5
+ //# sourceMappingURL=p-340f68a0.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t,g as i}from"./p-Dyi802qv.js";import{a}from"./p-CgtvEd63.js";const e=":host{display:block}";const l=class{constructor(t){s(this,t);var i;this.currentSlug=salla.config.get("page.slug");salla.onReady((()=>{this.currentSlug=salla.config.get("page.slug")}));this.advSlot=((i=this.host.querySelector('[slot="adv"]'))===null||i===void 0?void 0:i.innerHTML)||`<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n `}isNotVisible(s){return!!salla.storage.get(`statusAd-${s.id}`)}setCanDisplayFlag(s,t){if(!t){salla.storage.set(`statusAd-${s.id}`,"dismissed");a({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}}render(){if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((s=>t("div",{class:{"s-hidden":this.isNotVisible(s),"s-advertisement":true},"data-id":s.id,style:{"background-color":s.colors.bg,color:s.colors.text}},t("div",{id:"adv-slot",innerHTML:this.advSlot.replace("{iconElem}",`<i class="s-advertisement-content-icon ${s.icon}"></i>`).replace("{urlElem}",s.url?`<a href="${s.url}" target="${s.target}">${s.description}</a>`:s.description).replace("{closeElem}",`<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>`).replace("{icon}",s.icon).replace("{url}",s.url).replace("{target}",s.target).replace("{description}",s.description).replace("{bg_color}",s.colors.bg).replace("{text_color}",s.colors.text)}))))}componentWillLoad(){return new Promise((s=>salla.onReady(s))).then((()=>salla.api.advertisement.fetch(this.currentSlug))).then((s=>Array.isArray(s.data)?s.data.find((s=>!salla.storage.get(`statusAd-${s.id}`))):null)).then((s=>this.advertisements=s?[s]:[]))}componentDidRender(){var s;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((()=>{let s=this.host.querySelector(".s-advertisement-action");if(s){s.addEventListener("click",(()=>this.setCanDisplayFlag(this.advertisements[0],false)))}}));this.host.querySelectorAll("#adv-slot").forEach((s=>s===null||s===void 0?void 0:s.replaceWith(s===null||s===void 0?void 0:s.firstChild)));(s=this.host.querySelector('[slot="adv"]'))===null||s===void 0?void 0:s.remove();a({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})}get host(){return i(this)}};l.style=e;export{l as salla_advertisement};
5
- //# sourceMappingURL=p-8dd73cb0.entry.js.map
4
+ import{r as s,h as t,g as i}from"./p-B9zfrGy-.js";import{a}from"./p-CgtvEd63.js";const e=":host{display:block}";const l=class{constructor(t){s(this,t);var i;this.currentSlug=salla.config.get("page.slug");salla.onReady((()=>{this.currentSlug=salla.config.get("page.slug")}));this.advSlot=((i=this.host.querySelector('[slot="adv"]'))===null||i===void 0?void 0:i.innerHTML)||`<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n `}isNotVisible(s){return!!salla.storage.get(`statusAd-${s.id}`)}setCanDisplayFlag(s,t){if(!t){salla.storage.set(`statusAd-${s.id}`,"dismissed");a({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}}render(){if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((s=>t("div",{class:{"s-hidden":this.isNotVisible(s),"s-advertisement":true},"data-id":s.id,style:{"background-color":s.colors.bg,color:s.colors.text}},t("div",{id:"adv-slot",innerHTML:this.advSlot.replace("{iconElem}",`<i class="s-advertisement-content-icon ${s.icon}"></i>`).replace("{urlElem}",s.url?`<a href="${s.url}" target="${s.target}">${s.description}</a>`:s.description).replace("{closeElem}",`<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>`).replace("{icon}",s.icon).replace("{url}",s.url).replace("{target}",s.target).replace("{description}",s.description).replace("{bg_color}",s.colors.bg).replace("{text_color}",s.colors.text)}))))}componentWillLoad(){return new Promise((s=>salla.onReady(s))).then((()=>salla.api.advertisement.fetch(this.currentSlug))).then((s=>Array.isArray(s.data)?s.data.find((s=>!salla.storage.get(`statusAd-${s.id}`))):null)).then((s=>this.advertisements=s?[s]:[]))}componentDidRender(){var s;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((()=>{let s=this.host.querySelector(".s-advertisement-action");if(s){s.addEventListener("click",(()=>this.setCanDisplayFlag(this.advertisements[0],false)))}}));this.host.querySelectorAll("#adv-slot").forEach((s=>s===null||s===void 0?void 0:s.replaceWith(s===null||s===void 0?void 0:s.firstChild)));(s=this.host.querySelector('[slot="adv"]'))===null||s===void 0?void 0:s.remove();a({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})}get host(){return i(this)}};l.style=e;export{l as salla_advertisement};
5
+ //# sourceMappingURL=p-376dfef9.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,a,r,e){function l(t){return t instanceof r?t:new r((function(a){a(t)}))}return new(r||(r=Promise))((function(r,s){function o(t){try{i(e.next(t))}catch(t){s(t)}}function n(t){try{i(e["throw"](t))}catch(t){s(t)}}function i(t){t.done?r(t.value):l(t.value).then(o,n)}i((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},e,l,s,o;return o={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(t){return function(a){return i([t,a])}}function i(n){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,n[0]&&(r=0)),r)try{if(e=1,l&&(s=n[0]&2?l["return"]:n[0]?l["throw"]||((s=l["return"])&&s.call(l),0):l.next)&&!(s=s.call(l,n[1])).done)return s;if(l=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;l=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){r.label=n[1];break}if(n[0]===6&&r.label<s[1]){r.label=s[1];s=n;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(n);break}if(s[2])r.ops.pop();r.trys.pop();continue}n=a.call(t,r)}catch(t){n=[6,t];l=0}finally{e=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,a,r){if(r||arguments.length===2)for(var e=0,l=a.length,s;e<l;e++){if(s||!(e in a)){if(!s)s=Array.prototype.slice.call(a,0,e);s[e]=a[e]}}return t.concat(s||Array.prototype.slice.call(a))};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-rA1vzAd2.system.js","./p-Ik1kuM1-.system.js"],(function(t){"use strict";var a,r,e,l;return{setters:[function(t){a=t.r;r=t.h;e=t.H},function(t){l=t.G}],execute:function(){var s="";var o=function(t){if(!t)return"";return new Date(Number(t)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};var n=function(t){if(!t)return"";try{var a=t.toLowerCase();var r=salla.lang.get("pages.loyalty_program.".concat(a));return r==="pages.loyalty_program.".concat(a)?t:r}catch(a){return t}};var i=t("salla_loyalty_program",function(){function t(t){var r=this;a(this,t);this.loyaltyPointsArray=[];this.isLoadingLoyalty=false;this.nextPageUrlLoyalty="";this.handleClick=function(){r.loadMoreLoyaltyPoints()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){t.loadLoyaltyPoints()}))};t.prototype.loadLoyaltyPoints=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,r;return __generator(this,(function(e){switch(e.label){case 0:this.isLoadingLoyalty=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/points?page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.loyaltyPointsArray=a.data;this.nextPageUrlLoyalty=a.cursor.next;return[3,5];case 3:r=e.sent();console.error("Error loading loyalty points transactions",r);return[3,5];case 4:this.isLoadingLoyalty=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreLoyaltyPoints=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,r;return __generator(this,(function(e){switch(e.label){case 0:if(!this.nextPageUrlLoyalty)return[2];this.isLoadingLoyalty=true;e.label=1;case 1:e.trys.push([1,3,4,5]);return[4,salla.api.request(this.nextPageUrlLoyalty)];case 2:a=e.sent();this.loyaltyPointsArray=__spreadArray(__spreadArray([],this.loyaltyPointsArray,true),a.data,true);this.nextPageUrlLoyalty=((t=a.cursor)===null||t===void 0?void 0:t.next)||"";return[3,5];case 3:r=e.sent();console.error("Error loading more loyalty points",r);return[3,5];case 4:this.isLoadingLoyalty=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){return r(e,{key:"169d4cbb34e0e9869ddfb43c1c192bfd9814faf1"},r("div",{key:"b5d1c29d01f926f2699116e2f4be555d009afc76"},this.isLoadingLoyalty?r("salla-loading",null):r("div",null,this.loyaltyPointsArray.length>0?r("div",null,r("table",{class:"s-loyalty-program-table"},r("thead",{class:"s-loyalty-program-table-head"},r("tr",{class:"s-loyalty-program-table-head-tr"},r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),r("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((function(t){return r("tr",{class:"s-loyalty-program-table-tbody-tr"},r("td",{class:"s-loyalty-program-table-tbody-tr-td"},(t===null||t===void 0?void 0:t.type)==="plus"?"+":"",(t===null||t===void 0?void 0:t.points)||""," ",salla.lang.get("pages.loyalty_program.point")),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},o((t===null||t===void 0?void 0:t.created_at)?Number(t.created_at)*1e3:undefined)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},o(t===null||t===void 0?void 0:t.points_expire_date)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},n(t===null||t===void 0?void 0:t.key)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},n(t===null||t===void 0?void 0:t.status_key)))})))),r("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&r("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):r("div",null,r("div",{class:"s-loyalty-program-table-empty-state"},r("span",{innerHTML:l}),r("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),r("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))};return t}());i.style=s}}}));
5
- //# sourceMappingURL=p-308a57ad.system.entry.js.map
4
+ */System.register(["./p-DptjJiwe.system.js","./p-Ik1kuM1-.system.js"],(function(t){"use strict";var a,r,e,l;return{setters:[function(t){a=t.r;r=t.h;e=t.H},function(t){l=t.G}],execute:function(){var s="";var o=function(t){if(!t)return"";return new Date(Number(t)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};var n=function(t){if(!t)return"";try{var a=t.toLowerCase();var r=salla.lang.get("pages.loyalty_program.".concat(a));return r==="pages.loyalty_program.".concat(a)?t:r}catch(a){return t}};var i=t("salla_loyalty_program",function(){function t(t){var r=this;a(this,t);this.loyaltyPointsArray=[];this.isLoadingLoyalty=false;this.nextPageUrlLoyalty="";this.handleClick=function(){r.loadMoreLoyaltyPoints()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){t.loadLoyaltyPoints()}))};t.prototype.loadLoyaltyPoints=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,r;return __generator(this,(function(e){switch(e.label){case 0:this.isLoadingLoyalty=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/points?page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.loyaltyPointsArray=a.data;this.nextPageUrlLoyalty=a.cursor.next;return[3,5];case 3:r=e.sent();console.error("Error loading loyalty points transactions",r);return[3,5];case 4:this.isLoadingLoyalty=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreLoyaltyPoints=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,r;return __generator(this,(function(e){switch(e.label){case 0:if(!this.nextPageUrlLoyalty)return[2];this.isLoadingLoyalty=true;e.label=1;case 1:e.trys.push([1,3,4,5]);return[4,salla.api.request(this.nextPageUrlLoyalty)];case 2:a=e.sent();this.loyaltyPointsArray=__spreadArray(__spreadArray([],this.loyaltyPointsArray,true),a.data,true);this.nextPageUrlLoyalty=((t=a.cursor)===null||t===void 0?void 0:t.next)||"";return[3,5];case 3:r=e.sent();console.error("Error loading more loyalty points",r);return[3,5];case 4:this.isLoadingLoyalty=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){return r(e,{key:"169d4cbb34e0e9869ddfb43c1c192bfd9814faf1"},r("div",{key:"b5d1c29d01f926f2699116e2f4be555d009afc76"},this.isLoadingLoyalty?r("salla-loading",null):r("div",null,this.loyaltyPointsArray.length>0?r("div",null,r("table",{class:"s-loyalty-program-table"},r("thead",{class:"s-loyalty-program-table-head"},r("tr",{class:"s-loyalty-program-table-head-tr"},r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),r("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((function(t){return r("tr",{class:"s-loyalty-program-table-tbody-tr"},r("td",{class:"s-loyalty-program-table-tbody-tr-td"},(t===null||t===void 0?void 0:t.type)==="plus"?"+":"",(t===null||t===void 0?void 0:t.points)||""," ",salla.lang.get("pages.loyalty_program.point")),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},o((t===null||t===void 0?void 0:t.created_at)?Number(t.created_at)*1e3:undefined)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},o(t===null||t===void 0?void 0:t.points_expire_date)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},n(t===null||t===void 0?void 0:t.key)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},n(t===null||t===void 0?void 0:t.status_key)))})))),r("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&r("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):r("div",null,r("div",{class:"s-loyalty-program-table-empty-state"},r("span",{innerHTML:l}),r("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),r("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))};return t}());i.style=s}}}));
5
+ //# sourceMappingURL=p-3b77ca03.system.entry.js.map