@salla.sa/twilight-components 2.14.212 → 2.14.214

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 (266) hide show
  1. package/dist/cjs/{app-globals-RksNa6SQ.js → app-globals-DTEmVDD3.js} +3 -3
  2. package/dist/cjs/{app-globals-RksNa6SQ.js.map → app-globals-DTEmVDD3.js.map} +1 -1
  3. package/dist/cjs/{index-CPQVXtau.js → index-BxP66-qN.js} +4 -4
  4. package/dist/cjs/{index-CPQVXtau.js.map → index-BxP66-qN.js.map} +1 -1
  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-DlaNajVx.js → app-globals-zPxRP2e1.js} +3 -3
  39. package/dist/esm/{app-globals-DlaNajVx.js.map → app-globals-zPxRP2e1.js.map} +1 -1
  40. package/dist/esm/{index-DBjISX91.js → index-DhlOpBvy.js} +4 -4
  41. package/dist/esm/{index-DBjISX91.js.map → index-DhlOpBvy.js.map} +1 -1
  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-DlaNajVx.js → app-globals-zPxRP2e1.js} +2 -2
  74. package/dist/esm-es5/{app-globals-DlaNajVx.js.map → app-globals-zPxRP2e1.js.map} +1 -1
  75. package/dist/esm-es5/{index-DBjISX91.js → index-DhlOpBvy.js} +3 -3
  76. package/dist/esm-es5/{index-DBjISX91.js.map → index-DhlOpBvy.js.map} +1 -1
  77. package/dist/esm-es5/loader.js +1 -1
  78. package/dist/esm-es5/salla-add-product-button_51.entry.js +4 -4
  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 +1 -1
  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 +2 -2
  92. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  93. package/dist/esm-es5/salla-notifications.entry.js +2 -2
  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 +1 -1
  97. package/dist/esm-es5/salla-payments.entry.js +1 -1
  98. package/dist/esm-es5/salla-price-range.entry.js +2 -2
  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-8b6739b8.entry.js → p-0c956fe8.entry.js} +2 -2
  109. package/dist/twilight/{p-d1e08abd.entry.js → p-12e2111c.entry.js} +2 -2
  110. package/dist/twilight/{p-eacd14ea.system.entry.js → p-14301596.system.entry.js} +2 -2
  111. package/dist/twilight/{p-6ef842ae.entry.js → p-1a825c2d.entry.js} +2 -2
  112. package/dist/twilight/{p-55fbd324.system.entry.js → p-1cf76965.system.entry.js} +2 -2
  113. package/dist/twilight/{p-af586bf5.system.entry.js → p-2acd71a9.system.entry.js} +2 -2
  114. package/dist/twilight/{p-e063d21b.entry.js → p-2d830796.entry.js} +2 -2
  115. package/dist/twilight/{p-2bb4f45d.system.entry.js → p-3be63ee4.system.entry.js} +2 -2
  116. package/dist/twilight/{p-91798967.system.entry.js → p-3e085ee7.system.entry.js} +2 -2
  117. package/dist/twilight/{p-283d9536.entry.js → p-3e34b034.entry.js} +2 -2
  118. package/dist/twilight/{p-bd8a6157.system.entry.js → p-3f2155c2.system.entry.js} +2 -2
  119. package/dist/twilight/{p-aed8b40e.entry.js → p-43c180a5.entry.js} +2 -2
  120. package/dist/twilight/{p-51f3e89d.system.entry.js → p-5aa7fc77.system.entry.js} +2 -2
  121. package/dist/twilight/{p-3e1fdfef.system.entry.js → p-5c462d3a.system.entry.js} +2 -2
  122. package/dist/twilight/{p-9257dbc2.entry.js → p-5cb874e2.entry.js} +2 -2
  123. package/dist/twilight/{p-e7e1456e.system.entry.js → p-5fcda4de.system.entry.js} +2 -2
  124. package/dist/twilight/{p-DTzyYjVY.system.js.map → p-5rmT0SDW.system.js.map} +1 -1
  125. package/dist/twilight/{p-35c5729f.entry.js → p-676d5fb9.entry.js} +2 -2
  126. package/dist/twilight/{p-523d19eb.system.entry.js → p-67bd7dc6.system.entry.js} +2 -2
  127. package/dist/twilight/{p-481689f3.system.entry.js → p-68c66dc4.system.entry.js} +2 -2
  128. package/dist/twilight/{p-4f2ef4a9.entry.js → p-692ce218.entry.js} +2 -2
  129. package/dist/twilight/{p-ef55fc6f.system.entry.js → p-69d439ed.system.entry.js} +2 -2
  130. package/dist/twilight/{p-732b39c9.system.entry.js → p-6b0c72f6.system.entry.js} +2 -2
  131. package/dist/twilight/{p-87615e0a.entry.js → p-6ea16a5e.entry.js} +2 -2
  132. package/dist/twilight/{p-9cab9a65.entry.js → p-78f10d01.entry.js} +2 -2
  133. package/dist/twilight/{p-5de78cc0.system.entry.js → p-8c01fd3d.system.entry.js} +2 -2
  134. package/dist/twilight/{p-4da6777e.entry.js → p-8e6a4e2f.entry.js} +2 -2
  135. package/dist/twilight/{p-df8718ae.system.entry.js → p-8ed0942b.system.entry.js} +2 -2
  136. package/dist/twilight/{p-0f0d29ae.system.entry.js → p-946ba9df.system.entry.js} +2 -2
  137. package/dist/twilight/{p-4hsOA92v.system.js.map → p-B068gnMJ.system.js.map} +1 -1
  138. package/dist/twilight/{p-F0pwx5O0.system.js.map → p-B6GBAKYM.system.js.map} +1 -1
  139. package/dist/twilight/{p-Yu22uoIg.system.js.map → p-BJY4TRVZ.system.js.map} +1 -1
  140. package/dist/twilight/{p-7621aqOV.system.js.map → p-BLpIPF-7.system.js.map} +1 -1
  141. package/dist/twilight/{p-CZruv40v.system.js.map → p-BTJTfT-s.system.js.map} +1 -1
  142. package/dist/twilight/{p-BYuZYQcv.system.js.map → p-Bi_aLmUH.system.js.map} +1 -1
  143. package/dist/twilight/{p-hTBr1ZOM.system.js.map → p-C0Ob8EVA.system.js.map} +1 -1
  144. package/dist/twilight/{p-eOU3nZa-.system.js.map → p-C6Ko7rS6.system.js.map} +1 -1
  145. package/dist/twilight/{p-zIPKXJ5o.system.js.map → p-C6uUBg9v.system.js.map} +1 -1
  146. package/dist/twilight/{p-CikNeqYy.system.js.map → p-CE_cqjra.system.js.map} +1 -1
  147. package/dist/twilight/{p-PVV7FFhn.system.js → p-CF8_XJdJ.system.js} +2 -2
  148. package/dist/twilight/{p-PVV7FFhn.system.js.map → p-CF8_XJdJ.system.js.map} +1 -1
  149. package/dist/twilight/{p-ChzTr3PF.system.js.map → p-CGaDAHFQ.system.js.map} +1 -1
  150. package/dist/twilight/{p-DDO40vAB.system.js.map → p-CVbjwa0r.system.js.map} +1 -1
  151. package/dist/twilight/{p-Dor96eei.system.js.map → p-CawhIOxT.system.js.map} +1 -1
  152. package/dist/twilight/{p-COm0DXv1.system.js → p-CbuQ-9Zi.system.js} +2 -2
  153. package/dist/twilight/{p-COm0DXv1.system.js.map → p-CbuQ-9Zi.system.js.map} +1 -1
  154. package/dist/twilight/{p-DBUHNa40.system.js → p-CdqPLiJf.system.js} +3 -3
  155. package/dist/twilight/{p-DBUHNa40.system.js.map → p-CdqPLiJf.system.js.map} +1 -1
  156. package/dist/twilight/{p-rhU_U7os.system.js.map → p-CteNT-z0.system.js.map} +1 -1
  157. package/dist/twilight/{p-DyrUA7WB.system.js.map → p-CtePNFaa.system.js.map} +1 -1
  158. package/dist/twilight/{p-D8_YxrrH.system.js.map → p-D6rbZR1R.system.js.map} +1 -1
  159. package/dist/twilight/{p-D-kYAKc3.js → p-DAMB6Vgs.js} +2 -2
  160. package/dist/twilight/{p-D-kYAKc3.js.map → p-DAMB6Vgs.js.map} +1 -1
  161. package/dist/twilight/{p-BU2g5CPq.system.js.map → p-D_CVtJeC.system.js.map} +1 -1
  162. package/dist/twilight/{p-DBjISX91.js → p-DhlOpBvy.js} +3 -3
  163. package/dist/twilight/{p-DBjISX91.js.map → p-DhlOpBvy.js.map} +1 -1
  164. package/dist/twilight/{p-Dz88u4ai.system.js.map → p-Dj7l_Ya9.system.js.map} +1 -1
  165. package/dist/twilight/{p-CDP_H7Hc.system.js.map → p-DthBxA8Z.system.js.map} +1 -1
  166. package/dist/twilight/{p-CBHi-Xwt.system.js.map → p-Dw39hRfJ.system.js.map} +1 -1
  167. package/dist/twilight/{p-Ctlgm2rO.system.js.map → p-Hpnxk0cF.system.js.map} +1 -1
  168. package/dist/twilight/{p-dI6KDjPd.system.js.map → p-TSIUe1f7.system.js.map} +1 -1
  169. package/dist/twilight/{p-0bc0501c.system.entry.js → p-a2d605c6.system.entry.js} +2 -2
  170. package/dist/twilight/{p-b820c2ab.entry.js → p-a9bd46a4.entry.js} +2 -2
  171. package/dist/twilight/{p-bf9d58e3.entry.js → p-aa08a33d.entry.js} +2 -2
  172. package/dist/twilight/{p-8945b079.system.entry.js → p-abb36fab.system.entry.js} +2 -2
  173. package/dist/twilight/{p-de4a8981.system.entry.js → p-b13d561c.system.entry.js} +2 -2
  174. package/dist/twilight/{p-0c1ebc0e.entry.js → p-b2664085.entry.js} +2 -2
  175. package/dist/twilight/{p-eb3bdc9d.entry.js → p-b63413b1.entry.js} +2 -2
  176. package/dist/twilight/{p-0d7f5be2.system.entry.js → p-bdcd723a.system.entry.js} +2 -2
  177. package/dist/twilight/{p-7868427e.system.entry.js → p-c066a497.system.entry.js} +2 -2
  178. package/dist/twilight/{p-3cbcca71.entry.js → p-c2e7c0c2.entry.js} +2 -2
  179. package/dist/twilight/{p-54dde9f6.entry.js → p-c3267ade.entry.js} +2 -2
  180. package/dist/twilight/{p-9eba00f7.entry.js → p-c382e42d.entry.js} +2 -2
  181. package/dist/twilight/{p-caf62496.system.entry.js → p-c4eb4e27.system.entry.js} +2 -2
  182. package/dist/twilight/{p-c6622c76.system.entry.js → p-c6e8ca4f.system.entry.js} +2 -2
  183. package/dist/twilight/{p-e9a5ef4a.system.entry.js → p-c722cfe9.system.entry.js} +2 -2
  184. package/dist/twilight/{p-ed764d4e.entry.js → p-ca36eb68.entry.js} +2 -2
  185. package/dist/twilight/{p-224db8e6.system.entry.js → p-d4957f2b.system.entry.js} +2 -2
  186. package/dist/twilight/{p-f31876e7.system.entry.js → p-d8dd7345.system.entry.js} +2 -2
  187. package/dist/twilight/{p-896dd3b0.system.entry.js → p-dcadcd0a.system.entry.js} +2 -2
  188. package/dist/twilight/{p-0f0d8739.entry.js → p-dceb73c3.entry.js} +2 -2
  189. package/dist/twilight/{p-19368123.system.entry.js → p-e49bab8f.system.entry.js} +2 -2
  190. package/dist/twilight/{p-57589083.entry.js → p-e8af5599.entry.js} +2 -2
  191. package/dist/twilight/{p-377385b7.entry.js → p-e8fba39a.entry.js} +2 -2
  192. package/dist/twilight/{p-4a7814b4.entry.js → p-f05b572b.entry.js} +2 -2
  193. package/dist/twilight/{p-2eb348b5.entry.js → p-f0b9aaa1.entry.js} +2 -2
  194. package/dist/twilight/{p-e291a499.entry.js → p-f22ce14a.entry.js} +2 -2
  195. package/dist/twilight/{p-e8a2c069.entry.js → p-f4779a96.entry.js} +2 -2
  196. package/dist/twilight/{p-ff491939.system.entry.js → p-f5ae0545.system.entry.js} +3 -3
  197. package/dist/twilight/{p-18e9f50a.entry.js → p-fd397659.entry.js} +2 -2
  198. package/dist/twilight/{p-f3180d3d.entry.js → p-ffe66cd6.entry.js} +2 -2
  199. package/dist/twilight/{p-Ciw5T3OZ.system.js.map → p-gTlFHtEj.system.js.map} +1 -1
  200. package/dist/twilight/{p-nUyi62l9.system.js.map → p-on0hBTCM.system.js.map} +1 -1
  201. package/dist/twilight/{p-CO8cXs1m.system.js.map → p-tdcL8se7.system.js.map} +1 -1
  202. package/dist/twilight/{p-qW2B8JRY.system.js.map → p-uuwipd3I.system.js.map} +1 -1
  203. package/dist/twilight/{p-B2zlmRRT.system.js.map → p-wMdSg3Ln.system.js.map} +1 -1
  204. package/dist/twilight/{p-Bnu1yeCc.system.js.map → p-xL3zkqNb.system.js.map} +1 -1
  205. package/dist/twilight/{p-BINBSgyn.system.js.map → p-y7TTF1b3.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/twilight/{p-8b6739b8.entry.js.map → p-0c956fe8.entry.js.map} +0 -0
  210. /package/dist/twilight/{p-d1e08abd.entry.js.map → p-12e2111c.entry.js.map} +0 -0
  211. /package/dist/twilight/{p-eacd14ea.system.entry.js.map → p-14301596.system.entry.js.map} +0 -0
  212. /package/dist/twilight/{p-6ef842ae.entry.js.map → p-1a825c2d.entry.js.map} +0 -0
  213. /package/dist/twilight/{p-55fbd324.system.entry.js.map → p-1cf76965.system.entry.js.map} +0 -0
  214. /package/dist/twilight/{p-af586bf5.system.entry.js.map → p-2acd71a9.system.entry.js.map} +0 -0
  215. /package/dist/twilight/{p-e063d21b.entry.js.map → p-2d830796.entry.js.map} +0 -0
  216. /package/dist/twilight/{p-2bb4f45d.system.entry.js.map → p-3be63ee4.system.entry.js.map} +0 -0
  217. /package/dist/twilight/{p-91798967.system.entry.js.map → p-3e085ee7.system.entry.js.map} +0 -0
  218. /package/dist/twilight/{p-283d9536.entry.js.map → p-3e34b034.entry.js.map} +0 -0
  219. /package/dist/twilight/{p-bd8a6157.system.entry.js.map → p-3f2155c2.system.entry.js.map} +0 -0
  220. /package/dist/twilight/{p-aed8b40e.entry.js.map → p-43c180a5.entry.js.map} +0 -0
  221. /package/dist/twilight/{p-51f3e89d.system.entry.js.map → p-5aa7fc77.system.entry.js.map} +0 -0
  222. /package/dist/twilight/{p-3e1fdfef.system.entry.js.map → p-5c462d3a.system.entry.js.map} +0 -0
  223. /package/dist/twilight/{p-9257dbc2.entry.js.map → p-5cb874e2.entry.js.map} +0 -0
  224. /package/dist/twilight/{p-e7e1456e.system.entry.js.map → p-5fcda4de.system.entry.js.map} +0 -0
  225. /package/dist/twilight/{p-35c5729f.entry.js.map → p-676d5fb9.entry.js.map} +0 -0
  226. /package/dist/twilight/{p-523d19eb.system.entry.js.map → p-67bd7dc6.system.entry.js.map} +0 -0
  227. /package/dist/twilight/{p-481689f3.system.entry.js.map → p-68c66dc4.system.entry.js.map} +0 -0
  228. /package/dist/twilight/{p-4f2ef4a9.entry.js.map → p-692ce218.entry.js.map} +0 -0
  229. /package/dist/twilight/{p-ef55fc6f.system.entry.js.map → p-69d439ed.system.entry.js.map} +0 -0
  230. /package/dist/twilight/{p-732b39c9.system.entry.js.map → p-6b0c72f6.system.entry.js.map} +0 -0
  231. /package/dist/twilight/{p-87615e0a.entry.js.map → p-6ea16a5e.entry.js.map} +0 -0
  232. /package/dist/twilight/{p-9cab9a65.entry.js.map → p-78f10d01.entry.js.map} +0 -0
  233. /package/dist/twilight/{p-5de78cc0.system.entry.js.map → p-8c01fd3d.system.entry.js.map} +0 -0
  234. /package/dist/twilight/{p-4da6777e.entry.js.map → p-8e6a4e2f.entry.js.map} +0 -0
  235. /package/dist/twilight/{p-df8718ae.system.entry.js.map → p-8ed0942b.system.entry.js.map} +0 -0
  236. /package/dist/twilight/{p-0f0d29ae.system.entry.js.map → p-946ba9df.system.entry.js.map} +0 -0
  237. /package/dist/twilight/{p-0bc0501c.system.entry.js.map → p-a2d605c6.system.entry.js.map} +0 -0
  238. /package/dist/twilight/{p-b820c2ab.entry.js.map → p-a9bd46a4.entry.js.map} +0 -0
  239. /package/dist/twilight/{p-bf9d58e3.entry.js.map → p-aa08a33d.entry.js.map} +0 -0
  240. /package/dist/twilight/{p-8945b079.system.entry.js.map → p-abb36fab.system.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-de4a8981.system.entry.js.map → p-b13d561c.system.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-0c1ebc0e.entry.js.map → p-b2664085.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-eb3bdc9d.entry.js.map → p-b63413b1.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-0d7f5be2.system.entry.js.map → p-bdcd723a.system.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-7868427e.system.entry.js.map → p-c066a497.system.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-3cbcca71.entry.js.map → p-c2e7c0c2.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-54dde9f6.entry.js.map → p-c3267ade.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-9eba00f7.entry.js.map → p-c382e42d.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-caf62496.system.entry.js.map → p-c4eb4e27.system.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-c6622c76.system.entry.js.map → p-c6e8ca4f.system.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-e9a5ef4a.system.entry.js.map → p-c722cfe9.system.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-ed764d4e.entry.js.map → p-ca36eb68.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-224db8e6.system.entry.js.map → p-d4957f2b.system.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-f31876e7.system.entry.js.map → p-d8dd7345.system.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-896dd3b0.system.entry.js.map → p-dcadcd0a.system.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-0f0d8739.entry.js.map → p-dceb73c3.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-19368123.system.entry.js.map → p-e49bab8f.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-57589083.entry.js.map → p-e8af5599.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-377385b7.entry.js.map → p-e8fba39a.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-4a7814b4.entry.js.map → p-f05b572b.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-2eb348b5.entry.js.map → p-f0b9aaa1.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-e291a499.entry.js.map → p-f22ce14a.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-e8a2c069.entry.js.map → p-f4779a96.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-ff491939.system.entry.js.map → p-f5ae0545.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-18e9f50a.entry.js.map → p-fd397659.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-f3180d3d.entry.js.map → p-ffe66cd6.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,r,s){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):n(e.value).then(a,o)}l((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(e){return function(t){return l([e,t])}}function l(o){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(r=0)),r)try{if(s=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];n=0}finally{s=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DBUHNa40.system.js"],(function(e){"use strict";var t,r,s;return{setters:[function(e){t=e.r;r=e.h;s=e.g}],execute:function(){var n;(function(e){e["ProductDetail"]="product.single";e["Cart"]="cart"})(n||(n={}));var i;(function(e){e["Conditional"]="conditional";e["PercentageOrFixed"]="fixed";e["DiscountsTable"]="discounts_table";e["Bank"]="bank";e["BuyXGetY"]="buy_x_get_y";e["SpecialPrice"]="special_price"})(i||(i={}));var 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}';var o=e("salla_offer",function(){function e(e){var r=this;t(this,e);var s;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=function(e){return salla.lang.get("pages.offer.buy_quantity",{quantity:e})};salla.lang.onLoaded((function(){r.offer_with_price_text=salla.lang.get("pages.offer.with_price");r.with_discount_text=salla.lang.get("pages.products.with_a_discount");r.product_discount_text=salla.lang.get("pages.products.discount");r.special_offer_text=salla.lang.get("pages.products.special_offer");r.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");r.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug");r.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((s=this.host.querySelector('[slot="category"]'))===null||s===void 0?void 0:s.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}e.prototype.getEndpointByPageName=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!(this.currentPage==n.Cart))return[3,2];return[4,Salla.cart.getCurrentCartId()];case 1:e=t.sent();return[2,"offers/cart/".concat(e)];case 2:if(this.currentPage==n.ProductDetail){return[2,"offers/product/".concat(salla.config.get("page.id"))]}return[2,"offers"]}}))}))};e.prototype.emitPromotionViewed=function(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[e])};e.prototype.emitPromotionClicked=function(e){if(e===void 0){e=1}if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var t={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:e};salla.event.emit("promotion::clicked",[t])};e.prototype.componentWillLoad=function(){var e=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((function(e){return salla.onReady(e)})).then((function(){e.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(e.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:t=(e=salla.api).request;return[4,this.getEndpointByPageName()];case 1:return[2,t.apply(e,[r.sent()])]}}))}))})).then((function(t){if(!(e.offersList=t.data).length){throw new Error("salla-offers:: There is no offers!")}var r=e.offersList.find((function(e){return[i.SpecialPrice,i.Bank,i.BuyXGetY,i.DiscountsTable].includes(e.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===i.DiscountsTable){return e.offersList=[r]}if(e.isBankOffer=r.type===i.Bank){e.offersList=e.offersList.filter((function(e){return e.type===i.Bank}));e.isMultipleBank=e.offersList.length>1;return e.offersList}if(r.type===i.SpecialPrice){var s=r.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((function(t){r.details.products=t.data;return e.offersList=[r]})):salla.product.api.categories().then((function(t){var n=e.findCategories(t.data,s.targets);r.details.categories=n;return e.offersList=[r]}))}var n=r.details.get;return n.source==="products"?salla.product.api.fetch({source:"selected",source_value:n.source_value}).then((function(t){n.products=t.data;r.details.get=n;return e.offersList=[r]})):salla.product.api.categories().then((function(t){n.categories=e.findCategories(t.data,n.source_value);r.details.get=n;return e.offersList=[r]}))})).then((function(t){salla.storage.set(e.getStorageKey(),{offers:t,stored_at:(new Date).getTime()});e.canRender=true})).catch((function(e){salla.logger.warn(e)}))};e.prototype.componentDidLoad=function(){var e=this.host.querySelector(".s-slider-block__title-nav");e===null||e===void 0?void 0:e.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()};e.prototype.findCategories=function(e,t){var r;var s=[];for(var n=0,i=e;n<i.length;n++){var a=i[n];if(t.includes(a.id_||a.id)){s.push(a)}if(((r=a.sub_categories)===null||r===void 0?void 0:r.length)>0){s=s.concat(this.findCategories(a.sub_categories,t))}}return s};e.prototype.getStorageKey=function(){try{var e=salla.config.get("page.slug").replace(".","_");var t=salla.lang.getLocale();var r=salla.config.currency().code;if(!e||!t||!r){throw new Error("Unable to get the storage key.")}return"s-offers-".concat(e,"-").concat(salla.config.get("page.id"),"-").concat(t,"-").concat(r)}catch(e){return""}};e.prototype.getOffersFromStorage=function(){var e=salla.storage.get(this.getStorageKey());if(!e||e.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(e.offers)};e.prototype.render=function(){var e=this;if(!this.offersList.length||!this.canRender||!this.showOffer)return null;var t=this.offersList[0];var s=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:t.title;var n=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:t.description;var i={"block-title":s,"block-subTitle":n,"show-controls":this.isMultipleBank};return r("div",{class:"s-offer-wrapper",onClick:function(){return e.emitPromotionClicked()}},r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},i),r("div",{slot:"items"},this.renderSectionForOfferType(t.type))))};e.prototype.renderSectionForOfferType=function(e){if(this.isBankOffer){return this.renderBankSection()}if(e==i.SpecialPrice){return this.renderSpecialPriceSection()}if(e==i.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()};e.prototype.getCategoriesSection=function(e){return r("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,e.url).replace(/\{icon\}/g,e.icon||"sicon-store").replace(/\{name\}/g,e.name)})};e.prototype.renderBuyXGetYSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[(t=n.get.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))})),(s=n.get.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)}))]};e.prototype.renderBankSection=function(){var e=this;return this.offersList.map((function(t){return r("div",{class:{"s-offer-slide-one-sixth":e.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!e.isMultipleBank}},r("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!e.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":e.isMultipleBank}},r("div",{class:"s-offer-bank-logo"},r("img",{src:t.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":t.details.logo,alt:t.title+" offer"})),r("ul",{class:"s-offer-bank-payment-wrapper"},t.details.payments.map((function(e){return r("li",{class:"s-offer-bank-payment-single"},r("img",{src:salla.url.cdn("images/payment/"+e+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+e+".png"),alt:"payment"}))}))),e.isMultipleBank?r("p",{class:"s-offer-bank-payment-discount-percent"},"".concat(e.product_discount_text," ").concat(t.details.discount_value).concat(t.details.discount_type==="percentage"&&"%")):""),!e.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,e.offersList[0].title),r("p",{innerHTML:e.generateBankDescription(e.offersList[0].description,t.details.discount_value)})):"")}))};e.prototype.generateBankDescription=function(e,t){return e.replace(new RegExp("".concat(t," %")),'<span class="s-offer-bank-message-amount">'.concat(t," %</span>"))};e.prototype.renderDiscountTableSection=function(){var e=this;var t;var s=this.offersList[0];var n=s.details.show_price_after_discount;return(t=this.offersList[0].details.discounts)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},r("div",{class:"s-offer-slide-offer-entry"},r("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},r("p",{class:"s-offer-slide-offer-entry-quantity"},e.buy_quantity_text(t.quantity)),n?r("div",{class:"s-offer-slide-offer-entry-price"},r("span",null,e.offer_with_price_text),r("span",{class:"s-offer-slide-offer-entry-price-amount"},t.discounted_amount)," ",r("span",null,e.userCurrency)):""),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},e.with_discount_text,"(",r("span",null,t.percentage,!!t.percentage&&"%"),")")))}))};e.prototype.renderSpecialPriceSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[n.apply_to==="product"&&((t=n.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))}))),n.apply_to==="category"&&((s=n.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)})))]};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
5
- //# sourceMappingURL=p-eacd14ea.system.entry.js.map
4
+ */System.register(["./p-CdqPLiJf.system.js"],(function(e){"use strict";var t,r,s;return{setters:[function(e){t=e.r;r=e.h;s=e.g}],execute:function(){var n;(function(e){e["ProductDetail"]="product.single";e["Cart"]="cart"})(n||(n={}));var i;(function(e){e["Conditional"]="conditional";e["PercentageOrFixed"]="fixed";e["DiscountsTable"]="discounts_table";e["Bank"]="bank";e["BuyXGetY"]="buy_x_get_y";e["SpecialPrice"]="special_price"})(i||(i={}));var 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}';var o=e("salla_offer",function(){function e(e){var r=this;t(this,e);var s;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=function(e){return salla.lang.get("pages.offer.buy_quantity",{quantity:e})};salla.lang.onLoaded((function(){r.offer_with_price_text=salla.lang.get("pages.offer.with_price");r.with_discount_text=salla.lang.get("pages.products.with_a_discount");r.product_discount_text=salla.lang.get("pages.products.discount");r.special_offer_text=salla.lang.get("pages.products.special_offer");r.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");r.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug");r.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((s=this.host.querySelector('[slot="category"]'))===null||s===void 0?void 0:s.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}e.prototype.getEndpointByPageName=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!(this.currentPage==n.Cart))return[3,2];return[4,Salla.cart.getCurrentCartId()];case 1:e=t.sent();return[2,"offers/cart/".concat(e)];case 2:if(this.currentPage==n.ProductDetail){return[2,"offers/product/".concat(salla.config.get("page.id"))]}return[2,"offers"]}}))}))};e.prototype.emitPromotionViewed=function(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[e])};e.prototype.emitPromotionClicked=function(e){if(e===void 0){e=1}if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var t={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:e};salla.event.emit("promotion::clicked",[t])};e.prototype.componentWillLoad=function(){var e=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((function(e){return salla.onReady(e)})).then((function(){e.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(e.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:t=(e=salla.api).request;return[4,this.getEndpointByPageName()];case 1:return[2,t.apply(e,[r.sent()])]}}))}))})).then((function(t){if(!(e.offersList=t.data).length){throw new Error("salla-offers:: There is no offers!")}var r=e.offersList.find((function(e){return[i.SpecialPrice,i.Bank,i.BuyXGetY,i.DiscountsTable].includes(e.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===i.DiscountsTable){return e.offersList=[r]}if(e.isBankOffer=r.type===i.Bank){e.offersList=e.offersList.filter((function(e){return e.type===i.Bank}));e.isMultipleBank=e.offersList.length>1;return e.offersList}if(r.type===i.SpecialPrice){var s=r.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((function(t){r.details.products=t.data;return e.offersList=[r]})):salla.product.api.categories().then((function(t){var n=e.findCategories(t.data,s.targets);r.details.categories=n;return e.offersList=[r]}))}var n=r.details.get;return n.source==="products"?salla.product.api.fetch({source:"selected",source_value:n.source_value}).then((function(t){n.products=t.data;r.details.get=n;return e.offersList=[r]})):salla.product.api.categories().then((function(t){n.categories=e.findCategories(t.data,n.source_value);r.details.get=n;return e.offersList=[r]}))})).then((function(t){salla.storage.set(e.getStorageKey(),{offers:t,stored_at:(new Date).getTime()});e.canRender=true})).catch((function(e){salla.logger.warn(e)}))};e.prototype.componentDidLoad=function(){var e=this.host.querySelector(".s-slider-block__title-nav");e===null||e===void 0?void 0:e.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()};e.prototype.findCategories=function(e,t){var r;var s=[];for(var n=0,i=e;n<i.length;n++){var a=i[n];if(t.includes(a.id_||a.id)){s.push(a)}if(((r=a.sub_categories)===null||r===void 0?void 0:r.length)>0){s=s.concat(this.findCategories(a.sub_categories,t))}}return s};e.prototype.getStorageKey=function(){try{var e=salla.config.get("page.slug").replace(".","_");var t=salla.lang.getLocale();var r=salla.config.currency().code;if(!e||!t||!r){throw new Error("Unable to get the storage key.")}return"s-offers-".concat(e,"-").concat(salla.config.get("page.id"),"-").concat(t,"-").concat(r)}catch(e){return""}};e.prototype.getOffersFromStorage=function(){var e=salla.storage.get(this.getStorageKey());if(!e||e.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(e.offers)};e.prototype.render=function(){var e=this;if(!this.offersList.length||!this.canRender||!this.showOffer)return null;var t=this.offersList[0];var s=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:t.title;var n=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:t.description;var i={"block-title":s,"block-subTitle":n,"show-controls":this.isMultipleBank};return r("div",{class:"s-offer-wrapper",onClick:function(){return e.emitPromotionClicked()}},r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},i),r("div",{slot:"items"},this.renderSectionForOfferType(t.type))))};e.prototype.renderSectionForOfferType=function(e){if(this.isBankOffer){return this.renderBankSection()}if(e==i.SpecialPrice){return this.renderSpecialPriceSection()}if(e==i.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()};e.prototype.getCategoriesSection=function(e){return r("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,e.url).replace(/\{icon\}/g,e.icon||"sicon-store").replace(/\{name\}/g,e.name)})};e.prototype.renderBuyXGetYSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[(t=n.get.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))})),(s=n.get.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)}))]};e.prototype.renderBankSection=function(){var e=this;return this.offersList.map((function(t){return r("div",{class:{"s-offer-slide-one-sixth":e.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!e.isMultipleBank}},r("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!e.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":e.isMultipleBank}},r("div",{class:"s-offer-bank-logo"},r("img",{src:t.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":t.details.logo,alt:t.title+" offer"})),r("ul",{class:"s-offer-bank-payment-wrapper"},t.details.payments.map((function(e){return r("li",{class:"s-offer-bank-payment-single"},r("img",{src:salla.url.cdn("images/payment/"+e+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+e+".png"),alt:"payment"}))}))),e.isMultipleBank?r("p",{class:"s-offer-bank-payment-discount-percent"},"".concat(e.product_discount_text," ").concat(t.details.discount_value).concat(t.details.discount_type==="percentage"&&"%")):""),!e.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,e.offersList[0].title),r("p",{innerHTML:e.generateBankDescription(e.offersList[0].description,t.details.discount_value)})):"")}))};e.prototype.generateBankDescription=function(e,t){return e.replace(new RegExp("".concat(t," %")),'<span class="s-offer-bank-message-amount">'.concat(t," %</span>"))};e.prototype.renderDiscountTableSection=function(){var e=this;var t;var s=this.offersList[0];var n=s.details.show_price_after_discount;return(t=this.offersList[0].details.discounts)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},r("div",{class:"s-offer-slide-offer-entry"},r("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},r("p",{class:"s-offer-slide-offer-entry-quantity"},e.buy_quantity_text(t.quantity)),n?r("div",{class:"s-offer-slide-offer-entry-price"},r("span",null,e.offer_with_price_text),r("span",{class:"s-offer-slide-offer-entry-price-amount"},t.discounted_amount)," ",r("span",null,e.userCurrency)):""),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},e.with_discount_text,"(",r("span",null,t.percentage,!!t.percentage&&"%"),")")))}))};e.prototype.renderSpecialPriceSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[n.apply_to==="product"&&((t=n.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))}))),n.apply_to==="category"&&((s=n.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)})))]};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
5
+ //# sourceMappingURL=p-14301596.system.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-DBjISX91.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-6ef842ae.entry.js.map
4
+ import{r as t,h as s,H as a,g as c}from"./p-DhlOpBvy.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-1a825c2d.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-DBUHNa40.system.js"],(function(t){"use strict";var e,i,n;return{setters:[function(t){e=t.r;i=t.h;n=t.g}],execute:function(){var o='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;-webkit-transform:translateX(-39%);transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;-webkit-transition:opacity 0.3s;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){-webkit-transform:translateX(-72%);transform:translateX(-72%)}';var a=t("salla_tooltip",function(){function t(t){e(this,t);this.show=false;this.targetElement=null}t.prototype.handleMouseOver=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=true}};t.prototype.handleMouseOut=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=false}};t.prototype.componentDidLoad=function(){this.targetElement=document.getElementById(this.targetId)};t.prototype.render=function(){return i("div",{key:"7408633fdd76ea709b37137c577133fb356f3857",class:"s-tooltip-container"},i("slot",{key:"311cf8a6804f740495870b23fea1d1faed5d2801"}),this.show&&i("div",{key:"4cf994b632f4ec2355d345727a1cf17efa12711e",class:"s-tooltip-item"},this.text))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=o}}}));
5
- //# sourceMappingURL=p-55fbd324.system.entry.js.map
4
+ System.register(["./p-CdqPLiJf.system.js"],(function(t){"use strict";var e,i,n;return{setters:[function(t){e=t.r;i=t.h;n=t.g}],execute:function(){var o='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;-webkit-transform:translateX(-39%);transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;-webkit-transition:opacity 0.3s;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){-webkit-transform:translateX(-72%);transform:translateX(-72%)}';var s=t("salla_tooltip",function(){function t(t){e(this,t);this.show=false;this.targetElement=null}t.prototype.handleMouseOver=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=true}};t.prototype.handleMouseOut=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=false}};t.prototype.componentDidLoad=function(){this.targetElement=document.getElementById(this.targetId)};t.prototype.render=function(){return i("div",{key:"7408633fdd76ea709b37137c577133fb356f3857",class:"s-tooltip-container"},i("slot",{key:"311cf8a6804f740495870b23fea1d1faed5d2801"}),this.show&&i("div",{key:"4cf994b632f4ec2355d345727a1cf17efa12711e",class:"s-tooltip-item"},this.text))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());s.style=o}}}));
5
+ //# sourceMappingURL=p-1cf76965.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,a,e,n){function r(t){return t instanceof e?t:new e((function(a){a(t)}))}return new(e||(e=Promise))((function(e,i){function s(t){try{o(n.next(t))}catch(t){i(t)}}function u(t){try{o(n["throw"](t))}catch(t){i(t)}}function o(t){t.done?e(t.value):r(t.value).then(s,u)}o((n=n.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(a){return o([t,a])}}function o(u){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(n=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=a.call(t,e)}catch(t){u=[6,t];r=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DBUHNa40.system.js"],(function(t){"use strict";var a,e,n,r;return{setters:[function(t){a=t.r;e=t.h;n=t.H;r=t.g}],execute:function(){var i="";var s=t("salla_metadata",function(){function t(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(t){salla.log("Bad json passed via entityId prop")}}}t.prototype.getValue=function(t){if(t.type==="file"){return'<a href="'.concat(t.value,'" class="text-primary" target="_blank"><span class="sicon-download"></span> ').concat(this.download,"</a>")}if(t.type==="url"){return'<a href="'.concat(t.value,'" class="text-blue-700 underline" target="_blank">').concat(t.value,"</a>")}if(t.type==="date"){var a=new Date(t.value);var e=String(a.getDate()).padStart(2,"0");var n=String(a.getMonth()+1).padStart(2,"0");var r=a.getFullYear();var i="".concat(e,"/").concat(n,"/").concat(r);return i}return t.value};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,e;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.onReady()];case 1:n.sent();if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("custom-fields"))){return[2,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[2,salla.logger.error("can't render salla-metadata without enity-id prop!")]}return[4,salla.lang.onLoaded()];case 2:n.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=n.sent();this.specs=(a=e.data[0])===null||a===void 0?void 0:a.sections;return[2]}}))}))};t.prototype.render=function(){var t=this;if(!this.specs.length){return}return e(n,{class:"s-metadata-wrapper"},this.specs.map((function(a){return e("div",{class:"s-metadata-box"},e("div",{class:"s-metadata-box-header"},e("i",{class:"sicon-list"}),a.name),a.fields.map((function(a){return e("div",{class:"s-metadata-row"},e("p",{class:"s-metadata-row-name"},a.name),e("p",{class:"s-metadata-row-value",innerHTML:t.getValue(a)}))})))})))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
5
- //# sourceMappingURL=p-af586bf5.system.entry.js.map
4
+ */System.register(["./p-CdqPLiJf.system.js"],(function(t){"use strict";var a,e,n,r;return{setters:[function(t){a=t.r;e=t.h;n=t.H;r=t.g}],execute:function(){var i="";var s=t("salla_metadata",function(){function t(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(t){salla.log("Bad json passed via entityId prop")}}}t.prototype.getValue=function(t){if(t.type==="file"){return'<a href="'.concat(t.value,'" class="text-primary" target="_blank"><span class="sicon-download"></span> ').concat(this.download,"</a>")}if(t.type==="url"){return'<a href="'.concat(t.value,'" class="text-blue-700 underline" target="_blank">').concat(t.value,"</a>")}if(t.type==="date"){var a=new Date(t.value);var e=String(a.getDate()).padStart(2,"0");var n=String(a.getMonth()+1).padStart(2,"0");var r=a.getFullYear();var i="".concat(e,"/").concat(n,"/").concat(r);return i}return t.value};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,e;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.onReady()];case 1:n.sent();if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("custom-fields"))){return[2,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[2,salla.logger.error("can't render salla-metadata without enity-id prop!")]}return[4,salla.lang.onLoaded()];case 2:n.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=n.sent();this.specs=(a=e.data[0])===null||a===void 0?void 0:a.sections;return[2]}}))}))};t.prototype.render=function(){var t=this;if(!this.specs.length){return}return e(n,{class:"s-metadata-wrapper"},this.specs.map((function(a){return e("div",{class:"s-metadata-box"},e("div",{class:"s-metadata-box-header"},e("i",{class:"sicon-list"}),a.name),a.fields.map((function(a){return e("div",{class:"s-metadata-row"},e("p",{class:"s-metadata-row-name"},a.name),e("p",{class:"s-metadata-row-value",innerHTML:t.getValue(a)}))})))})))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
5
+ //# sourceMappingURL=p-2acd71a9.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as i,H as e}from"./p-DBjISX91.js";var s;(function(t){t["PERCENTAGE"]="percentage";t["FIXED"]="fixed";t["FREE_PRODUCT"]="free_product"})(s||(s={}));var o;(function(t){t["PRODUCT_COUNT"]="products_count";t["PRODUCT_PURCHASE"]="order_amount"})(o||(o={}));const n=":host{display:block}";const a=class{constructor(i){t(this,i);this.offer=null;this.products={};this.isLoading=true;this.canRender=true}componentWillLoad(){salla.onReady().then((()=>{var t,i,e;if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((e=(i=salla.storage.get("cart"))===null||i===void 0?void 0:i.summary)===null||e===void 0?void 0:e.count)){throw new Error("feature or cart object does not existed")}})).then((()=>salla.api.cart.offers())).then((({data:t})=>{this.offer=t.find((t=>t.type==="conditional"));if(!this.offer){throw new Error("No conditional offer has been activated in the merchant dashboard")}this.offer.details.discounts.unshift({value:0,min_spend:0});return this.updateInitialOfferValue()})).then((()=>this.getProducts())).then((()=>salla.event.on("cart::updated",(t=>this.updateOfferValues(t))))).catch((t=>{this.canRender=false;salla.logger.warn("salla-conditional-offer:: ",t)})).finally((()=>{this.isLoading=false}))}getProducts(){const t=this.offer.details.discounts.filter((({type:t})=>t===s.FREE_PRODUCT)).map((({value:t})=>t));if(t.length>0){return salla.product.fetch({source:"selected",source_value:t}).then((({data:t})=>{t.forEach((({id:t,url:i,image:e})=>{this.products[t]={url:i,image:e}}))}))}}updateInitialOfferValue(){return salla.api.cart.details().then((({data:{cart:t}})=>this.updateOfferValues(t)))}updateOfferValues({items:t,sub_total:i}){var e;const s=this.offer.details.based_on===o.PRODUCT_COUNT?t.reduce(((t,{quantity:i})=>t+i),0):i;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(e=this.offer)===null||e===void 0?void 0:e.details),{current_value:s})});return this.offer}getCheckpointContent(t){var e,o;if(t.type===s.PERCENTAGE)return`${t.value}%`;if(t.type===s.FIXED)return salla.money(t.value);if(t.type!==s.FREE_PRODUCT){salla.logger.error(`salla-conditional-offer:: unexpected type (${t.type})!`);return""}const n=this.products[t.value];if(!n){salla.logger.error(`salla-conditional-offer:: there is no product with id (${t.value})!`);return""}return i("a",{class:"s-conditional-offer-product-link",href:n.url},i("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:((e=n===null||n===void 0?void 0:n.image)===null||e===void 0?void 0:e.alt)||"",src:(o=n===null||n===void 0?void 0:n.image)===null||o===void 0?void 0:o.url}))}getOfferType(t){var i;const e=(i=this.offer.details)===null||i===void 0?void 0:i.based_on;if(e===o.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",t.min_spend);if(e===o.PRODUCT_PURCHASE)return salla.money(t.min_spend);salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${e}`);return`${t.min_spend}`}clamp(t,i,e){return Math.max(i,Math.min(t,e))}mapValueRanges(t,i,e,s,o){const n=(t-i)*(o-s)/(e-i)+s;if(n===Number.POSITIVE_INFINITY)return 100;if(n===Number.NEGATIVE_INFINITY)return 0;return this.clamp(n,0,100)}getCheckPointView(t,e){var s,o;const n=this.offer.details.discounts.findIndex((({min_spend:i})=>i===t.min_spend));const a=(o=(s=this.offer.details.discounts[n-1])===null||s===void 0?void 0:s.min_spend)!==null&&o!==void 0?o:0;const l=this.mapValueRanges(this.offer.details.current_value,a,t.min_spend,0,100);const r=t.min_spend<=this.offer.details.current_value;return i("div",{class:"s-conditional-offer-checkpoint-container"},e>0?[i("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},i("div",{class:"s-conditional-offer-progress-line-inactive"}),i("div",{class:"s-conditional-offer-progress-line-active",style:{width:`${l}%`}})),i("div",{key:"checkpoint",class:`s-conditional-offer-checkpoint ${r?"s-conditional-offer-active-checkpoint":""}`},i("div",{class:`s-conditional-offer-item-avatar-content ${r?"active":""}`,innerHTML:this.products&&this.getCheckpointContent(t)}),i("div",{class:`s-conditional-offer-checkpoint-label ${r?"active":""}`,innerHTML:this.getOfferType(t)}))]:i("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":e===0,active:r},innerHTML:this.getOfferType(t)}))}getLoadingSkeletonView(){return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-skeleton-inner-container"},i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"30%"})),i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"35%"})),i("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((()=>[i("salla-skeleton",{key:"checkpoint-line",height:"8px"}),i("div",{key:"checkpoint"},i("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))])))))}render(){if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-title-wrapper"},i("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?i("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",i("i",{class:"sicon-information"})):null),i("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map(((t,e)=>i("div",{class:{"flex-1":e>0},key:t.min_spend},this.getCheckPointView(t,e))))))}};a.style=n;export{a as salla_conditional_offer};
5
- //# sourceMappingURL=p-e063d21b.entry.js.map
4
+ import{r as t,h as i,H as e}from"./p-DhlOpBvy.js";var s;(function(t){t["PERCENTAGE"]="percentage";t["FIXED"]="fixed";t["FREE_PRODUCT"]="free_product"})(s||(s={}));var o;(function(t){t["PRODUCT_COUNT"]="products_count";t["PRODUCT_PURCHASE"]="order_amount"})(o||(o={}));const n=":host{display:block}";const a=class{constructor(i){t(this,i);this.offer=null;this.products={};this.isLoading=true;this.canRender=true}componentWillLoad(){salla.onReady().then((()=>{var t,i,e;if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((e=(i=salla.storage.get("cart"))===null||i===void 0?void 0:i.summary)===null||e===void 0?void 0:e.count)){throw new Error("feature or cart object does not existed")}})).then((()=>salla.api.cart.offers())).then((({data:t})=>{this.offer=t.find((t=>t.type==="conditional"));if(!this.offer){throw new Error("No conditional offer has been activated in the merchant dashboard")}this.offer.details.discounts.unshift({value:0,min_spend:0});return this.updateInitialOfferValue()})).then((()=>this.getProducts())).then((()=>salla.event.on("cart::updated",(t=>this.updateOfferValues(t))))).catch((t=>{this.canRender=false;salla.logger.warn("salla-conditional-offer:: ",t)})).finally((()=>{this.isLoading=false}))}getProducts(){const t=this.offer.details.discounts.filter((({type:t})=>t===s.FREE_PRODUCT)).map((({value:t})=>t));if(t.length>0){return salla.product.fetch({source:"selected",source_value:t}).then((({data:t})=>{t.forEach((({id:t,url:i,image:e})=>{this.products[t]={url:i,image:e}}))}))}}updateInitialOfferValue(){return salla.api.cart.details().then((({data:{cart:t}})=>this.updateOfferValues(t)))}updateOfferValues({items:t,sub_total:i}){var e;const s=this.offer.details.based_on===o.PRODUCT_COUNT?t.reduce(((t,{quantity:i})=>t+i),0):i;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(e=this.offer)===null||e===void 0?void 0:e.details),{current_value:s})});return this.offer}getCheckpointContent(t){var e,o;if(t.type===s.PERCENTAGE)return`${t.value}%`;if(t.type===s.FIXED)return salla.money(t.value);if(t.type!==s.FREE_PRODUCT){salla.logger.error(`salla-conditional-offer:: unexpected type (${t.type})!`);return""}const n=this.products[t.value];if(!n){salla.logger.error(`salla-conditional-offer:: there is no product with id (${t.value})!`);return""}return i("a",{class:"s-conditional-offer-product-link",href:n.url},i("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:((e=n===null||n===void 0?void 0:n.image)===null||e===void 0?void 0:e.alt)||"",src:(o=n===null||n===void 0?void 0:n.image)===null||o===void 0?void 0:o.url}))}getOfferType(t){var i;const e=(i=this.offer.details)===null||i===void 0?void 0:i.based_on;if(e===o.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",t.min_spend);if(e===o.PRODUCT_PURCHASE)return salla.money(t.min_spend);salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${e}`);return`${t.min_spend}`}clamp(t,i,e){return Math.max(i,Math.min(t,e))}mapValueRanges(t,i,e,s,o){const n=(t-i)*(o-s)/(e-i)+s;if(n===Number.POSITIVE_INFINITY)return 100;if(n===Number.NEGATIVE_INFINITY)return 0;return this.clamp(n,0,100)}getCheckPointView(t,e){var s,o;const n=this.offer.details.discounts.findIndex((({min_spend:i})=>i===t.min_spend));const a=(o=(s=this.offer.details.discounts[n-1])===null||s===void 0?void 0:s.min_spend)!==null&&o!==void 0?o:0;const l=this.mapValueRanges(this.offer.details.current_value,a,t.min_spend,0,100);const r=t.min_spend<=this.offer.details.current_value;return i("div",{class:"s-conditional-offer-checkpoint-container"},e>0?[i("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},i("div",{class:"s-conditional-offer-progress-line-inactive"}),i("div",{class:"s-conditional-offer-progress-line-active",style:{width:`${l}%`}})),i("div",{key:"checkpoint",class:`s-conditional-offer-checkpoint ${r?"s-conditional-offer-active-checkpoint":""}`},i("div",{class:`s-conditional-offer-item-avatar-content ${r?"active":""}`,innerHTML:this.products&&this.getCheckpointContent(t)}),i("div",{class:`s-conditional-offer-checkpoint-label ${r?"active":""}`,innerHTML:this.getOfferType(t)}))]:i("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":e===0,active:r},innerHTML:this.getOfferType(t)}))}getLoadingSkeletonView(){return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-skeleton-inner-container"},i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"30%"})),i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"35%"})),i("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((()=>[i("salla-skeleton",{key:"checkpoint-line",height:"8px"}),i("div",{key:"checkpoint"},i("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))])))))}render(){if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-title-wrapper"},i("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?i("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",i("i",{class:"sicon-information"})):null),i("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map(((t,e)=>i("div",{class:{"flex-1":e>0},key:t.min_spend},this.getCheckPointView(t,e))))))}};a.style=n;export{a as salla_conditional_offer};
5
+ //# sourceMappingURL=p-2d830796.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-DBUHNa40.system.js","./p-CmE8W9Xg.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var n,s,e,c,i,a;return{setters:[function(t){n=t.r;s=t.h;e=t.H;c=t.g},function(t){i=t.w},function(t){a=t.M}],execute:function(){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>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 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>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 r='\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';var h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";var u=t("salla_contacts",function(){function t(t){var s=this;n(this,t);var e;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:o,whatsapp:i,phone:l,telegram:r,email:a};this.contactSlot=((e=this.host.querySelector('[slot="contact"]'))===null||e===void 0?void 0:e.innerHTML)||'<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>'.concat(!this.iconsOnly&&"<span class='unicode'>{value}</span>","</a>");salla.onReady((function(){s.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((function(){s.contactsTitle=s.contactsTitle||salla.lang.get("blocks.footer.social")}))}t.prototype.getContactsArray=function(){return Object.entries(this.contacts).filter((function(t){var n=t[0],s=t[1];return s!==""})).map((function(t){var n=t[0],s=t[1];return{type:n,value:s}}))};t.prototype.getContactLink=function(t){var n=this.contacts[t];switch(t){case"phone":case"mobile":return"tel:".concat(n);case"whatsapp":return salla.url.get("whatsapp/send");case"email":return"mailto:".concat(n);case"telegram":return n.startsWith("https://t.me/")?n:"https://t.me/".concat(n);default:return n}};t.prototype.getContactIcon=function(t){return this.iconsList[t]};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var n=this.getContactsArray();if(!n||n.length==0){return}if(this.isHeader){return s(e,{class:"s-contacts s-contacts-header"},n.filter((function(t){return t.type=="phone"||t.type=="email"})).map((function(n,e){return s("a",{href:t.getContactLink(n.type),key:e,class:"s-contacts-topnav-link"},n.type==="email"?n.value:[s("span",null,t.contactsTitle,": "),s("a",{class:"unicode",href:t.iconsList[n.type]},n.value)])})))}return s(e,{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}},n.map((function(n,e){return s("div",{key:e,id:"contact-slot",innerHTML:t.contactSlot.replace(/\{icon\}/g,t.getContactIcon(n.type)).replace(/\{value\}/g,n.value.toString()).replace(/\{link\}/g,t.getContactLink(n.type))})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return c(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
5
- //# sourceMappingURL=p-2bb4f45d.system.entry.js.map
4
+ System.register(["./p-CdqPLiJf.system.js","./p-CmE8W9Xg.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var n,s,e,c,i,a;return{setters:[function(t){n=t.r;s=t.h;e=t.H;c=t.g},function(t){i=t.w},function(t){a=t.M}],execute:function(){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>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 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>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 r='\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';var h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";var u=t("salla_contacts",function(){function t(t){var s=this;n(this,t);var e;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:o,whatsapp:i,phone:l,telegram:r,email:a};this.contactSlot=((e=this.host.querySelector('[slot="contact"]'))===null||e===void 0?void 0:e.innerHTML)||'<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>'.concat(!this.iconsOnly&&"<span class='unicode'>{value}</span>","</a>");salla.onReady((function(){s.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((function(){s.contactsTitle=s.contactsTitle||salla.lang.get("blocks.footer.social")}))}t.prototype.getContactsArray=function(){return Object.entries(this.contacts).filter((function(t){var n=t[0],s=t[1];return s!==""})).map((function(t){var n=t[0],s=t[1];return{type:n,value:s}}))};t.prototype.getContactLink=function(t){var n=this.contacts[t];switch(t){case"phone":case"mobile":return"tel:".concat(n);case"whatsapp":return salla.url.get("whatsapp/send");case"email":return"mailto:".concat(n);case"telegram":return n.startsWith("https://t.me/")?n:"https://t.me/".concat(n);default:return n}};t.prototype.getContactIcon=function(t){return this.iconsList[t]};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var n=this.getContactsArray();if(!n||n.length==0){return}if(this.isHeader){return s(e,{class:"s-contacts s-contacts-header"},n.filter((function(t){return t.type=="phone"||t.type=="email"})).map((function(n,e){return s("a",{href:t.getContactLink(n.type),key:e,class:"s-contacts-topnav-link"},n.type==="email"?n.value:[s("span",null,t.contactsTitle,": "),s("a",{class:"unicode",href:t.iconsList[n.type]},n.value)])})))}return s(e,{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}},n.map((function(n,e){return s("div",{key:e,id:"contact-slot",innerHTML:t.contactSlot.replace(/\{icon\}/g,t.getContactIcon(n.type)).replace(/\{value\}/g,n.value.toString()).replace(/\{link\}/g,t.getContactLink(n.type))})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return c(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
5
+ //# sourceMappingURL=p-3be63ee4.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-DBUHNa40.system.js"],(function(t){"use strict";var a,l,s,n;return{setters:[function(t){a=t.r;l=t.h;s=t.H;n=t.g}],execute:function(){var i=":host{display:block}";var e=t("salla_app_install_alert",function(){function t(t){a(this,t);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}t.prototype.connectedCallback=function(){var t=this;salla.onReady((function(){t.data=salla.config.get("store.app_install_prompt");if(!t.isMobileOrTabletDevice())return;if(!t.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");t.ctaLink=salla.url.get("app");t.alertDelay=setTimeout((function(){return t.open=true}),3e3)}))};t.prototype.disconnectedCallback=function(){clearTimeout(this.alertDelay)};t.prototype.isMobileOrTabletDevice=function(t){if(t===void 0){t=1024}var a=window.innerWidth<=t;var l=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);var s="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return l&&a&&s};t.prototype.closeAlert=function(){var t=this;salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(function(){t.closing=false;t.open=false}),{once:true})};t.prototype.render=function(){var t=this;return this.data?l(s,{class:"s-app-install-alert-wrapper ".concat(this.open?"open":""," ").concat(this.closing?"closing":""),position:this.data.position},l("div",null,l("img",{src:this.data.icon,width:"58",height:"58",alt:"".concat(salla.config.get("store.name"))})),l("div",{class:"s-app-install-alert-content"},l("h2",{class:"s-app-install-alert-title"},this.data.title),l("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",l("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),l("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:function(){return t.closeAlert()}},l("i",{class:"sicon-cancel"}))):null};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());e.style=i}}}));
5
- //# sourceMappingURL=p-91798967.system.entry.js.map
4
+ System.register(["./p-CdqPLiJf.system.js"],(function(t){"use strict";var a,l,s,i;return{setters:[function(t){a=t.r;l=t.h;s=t.H;i=t.g}],execute:function(){var n=":host{display:block}";var e=t("salla_app_install_alert",function(){function t(t){a(this,t);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}t.prototype.connectedCallback=function(){var t=this;salla.onReady((function(){t.data=salla.config.get("store.app_install_prompt");if(!t.isMobileOrTabletDevice())return;if(!t.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");t.ctaLink=salla.url.get("app");t.alertDelay=setTimeout((function(){return t.open=true}),3e3)}))};t.prototype.disconnectedCallback=function(){clearTimeout(this.alertDelay)};t.prototype.isMobileOrTabletDevice=function(t){if(t===void 0){t=1024}var a=window.innerWidth<=t;var l=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);var s="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return l&&a&&s};t.prototype.closeAlert=function(){var t=this;salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(function(){t.closing=false;t.open=false}),{once:true})};t.prototype.render=function(){var t=this;return this.data?l(s,{class:"s-app-install-alert-wrapper ".concat(this.open?"open":""," ").concat(this.closing?"closing":""),position:this.data.position},l("div",null,l("img",{src:this.data.icon,width:"58",height:"58",alt:"".concat(salla.config.get("store.name"))})),l("div",{class:"s-app-install-alert-content"},l("h2",{class:"s-app-install-alert-title"},this.data.title),l("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",l("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),l("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:function(){return t.closeAlert()}},l("i",{class:"sicon-cancel"}))):null};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());e.style=n}}}));
5
+ //# sourceMappingURL=p-3e085ee7.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,c as e,h as s,H as i,g as l}from"./p-DBjISX91.js";import{F as a}from"./p-DL4h2bc3.js";import{H as r}from"./p-DjVGZdqd.js";import"./p-CgtvEd63.js";const o=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";const n=class{constructor(s){t(this,s);this.changed=e(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(()=>this.host.style.display="none"));salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply");this.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let e={};this.filters=t.map((t=>{t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;if(t.key=="rating"){t.type=a.VALUES;let{max:e,min:s}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=s||t<=e))}if(this.filtersData.variants&&t.type==a.VARIANTS){e.variants=this.filtersData.variants}if(this.filtersData[t.key]&&t.type!==a.VARIANTS){e[t.key]=this.filtersData[t.key]}let s=new URLSearchParams(window.location.search);let i=false;for(let t of s.keys()){if(t.includes("filters")){i=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(e).length==0&&!i){let t=window.location.href;let s=salla.config.get("page.id");let i=t.indexOf("?")!==-1?"&":"?";let l=t+i+"filters[category_id]="+s;e.category_id=s;window.history.pushState({path:l},"",l)}return t}));this.filtersData=e;this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await r.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady){return}let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{var e;if(t){let t=new URL(window.location.href);for(const[e]of t.searchParams.entries()){if(e.startsWith("filters")){t.searchParams.delete(e)}}let e=this.encodeFilters(this.filtersData);let s=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");if(s){t.search=t.search.split("&filters")[0]+"&"+e}else{t.search=`?${e}`}window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);(e=t.searchParams)===null||e===void 0?void 0:e.delete("filters");window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData);this.changed.emit(this.filtersData)}),300)}encodeFilters(t,e="filters"){const s=[];for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)){const l=t[i];const a=e?`${e}[${i}]`:i;if(Array.isArray(l)){for(let t=0;t<l.length;t++){s.push(`${a}[${t}]=${l[t]}`)}}else if(typeof l==="object"&&l!==null){s.push(this.encodeFilters(l,a))}else{let t=`${a}=${l}`;s.push(t)}}}return s.join("&")}async resetFilters(){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((t=>t.reset&&t.reset()));salla.event.emit("salla-filters::reset");return this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search);const e=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t.get(e))}`)).join("&");const s=e?`${window.location.pathname}?${e}`:window.location.pathname;window.history.pushState({},"",s)}handleOptionChange(t,e,s){if(e.type===a.RANGE){this.filtersData[e.key]=s}let i=t.target.checked;if(e.type===a.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[e.key]=s);i||delete this.filtersData.variants[e.key]}else if(t.target.type=="radio"){i&&(this.filtersData[e.key]=s);i||delete this.filtersData[e.key]}else if(t.target.type=="checkbox"){this.filtersData[e.key]=this.filtersData[e.key]||[];if(i){this.filtersData[e.key].push(s)}this.filtersData[e.key]=this.filtersData[e.key].filter((t=>t!=s))}this.applyFilters()}render(){var t,e;return s(i,{key:"d8df51f604c92feea7ef0eb73bc8310cb1320273"},(t=this.filters)===null||t===void 0?void 0:t.map((t=>s("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:e,value:s}})=>{this.handleOptionChange(t,e,s)}}))),((e=this.filters)===null||e===void 0?void 0:e.length)?s("div",{class:"s-filters-footer"},s("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)):"")}componentDidLoad(){this.isReady=true}get host(){return l(this)}};n.style=o;export{n as salla_filters};
5
- //# sourceMappingURL=p-283d9536.entry.js.map
4
+ import{r as t,c as e,h as s,H as i,g as l}from"./p-DhlOpBvy.js";import{F as a}from"./p-DL4h2bc3.js";import{H as r}from"./p-DjVGZdqd.js";import"./p-CgtvEd63.js";const o=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";const n=class{constructor(s){t(this,s);this.changed=e(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(()=>this.host.style.display="none"));salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply");this.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let e={};this.filters=t.map((t=>{t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;if(t.key=="rating"){t.type=a.VALUES;let{max:e,min:s}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=s||t<=e))}if(this.filtersData.variants&&t.type==a.VARIANTS){e.variants=this.filtersData.variants}if(this.filtersData[t.key]&&t.type!==a.VARIANTS){e[t.key]=this.filtersData[t.key]}let s=new URLSearchParams(window.location.search);let i=false;for(let t of s.keys()){if(t.includes("filters")){i=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(e).length==0&&!i){let t=window.location.href;let s=salla.config.get("page.id");let i=t.indexOf("?")!==-1?"&":"?";let l=t+i+"filters[category_id]="+s;e.category_id=s;window.history.pushState({path:l},"",l)}return t}));this.filtersData=e;this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await r.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady){return}let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{var e;if(t){let t=new URL(window.location.href);for(const[e]of t.searchParams.entries()){if(e.startsWith("filters")){t.searchParams.delete(e)}}let e=this.encodeFilters(this.filtersData);let s=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");if(s){t.search=t.search.split("&filters")[0]+"&"+e}else{t.search=`?${e}`}window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);(e=t.searchParams)===null||e===void 0?void 0:e.delete("filters");window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData);this.changed.emit(this.filtersData)}),300)}encodeFilters(t,e="filters"){const s=[];for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)){const l=t[i];const a=e?`${e}[${i}]`:i;if(Array.isArray(l)){for(let t=0;t<l.length;t++){s.push(`${a}[${t}]=${l[t]}`)}}else if(typeof l==="object"&&l!==null){s.push(this.encodeFilters(l,a))}else{let t=`${a}=${l}`;s.push(t)}}}return s.join("&")}async resetFilters(){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((t=>t.reset&&t.reset()));salla.event.emit("salla-filters::reset");return this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search);const e=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t.get(e))}`)).join("&");const s=e?`${window.location.pathname}?${e}`:window.location.pathname;window.history.pushState({},"",s)}handleOptionChange(t,e,s){if(e.type===a.RANGE){this.filtersData[e.key]=s}let i=t.target.checked;if(e.type===a.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[e.key]=s);i||delete this.filtersData.variants[e.key]}else if(t.target.type=="radio"){i&&(this.filtersData[e.key]=s);i||delete this.filtersData[e.key]}else if(t.target.type=="checkbox"){this.filtersData[e.key]=this.filtersData[e.key]||[];if(i){this.filtersData[e.key].push(s)}this.filtersData[e.key]=this.filtersData[e.key].filter((t=>t!=s))}this.applyFilters()}render(){var t,e;return s(i,{key:"d8df51f604c92feea7ef0eb73bc8310cb1320273"},(t=this.filters)===null||t===void 0?void 0:t.map((t=>s("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:e,value:s}})=>{this.handleOptionChange(t,e,s)}}))),((e=this.filters)===null||e===void 0?void 0:e.length)?s("div",{class:"s-filters-footer"},s("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)):"")}componentDidLoad(){this.isReady=true}get host(){return l(this)}};n.style=o;export{n as salla_filters};
5
+ //# sourceMappingURL=p-3e34b034.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-DBUHNa40.system.js"],(function(e){"use strict";var t,i,a,s;return{setters:[function(e){t=e.r;i=e.c;a=e.h;s=e.H}],execute:function(){var c="salla-loyalty-prize-item:hover{-webkit-box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important;box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";var d=e("salla_loyalty_prize_item",function(){function e(e){t(this,e);this.prizeItemSelected=i(this,"prizeItemSelected")}e.prototype.onPrizeItemClick=function(){this.prizeItemSelected.emit(this.item)};e.prototype.render=function(){return a(s,{key:"20e5ad52da53840d7e765f3965aa6426a51e3603"},a("div",{key:"1848c9e78576ead79f0f6f51f6acddff8d643b33",onClick:this.onPrizeItemClick.bind(this)},a("img",{key:"48d183f869c50e4f64a1188d71491c9ca3558a1b",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),a("div",{key:"83a7e2cde389dea40d68e757d3d53f03a396834d",class:"s-loyalty-prize-item-title"},this.item.name),a("div",{key:"5c2062ce52d39eb7a68b32f25ea9082e94a5ccb4",class:"s-loyalty-prize-item-subtitle"},this.item.description),a("div",{key:"9b1a68ab595dd46bf2fd17ec815e98abf5bdbc05",class:"s-loyalty-prize-item-points"},this.item.cost_points," Points")))};return e}());d.style=c}}}));
5
- //# sourceMappingURL=p-bd8a6157.system.entry.js.map
4
+ System.register(["./p-CdqPLiJf.system.js"],(function(e){"use strict";var t,i,a,s;return{setters:[function(e){t=e.r;i=e.c;a=e.h;s=e.H}],execute:function(){var c="salla-loyalty-prize-item:hover{-webkit-box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important;box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";var d=e("salla_loyalty_prize_item",function(){function e(e){t(this,e);this.prizeItemSelected=i(this,"prizeItemSelected")}e.prototype.onPrizeItemClick=function(){this.prizeItemSelected.emit(this.item)};e.prototype.render=function(){return a(s,{key:"20e5ad52da53840d7e765f3965aa6426a51e3603"},a("div",{key:"1848c9e78576ead79f0f6f51f6acddff8d643b33",onClick:this.onPrizeItemClick.bind(this)},a("img",{key:"48d183f869c50e4f64a1188d71491c9ca3558a1b",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),a("div",{key:"83a7e2cde389dea40d68e757d3d53f03a396834d",class:"s-loyalty-prize-item-title"},this.item.name),a("div",{key:"5c2062ce52d39eb7a68b32f25ea9082e94a5ccb4",class:"s-loyalty-prize-item-subtitle"},this.item.description),a("div",{key:"9b1a68ab595dd46bf2fd17ec815e98abf5bdbc05",class:"s-loyalty-prize-item-points"},this.item.cost_points," Points")))};return e}());d.style=c}}}));
5
+ //# sourceMappingURL=p-3f2155c2.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 t,g as i}from"./p-DBjISX91.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-aed8b40e.entry.js.map
4
+ import{r as s,h as t,g as i}from"./p-DhlOpBvy.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-43c180a5.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,a,i,e){function n(t){return t instanceof i?t:new i((function(a){a(t)}))}return new(i||(i=Promise))((function(i,r){function s(t){try{l(e.next(t))}catch(t){r(t)}}function o(t){try{l(e["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):n(t.value).then(s,o)}l((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(a){return l([t,a])}}function l(o){if(e)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(i=0)),i)try{if(e=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=a.call(t,i)}catch(t){o=[6,t];n=0}finally{e=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DBUHNa40.system.js"],(function(t){"use strict";var a,i,e,n;return{setters:[function(t){a=t.r;i=t.h;e=t.H;n=t.g}],execute:function(){var r="salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:-ms-flexbox;display:flex;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";var s=t("salla_installment",function(){function t(t){a(this,t);this.tabbyBorderRemoved=false;this.tabbyRemoveBorderTries=0;this.language=salla.config.get("user.language_code");this.currency=salla.config.get("user.currency_code");this.country=salla.config.get("user.country_code");this.installment_sheria_text=function(t,a){return salla.lang.get(t,a)}}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a;var i=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();return[4,salla.lang.onLoaded()];case 2:e.sent();this.currency=salla.config.get("user.currency_code")||"SAR";this.language=salla.config.get("user.language_code")||"ar";this.country=salla.config.get("user.country_code")||"SA";t=[{key:"pages.products.installments",installments:3},{key:"pages.products.installments_emkan",installments:5}];t.forEach((function(t){i.installment_sheria_text(t.key,{payment:salla.money(parseFloat(i.price)),amount:salla.money((parseFloat(i.price)/t.installments).toFixed(2)).replace(/\.00$/,""),installments:t.installments})}));a=salla.config.get("store.settings.installments");if(a){this.tamaraIsActive=a.tamara;this.tabbyIsActive=a.tabby;this.spotiiIsActive=a.spotii;this.mispayActive=a.mispay;this.emkanIsActive=a.emkan;this.madfuActive=a.madfu;this.rajehiIsActive=a.mokafaa_alrajhi}salla.event.on("product::price.updated",(function(t){var a=t.data;if(!a.price||a.price==i.price){return}i.price=a.price;i.renderInstallments(true)}));return[2]}}))}))};t.prototype.componentDidLoad=function(){this.renderInstallments()};t.prototype.render=function(){var t;var a=this.currency==="SAR";if(!this.isValidPrice(this.price)){return""}return i(e,null,this.tamaraIsActive&&(((t=this.tamaraIsActive)===null||t===void 0?void 0:t.publicKey)?i("div",{class:"mb-5"},i("tamara-widget",{type:"tamara-summary","inline-type":"2",amount:this.price})):i("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"})),this.tabbyIsActive?i("div",{id:"tabbyPromoWrapper"},i("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?i("div",{class:"spotii-wrapper"},i("div",{class:"spotii-promo"})):"",this.shouldShowMispay()&&(this.mispayActive.publicKey?i("div",{class:"mb-5"},i("mispay-widget",{amount:this.price,lang:this.language})):i("div",{class:"s-installment-mispay-wrapper"},i("div",{class:"s-installment-mispay-content"},i("img",{src:salla.url.cdn("images/payment/png/mispay.png"),alt:"mispay"}),i("span",{class:"s-installment-mispay-content-text",innerHTML:this.installment_sheria_text("pages.products.installments",{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/4).toFixed(2)),installments:4})})))),this.emkanIsActive&&this.currency==="SAR"?i("div",{class:"s-installment-emkan-wrapper"},i("div",{class:"s-installment-emkan-content"},i("img",{src:salla.url.cdn("images/payment/png/emkan.png"),alt:"emkan"}),i("span",{class:"s-installment-emkan-content-text",innerHTML:this.installment_sheria_text("pages.products.installments_emkan",{payment:salla.money(parseFloat(this.price)),installments:5})}))):"",this.madfuActive&&this.currency==="SAR"?i("div",{class:"s-installment-madfu-wrapper"},i("div",{class:"s-installment-madfu-content"},i("img",{src:salla.url.cdn("images/payment/png/madfu.png"),alt:"madfu"}),i("span",{class:"s-installment-madfu-content-text"},salla.lang.get("pages.products.installments_madfu")))):"",a&&this.rajehiIsActive?i("div",{class:"s-installment-rajehi-wrapper"},i("div",{class:"s-installment-rajehi-content"},i("img",{src:salla.url.cdn("images/payment/png/mokafaa_alrajhi_loyalty.png"),alt:"mokafaa_alrajhi_loyalty"}),i("span",{class:"s-installment-rajehi-content-text"},salla.lang.get("pages.products.rajahi_earn_points",{points:Math.floor(+this.price*this.rajehiIsActive.pointsPerRiyal)})))):"")};t.prototype.renderInstallments=function(t){var a=this;if(t===void 0){t=false}if(!this.isValidPrice(this.price)){return}if(this.tamaraIsActive){this.loadTamara({isUpdating:t})}if(this.tabbyIsActive){if(t){var i=this.host.querySelector("#tabbyPromoWrapper");if(i){i.remove()}var e=document.createElement("div");e.setAttribute("id","tabbyPromoWrapper");var n=document.createElement("div");n.setAttribute("id","tabbyPromo");e.appendChild(n);this.host.appendChild(e);var r=document.querySelector('script[src="https://checkout.tabby.ai/tabby-promo.js"]');if(r){r.remove()}}var s=document.createElement("script");s.setAttribute("src","https://checkout.tabby.ai/tabby-promo.js");document.head.appendChild(s);s.onload=function(){var t=window.TabbyPromo;new t({selector:"#tabbyPromo",currency:a.currency,price:a.price,lang:a.language,publicKey:salla.config.get("store.settings.installments.tabby.publicKey"),merchantCode:salla.config.get("store.settings.installments.tabby.merchantCode")});document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))};this.removeTabbyBorder()}if(this.spotiiIsActive){if(t){var o=this.host.querySelector(".spotii-wrapper");if(o){o.remove()}var l=document.createElement("div");l.classList.add("spotii-wrapper");var p=document.createElement("div");p.classList.add("spotii-promo");l.appendChild(p);this.host.appendChild(l);var m=document.querySelector('script[src="'+salla.url.cdn("js/price-widget-ar-salla.js")+'"]');if(m){m.remove()}}var c=salla.money((Number(this.price)/3).toFixed(2),false);var d=salla.config.get("theme.is_rtl",true);window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],numberOfPayment:3,currency:this.currency,templateLine:"${textOne} ${number} ${textTwo} "+c+"${logo} ${info}",textOne:d?"جزء الدفع على":"Split it into",textTwo:d?"أقساط متساوية بدون تكاليف اضافية بقيمة":"payments of",textThree:"مع",price:this.price};var b=document.createElement("script");b.setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js"));document.head.appendChild(b)}if(this.shouldShowMispay()&&this.mispayActive.publicKey){this.loadExternalScript({position:"head",src:"https://widget.mispay.co/v1/sdk.js?authorize=".concat(this.mispayActive.publicKey)})}};t.prototype.isValidPrice=function(t){var a=/^\d+(\.\d{1,2})?$/;var i=a.test(t);var e=parseFloat(t)>0;return i&&e};t.prototype.loadExternalScript=function(t){var a=t.src,i=t.onLoad,e=t.position;var n=document.createElement("script");n.src=a;n.onload=i;document[e].appendChild(n)};t.prototype.loadTamara=function(t){var a=this;var i=t.isUpdating;var e,n;var r=!!((e=this.tamaraIsActive)===null||e===void 0?void 0:e.publicKey);if(i){setTimeout((function(){var t,a;if(r){return(t=window.TamaraWidgetV2)===null||t===void 0?void 0:t.refresh()}(a=window.TamaraProductWidget)===null||a===void 0?void 0:a.render()}),300)}else{if(r){var s=salla.config.get("user.language_code");var o=["ar","en"].includes(s)?s:"ar";var l=(n=this.currency)===null||n===void 0?void 0:n.slice(0,-1);var p=["SA","AE","KW","BH","OM","QA"].includes(l)?l:null;if(!p){console.error("Tamara: Country code is not supported",l)}else{window.tamaraWidgetConfig={lang:o,country:p,publicKey:this.tamaraIsActive.publicKey,style:{fontSize:"14px"}};this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget-v2/tamara-widget.js"})}}else{this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget/product-widget.min.js",onLoad:function(){window.TamaraProductWidget.init({lang:a.language});setTimeout((function(){window.TamaraProductWidget.render()}),300)}})}}};t.prototype.shouldShowMispay=function(){return this.currency==="SAR"&&this.mispayActive};t.prototype.removeTabbyBorder=function(){var t=this;if(this.tabbyBorderRemoved||this.tabbyRemoveBorderTries>5){return}this.tabbyRemoveBorderTries++;setTimeout((function(){var a=document.querySelector("#tabbyPromo>div>div");a=a&&a.shadowRoot?a.shadowRoot.querySelector('div[class^="styles__tabby-promo-snippet--"]'):null;if(a){a.style="border: none; margin: 15px 0!important;";t.tabbyBorderRemoved=true}else{t.removeTabbyBorder()}}),this.tabbyRemoveBorderTries*500)};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());s.style=r}}}));
5
- //# sourceMappingURL=p-51f3e89d.system.entry.js.map
4
+ */System.register(["./p-CdqPLiJf.system.js"],(function(t){"use strict";var a,i,e,n;return{setters:[function(t){a=t.r;i=t.h;e=t.H;n=t.g}],execute:function(){var r="salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:-ms-flexbox;display:flex;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";var s=t("salla_installment",function(){function t(t){a(this,t);this.tabbyBorderRemoved=false;this.tabbyRemoveBorderTries=0;this.language=salla.config.get("user.language_code");this.currency=salla.config.get("user.currency_code");this.country=salla.config.get("user.country_code");this.installment_sheria_text=function(t,a){return salla.lang.get(t,a)}}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a;var i=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();return[4,salla.lang.onLoaded()];case 2:e.sent();this.currency=salla.config.get("user.currency_code")||"SAR";this.language=salla.config.get("user.language_code")||"ar";this.country=salla.config.get("user.country_code")||"SA";t=[{key:"pages.products.installments",installments:3},{key:"pages.products.installments_emkan",installments:5}];t.forEach((function(t){i.installment_sheria_text(t.key,{payment:salla.money(parseFloat(i.price)),amount:salla.money((parseFloat(i.price)/t.installments).toFixed(2)).replace(/\.00$/,""),installments:t.installments})}));a=salla.config.get("store.settings.installments");if(a){this.tamaraIsActive=a.tamara;this.tabbyIsActive=a.tabby;this.spotiiIsActive=a.spotii;this.mispayActive=a.mispay;this.emkanIsActive=a.emkan;this.madfuActive=a.madfu;this.rajehiIsActive=a.mokafaa_alrajhi}salla.event.on("product::price.updated",(function(t){var a=t.data;if(!a.price||a.price==i.price){return}i.price=a.price;i.renderInstallments(true)}));return[2]}}))}))};t.prototype.componentDidLoad=function(){this.renderInstallments()};t.prototype.render=function(){var t;var a=this.currency==="SAR";if(!this.isValidPrice(this.price)){return""}return i(e,null,this.tamaraIsActive&&(((t=this.tamaraIsActive)===null||t===void 0?void 0:t.publicKey)?i("div",{class:"mb-5"},i("tamara-widget",{type:"tamara-summary","inline-type":"2",amount:this.price})):i("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"})),this.tabbyIsActive?i("div",{id:"tabbyPromoWrapper"},i("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?i("div",{class:"spotii-wrapper"},i("div",{class:"spotii-promo"})):"",this.shouldShowMispay()&&(this.mispayActive.publicKey?i("div",{class:"mb-5"},i("mispay-widget",{amount:this.price,lang:this.language})):i("div",{class:"s-installment-mispay-wrapper"},i("div",{class:"s-installment-mispay-content"},i("img",{src:salla.url.cdn("images/payment/png/mispay.png"),alt:"mispay"}),i("span",{class:"s-installment-mispay-content-text",innerHTML:this.installment_sheria_text("pages.products.installments",{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/4).toFixed(2)),installments:4})})))),this.emkanIsActive&&this.currency==="SAR"?i("div",{class:"s-installment-emkan-wrapper"},i("div",{class:"s-installment-emkan-content"},i("img",{src:salla.url.cdn("images/payment/png/emkan.png"),alt:"emkan"}),i("span",{class:"s-installment-emkan-content-text",innerHTML:this.installment_sheria_text("pages.products.installments_emkan",{payment:salla.money(parseFloat(this.price)),installments:5})}))):"",this.madfuActive&&this.currency==="SAR"?i("div",{class:"s-installment-madfu-wrapper"},i("div",{class:"s-installment-madfu-content"},i("img",{src:salla.url.cdn("images/payment/png/madfu.png"),alt:"madfu"}),i("span",{class:"s-installment-madfu-content-text"},salla.lang.get("pages.products.installments_madfu")))):"",a&&this.rajehiIsActive?i("div",{class:"s-installment-rajehi-wrapper"},i("div",{class:"s-installment-rajehi-content"},i("img",{src:salla.url.cdn("images/payment/png/mokafaa_alrajhi_loyalty.png"),alt:"mokafaa_alrajhi_loyalty"}),i("span",{class:"s-installment-rajehi-content-text"},salla.lang.get("pages.products.rajahi_earn_points",{points:Math.floor(+this.price*this.rajehiIsActive.pointsPerRiyal)})))):"")};t.prototype.renderInstallments=function(t){var a=this;if(t===void 0){t=false}if(!this.isValidPrice(this.price)){return}if(this.tamaraIsActive){this.loadTamara({isUpdating:t})}if(this.tabbyIsActive){if(t){var i=this.host.querySelector("#tabbyPromoWrapper");if(i){i.remove()}var e=document.createElement("div");e.setAttribute("id","tabbyPromoWrapper");var n=document.createElement("div");n.setAttribute("id","tabbyPromo");e.appendChild(n);this.host.appendChild(e);var r=document.querySelector('script[src="https://checkout.tabby.ai/tabby-promo.js"]');if(r){r.remove()}}var s=document.createElement("script");s.setAttribute("src","https://checkout.tabby.ai/tabby-promo.js");document.head.appendChild(s);s.onload=function(){var t=window.TabbyPromo;new t({selector:"#tabbyPromo",currency:a.currency,price:a.price,lang:a.language,publicKey:salla.config.get("store.settings.installments.tabby.publicKey"),merchantCode:salla.config.get("store.settings.installments.tabby.merchantCode")});document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))};this.removeTabbyBorder()}if(this.spotiiIsActive){if(t){var o=this.host.querySelector(".spotii-wrapper");if(o){o.remove()}var l=document.createElement("div");l.classList.add("spotii-wrapper");var p=document.createElement("div");p.classList.add("spotii-promo");l.appendChild(p);this.host.appendChild(l);var m=document.querySelector('script[src="'+salla.url.cdn("js/price-widget-ar-salla.js")+'"]');if(m){m.remove()}}var c=salla.money((Number(this.price)/3).toFixed(2),false);var d=salla.config.get("theme.is_rtl",true);window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],numberOfPayment:3,currency:this.currency,templateLine:"${textOne} ${number} ${textTwo} "+c+"${logo} ${info}",textOne:d?"جزء الدفع على":"Split it into",textTwo:d?"أقساط متساوية بدون تكاليف اضافية بقيمة":"payments of",textThree:"مع",price:this.price};var b=document.createElement("script");b.setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js"));document.head.appendChild(b)}if(this.shouldShowMispay()&&this.mispayActive.publicKey){this.loadExternalScript({position:"head",src:"https://widget.mispay.co/v1/sdk.js?authorize=".concat(this.mispayActive.publicKey)})}};t.prototype.isValidPrice=function(t){var a=/^\d+(\.\d{1,2})?$/;var i=a.test(t);var e=parseFloat(t)>0;return i&&e};t.prototype.loadExternalScript=function(t){var a=t.src,i=t.onLoad,e=t.position;var n=document.createElement("script");n.src=a;n.onload=i;document[e].appendChild(n)};t.prototype.loadTamara=function(t){var a=this;var i=t.isUpdating;var e,n;var r=!!((e=this.tamaraIsActive)===null||e===void 0?void 0:e.publicKey);if(i){setTimeout((function(){var t,a;if(r){return(t=window.TamaraWidgetV2)===null||t===void 0?void 0:t.refresh()}(a=window.TamaraProductWidget)===null||a===void 0?void 0:a.render()}),300)}else{if(r){var s=salla.config.get("user.language_code");var o=["ar","en"].includes(s)?s:"ar";var l=(n=this.currency)===null||n===void 0?void 0:n.slice(0,-1);var p=["SA","AE","KW","BH","OM","QA"].includes(l)?l:null;if(!p){console.error("Tamara: Country code is not supported",l)}else{window.tamaraWidgetConfig={lang:o,country:p,publicKey:this.tamaraIsActive.publicKey,style:{fontSize:"14px"}};this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget-v2/tamara-widget.js"})}}else{this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget/product-widget.min.js",onLoad:function(){window.TamaraProductWidget.init({lang:a.language});setTimeout((function(){window.TamaraProductWidget.render()}),300)}})}}};t.prototype.shouldShowMispay=function(){return this.currency==="SAR"&&this.mispayActive};t.prototype.removeTabbyBorder=function(){var t=this;if(this.tabbyBorderRemoved||this.tabbyRemoveBorderTries>5){return}this.tabbyRemoveBorderTries++;setTimeout((function(){var a=document.querySelector("#tabbyPromo>div>div");a=a&&a.shadowRoot?a.shadowRoot.querySelector('div[class^="styles__tabby-promo-snippet--"]'):null;if(a){a.style="border: none; margin: 15px 0!important;";t.tabbyBorderRemoved=true}else{t.removeTabbyBorder()}}),this.tabbyRemoveBorderTries*500)};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());s.style=r}}}));
5
+ //# sourceMappingURL=p-5aa7fc77.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-DBUHNa40.system.js"],(function(t){"use strict";var s,a,i,e;return{setters:[function(t){s=t.r;a=t.h;i=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,a,i;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=((a=t.host.querySelector('[slot="sbc"]'))===null||a===void 0?void 0:a.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=((i=t.host.querySelector('[slot="cod"]'))===null||i===void 0?void 0:i.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 a(i,{key:"8eb29810cf5ec8c04f019fb20255322b6ea79ca5",class:"s-payments-list-wrap"},a("ul",{key:"81ec04a90c0e264ede22152c2c39958662e561f4",class:"s-payments-list"},s&&a("li",{key:"d0ce3eb7586be08a46404846bb2a92cfa5833b1e",class:"s-payments-list-item"},a("img",{key:"4564101a2d5b6d40dd72270188cf44cfa503be35",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"?a("div",{id:"cod-slot",innerHTML:t.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png",58,58))}):a("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&&a("div",{key:"257168fc5a4b539e35c9a2c41974f3e6f2b7bc80",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,a;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();(a=this.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());n.style=l}}}));
5
- //# sourceMappingURL=p-3e1fdfef.system.entry.js.map
4
+ System.register(["./p-CdqPLiJf.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:"8eb29810cf5ec8c04f019fb20255322b6ea79ca5",class:"s-payments-list-wrap"},i("ul",{key:"81ec04a90c0e264ede22152c2c39958662e561f4",class:"s-payments-list"},s&&i("li",{key:"d0ce3eb7586be08a46404846bb2a92cfa5833b1e",class:"s-payments-list-item"},i("img",{key:"4564101a2d5b6d40dd72270188cf44cfa503be35",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:"257168fc5a4b539e35c9a2c41974f3e6f2b7bc80",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-5c462d3a.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 a,H as t,g as l}from"./p-DBjISX91.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-9257dbc2.entry.js.map
4
+ import{r as s,h as a,H as t,g as l}from"./p-DhlOpBvy.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-5cb874e2.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,n,i,e){function r(t){return t instanceof i?t:new i((function(n){n(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{u(e.next(t))}catch(t){o(t)}}function a(t){try{u(e["throw"](t))}catch(t){o(t)}}function u(t){t.done?i(t.value):r(t.value).then(s,a)}u((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(n){return u([t,n])}}function u(a){if(e)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(e=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=n.call(t,i)}catch(t){a=[6,t];r=0}finally{e=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-DBUHNa40.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,i,e,r;return{setters:[function(t){n=t.r;i=t.h;e=t.g},function(t){r=t.H},null],execute:function(){var o="";var s=t("salla_notifications",function(){function t(t){var i=this;n(this,t);this.itemPerPage=10;this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");this.load_more_text_trans=salla.lang.get("common.elements.load_more");salla.lang.onLoaded((function(){i.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");i.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var n;var i=(n=this.status)===null||n===void 0?void 0:n.querySelector(".s-button-text");if(i){r.toggleElementClassIf(i,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.getNotificationCard=function(t){var n=document.createElement("salla-notification-item");n.notification=t;n.classList.add("s-block");return n};t.prototype.render=function(){var t=this;var n;if(this.showPlaceholder){return i("div",{class:"s-notifications-no-content"},i("salla-placeholder",{alignment:"center"},i("span",{slot:"title"},this.no_notifications_trans)))}return i("div",{class:"s-notifications-wrapper"},i("div",{class:"s-notifications-container",ref:function(n){return t.wrapper=n}}),this.nextPage&&i("div",{class:"s-infinite-scroll-wrapper",ref:function(n){return t.status=n}},i("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},i("span",{class:"s-button-text s-infinite-scroll-btn-text"},(n=this.loadMoreText)!==null&&n!==void 0?n:this.load_more_text_trans),i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(n){return t.btnLoader=n},style:{display:"none"}}))))};t.prototype.handleResponse=function(t){var n=this;return t.map((function(t){return n.getNotificationCard(t)}))};t.prototype.initiateInfiniteScroll=function(){var t=this;var n,i,e;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:true,nextPage:this.nextPage,scrollThreshold:false},true);(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("request",(function(n){t.loading()}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(function(n){var i;t.loading(false);t.pagination=n.pagination;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));var e=t.host.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(e)}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.api.notifications.fetch({per_page:this.itemPerPage}).then((function(n){var i;t.pagination=n.pagination;t.total=n.pagination.total;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;setTimeout((function(){if(!n.data.length){return t.showPlaceholder=true}t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));t.initiateInfiniteScroll();var i=t.wrapper.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(i)}),100)})).catch((function(n){salla.logger.error(n);t.showPlaceholder=true;t.loading(false)}))];case 1:n.sent();return[2]}}))}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage();return[2]}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.loadInitialData()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());s.style=o}}}));
5
- //# sourceMappingURL=p-e7e1456e.system.entry.js.map
4
+ */System.register(["./p-CdqPLiJf.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,i,e,r;return{setters:[function(t){n=t.r;i=t.h;e=t.g},function(t){r=t.H},null],execute:function(){var o="";var s=t("salla_notifications",function(){function t(t){var i=this;n(this,t);this.itemPerPage=10;this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");this.load_more_text_trans=salla.lang.get("common.elements.load_more");salla.lang.onLoaded((function(){i.no_notifications_trans=salla.lang.get("blocks.header.no_notifications");i.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var n;var i=(n=this.status)===null||n===void 0?void 0:n.querySelector(".s-button-text");if(i){r.toggleElementClassIf(i,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.getNotificationCard=function(t){var n=document.createElement("salla-notification-item");n.notification=t;n.classList.add("s-block");return n};t.prototype.render=function(){var t=this;var n;if(this.showPlaceholder){return i("div",{class:"s-notifications-no-content"},i("salla-placeholder",{alignment:"center"},i("span",{slot:"title"},this.no_notifications_trans)))}return i("div",{class:"s-notifications-wrapper"},i("div",{class:"s-notifications-container",ref:function(n){return t.wrapper=n}}),this.nextPage&&i("div",{class:"s-infinite-scroll-wrapper",ref:function(n){return t.status=n}},i("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},i("span",{class:"s-button-text s-infinite-scroll-btn-text"},(n=this.loadMoreText)!==null&&n!==void 0?n:this.load_more_text_trans),i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(n){return t.btnLoader=n},style:{display:"none"}}))))};t.prototype.handleResponse=function(t){var n=this;return t.map((function(t){return n.getNotificationCard(t)}))};t.prototype.initiateInfiniteScroll=function(){var t=this;var n,i,e;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:true,nextPage:this.nextPage,scrollThreshold:false},true);(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("request",(function(n){t.loading()}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(function(n){var i;t.loading(false);t.pagination=n.pagination;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));var e=t.host.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(e)}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.api.notifications.fetch({per_page:this.itemPerPage}).then((function(n){var i;t.pagination=n.pagination;t.total=n.pagination.total;t.nextPage=((i=n.pagination.links)===null||i===void 0?void 0:i.next)||null;setTimeout((function(){if(!n.data.length){return t.showPlaceholder=true}t.handleResponse(n.data).forEach((function(n){return t.wrapper.append(n)}));t.initiateInfiniteScroll();var i=t.wrapper.querySelectorAll("salla-notification-item:not(.animated)");r.animateItems(i)}),100)})).catch((function(n){salla.logger.error(n);t.showPlaceholder=true;t.loading(false)}))];case 1:n.sent();return[2]}}))}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage();return[2]}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.loadInitialData()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());s.style=o}}}));
5
+ //# sourceMappingURL=p-5fcda4de.system.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-DTzyYjVY.system.js","sources":["src/components/salla-review-card/salla-review-card.css?tag=salla-review-card","src/components/salla-review-card/salla-review-card.tsx"],"sourcesContent":[":host {\n display: block\n}\n\n","import { Component, h, Element, State, Prop } from \"@stencil/core\";\nimport type { Review } from \"./interfaces\";\nimport IconVerified from '../../assets/svg/check.svg'\nimport IconStar2 from '../../assets/svg/star-02.svg'\nimport IconStar2Muted from '../../assets/svg/star-02-muted.svg'\nimport IconFire2 from '../../assets/svg/fire-02.svg'\n\ninterface SwipeEvent {\n x: number;\n y: number;\n}\n\n@Component({\n tag: \"salla-review-card\",\n styleUrl: \"salla-review-card.css\",\n})\nexport class SallaReviewCard {\n @Element() el!: HTMLElement;\n @Prop() review: Partial<Review>;\n @State() currentSlide = 0;\n @State() purchasedCount: string\n @State() showPurchaseCount = false;\n\n private startPoint: SwipeEvent = { x: 0, y: 0 };\n private isSwiping = false;\n private sliderElement?: HTMLElement;\n private isRTL = \"rtl\"\n\n async componentDidLoad() {\n await salla.onReady()\n\n this.showPurchaseCount = !!salla.config.get('store.settings.product.total_sold_enabled', false);\n this.isRTL = salla.config.get('theme.is_rtl', true)\n\n this.purchasedCount = salla.lang.getWithDefault('blocks.home.reviews.purchased_count',\n this.isRTL ? ` تم شراءه ${this.review.product?.sold_quantity} مرة`\n : `Purchased ${this.review.product.sold_quantity} times`,\n { count: this.review.product?.sold_quantity })\n\n this.initializeSlider();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n private get images(): Review[\"product\"][\"images\"] {\n const { review } = this;\n return review?.images?.length > 1\n ? review.images.map((image, idx) => ({ url: image, alt: '', id: idx }))\n : review?.product?.images || []\n }\n\n private get hasMultipleImages(): boolean {\n return this.images.length > 1;\n }\n\n private get slideTransform(): string {\n const direction = this.isRTL ? 1 : -1;\n return `translateX(${this.currentSlide * 100 * direction}%)`;\n }\n\n private initializeSlider() {\n if (!this.hasMultipleImages) return;\n\n this.sliderElement = this.el.querySelector(\".s-review-card-slider-container\") as HTMLElement;\n if (!this.sliderElement) return;\n\n // Enable pointer events and set touch-action\n this.sliderElement.style.touchAction = 'pan-y pinch-zoom';\n this.addEventListeners();\n }\n\n private addEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.addEventListener(\"pointerdown\", this.handlePointerDown, { passive: false });\n this.sliderElement.addEventListener(\"pointermove\", this.handlePointerMove, { passive: false });\n this.sliderElement.addEventListener(\"pointerup\", this.handlePointerUp, { passive: true });\n this.sliderElement.addEventListener(\"pointercancel\", this.handlePointerCancel, { passive: true });\n }\n\n private removeEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.removeEventListener(\"pointerdown\", this.handlePointerDown);\n this.sliderElement.removeEventListener(\"pointermove\", this.handlePointerMove);\n this.sliderElement.removeEventListener(\"pointerup\", this.handlePointerUp);\n this.sliderElement.removeEventListener(\"pointercancel\", this.handlePointerCancel);\n }\n\n private handlePointerDown = (e: PointerEvent) => {\n // Only handle primary pointer (first touch/mouse)\n if (!e.isPrimary) return;\n\n this.sliderElement?.setPointerCapture(e.pointerId);\n\n this.startSwipe(e.clientX, e.clientY);\n e.preventDefault();\n };\n\n private handlePointerMove = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n e.preventDefault();\n };\n\n private handlePointerUp = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.endSwipe(e.clientX, e.clientY);\n };\n\n private handlePointerCancel = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.isSwiping = false;\n };\n\n private startSwipe(x: number, y: number) {\n this.startPoint = { x, y };\n this.isSwiping = true;\n }\n\n componentDidRender() {\n this.removeEventListeners()\n this.addEventListeners();\n }\n\n private endSwipe(x: number, y: number) {\n this.isSwiping = false;\n const dx = x - this.startPoint.x;\n const dy = y - this.startPoint.y;\n this.processSwipe(dx, dy);\n }\n\n private processSwipe(dx: number, dy: number) {\n const MIN_SWIPE_DISTANCE = 10;\n\n if (Math.abs(dx) < MIN_SWIPE_DISTANCE || Math.abs(dy) > Math.abs(dx)) return;\n\n const isLeftSwipe = dx < 0;\n const shouldGoNext = this.isRTL ? !isLeftSwipe : isLeftSwipe;\n\n if (shouldGoNext) {\n this.goToNextSlide();\n } else {\n this.goToPrevSlide();\n }\n }\n\n private goToNextSlide() {\n if (this.currentSlide < this.images.length - 1) {\n this.currentSlide++;\n }\n }\n\n private goToPrevSlide() {\n if (this.currentSlide > 0) {\n this.currentSlide--;\n }\n }\n\n private goToSlide = (index: number) => {\n this.currentSlide = Math.max(0, Math.min(index, this.images.length - 1));\n };\n\n private renderStars() {\n return Array(5)\n .fill(null)\n .map((_, index) => <span key={index} innerHTML={this.review.stars >= index + 1 ? IconStar2 : IconStar2Muted} />);\n }\n\n private renderDots() {\n return this.images.map(({ url }, index) => (\n <button\n key={url || index}\n type=\"button\"\n class={`s-review-card-slider-dot ${this.currentSlide === index ? \"active\" : \"\"}`}\n onClick={() => this.goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n onPointerDown={() => this.goToSlide(index)}\n />\n ));\n }\n\n private renderSlider() {\n if (!this.hasMultipleImages) return null;\n\n return (\n <div class=\"s-review-card-slider-container\">\n <div class=\"s-review-card-slides\" style={{ transform: this.slideTransform }}>\n {this.images.map((image) => (\n <div key={image?.id} class=\"s-review-card-slider-slide\">\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n width={275}\n height={275}\n loading=\"lazy\"\n draggable={false}\n />\n </div>\n ))}\n </div>\n <div class=\"s-review-card-slider-dots\">{this.renderDots()}</div>\n </div>\n );\n }\n\n private renderSingleImage() {\n const image = this.review?.product?.image;\n if (!image || this.hasMultipleImages) return null;\n\n return (\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n class=\"s-review-card-image\"\n width={275}\n height={275}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n\n );\n }\n\n private renderHeader() {\n return (\n <div class=\"s-review-card-header\">\n <div class=\"s-review-card-reviewer-name\">\n <p>{this.review?.name}</p>\n {this.review?.has_order && <span class=\"s-review-card-verified-icon\" innerHTML={IconVerified} />}\n </div>\n <div class=\"s-review-card-stars\">{this.renderStars()}</div>\n </div>\n );\n }\n\n private renderProductInfo() {\n const product = this.review?.product;\n if (!product) return null;\n\n return (\n <a href={this.review?.product?.url} class=\"s-review-card-product-container\">\n <img\n alt={product.image?.alt || \"Product\"}\n src={product.image?.url}\n class=\"s-review-card-product-image\"\n width={60}\n height={60}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n <div class=\"s-review-card-product-details\">\n <p class=\"s-review-card-product-details-name\">{product.name}</p>\n {this.showPurchaseCount ? <p class=\"s-review-card-product-details-purchase-count\">\n <span innerHTML={IconFire2} />\n {this.purchasedCount}\n </p> : null}\n </div>\n </a>\n );\n }\n\n render() {\n return <div class=\"s-review-card-container\">\n {this.renderSlider()}\n {this.renderSingleImage()}\n {renderDivider()}\n <div class=\"s-review-card-content\">\n {this.renderHeader()}\n <p\n class=\"s-review-card-review-content\"\n innerHTML={this.review?.content}\n />\n {renderDivider()}\n {this.renderProductInfo()}\n </div>\n </div>\n }\n}\n\nconst renderDivider = (className?: string) => (\n <div class={`s-review-card-divider ${className || \"\"}`} />\n)"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA,MAAM,kBAAkB,GAAG,sBAAsB;;wBCgBpC,eAAe,gCAAA,MAAA;kBAJ5B,IAAA,WAAA,CAAA,OAAA,EAAA;;kBAOW,QAAA,IAAY,CAAA,YAAA,GAAG,CAAC;kBAEhB,QAAA,IAAiB,CAAA,iBAAA,GAAG,KAAK;kBAE1B,QAAA,IAAU,CAAA,UAAA,GAAe,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;kBACvC,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;kBAEjB,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;kBAiEb,QAAA,IAAA,CAAA,i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AC,cAAc,CAClB,GAAG,IAAI,CACP,CACJ;;sBAIR,MAAM,GAAA;;0BACJ,OAAO,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,yBAAyB,EAAA,EACxC,IAAI,CAAC,YAAY,EAAE,EACnB,IAAI,CAAC,iBAAiB,EAAE,EACxB,aAAa,EAAE,EAChB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,uBAAuB,EAAA,EAC/B,IAAI,CAAC,YAAY,EAAE,EACpB,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,8BAA8B,EACpC,SAAS,EAAE,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,OAAO,EAC/B,CAAA,EACD,aAAa,EAAE,EACf,IAAI,CAAC,iBAAiB,EAAE,CACrB,CACF;;;;kBAIV,MAAM,aAAa,GAAG,CAAC,SAAkB,MACvC,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,CAAA,sBAAA,EAAsC,EAAE,CAAE,CAAA,EAAA,CAAI,CAC3D;;;;;;;;;"}
1
+ {"version":3,"file":"p-5rmT0SDW.system.js","sources":["src/components/salla-review-card/salla-review-card.css?tag=salla-review-card","src/components/salla-review-card/salla-review-card.tsx"],"sourcesContent":[":host {\n display: block\n}\n\n","import { Component, h, Element, State, Prop } from \"@stencil/core\";\nimport type { Review } from \"./interfaces\";\nimport IconVerified from '../../assets/svg/check.svg'\nimport IconStar2 from '../../assets/svg/star-02.svg'\nimport IconStar2Muted from '../../assets/svg/star-02-muted.svg'\nimport IconFire2 from '../../assets/svg/fire-02.svg'\n\ninterface SwipeEvent {\n x: number;\n y: number;\n}\n\n@Component({\n tag: \"salla-review-card\",\n styleUrl: \"salla-review-card.css\",\n})\nexport class SallaReviewCard {\n @Element() el!: HTMLElement;\n @Prop() review: Partial<Review>;\n @State() currentSlide = 0;\n @State() purchasedCount: string\n @State() showPurchaseCount = false;\n\n private startPoint: SwipeEvent = { x: 0, y: 0 };\n private isSwiping = false;\n private sliderElement?: HTMLElement;\n private isRTL = \"rtl\"\n\n async componentDidLoad() {\n await salla.onReady()\n\n this.showPurchaseCount = !!salla.config.get('store.settings.product.total_sold_enabled', false);\n this.isRTL = salla.config.get('theme.is_rtl', true)\n\n this.purchasedCount = salla.lang.getWithDefault('blocks.home.reviews.purchased_count',\n this.isRTL ? ` تم شراءه ${this.review.product?.sold_quantity} مرة`\n : `Purchased ${this.review.product.sold_quantity} times`,\n { count: this.review.product?.sold_quantity })\n\n this.initializeSlider();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n private get images(): Review[\"product\"][\"images\"] {\n const { review } = this;\n return review?.images?.length > 1\n ? review.images.map((image, idx) => ({ url: image, alt: '', id: idx }))\n : review?.product?.images || []\n }\n\n private get hasMultipleImages(): boolean {\n return this.images.length > 1;\n }\n\n private get slideTransform(): string {\n const direction = this.isRTL ? 1 : -1;\n return `translateX(${this.currentSlide * 100 * direction}%)`;\n }\n\n private initializeSlider() {\n if (!this.hasMultipleImages) return;\n\n this.sliderElement = this.el.querySelector(\".s-review-card-slider-container\") as HTMLElement;\n if (!this.sliderElement) return;\n\n // Enable pointer events and set touch-action\n this.sliderElement.style.touchAction = 'pan-y pinch-zoom';\n this.addEventListeners();\n }\n\n private addEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.addEventListener(\"pointerdown\", this.handlePointerDown, { passive: false });\n this.sliderElement.addEventListener(\"pointermove\", this.handlePointerMove, { passive: false });\n this.sliderElement.addEventListener(\"pointerup\", this.handlePointerUp, { passive: true });\n this.sliderElement.addEventListener(\"pointercancel\", this.handlePointerCancel, { passive: true });\n }\n\n private removeEventListeners() {\n if (!this.sliderElement) return;\n\n this.sliderElement.removeEventListener(\"pointerdown\", this.handlePointerDown);\n this.sliderElement.removeEventListener(\"pointermove\", this.handlePointerMove);\n this.sliderElement.removeEventListener(\"pointerup\", this.handlePointerUp);\n this.sliderElement.removeEventListener(\"pointercancel\", this.handlePointerCancel);\n }\n\n private handlePointerDown = (e: PointerEvent) => {\n // Only handle primary pointer (first touch/mouse)\n if (!e.isPrimary) return;\n\n this.sliderElement?.setPointerCapture(e.pointerId);\n\n this.startSwipe(e.clientX, e.clientY);\n e.preventDefault();\n };\n\n private handlePointerMove = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n e.preventDefault();\n };\n\n private handlePointerUp = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.endSwipe(e.clientX, e.clientY);\n };\n\n private handlePointerCancel = (e: PointerEvent) => {\n if (!this.isSwiping || !e.isPrimary) return;\n\n this.sliderElement?.releasePointerCapture(e.pointerId);\n\n this.isSwiping = false;\n };\n\n private startSwipe(x: number, y: number) {\n this.startPoint = { x, y };\n this.isSwiping = true;\n }\n\n componentDidRender() {\n this.removeEventListeners()\n this.addEventListeners();\n }\n\n private endSwipe(x: number, y: number) {\n this.isSwiping = false;\n const dx = x - this.startPoint.x;\n const dy = y - this.startPoint.y;\n this.processSwipe(dx, dy);\n }\n\n private processSwipe(dx: number, dy: number) {\n const MIN_SWIPE_DISTANCE = 10;\n\n if (Math.abs(dx) < MIN_SWIPE_DISTANCE || Math.abs(dy) > Math.abs(dx)) return;\n\n const isLeftSwipe = dx < 0;\n const shouldGoNext = this.isRTL ? !isLeftSwipe : isLeftSwipe;\n\n if (shouldGoNext) {\n this.goToNextSlide();\n } else {\n this.goToPrevSlide();\n }\n }\n\n private goToNextSlide() {\n if (this.currentSlide < this.images.length - 1) {\n this.currentSlide++;\n }\n }\n\n private goToPrevSlide() {\n if (this.currentSlide > 0) {\n this.currentSlide--;\n }\n }\n\n private goToSlide = (index: number) => {\n this.currentSlide = Math.max(0, Math.min(index, this.images.length - 1));\n };\n\n private renderStars() {\n return Array(5)\n .fill(null)\n .map((_, index) => <span key={index} innerHTML={this.review.stars >= index + 1 ? IconStar2 : IconStar2Muted} />);\n }\n\n private renderDots() {\n return this.images.map(({ url }, index) => (\n <button\n key={url || index}\n type=\"button\"\n class={`s-review-card-slider-dot ${this.currentSlide === index ? \"active\" : \"\"}`}\n onClick={() => this.goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n onPointerDown={() => this.goToSlide(index)}\n />\n ));\n }\n\n private renderSlider() {\n if (!this.hasMultipleImages) return null;\n\n return (\n <div class=\"s-review-card-slider-container\">\n <div class=\"s-review-card-slides\" style={{ transform: this.slideTransform }}>\n {this.images.map((image) => (\n <div key={image?.id} class=\"s-review-card-slider-slide\">\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n width={275}\n height={275}\n loading=\"lazy\"\n draggable={false}\n />\n </div>\n ))}\n </div>\n <div class=\"s-review-card-slider-dots\">{this.renderDots()}</div>\n </div>\n );\n }\n\n private renderSingleImage() {\n const image = this.review?.product?.image;\n if (!image || this.hasMultipleImages) return null;\n\n return (\n <img\n src={image.url}\n alt={image.alt || \"Product image\"}\n class=\"s-review-card-image\"\n width={275}\n height={275}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n\n );\n }\n\n private renderHeader() {\n return (\n <div class=\"s-review-card-header\">\n <div class=\"s-review-card-reviewer-name\">\n <p>{this.review?.name}</p>\n {this.review?.has_order && <span class=\"s-review-card-verified-icon\" innerHTML={IconVerified} />}\n </div>\n <div class=\"s-review-card-stars\">{this.renderStars()}</div>\n </div>\n );\n }\n\n private renderProductInfo() {\n const product = this.review?.product;\n if (!product) return null;\n\n return (\n <a href={this.review?.product?.url} class=\"s-review-card-product-container\">\n <img\n alt={product.image?.alt || \"Product\"}\n src={product.image?.url}\n class=\"s-review-card-product-image\"\n width={60}\n height={60}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n <div class=\"s-review-card-product-details\">\n <p class=\"s-review-card-product-details-name\">{product.name}</p>\n {this.showPurchaseCount ? <p class=\"s-review-card-product-details-purchase-count\">\n <span innerHTML={IconFire2} />\n {this.purchasedCount}\n </p> : null}\n </div>\n </a>\n );\n }\n\n render() {\n return <div class=\"s-review-card-container\">\n {this.renderSlider()}\n {this.renderSingleImage()}\n {renderDivider()}\n <div class=\"s-review-card-content\">\n {this.renderHeader()}\n <p\n class=\"s-review-card-review-content\"\n innerHTML={this.review?.content}\n />\n {renderDivider()}\n {this.renderProductInfo()}\n </div>\n </div>\n }\n}\n\nconst renderDivider = (className?: string) => (\n <div class={`s-review-card-divider ${className || \"\"}`} />\n)"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA,MAAM,kBAAkB,GAAG,sBAAsB;;wBCgBpC,eAAe,gCAAA,MAAA;kBAJ5B,IAAA,WAAA,CAAA,OAAA,EAAA;;kBAOW,QAAA,IAAY,CAAA,YAAA,GAAG,CAAC;kBAEhB,QAAA,IAAiB,CAAA,iBAAA,GAAG,KAAK;kBAE1B,QAAA,IAAU,CAAA,UAAA,GAAe,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;kBACvC,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;kBAEjB,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;kBAiEb,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,CAAe,KAAI;;;8BAE9C,IAAI,CAAC,CAAC,CAAC,SAAS;kCAAE;kBAElB,YAAA,CAAA,EAAA,GAAA,IAAI,CAAC,aAAa,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;8BAElD,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC;8BACrC,CAAC,CAAC,cAAc,EAAE;kBACpB,SAAC;kBAEO,QAAA,IAA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