@salla.sa/twilight-components 2.14.259 → 2.14.260

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 (304) hide show
  1. package/dist/cjs/{app-globals-BaW1ktwu.js → app-globals-C-RMRzcr.js} +3 -3
  2. package/dist/cjs/{app-globals-BaW1ktwu.js.map → app-globals-C-RMRzcr.js.map} +1 -1
  3. package/dist/cjs/{index-BUbxVNrN.js → index-Cb0SQNc9.js} +4 -4
  4. package/dist/cjs/index-Cb0SQNc9.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion_4.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  39. package/dist/cjs/twilight.cjs.js +2 -2
  40. package/dist/components/index.js +2 -2
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/esm/{app-globals-wZyXu1Pt.js → app-globals-CYjWTTrt.js} +3 -3
  43. package/dist/esm/{app-globals-wZyXu1Pt.js.map → app-globals-CYjWTTrt.js.map} +1 -1
  44. package/dist/esm/{index-Dr_h0iSH.js → index-DtlYcjlJ.js} +4 -4
  45. package/dist/esm/index-DtlYcjlJ.js.map +1 -0
  46. package/dist/esm/loader.js +3 -3
  47. package/dist/esm/salla-accordion_4.entry.js +1 -1
  48. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  49. package/dist/esm/salla-advertisement.entry.js +1 -1
  50. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  51. package/dist/esm/salla-apps-icons.entry.js +1 -1
  52. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  53. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  54. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  55. package/dist/esm/salla-contacts.entry.js +1 -1
  56. package/dist/esm/salla-filters-widget.entry.js +1 -1
  57. package/dist/esm/salla-filters.entry.js +1 -1
  58. package/dist/esm/salla-installment.entry.js +1 -1
  59. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  60. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  61. package/dist/esm/salla-metadata.entry.js +1 -1
  62. package/dist/esm/salla-notification-item.entry.js +1 -1
  63. package/dist/esm/salla-notifications.entry.js +1 -1
  64. package/dist/esm/salla-offer.entry.js +1 -1
  65. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  66. package/dist/esm/salla-order-details.entry.js +1 -1
  67. package/dist/esm/salla-order-summary.entry.js +1 -1
  68. package/dist/esm/salla-orders.entry.js +1 -1
  69. package/dist/esm/salla-payments.entry.js +1 -1
  70. package/dist/esm/salla-price-range.entry.js +1 -1
  71. package/dist/esm/salla-product-options.entry.js +1 -1
  72. package/dist/esm/salla-review-card.entry.js +1 -1
  73. package/dist/esm/salla-reviews-page.entry.js +1 -1
  74. package/dist/esm/salla-reviews.entry.js +1 -1
  75. package/dist/esm/salla-social.entry.js +1 -1
  76. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  77. package/dist/esm/salla-tooltip.entry.js +1 -1
  78. package/dist/esm/salla-verify.entry.js +1 -1
  79. package/dist/esm/salla-wallet.entry.js +1 -1
  80. package/dist/esm/twilight.js +3 -3
  81. package/dist/esm-es5/{app-globals-wZyXu1Pt.js → app-globals-CYjWTTrt.js} +2 -2
  82. package/dist/esm-es5/{app-globals-wZyXu1Pt.js.map → app-globals-CYjWTTrt.js.map} +1 -1
  83. package/dist/esm-es5/{index-Dr_h0iSH.js → index-DtlYcjlJ.js} +3 -3
  84. package/dist/esm-es5/index-DtlYcjlJ.js.map +1 -0
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/salla-accordion_4.entry.js +1 -1
  87. package/dist/esm-es5/salla-add-product-button_51.entry.js +4 -4
  88. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  89. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  90. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  91. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  92. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  93. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  94. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  95. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  96. package/dist/esm-es5/salla-filters.entry.js +1 -1
  97. package/dist/esm-es5/salla-installment.entry.js +1 -1
  98. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  99. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  100. package/dist/esm-es5/salla-metadata.entry.js +2 -2
  101. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  102. package/dist/esm-es5/salla-notifications.entry.js +2 -2
  103. package/dist/esm-es5/salla-offer.entry.js +1 -1
  104. package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js +1 -1
  105. package/dist/esm-es5/salla-order-details.entry.js +1 -1
  106. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  107. package/dist/esm-es5/salla-orders.entry.js +2 -2
  108. package/dist/esm-es5/salla-payments.entry.js +1 -1
  109. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  110. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  111. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  112. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  113. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  114. package/dist/esm-es5/salla-social.entry.js +1 -1
  115. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  116. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  117. package/dist/esm-es5/salla-verify.entry.js +1 -1
  118. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  119. package/dist/esm-es5/twilight.js +1 -1
  120. package/dist/twilight/{p-B3kEjtyr.system.js.map → p--178guyc.system.js.map} +1 -1
  121. package/dist/twilight/{p-3592b583.system.entry.js → p-007ca6d7.system.entry.js} +2 -2
  122. package/dist/twilight/{p-949a66c1.system.entry.js → p-0259d6cb.system.entry.js} +2 -2
  123. package/dist/twilight/{p-97dde580.system.entry.js → p-0303d452.system.entry.js} +2 -2
  124. package/dist/twilight/{p-d0ab3dbc.system.entry.js → p-04e33bba.system.entry.js} +2 -2
  125. package/dist/twilight/{p-6bde3b47.entry.js → p-099e8eb6.entry.js} +2 -2
  126. package/dist/twilight/{p-c1c17d0b.system.entry.js → p-0ba23365.system.entry.js} +2 -2
  127. package/dist/twilight/{p-e59edbdd.entry.js → p-109f5735.entry.js} +2 -2
  128. package/dist/twilight/{p-cd019bf1.system.entry.js → p-1362c93c.system.entry.js} +2 -2
  129. package/dist/twilight/{p-0769a6e0.entry.js → p-138b8ce7.entry.js} +2 -2
  130. package/dist/twilight/{p-db0cd840.entry.js → p-19061cec.entry.js} +2 -2
  131. package/dist/twilight/{p-ae051ea2.entry.js → p-1b42ce8a.entry.js} +2 -2
  132. package/dist/twilight/{p-d7304e82.entry.js → p-2323e473.entry.js} +2 -2
  133. package/dist/twilight/{p-0e3a43f5.system.entry.js → p-2bb3b70e.system.entry.js} +2 -2
  134. package/dist/twilight/{p-56770d90.system.entry.js → p-36b00bb1.system.entry.js} +3 -3
  135. package/dist/twilight/{p-7ec7d474.entry.js → p-385257e0.entry.js} +2 -2
  136. package/dist/twilight/{p-d52b8ce4.system.entry.js → p-39a319ec.system.entry.js} +2 -2
  137. package/dist/twilight/{p-0a6f1ffb.entry.js → p-3ad485dd.entry.js} +2 -2
  138. package/dist/twilight/{p-e3e75bed.entry.js → p-3ad79104.entry.js} +2 -2
  139. package/dist/twilight/{p-00dfddea.system.entry.js → p-3e960ee9.system.entry.js} +2 -2
  140. package/dist/twilight/{p-6154b6eb.entry.js → p-3f20e330.entry.js} +2 -2
  141. package/dist/twilight/{p-ae7b050f.system.entry.js → p-4cf011a4.system.entry.js} +2 -2
  142. package/dist/twilight/{p-e705ac16.system.entry.js → p-54a5d0ac.system.entry.js} +2 -2
  143. package/dist/twilight/{p-84c3941d.system.entry.js → p-55771cda.system.entry.js} +2 -2
  144. package/dist/twilight/{p-df3f649a.system.entry.js → p-57cfb4b1.system.entry.js} +2 -2
  145. package/dist/twilight/{p-b29ee431.entry.js → p-58768895.entry.js} +2 -2
  146. package/dist/twilight/{p-e5b92338.system.entry.js → p-5cb3dd8e.system.entry.js} +2 -2
  147. package/dist/twilight/{p-c0c81732.system.entry.js → p-5f352ca9.system.entry.js} +2 -2
  148. package/dist/twilight/{p-edbe1cac.system.entry.js → p-66464e8e.system.entry.js} +2 -2
  149. package/dist/twilight/{p-9cc55265.entry.js → p-6a611226.entry.js} +2 -2
  150. package/dist/twilight/{p-89a0da99.entry.js → p-6e1ecf18.entry.js} +2 -2
  151. package/dist/twilight/{p-ceb8da67.system.entry.js → p-7105480a.system.entry.js} +2 -2
  152. package/dist/twilight/{p-15554834.system.entry.js → p-784ee964.system.entry.js} +2 -2
  153. package/dist/twilight/{p-d7ec137d.system.entry.js → p-7dc3a160.system.entry.js} +2 -2
  154. package/dist/twilight/{p-c94aaea0.entry.js → p-7f20c85c.entry.js} +6 -6
  155. package/dist/twilight/{p-532b9b17.entry.js → p-83549a90.entry.js} +2 -2
  156. package/dist/twilight/{p-f84e2327.entry.js → p-862ad154.entry.js} +2 -2
  157. package/dist/twilight/{p-b0051f63.entry.js → p-939f9104.entry.js} +2 -2
  158. package/dist/twilight/{p-039346b8.system.entry.js → p-93e6452b.system.entry.js} +2 -2
  159. package/dist/twilight/{p-08d61ff2.entry.js → p-97cc91c4.entry.js} +2 -2
  160. package/dist/twilight/{p-228242f7.entry.js → p-9fa8d963.entry.js} +2 -2
  161. package/dist/twilight/{p-Dw8CTCni.system.js.map → p-B9diX3Ld.system.js.map} +1 -1
  162. package/dist/twilight/{p-ERq3kNfh.system.js.map → p-BNKx_fXu.system.js.map} +1 -1
  163. package/dist/twilight/{p-Bqwo1MhQ.system.js.map → p-BP64ZxhW.system.js.map} +1 -1
  164. package/dist/twilight/{p-D4hseaGD.system.js.map → p-BWbXuc8f.system.js.map} +1 -1
  165. package/dist/twilight/{p-DbYzV2HQ.system.js.map → p-Brt6MZMy.system.js.map} +1 -1
  166. package/dist/twilight/{p-BAr95b3n.system.js.map → p-Bx7mzn4-.system.js.map} +1 -1
  167. package/dist/twilight/{p-CHzuzHDL.system.js.map → p-C0zi3xso.system.js.map} +1 -1
  168. package/dist/twilight/{p-Cc8dkoHl.system.js.map → p-C25xo2I9.system.js.map} +1 -1
  169. package/dist/twilight/{p-7FnPac86.system.js.map → p-C3b5GFVP.system.js.map} +1 -1
  170. package/dist/twilight/{p-7jsBTJOk.system.js.map → p-C6nl4csu.system.js.map} +1 -1
  171. package/dist/twilight/{p-BlvvQJnI.system.js.map → p-C8JDkECr.system.js.map} +1 -1
  172. package/dist/twilight/{p-Dosz7Na1.system.js.map → p-C9OfFWmp.system.js.map} +1 -1
  173. package/dist/twilight/{p-Cf6u_xVH.system.js.map → p-CI_HtUC7.system.js.map} +1 -1
  174. package/dist/twilight/{p-COs3bEuH.system.js.map → p-CX4G4VV7.system.js.map} +1 -1
  175. package/dist/twilight/{p-D3plH8z9.system.js.map → p-C_tZ3UPA.system.js.map} +1 -1
  176. package/dist/twilight/{p-JsYArMQH.system.js.map → p-CdPxDxze.system.js.map} +1 -1
  177. package/dist/twilight/{p-BnsVGJir.system.js.map → p-Ch2ngfCk.system.js.map} +1 -1
  178. package/dist/twilight/{p-RygE2GKU.system.js.map → p-Cl6TP9Ol.system.js.map} +1 -1
  179. package/dist/twilight/{p-DeseX8V6.system.js.map → p-CvcXa2TU.system.js.map} +1 -1
  180. package/dist/twilight/{p-BfdixxaW.system.js.map → p-D0CcSuA9.system.js.map} +1 -1
  181. package/dist/twilight/{p-CVcJQx-E.system.js.map → p-D2T3kwP1.system.js.map} +1 -1
  182. package/dist/twilight/{p-BwJ_P_jJ.system.js → p-DF5hpYv8.system.js} +2 -2
  183. package/dist/twilight/{p-BwJ_P_jJ.system.js.map → p-DF5hpYv8.system.js.map} +1 -1
  184. package/dist/twilight/{p-KjQfyzJD.system.js.map → p-DG_xtA-f.system.js.map} +1 -1
  185. package/dist/twilight/{p-1fOf1jhv.system.js.map → p-DHzL55RC.system.js.map} +1 -1
  186. package/dist/twilight/{p-GfIPqLYs.system.js.map → p-DS9YDo5Q.system.js.map} +1 -1
  187. package/dist/twilight/{p-BZl5RHdf.system.js.map → p-DhIVzS4b.system.js.map} +1 -1
  188. package/dist/twilight/{p-BL8Qlvzz.system.js → p-DiFVtThr.system.js} +3 -3
  189. package/dist/twilight/p-DiFVtThr.system.js.map +1 -0
  190. package/dist/twilight/{p-DrLXNast.system.js.map → p-DqqqpQLX.system.js.map} +1 -1
  191. package/dist/twilight/{p-Dr_h0iSH.js → p-DtlYcjlJ.js} +3 -3
  192. package/dist/twilight/p-DtlYcjlJ.js.map +1 -0
  193. package/dist/twilight/{p-DZiCNWuJ.js → p-FCntN3lB.js} +2 -2
  194. package/dist/twilight/{p-DZiCNWuJ.js.map → p-FCntN3lB.js.map} +1 -1
  195. package/dist/twilight/{p-CpG6hlX3.system.js.map → p-NwP5WLUz.system.js.map} +1 -1
  196. package/dist/twilight/{p-D1nfm0gQ.system.js.map → p-UHVUEdWQ.system.js.map} +1 -1
  197. package/dist/twilight/{p-BBzKqD9K.system.js → p-_Zg_vfYO.system.js} +2 -2
  198. package/dist/twilight/{p-BBzKqD9K.system.js.map → p-_Zg_vfYO.system.js.map} +1 -1
  199. package/dist/twilight/{p-7c783b6c.entry.js → p-a80652d3.entry.js} +2 -2
  200. package/dist/twilight/{p-967da197.system.entry.js → p-b23ce243.system.entry.js} +2 -2
  201. package/dist/twilight/{p-9ee4ee16.system.entry.js → p-bcae7f12.system.entry.js} +2 -2
  202. package/dist/twilight/{p-e8e7d078.system.entry.js → p-c0072de1.system.entry.js} +3 -3
  203. package/dist/twilight/{p-e48ca56a.entry.js → p-c6a3fdb0.entry.js} +2 -2
  204. package/dist/twilight/{p-8e099efd.system.entry.js → p-c6fde185.system.entry.js} +2 -2
  205. package/dist/twilight/{p-12c89d39.system.entry.js → p-c94f95c1.system.entry.js} +2 -2
  206. package/dist/twilight/{p-9c7abe6a.entry.js → p-cbcfb963.entry.js} +2 -2
  207. package/dist/twilight/{p-e27633d6.system.entry.js → p-ce103d4c.system.entry.js} +2 -2
  208. package/dist/twilight/{p-da2c57dd.system.entry.js → p-d14a8edc.system.entry.js} +2 -2
  209. package/dist/twilight/{p-12dd0623.entry.js → p-d1809737.entry.js} +2 -2
  210. package/dist/twilight/{p-f032b94d.system.entry.js → p-d632f1fa.system.entry.js} +2 -2
  211. package/dist/twilight/{p-61fcba71.entry.js → p-d71d6dff.entry.js} +2 -2
  212. package/dist/twilight/{p-4eb654dc.system.entry.js → p-d8aab17c.system.entry.js} +2 -2
  213. package/dist/twilight/{p-00068e76.entry.js → p-db7a231b.entry.js} +2 -2
  214. package/dist/twilight/{p-96f8325a.system.entry.js → p-e0e29fb0.system.entry.js} +2 -2
  215. package/dist/twilight/{p-5dd3d1b7.entry.js → p-e1e90d0c.entry.js} +2 -2
  216. package/dist/twilight/{p-fce368f7.entry.js → p-e28d3b71.entry.js} +2 -2
  217. package/dist/twilight/{p-75c9e2c4.entry.js → p-e6d51e3a.entry.js} +2 -2
  218. package/dist/twilight/{p-16cb7a49.entry.js → p-ee66c0dd.entry.js} +2 -2
  219. package/dist/twilight/{p-a6e8e1e7.entry.js → p-ef04d7e0.entry.js} +2 -2
  220. package/dist/twilight/{p-510b1a2a.entry.js → p-f0dd4f76.entry.js} +2 -2
  221. package/dist/twilight/{p-7e9bec45.entry.js → p-f1d6fdbf.entry.js} +2 -2
  222. package/dist/twilight/{p-c7c91c45.system.entry.js → p-f2bac5d5.system.entry.js} +2 -2
  223. package/dist/twilight/p-f702aead.entry.js +5 -0
  224. package/dist/twilight/{p-63d10a9e.system.entry.js → p-fba0b0f7.system.entry.js} +2 -2
  225. package/dist/twilight/{p-Dh2Y37LB.system.js.map → p-hUWZ36QL.system.js.map} +1 -1
  226. package/dist/twilight/{p-4ae6httG.system.js.map → p-lKe9xnuY.system.js.map} +1 -1
  227. package/dist/twilight/{p-CH4ZFrh_.system.js.map → p-t6iSIvKc.system.js.map} +1 -1
  228. package/dist/twilight/{p-DYrmIHi5.system.js.map → p-xfMEaBec.system.js.map} +1 -1
  229. package/dist/twilight/{p-Dvmkrqbs.system.js.map → p-y6fipjol.system.js.map} +1 -1
  230. package/dist/twilight/twilight.esm.js +1 -1
  231. package/dist/twilight/twilight.js +1 -1
  232. package/package.json +5 -5
  233. package/dist/cjs/index-BUbxVNrN.js.map +0 -1
  234. package/dist/esm/index-Dr_h0iSH.js.map +0 -1
  235. package/dist/esm-es5/index-Dr_h0iSH.js.map +0 -1
  236. package/dist/twilight/p-BL8Qlvzz.system.js.map +0 -1
  237. package/dist/twilight/p-Dr_h0iSH.js.map +0 -1
  238. package/dist/twilight/p-dbe580d1.entry.js +0 -5
  239. /package/dist/twilight/{p-3592b583.system.entry.js.map → p-007ca6d7.system.entry.js.map} +0 -0
  240. /package/dist/twilight/{p-949a66c1.system.entry.js.map → p-0259d6cb.system.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-97dde580.system.entry.js.map → p-0303d452.system.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-d0ab3dbc.system.entry.js.map → p-04e33bba.system.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-6bde3b47.entry.js.map → p-099e8eb6.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-c1c17d0b.system.entry.js.map → p-0ba23365.system.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-e59edbdd.entry.js.map → p-109f5735.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-cd019bf1.system.entry.js.map → p-1362c93c.system.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-0769a6e0.entry.js.map → p-138b8ce7.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-db0cd840.entry.js.map → p-19061cec.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-ae051ea2.entry.js.map → p-1b42ce8a.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-d7304e82.entry.js.map → p-2323e473.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-0e3a43f5.system.entry.js.map → p-2bb3b70e.system.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-56770d90.system.entry.js.map → p-36b00bb1.system.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-7ec7d474.entry.js.map → p-385257e0.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-d52b8ce4.system.entry.js.map → p-39a319ec.system.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-0a6f1ffb.entry.js.map → p-3ad485dd.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-e3e75bed.entry.js.map → p-3ad79104.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-00dfddea.system.entry.js.map → p-3e960ee9.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-6154b6eb.entry.js.map → p-3f20e330.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-ae7b050f.system.entry.js.map → p-4cf011a4.system.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-e705ac16.system.entry.js.map → p-54a5d0ac.system.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-84c3941d.system.entry.js.map → p-55771cda.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-df3f649a.system.entry.js.map → p-57cfb4b1.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-b29ee431.entry.js.map → p-58768895.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-e5b92338.system.entry.js.map → p-5cb3dd8e.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-c0c81732.system.entry.js.map → p-5f352ca9.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-edbe1cac.system.entry.js.map → p-66464e8e.system.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-9cc55265.entry.js.map → p-6a611226.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-89a0da99.entry.js.map → p-6e1ecf18.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-ceb8da67.system.entry.js.map → p-7105480a.system.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-15554834.system.entry.js.map → p-784ee964.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-d7ec137d.system.entry.js.map → p-7dc3a160.system.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-c94aaea0.entry.js.map → p-7f20c85c.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-532b9b17.entry.js.map → p-83549a90.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-f84e2327.entry.js.map → p-862ad154.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-b0051f63.entry.js.map → p-939f9104.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-039346b8.system.entry.js.map → p-93e6452b.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-08d61ff2.entry.js.map → p-97cc91c4.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-228242f7.entry.js.map → p-9fa8d963.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-7c783b6c.entry.js.map → p-a80652d3.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-967da197.system.entry.js.map → p-b23ce243.system.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-9ee4ee16.system.entry.js.map → p-bcae7f12.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-e8e7d078.system.entry.js.map → p-c0072de1.system.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-e48ca56a.entry.js.map → p-c6a3fdb0.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-8e099efd.system.entry.js.map → p-c6fde185.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-12c89d39.system.entry.js.map → p-c94f95c1.system.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-9c7abe6a.entry.js.map → p-cbcfb963.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-e27633d6.system.entry.js.map → p-ce103d4c.system.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-da2c57dd.system.entry.js.map → p-d14a8edc.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-12dd0623.entry.js.map → p-d1809737.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-f032b94d.system.entry.js.map → p-d632f1fa.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-61fcba71.entry.js.map → p-d71d6dff.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-4eb654dc.system.entry.js.map → p-d8aab17c.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-00068e76.entry.js.map → p-db7a231b.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-96f8325a.system.entry.js.map → p-e0e29fb0.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-5dd3d1b7.entry.js.map → p-e1e90d0c.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-fce368f7.entry.js.map → p-e28d3b71.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-75c9e2c4.entry.js.map → p-e6d51e3a.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-16cb7a49.entry.js.map → p-ee66c0dd.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-a6e8e1e7.entry.js.map → p-ef04d7e0.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-510b1a2a.entry.js.map → p-f0dd4f76.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-7e9bec45.entry.js.map → p-f1d6fdbf.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-c7c91c45.system.entry.js.map → p-f2bac5d5.system.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-dbe580d1.entry.js.map → p-f702aead.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-63d10a9e.system.entry.js.map → p-fba0b0f7.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,c as t,h as s,H as i,g as a}from"./p-Dr_h0iSH.js";var n=`\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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;const r=":host{display:block}";const c=class{constructor(s){e(this,s);this.invalidInput=t(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((()=>this.setTranslations()));Salla.event.on("booking::open",(e=>this.handleBookingOpen(e)))}async setTranslations(){const e=(e,t,s)=>new Promise((i=>{salla.helpers.setNested(salla.lang.messages[e],t,s);i(true)}));await e("ar.trans","pages.cart.book_an_appointment","حجز موعد");await e("en.trans","pages.cart.book_an_appointment","Book an Appointment");await e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد");await e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment");await e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");await e("en.trans","pages.cart.booked_successfully","Booked Successfully");await e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد");await e("en.trans","pages.cart.select_appointment_date","Select appointment date");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date")}openBookingModal(e,t=false){if(t&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((e=>{if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:this.productId})})).catch((e=>{salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))}handleBookingOpen(e){if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((()=>{this.modal.setTitle(this.selectDate);this.modal.open()}),100)}setAfterReloadEvent(e,t){salla.storage.set("afterReloadEvent",{event:e,payload:t})}emitAfterReloadEvent(){const e=salla.storage.get("afterReloadEvent");if(e&&e.event){const t=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(t);salla.storage.remove("afterReloadEvent")}}componentWillLoad(){if(this.option&&this.option.details.length){this.reservations=this.option.details}}componentDidLoad(){window.addEventListener("booking::open-after-reload",(e=>this.openBookingModal(e,true)));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(e=>this.invalidInput.emit(e)));this.reservationsInput.addEventListener("input",(()=>{this.reservationsInput.setCustomValidity("");this.reservationsInput.reportValidity()}))}handleMessageEvent(e){var t,s;if(e.data.source!=="booking")return;const i=e.data.type;const a=e.data.message;if(localStorage.getItem("debug"))console.log(`Received an action:${i}`,e.data);if(i==="error"){if((t=a.fields)===null||t===void 0?void 0:t.reservation){salla.notify.error(a.fields.reservation[0]);return}const e=Object.values(a.fields||[a.message]).flat().map((e=>`<li>${e}</li>`)).join("");salla.notify.error(`<ul>${e}</ul>`)}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((e=>{if(e.time&&e.time.length>0){const t=e.time[0];return{date:e.date,day:e.day,from_timestamp:t.from,to_timestamp:t.to}}return null})).filter((e=>e!==null));salla.notify.success(this.bookedLabel);(s=this.modal)===null||s===void 0?void 0:s.close();setTimeout((()=>window.location.reload()))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}}bookingModal(){return s("salla-modal",{class:"s-booking-field-modal",ref:e=>this.modal=e,width:"md",position:"middle",noPadding:true},s("iframe",{ref:e=>this.iframe=e,src:this.bookingUrl,frameborder:"0"}))}renderReservationDate(e){return s("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},s("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)}renderReservationTime(e){if(!e.from_timestamp)return"";return s("span",{class:"s-booking-field-reservations-time"},s("i",{class:"s-booking-field-reservations-icon",innerHTML:l}),s("span",null,e.from_timestamp," - ",e.to_timestamp))}render(){return s(i,{key:"04c9e3dc3dc825bd6905221d858c260f7ca34748"},s("div",{key:"07ec38cec1bd1798640dd7ea9592bb3b17d945c6",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?s("div",{class:"s-booking-field-price"},s("span",{innerHTML:salla.money(this.option.price)})):"",s("salla-button",{key:"6b71889cfc0429d15c466a6f194df31549f09786",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:e=>this.openBookingModal(e,false)},s("span",{key:"a16f8db6f52c7751ea605efcae04057ca0dc5b61",class:"s-booking-field-book-now-content"},s("span",{key:"95f6086a599bcc620c87ece6c6ae9620dba15581",innerHTML:n}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&s("div",{key:"b3615100bbfff3d98d0ac99145aaf53449790c94",class:"s-booking-field-reservations"},this.reservations.map(((e,t)=>s("div",{key:t,class:"s-booking-field-reservations-item"},this.renderReservationDate(e),this.renderReservationTime(e))))),s("input",{key:"126f14f2e520b8696bc7450e209bad30b267878b",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:e=>this.reservationsInput=e}),this.iframeReady&&this.bookingModal())}get host(){return a(this)}};c.style=r;const d=class{constructor(t){e(this,t)}hideAllOptions(e){this.host.querySelectorAll(`[data-show-when^="options[${e}"]`).forEach((e=>{e.classList.add("hidden");this.hideAllOptions(e.dataset.optionId);this.disableInputs(e)}))}disableInputs(e){e.querySelectorAll("[name]").forEach((e=>{var t;e.setAttribute("disabled","");e.removeAttribute("required");if(((t=e===null||e===void 0?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))}changeHandler(e){var t;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.tagName)||"N/A"));return}let s=e.target.name.replace("[]","");let i=e.target.getAttribute("type")==="checkbox";let a=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",`[data-show-when^="${s}"]`);this.host.querySelectorAll(`[data-show-when^="${s}"]`).forEach((t=>{let s=!(t===null||t===void 0?void 0:t.dataset.showWhen.includes("!="));let n=t===null||t===void 0?void 0:t.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();let o;if(i){let t=Array.from(this.host.querySelectorAll(`input[name="${e.target.name}"]:checked`),(e=>e===null||e===void 0?void 0:e.value));o=t.includes(n.toString())}else if(a){o=e.target.checked&&e.target.value===n}else{o=n===e.target.value}salla.log("The input is ",i?"Multiple":a?"Radio":"Single"," value:",o);let l=s&&o||!s&&!o;if(l){t.classList.remove("hidden");t.querySelectorAll("[name]").forEach((e=>{e.removeAttribute("disabled");const t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){const t=Array.from(document.querySelectorAll(`input[type="checkbox"][name="${e.getAttribute("name")}"]`));const s=t.some((e=>e.checked));if(s){t.forEach((e=>{e.removeAttribute("required")}))}}}))}else{this.hideAllOptions(t.dataset.optionId);t.classList.add("hidden");this.disableInputs(t)}}))}componentDidRender(){this.host.querySelectorAll(`[data-show-when]`).forEach((e=>{var t;let s=(t=e===null||e===void 0?void 0:e.dataset)===null||t===void 0?void 0:t.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!s){return}this.changeHandler({target:this.host.querySelector('[name^="'+s+'"]')})}))}render(){return s(i,{key:"405156ba83b8731039c2dd0ff800f617150cc722"},s("slot",{key:"2bff17ce7b49fef9b028d673992d256b00e9481b"}))}get host(){return a(this)}};export{c as salla_booking_field,d as salla_conditional_fields};
5
- //# sourceMappingURL=p-7c783b6c.entry.js.map
4
+ import{r as e,c as t,h as s,H as i,g as a}from"./p-DtlYcjlJ.js";var n=`\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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;const r=":host{display:block}";const c=class{constructor(s){e(this,s);this.invalidInput=t(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((()=>this.setTranslations()));Salla.event.on("booking::open",(e=>this.handleBookingOpen(e)))}async setTranslations(){const e=(e,t,s)=>new Promise((i=>{salla.helpers.setNested(salla.lang.messages[e],t,s);i(true)}));await e("ar.trans","pages.cart.book_an_appointment","حجز موعد");await e("en.trans","pages.cart.book_an_appointment","Book an Appointment");await e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد");await e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment");await e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");await e("en.trans","pages.cart.booked_successfully","Booked Successfully");await e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد");await e("en.trans","pages.cart.select_appointment_date","Select appointment date");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date")}openBookingModal(e,t=false){if(t&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((e=>{if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:this.productId})})).catch((e=>{salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))}handleBookingOpen(e){if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((()=>{this.modal.setTitle(this.selectDate);this.modal.open()}),100)}setAfterReloadEvent(e,t){salla.storage.set("afterReloadEvent",{event:e,payload:t})}emitAfterReloadEvent(){const e=salla.storage.get("afterReloadEvent");if(e&&e.event){const t=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(t);salla.storage.remove("afterReloadEvent")}}componentWillLoad(){if(this.option&&this.option.details.length){this.reservations=this.option.details}}componentDidLoad(){window.addEventListener("booking::open-after-reload",(e=>this.openBookingModal(e,true)));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(e=>this.invalidInput.emit(e)));this.reservationsInput.addEventListener("input",(()=>{this.reservationsInput.setCustomValidity("");this.reservationsInput.reportValidity()}))}handleMessageEvent(e){var t,s;if(e.data.source!=="booking")return;const i=e.data.type;const a=e.data.message;if(localStorage.getItem("debug"))console.log(`Received an action:${i}`,e.data);if(i==="error"){if((t=a.fields)===null||t===void 0?void 0:t.reservation){salla.notify.error(a.fields.reservation[0]);return}const e=Object.values(a.fields||[a.message]).flat().map((e=>`<li>${e}</li>`)).join("");salla.notify.error(`<ul>${e}</ul>`)}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((e=>{if(e.time&&e.time.length>0){const t=e.time[0];return{date:e.date,day:e.day,from_timestamp:t.from,to_timestamp:t.to}}return null})).filter((e=>e!==null));salla.notify.success(this.bookedLabel);(s=this.modal)===null||s===void 0?void 0:s.close();setTimeout((()=>window.location.reload()))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}}bookingModal(){return s("salla-modal",{class:"s-booking-field-modal",ref:e=>this.modal=e,width:"md",position:"middle",noPadding:true},s("iframe",{ref:e=>this.iframe=e,src:this.bookingUrl,frameborder:"0"}))}renderReservationDate(e){return s("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},s("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)}renderReservationTime(e){if(!e.from_timestamp)return"";return s("span",{class:"s-booking-field-reservations-time"},s("i",{class:"s-booking-field-reservations-icon",innerHTML:l}),s("span",null,e.from_timestamp," - ",e.to_timestamp))}render(){return s(i,{key:"04c9e3dc3dc825bd6905221d858c260f7ca34748"},s("div",{key:"07ec38cec1bd1798640dd7ea9592bb3b17d945c6",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?s("div",{class:"s-booking-field-price"},s("span",{innerHTML:salla.money(this.option.price)})):"",s("salla-button",{key:"6b71889cfc0429d15c466a6f194df31549f09786",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:e=>this.openBookingModal(e,false)},s("span",{key:"a16f8db6f52c7751ea605efcae04057ca0dc5b61",class:"s-booking-field-book-now-content"},s("span",{key:"95f6086a599bcc620c87ece6c6ae9620dba15581",innerHTML:n}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&s("div",{key:"b3615100bbfff3d98d0ac99145aaf53449790c94",class:"s-booking-field-reservations"},this.reservations.map(((e,t)=>s("div",{key:t,class:"s-booking-field-reservations-item"},this.renderReservationDate(e),this.renderReservationTime(e))))),s("input",{key:"126f14f2e520b8696bc7450e209bad30b267878b",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:e=>this.reservationsInput=e}),this.iframeReady&&this.bookingModal())}get host(){return a(this)}};c.style=r;const d=class{constructor(t){e(this,t)}hideAllOptions(e){this.host.querySelectorAll(`[data-show-when^="options[${e}"]`).forEach((e=>{e.classList.add("hidden");this.hideAllOptions(e.dataset.optionId);this.disableInputs(e)}))}disableInputs(e){e.querySelectorAll("[name]").forEach((e=>{var t;e.setAttribute("disabled","");e.removeAttribute("required");if(((t=e===null||e===void 0?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))}changeHandler(e){var t;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.tagName)||"N/A"));return}let s=e.target.name.replace("[]","");let i=e.target.getAttribute("type")==="checkbox";let a=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",`[data-show-when^="${s}"]`);this.host.querySelectorAll(`[data-show-when^="${s}"]`).forEach((t=>{let s=!(t===null||t===void 0?void 0:t.dataset.showWhen.includes("!="));let n=t===null||t===void 0?void 0:t.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();let o;if(i){let t=Array.from(this.host.querySelectorAll(`input[name="${e.target.name}"]:checked`),(e=>e===null||e===void 0?void 0:e.value));o=t.includes(n.toString())}else if(a){o=e.target.checked&&e.target.value===n}else{o=n===e.target.value}salla.log("The input is ",i?"Multiple":a?"Radio":"Single"," value:",o);let l=s&&o||!s&&!o;if(l){t.classList.remove("hidden");t.querySelectorAll("[name]").forEach((e=>{e.removeAttribute("disabled");const t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){const t=Array.from(document.querySelectorAll(`input[type="checkbox"][name="${e.getAttribute("name")}"]`));const s=t.some((e=>e.checked));if(s){t.forEach((e=>{e.removeAttribute("required")}))}}}))}else{this.hideAllOptions(t.dataset.optionId);t.classList.add("hidden");this.disableInputs(t)}}))}componentDidRender(){this.host.querySelectorAll(`[data-show-when]`).forEach((e=>{var t;let s=(t=e===null||e===void 0?void 0:e.dataset)===null||t===void 0?void 0:t.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!s){return}this.changeHandler({target:this.host.querySelector('[name^="'+s+'"]')})}))}render(){return s(i,{key:"405156ba83b8731039c2dd0ff800f617150cc722"},s("slot",{key:"2bff17ce7b49fef9b028d673992d256b00e9481b"}))}get host(){return a(this)}};export{c as salla_booking_field,d as salla_conditional_fields};
5
+ //# sourceMappingURL=p-a80652d3.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(i,t,e,n){function r(i){return i instanceof e?i:new e((function(t){t(i)}))}return new(e||(e=Promise))((function(e,s){function a(i){try{u(n.next(i))}catch(i){s(i)}}function o(i){try{u(n["throw"](i))}catch(i){s(i)}}function u(i){i.done?e(i.value):r(i.value).then(a,o)}u((n=n.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(i){return function(t){return u([i,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(n=1,r&&(s=o[0]&2?r["return"]:o[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;if(r=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;r=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=t.call(i,e)}catch(i){o=[6,i];r=0}finally{n=s=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-BL8Qlvzz.system.js","./p-Dxc5oJG6.system.js"],(function(i){"use strict";var t,e,n,r;return{setters:[function(i){t=i.r;e=i.h;n=i.g},function(i){r=i.I}],execute:function(){var s=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>';var a=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>';var o=' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>';var u=":host{display:block}";var l=i("salla_review_card",function(){function i(i){var e=this;t(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var t;if(!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.setPointerCapture(i.pointerId);e.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!e.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.isSwiping=false};this.goToSlide=function(i){e.currentSlide=Math.max(0,Math.min(i,e.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()};i.prototype.addEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})};i.prototype.removeEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var n=t-this.startPoint.y;this.processSwipe(e,n)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var n=i<0;var r=this.isRTL?!n:n;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,n){return e("span",{key:n,innerHTML:i.review.stars>=n+1?s:a})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,n){var r=t.url;return e("button",{key:r||n,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===n?"active":""),onClick:function(){return i.goToSlide(n)},"aria-label":"Go to slide ".concat(n+1),onPointerDown:function(){return i.goToSlide(n)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return e("div",{class:"s-review-card-slider-container"},e("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return e("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},e("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),e("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var n=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!n||this.hasMultipleImages)return null;return e("img",{src:n.url,alt:n.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return e("div",{class:"s-review-card-header"},e("div",{class:"s-review-card-reviewer-name"},e("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&e("span",{class:"s-review-card-verified-icon",innerHTML:r})),e("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,n,r,s;var a=(i=this.review)===null||i===void 0?void 0:i.product;if(!a)return null;return e("a",{href:(n=(t=this.review)===null||t===void 0?void 0:t.product)===null||n===void 0?void 0:n.url,class:"s-review-card-product-container"},e("img",{alt:((r=a.image)===null||r===void 0?void 0:r.alt)||"Product",src:(s=a.image)===null||s===void 0?void 0:s.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),e("div",{class:"s-review-card-product-details"},e("p",{class:"s-review-card-product-details-name"},a.name),this.showPurchaseCount?e("p",{class:"s-review-card-product-details-purchase-count"},e("span",{innerHTML:o}),this.purchasedCount):null))};i.prototype.render=function(){var i;return e("div",{key:"22c0b4997b5eaa3eee23c642aa8fc778cff7fd22",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),c(),e("div",{key:"db1391a8d4ddad808f54551b39d9bfeb55466225",class:"s-review-card-content"},this.renderHeader(),e("p",{key:"4c6e9af60e480f5c9f840e7ba95f7c59ba12e172",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),c(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return i}());var c=function(i){return e("div",{class:"s-review-card-divider ".concat("")})};l.style=u}}}));
5
- //# sourceMappingURL=p-967da197.system.entry.js.map
4
+ */System.register(["./p-DiFVtThr.system.js","./p-Dxc5oJG6.system.js"],(function(i){"use strict";var t,e,n,r;return{setters:[function(i){t=i.r;e=i.h;n=i.g},function(i){r=i.I}],execute:function(){var s=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>';var a=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>';var o=' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>';var u=":host{display:block}";var c=i("salla_review_card",function(){function i(i){var e=this;t(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var t;if(!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.setPointerCapture(i.pointerId);e.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!e.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.isSwiping=false};this.goToSlide=function(i){e.currentSlide=Math.max(0,Math.min(i,e.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()};i.prototype.addEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})};i.prototype.removeEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var n=t-this.startPoint.y;this.processSwipe(e,n)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var n=i<0;var r=this.isRTL?!n:n;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,n){return e("span",{key:n,innerHTML:i.review.stars>=n+1?s:a})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,n){var r=t.url;return e("button",{key:r||n,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===n?"active":""),onClick:function(){return i.goToSlide(n)},"aria-label":"Go to slide ".concat(n+1),onPointerDown:function(){return i.goToSlide(n)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return e("div",{class:"s-review-card-slider-container"},e("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return e("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},e("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),e("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var n=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!n||this.hasMultipleImages)return null;return e("img",{src:n.url,alt:n.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return e("div",{class:"s-review-card-header"},e("div",{class:"s-review-card-reviewer-name"},e("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&e("span",{class:"s-review-card-verified-icon",innerHTML:r})),e("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,n,r,s;var a=(i=this.review)===null||i===void 0?void 0:i.product;if(!a)return null;return e("a",{href:(n=(t=this.review)===null||t===void 0?void 0:t.product)===null||n===void 0?void 0:n.url,class:"s-review-card-product-container"},e("img",{alt:((r=a.image)===null||r===void 0?void 0:r.alt)||"Product",src:(s=a.image)===null||s===void 0?void 0:s.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),e("div",{class:"s-review-card-product-details"},e("p",{class:"s-review-card-product-details-name"},a.name),this.showPurchaseCount?e("p",{class:"s-review-card-product-details-purchase-count"},e("span",{innerHTML:o}),this.purchasedCount):null))};i.prototype.render=function(){var i;return e("div",{key:"22c0b4997b5eaa3eee23c642aa8fc778cff7fd22",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),l(),e("div",{key:"db1391a8d4ddad808f54551b39d9bfeb55466225",class:"s-review-card-content"},this.renderHeader(),e("p",{key:"4c6e9af60e480f5c9f840e7ba95f7c59ba12e172",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),l(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return i}());var l=function(i){return e("div",{class:"s-review-card-divider ".concat("")})};c.style=u}}}));
5
+ //# sourceMappingURL=p-b23ce243.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,n,i){function a(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function r(t){try{c(i.next(t))}catch(t){s(t)}}function o(t){try{c(i["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):a(t.value).then(r,o)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,r;return r={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function o(t){return function(e){return c([t,e])}}function c(o){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,o[0]&&(n=0)),n)try{if(i=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;a=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(o[0]===6&&n.label<s[1]){n.label=s[1];s=o;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(o);break}if(s[2])n.ops.pop();n.trys.pop();continue}o=e.call(t,n)}catch(t){o=[6,t];a=0}finally{i=s=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-BL8Qlvzz.system.js"],(function(t){"use strict";var e,n,i,a,s;return{setters:[function(t){e=t.r;n=t.c;i=t.h;a=t.H;s=t.g}],execute:function(){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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';var c='\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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var l=":host{display:block}";var u=t("salla_booking_field",function(){function t(t){var i=this;e(this,t);this.invalidInput=n(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((function(){return i.setTranslations()}));Salla.event.on("booking::open",(function(t){return i.handleBookingOpen(t)}))}t.prototype.setTranslations=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=function(t,e,n){return new Promise((function(i){salla.helpers.setNested(salla.lang.messages[t],e,n);i(true)}))};return[4,t("ar.trans","pages.cart.book_an_appointment","حجز موعد")];case 1:e.sent();return[4,t("en.trans","pages.cart.book_an_appointment","Book an Appointment")];case 2:e.sent();return[4,t("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد")];case 3:e.sent();return[4,t("en.trans","pages.cart.edit_an_appointment","Edit an Appointment")];case 4:e.sent();return[4,t("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح")];case 5:e.sent();return[4,t("en.trans","pages.cart.booked_successfully","Booked Successfully")];case 6:e.sent();return[4,t("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد")];case 7:e.sent();return[4,t("en.trans","pages.cart.select_appointment_date","Select appointment date")];case 8:e.sent();this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date");return[2]}}))}))};t.prototype.openBookingModal=function(t,e){var n=this;if(e===void 0){e=false}if(e&&(!t.detail||typeof t.detail!=="number"||t.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((function(t){if(t.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:t.data.redirect.url,id:n.productId})})).catch((function(t){salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(t.response||t)}))};t.prototype.handleBookingOpen=function(t){var e=this;if(t.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",t.id,t.url);this.iframeReady=true;setTimeout((function(){e.modal.setTitle(e.selectDate);e.modal.open()}),100)};t.prototype.setAfterReloadEvent=function(t,e){salla.storage.set("afterReloadEvent",{event:t,payload:e})};t.prototype.emitAfterReloadEvent=function(){var t=salla.storage.get("afterReloadEvent");if(t&&t.event){var e=new CustomEvent(t.event,{detail:t.payload});window.dispatchEvent(e);salla.storage.remove("afterReloadEvent")}};t.prototype.componentWillLoad=function(){if(this.option&&this.option.details.length){this.reservations=this.option.details}};t.prototype.componentDidLoad=function(){var t=this;window.addEventListener("booking::open-after-reload",(function(e){return t.openBookingModal(e,true)}));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(function(e){return t.invalidInput.emit(e)}));this.reservationsInput.addEventListener("input",(function(){t.reservationsInput.setCustomValidity("");t.reservationsInput.reportValidity()}))};t.prototype.handleMessageEvent=function(t){var e,n;if(t.data.source!=="booking")return;var i=t.data.type;var a=t.data.message;if(localStorage.getItem("debug"))console.log("Received an action:".concat(i),t.data);if(i==="error"){if((e=a.fields)===null||e===void 0?void 0:e.reservation){salla.notify.error(a.fields.reservation[0]);return}var s=Object.values(a.fields||[a.message]).flat().map((function(t){return"<li>".concat(t,"</li>")})).join("");salla.notify.error("<ul>".concat(s,"</ul>"))}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((function(t){if(t.time&&t.time.length>0){var e=t.time[0];return{date:t.date,day:t.day,from_timestamp:e.from,to_timestamp:e.to}}return null})).filter((function(t){return t!==null}));salla.notify.success(this.bookedLabel);(n=this.modal)===null||n===void 0?void 0:n.close();setTimeout((function(){return window.location.reload()}))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}};t.prototype.bookingModal=function(){var t=this;return i("salla-modal",{class:"s-booking-field-modal",ref:function(e){return t.modal=e},width:"md",position:"middle",noPadding:true},i("iframe",{ref:function(e){return t.iframe=e},src:this.bookingUrl,frameborder:"0"}))};t.prototype.renderReservationDate=function(t){return i("span",{class:t.from_timestamp?"s-booking-field-reservations-has-time":""},i("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),t.date)};t.prototype.renderReservationTime=function(t){if(!t.from_timestamp)return"";return i("span",{class:"s-booking-field-reservations-time"},i("i",{class:"s-booking-field-reservations-icon",innerHTML:c}),i("span",null,t.from_timestamp," - ",t.to_timestamp))};t.prototype.render=function(){var t=this;return i(a,{key:"04c9e3dc3dc825bd6905221d858c260f7ca34748"},i("div",{key:"07ec38cec1bd1798640dd7ea9592bb3b17d945c6",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?i("div",{class:"s-booking-field-price"},i("span",{innerHTML:salla.money(this.option.price)})):"",i("salla-button",{key:"6b71889cfc0429d15c466a6f194df31549f09786",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:function(e){return t.openBookingModal(e,false)}},i("span",{key:"a16f8db6f52c7751ea605efcae04057ca0dc5b61",class:"s-booking-field-book-now-content"},i("span",{key:"95f6086a599bcc620c87ece6c6ae9620dba15581",innerHTML:r}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&i("div",{key:"b3615100bbfff3d98d0ac99145aaf53449790c94",class:"s-booking-field-reservations"},this.reservations.map((function(e,n){return i("div",{key:n,class:"s-booking-field-reservations-item"},t.renderReservationDate(e),t.renderReservationTime(e))}))),i("input",{key:"126f14f2e520b8696bc7450e209bad30b267878b",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:function(e){return t.reservationsInput=e}}),this.iframeReady&&this.bookingModal())};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());u.style=l;var f=t("salla_conditional_fields",function(){function t(t){e(this,t)}t.prototype.hideAllOptions=function(t){var e=this;this.host.querySelectorAll('[data-show-when^="options['.concat(t,'"]')).forEach((function(t){t.classList.add("hidden");e.hideAllOptions(t.dataset.optionId);e.disableInputs(t)}))};t.prototype.disableInputs=function(t){t.querySelectorAll("[name]").forEach((function(t){var e;t.setAttribute("disabled","");t.removeAttribute("required");if(((e=t===null||t===void 0?void 0:t.tagName)===null||e===void 0?void 0:e.toLowerCase())==="select"){t.value=""}if(["checkbox"].includes(t.getAttribute("type"))&&t.hasOwnProperty("checked")){t.checked=false}}))};t.prototype.changeHandler=function(t){var e=this;var n;salla.event.emit("salla-onditional-fields::change",t);salla.log("Received the change event: ",t);if(!t.target||!["SELECT"].includes(t.target.tagName)&&!["checkbox","radio"].includes(t.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((n=t===null||t===void 0?void 0:t.target)===null||n===void 0?void 0:n.tagName)||"N/A"));return}var i=t.target.name.replace("[]","");var a=t.target.getAttribute("type")==="checkbox";var s=t.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",'[data-show-when^="'.concat(i,'"]'));this.host.querySelectorAll('[data-show-when^="'.concat(i,'"]')).forEach((function(n){var i=!(n===null||n===void 0?void 0:n.dataset.showWhen.includes("!="));var r=n===null||n===void 0?void 0:n.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();var o;if(a){var c=Array.from(e.host.querySelectorAll('input[name="'.concat(t.target.name,'"]:checked')),(function(t){return t===null||t===void 0?void 0:t.value}));o=c.includes(r.toString())}else if(s){o=t.target.checked&&t.target.value===r}else{o=r===t.target.value}salla.log("The input is ",a?"Multiple":s?"Radio":"Single"," value:",o);var l=i&&o||!i&&!o;if(l){n.classList.remove("hidden");n.querySelectorAll("[name]").forEach((function(t){t.removeAttribute("disabled");var e=t.closest(".s-product-options-option");if(e.dataset.optionRequired==="true"){t.setAttribute("required","")}if(t.getAttribute("type")==="checkbox"){var n=Array.from(document.querySelectorAll('input[type="checkbox"][name="'.concat(t.getAttribute("name"),'"]')));var i=n.some((function(t){return t.checked}));if(i){n.forEach((function(t){t.removeAttribute("required")}))}}}))}else{e.hideAllOptions(n.dataset.optionId);n.classList.add("hidden");e.disableInputs(n)}}))};t.prototype.componentDidRender=function(){var t=this;this.host.querySelectorAll("[data-show-when]").forEach((function(e){var n;var i=(n=e===null||e===void 0?void 0:e.dataset)===null||n===void 0?void 0:n.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!i){return}t.changeHandler({target:t.host.querySelector('[name^="'+i+'"]')})}))};t.prototype.render=function(){return i(a,{key:"405156ba83b8731039c2dd0ff800f617150cc722"},i("slot",{key:"2bff17ce7b49fef9b028d673992d256b00e9481b"}))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}())}}}));
5
- //# sourceMappingURL=p-9ee4ee16.system.entry.js.map
4
+ */System.register(["./p-DiFVtThr.system.js"],(function(t){"use strict";var e,n,i,a,s;return{setters:[function(t){e=t.r;n=t.c;i=t.h;a=t.H;s=t.g}],execute:function(){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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';var c='\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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var l=":host{display:block}";var u=t("salla_booking_field",function(){function t(t){var i=this;e(this,t);this.invalidInput=n(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((function(){return i.setTranslations()}));Salla.event.on("booking::open",(function(t){return i.handleBookingOpen(t)}))}t.prototype.setTranslations=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=function(t,e,n){return new Promise((function(i){salla.helpers.setNested(salla.lang.messages[t],e,n);i(true)}))};return[4,t("ar.trans","pages.cart.book_an_appointment","حجز موعد")];case 1:e.sent();return[4,t("en.trans","pages.cart.book_an_appointment","Book an Appointment")];case 2:e.sent();return[4,t("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد")];case 3:e.sent();return[4,t("en.trans","pages.cart.edit_an_appointment","Edit an Appointment")];case 4:e.sent();return[4,t("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح")];case 5:e.sent();return[4,t("en.trans","pages.cart.booked_successfully","Booked Successfully")];case 6:e.sent();return[4,t("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد")];case 7:e.sent();return[4,t("en.trans","pages.cart.select_appointment_date","Select appointment date")];case 8:e.sent();this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date");return[2]}}))}))};t.prototype.openBookingModal=function(t,e){var n=this;if(e===void 0){e=false}if(e&&(!t.detail||typeof t.detail!=="number"||t.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((function(t){if(t.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:t.data.redirect.url,id:n.productId})})).catch((function(t){salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(t.response||t)}))};t.prototype.handleBookingOpen=function(t){var e=this;if(t.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",t.id,t.url);this.iframeReady=true;setTimeout((function(){e.modal.setTitle(e.selectDate);e.modal.open()}),100)};t.prototype.setAfterReloadEvent=function(t,e){salla.storage.set("afterReloadEvent",{event:t,payload:e})};t.prototype.emitAfterReloadEvent=function(){var t=salla.storage.get("afterReloadEvent");if(t&&t.event){var e=new CustomEvent(t.event,{detail:t.payload});window.dispatchEvent(e);salla.storage.remove("afterReloadEvent")}};t.prototype.componentWillLoad=function(){if(this.option&&this.option.details.length){this.reservations=this.option.details}};t.prototype.componentDidLoad=function(){var t=this;window.addEventListener("booking::open-after-reload",(function(e){return t.openBookingModal(e,true)}));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(function(e){return t.invalidInput.emit(e)}));this.reservationsInput.addEventListener("input",(function(){t.reservationsInput.setCustomValidity("");t.reservationsInput.reportValidity()}))};t.prototype.handleMessageEvent=function(t){var e,n;if(t.data.source!=="booking")return;var i=t.data.type;var a=t.data.message;if(localStorage.getItem("debug"))console.log("Received an action:".concat(i),t.data);if(i==="error"){if((e=a.fields)===null||e===void 0?void 0:e.reservation){salla.notify.error(a.fields.reservation[0]);return}var s=Object.values(a.fields||[a.message]).flat().map((function(t){return"<li>".concat(t,"</li>")})).join("");salla.notify.error("<ul>".concat(s,"</ul>"))}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((function(t){if(t.time&&t.time.length>0){var e=t.time[0];return{date:t.date,day:t.day,from_timestamp:e.from,to_timestamp:e.to}}return null})).filter((function(t){return t!==null}));salla.notify.success(this.bookedLabel);(n=this.modal)===null||n===void 0?void 0:n.close();setTimeout((function(){return window.location.reload()}))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}};t.prototype.bookingModal=function(){var t=this;return i("salla-modal",{class:"s-booking-field-modal",ref:function(e){return t.modal=e},width:"md",position:"middle",noPadding:true},i("iframe",{ref:function(e){return t.iframe=e},src:this.bookingUrl,frameborder:"0"}))};t.prototype.renderReservationDate=function(t){return i("span",{class:t.from_timestamp?"s-booking-field-reservations-has-time":""},i("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),t.date)};t.prototype.renderReservationTime=function(t){if(!t.from_timestamp)return"";return i("span",{class:"s-booking-field-reservations-time"},i("i",{class:"s-booking-field-reservations-icon",innerHTML:c}),i("span",null,t.from_timestamp," - ",t.to_timestamp))};t.prototype.render=function(){var t=this;return i(a,{key:"04c9e3dc3dc825bd6905221d858c260f7ca34748"},i("div",{key:"07ec38cec1bd1798640dd7ea9592bb3b17d945c6",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?i("div",{class:"s-booking-field-price"},i("span",{innerHTML:salla.money(this.option.price)})):"",i("salla-button",{key:"6b71889cfc0429d15c466a6f194df31549f09786",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:function(e){return t.openBookingModal(e,false)}},i("span",{key:"a16f8db6f52c7751ea605efcae04057ca0dc5b61",class:"s-booking-field-book-now-content"},i("span",{key:"95f6086a599bcc620c87ece6c6ae9620dba15581",innerHTML:r}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&i("div",{key:"b3615100bbfff3d98d0ac99145aaf53449790c94",class:"s-booking-field-reservations"},this.reservations.map((function(e,n){return i("div",{key:n,class:"s-booking-field-reservations-item"},t.renderReservationDate(e),t.renderReservationTime(e))}))),i("input",{key:"126f14f2e520b8696bc7450e209bad30b267878b",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:function(e){return t.reservationsInput=e}}),this.iframeReady&&this.bookingModal())};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());u.style=l;var f=t("salla_conditional_fields",function(){function t(t){e(this,t)}t.prototype.hideAllOptions=function(t){var e=this;this.host.querySelectorAll('[data-show-when^="options['.concat(t,'"]')).forEach((function(t){t.classList.add("hidden");e.hideAllOptions(t.dataset.optionId);e.disableInputs(t)}))};t.prototype.disableInputs=function(t){t.querySelectorAll("[name]").forEach((function(t){var e;t.setAttribute("disabled","");t.removeAttribute("required");if(((e=t===null||t===void 0?void 0:t.tagName)===null||e===void 0?void 0:e.toLowerCase())==="select"){t.value=""}if(["checkbox"].includes(t.getAttribute("type"))&&t.hasOwnProperty("checked")){t.checked=false}}))};t.prototype.changeHandler=function(t){var e=this;var n;salla.event.emit("salla-onditional-fields::change",t);salla.log("Received the change event: ",t);if(!t.target||!["SELECT"].includes(t.target.tagName)&&!["checkbox","radio"].includes(t.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((n=t===null||t===void 0?void 0:t.target)===null||n===void 0?void 0:n.tagName)||"N/A"));return}var i=t.target.name.replace("[]","");var a=t.target.getAttribute("type")==="checkbox";var s=t.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",'[data-show-when^="'.concat(i,'"]'));this.host.querySelectorAll('[data-show-when^="'.concat(i,'"]')).forEach((function(n){var i=!(n===null||n===void 0?void 0:n.dataset.showWhen.includes("!="));var r=n===null||n===void 0?void 0:n.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();var o;if(a){var c=Array.from(e.host.querySelectorAll('input[name="'.concat(t.target.name,'"]:checked')),(function(t){return t===null||t===void 0?void 0:t.value}));o=c.includes(r.toString())}else if(s){o=t.target.checked&&t.target.value===r}else{o=r===t.target.value}salla.log("The input is ",a?"Multiple":s?"Radio":"Single"," value:",o);var l=i&&o||!i&&!o;if(l){n.classList.remove("hidden");n.querySelectorAll("[name]").forEach((function(t){t.removeAttribute("disabled");var e=t.closest(".s-product-options-option");if(e.dataset.optionRequired==="true"){t.setAttribute("required","")}if(t.getAttribute("type")==="checkbox"){var n=Array.from(document.querySelectorAll('input[type="checkbox"][name="'.concat(t.getAttribute("name"),'"]')));var i=n.some((function(t){return t.checked}));if(i){n.forEach((function(t){t.removeAttribute("required")}))}}}))}else{e.hideAllOptions(n.dataset.optionId);n.classList.add("hidden");e.disableInputs(n)}}))};t.prototype.componentDidRender=function(){var t=this;this.host.querySelectorAll("[data-show-when]").forEach((function(e){var n;var i=(n=e===null||e===void 0?void 0:e.dataset)===null||n===void 0?void 0:n.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!i){return}t.changeHandler({target:t.host.querySelector('[name^="'+i+'"]')})}))};t.prototype.render=function(){return i(a,{key:"405156ba83b8731039c2dd0ff800f617150cc722"},i("slot",{key:"2bff17ce7b49fef9b028d673992d256b00e9481b"}))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}())}}}));
5
+ //# sourceMappingURL=p-bcae7f12.system.entry.js.map
@@ -1,5 +1,5 @@
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}}};
1
+ var __awaiter=this&&this.__awaiter||function(t,a,e,r){function n(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(r.next(t))}catch(t){i(t)}}function u(t){try{o(r["throw"](t))}catch(t){i(t)}}function o(t){t.done?e(t.value):n(t.value).then(s,u)}o((r=r.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:[]},r,n,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(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(r=1,n&&(i=u[0]&2?n["return"]:u[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;if(n=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++;n=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];n=0}finally{r=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-BL8Qlvzz.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-e8e7d078.system.entry.js.map
4
+ */System.register(["./p-DiFVtThr.system.js"],(function(t){"use strict";var a,e,r,n;return{setters:[function(t){a=t.r;e=t.h;r=t.H;n=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 r=String(a.getMonth()+1).padStart(2,"0");var n=a.getFullYear();var i="".concat(e,"/").concat(r,"/").concat(n);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(r){switch(r.label){case 0:return[4,salla.onReady()];case 1:r.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:r.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=r.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(r,{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 n(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
5
+ //# sourceMappingURL=p-c0072de1.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as a,h as t,H as s,g as i}from"./p-Dr_h0iSH.js";const e="";const l=class{constructor(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(a){salla.log("Bad json passed via entityId prop")}}}getValue(a){if(a.type==="file"){return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`}if(a.type==="url"){return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`}if(a.type==="date"){const t=new Date(a.value);const s=String(t.getDate()).padStart(2,"0");const i=String(t.getMonth()+1).padStart(2,"0");const e=t.getFullYear();const l=`${s}/${i}/${e}`;return l}return a.value}async componentWillLoad(){var a,t;await salla.onReady();if(!((a=salla.config.get("store.features"))===null||a===void 0?void 0:a.includes("custom-fields"))){return salla.logger.error("feature custom-fields is not activated")}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return salla.logger.error("can't render salla-metadata without enity-id prop!")}await salla.lang.onLoaded();this.download=salla.lang.get("pages.thank_you.download");const s=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=(t=s.data[0])===null||t===void 0?void 0:t.sections}render(){if(!this.specs.length){return}return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return i(this)}};l.style=e;export{l as salla_metadata};
5
- //# sourceMappingURL=p-e48ca56a.entry.js.map
4
+ import{r as a,h as t,H as s,g as l}from"./p-DtlYcjlJ.js";const e="";const i=class{constructor(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(a){salla.log("Bad json passed via entityId prop")}}}getValue(a){if(a.type==="file"){return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`}if(a.type==="url"){return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`}if(a.type==="date"){const t=new Date(a.value);const s=String(t.getDate()).padStart(2,"0");const l=String(t.getMonth()+1).padStart(2,"0");const e=t.getFullYear();const i=`${s}/${l}/${e}`;return i}return a.value}async componentWillLoad(){var a,t;await salla.onReady();if(!((a=salla.config.get("store.features"))===null||a===void 0?void 0:a.includes("custom-fields"))){return salla.logger.error("feature custom-fields is not activated")}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return salla.logger.error("can't render salla-metadata without enity-id prop!")}await salla.lang.onLoaded();this.download=salla.lang.get("pages.thank_you.download");const s=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=(t=s.data[0])===null||t===void 0?void 0:t.sections}render(){if(!this.specs.length){return}return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return l(this)}};i.style=e;export{i as salla_metadata};
5
+ //# sourceMappingURL=p-c6a3fdb0.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,n,e,r){function s(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,i){function c(t){try{o(r.next(t))}catch(t){i(t)}}function a(t){try{o(r["throw"](t))}catch(t){i(t)}}function o(t){t.done?e(t.value):s(t.value).then(c,a)}o((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,c;return c={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(t){return function(n){return o([t,n])}}function o(a){if(r)throw new TypeError("Generator is already executing.");while(c&&(c=0,a[0]&&(e=0)),e)try{if(r=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;s=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=n.call(t,e)}catch(t){a=[6,t];s=0}finally{r=i=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-BL8Qlvzz.system.js","./p-Dxc5oJG6.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.r;e=t.h},function(t){r=t.I}],execute:function(){var s='\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>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333z"></path>\n</svg>\n';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>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var c='\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>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n';var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n';var o=":host{display:block}";var l=t("salla_order_summary",function(){function t(t){n(this,t);this.codeCopied=null;this.noItemFound=true;this.order_items=[];this.isDigitalCard=function(t){return t.product.type==="codes"};this.isDigitalProduct=function(t){return t.product.type==="digital"}}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){switch(n.label){case 0:salla.lang.onLoaded((function(){t.codes_text=salla.lang.get("pages.thank_you.codes");t.copy_text=salla.lang.get("common.elements.copy");t.files_text=salla.lang.get("pages.thank_you.files");t.download_text=salla.lang.get("pages.thank_you.download")}));return[4,this.getOrderItems()];case 1:return[2,n.sent()]}}))}))};t.prototype.copyToClipboardHandler=function(t){var n=this;if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(t).then((function(){n.codeCopied=t;n.copyCodeButtonTimeout=setTimeout((function(){n.codeCopied=null}),3e3)}))}catch(t){salla.loggers.error("copy functionality is not supported by the browser")}}};t.prototype.getOrderItems=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,r,s,i;var c=this;return __generator(this,(function(a){switch(a.label){case 0:t=this.orderId||salla.config.get("page.id");n="Failed to fetch order items";if(!t){salla.logger.error(n);throw new Error(n)}a.label=1;case 1:a.trys.push([1,3,,4]);return[4,salla.api.request("orders/".concat(t))];case 2:e=a.sent().data.items,r=e===void 0?[]:e;s=r.some((function(t){return c.isDigitalCard(t)||c.isDigitalProduct(t)}));if(s){this.order_items=r;this.noItemFound=false}return[3,4];case 3:i=a.sent();salla.logger.error(n);return[3,4];case 4:return[2]}}))}))};t.prototype.disconnectedCallback=function(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)};t.prototype.render=function(){var t=this;return e("ul",{key:"14eed8e219bcde5b32d5fddb95bb8727e980c56c",class:"s-order-summary-wrapper"},this.noItemFound?e("salla-placeholder",{alignment:"center"},e("span",{slot:"title"})):this.order_items.map((function(n){return t.isDigitalCard(n)?e("li",{key:n.product.id,class:"s-order-summary-item"},e("h2",{class:"s-order-summary-item-title"},t.codes_text," (",n.name,")"),n.codes.map((function(n){return e("div",{key:n.code,class:"s-order-summary-code-item-wrapper"},e("p",null,e("span",{innerHTML:a}),e("span",null,n.code)),e("salla-button",{class:"s-order-summary-item-copy-button ".concat(t.codeCopied===n.code?"copied":""),onClick:function(){return t.copyToClipboardHandler(n.code)},shape:"link"},e("span",{innerHTML:t.codeCopied===n.code?r:c}),e("span",null,t.copy_text)))}))):t.isDigitalProduct(n)?e("li",{key:n.product.id,class:"s-order-summary-item"},e("h2",{class:"s-order-summary-item-title"},t.files_text," (",n.name,")"),e("ul",null,n.files.map((function(n){return e("li",{class:"s-order-summary-digital-item-wrapper"},e("div",null,e("span",{innerHTML:s}),e("span",null,n.name)),e("a",{href:n.url,target:"_blank",class:"s-order-summary-item-download"},e("span",{innerHTML:i}),e("span",null,t.download_text)))})))):null})))};return t}());l.style=o}}}));
5
- //# sourceMappingURL=p-8e099efd.system.entry.js.map
4
+ */System.register(["./p-DiFVtThr.system.js","./p-Dxc5oJG6.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.r;e=t.h},function(t){r=t.I}],execute:function(){var s='\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>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333z"></path>\n</svg>\n';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>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var c='\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>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n';var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n';var o=":host{display:block}";var l=t("salla_order_summary",function(){function t(t){n(this,t);this.codeCopied=null;this.noItemFound=true;this.order_items=[];this.isDigitalCard=function(t){return t.product.type==="codes"};this.isDigitalProduct=function(t){return t.product.type==="digital"}}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){switch(n.label){case 0:salla.lang.onLoaded((function(){t.codes_text=salla.lang.get("pages.thank_you.codes");t.copy_text=salla.lang.get("common.elements.copy");t.files_text=salla.lang.get("pages.thank_you.files");t.download_text=salla.lang.get("pages.thank_you.download")}));return[4,this.getOrderItems()];case 1:return[2,n.sent()]}}))}))};t.prototype.copyToClipboardHandler=function(t){var n=this;if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(t).then((function(){n.codeCopied=t;n.copyCodeButtonTimeout=setTimeout((function(){n.codeCopied=null}),3e3)}))}catch(t){salla.loggers.error("copy functionality is not supported by the browser")}}};t.prototype.getOrderItems=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,r,s,i;var c=this;return __generator(this,(function(a){switch(a.label){case 0:t=this.orderId||salla.config.get("page.id");n="Failed to fetch order items";if(!t){salla.logger.error(n);throw new Error(n)}a.label=1;case 1:a.trys.push([1,3,,4]);return[4,salla.api.request("orders/".concat(t))];case 2:e=a.sent().data.items,r=e===void 0?[]:e;s=r.some((function(t){return c.isDigitalCard(t)||c.isDigitalProduct(t)}));if(s){this.order_items=r;this.noItemFound=false}return[3,4];case 3:i=a.sent();salla.logger.error(n);return[3,4];case 4:return[2]}}))}))};t.prototype.disconnectedCallback=function(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)};t.prototype.render=function(){var t=this;return e("ul",{key:"14eed8e219bcde5b32d5fddb95bb8727e980c56c",class:"s-order-summary-wrapper"},this.noItemFound?e("salla-placeholder",{alignment:"center"},e("span",{slot:"title"})):this.order_items.map((function(n){return t.isDigitalCard(n)?e("li",{key:n.product.id,class:"s-order-summary-item"},e("h2",{class:"s-order-summary-item-title"},t.codes_text," (",n.name,")"),n.codes.map((function(n){return e("div",{key:n.code,class:"s-order-summary-code-item-wrapper"},e("p",null,e("span",{innerHTML:a}),e("span",null,n.code)),e("salla-button",{class:"s-order-summary-item-copy-button ".concat(t.codeCopied===n.code?"copied":""),onClick:function(){return t.copyToClipboardHandler(n.code)},shape:"link"},e("span",{innerHTML:t.codeCopied===n.code?r:c}),e("span",null,t.copy_text)))}))):t.isDigitalProduct(n)?e("li",{key:n.product.id,class:"s-order-summary-item"},e("h2",{class:"s-order-summary-item-title"},t.files_text," (",n.name,")"),e("ul",null,n.files.map((function(n){return e("li",{class:"s-order-summary-digital-item-wrapper"},e("div",null,e("span",{innerHTML:s}),e("span",null,n.name)),e("a",{href:n.url,target:"_blank",class:"s-order-summary-item-download"},e("span",{innerHTML:i}),e("span",null,t.download_text)))})))):null})))};return t}());l.style=o}}}));
5
+ //# sourceMappingURL=p-c6fde185.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BL8Qlvzz.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:"e2454dd8d3533e19b93b796ca427d825c6576ff0",class:"s-tooltip-container"},i("slot",{key:"08ae103831491e760b47c848c161f909341c68ee"}),this.show&&i("div",{key:"bab2b3214ff45377b5d971f13f32c691ec090324",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-12c89d39.system.entry.js.map
4
+ System.register(["./p-DiFVtThr.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:"e2454dd8d3533e19b93b796ca427d825c6576ff0",class:"s-tooltip-container"},i("slot",{key:"08ae103831491e760b47c848c161f909341c68ee"}),this.show&&i("div",{key:"bab2b3214ff45377b5d971f13f32c691ec090324",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-c94f95c1.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,H as a,g as i}from"./p-Dr_h0iSH.js";const e=":host{display:block}";const l=class{constructor(t){s(this,t);this.exclude=[]}componentWillLoad(){return salla.onReady().then((()=>{var s,t,a;if(typeof this.exclude==="string"){try{this.exclude=JSON.parse(this.exclude)}catch(s){salla.logger.error("salla-payments:: failed to parse the exclude props!",this.exclude);this.exclude=[]}}this.placeholderImage=salla.url.cdn(`images/s-empty.png`);this.paymentSlot=((s=this.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="${this.placeholderImage}" data-src="{image}" alt={payment} /><li>`;this.sbcSlot=((t=this.host.querySelector('[slot="sbc"]'))===null||t===void 0?void 0:t.innerHTML)||`<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="${this.placeholderImage}" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>`;this.codSlot=((a=this.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.innerHTML)||`<li class="s-payments-list-item"> <img width="100%" height="100%" src="${this.placeholderImage}" data-src={image} class="lazy" alt="COD"/><li>`;this.payments=salla.config.get("store.settings.payments")}))}render(){const s=!this.exclude.includes("made-in-ksa")&&salla.config.get("store.settings.made_in_ksa");const i=this.exclude.includes("sbc")?null:salla.config.get("store.settings.certificate.id");return t(a,{key:"a1a26ba03aa60491071f0e63bac40de3ad91bce6",class:"s-payments-list-wrap"},t("ul",{key:"d31ca162e83aade956f45d8f517029942a748646",class:"s-payments-list"},s&&t("li",{key:"552e3e57345d01ab33bfd20094cbcf8f702c6efa",class:"s-payments-list-item"},t("img",{key:"04eb9c9a1950edc9ea3c2e218fbe6c5c21d65f6a",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((s=>s=="cod"?t("div",{id:"cod-slot",innerHTML:this.codSlot.replace(/\{image\}/g,salla.url.cdn(`images/payment/cod_mini.png`,58,58))}):t("div",{id:"payment-slot",innerHTML:this.paymentSlot.replace(/\{image\}/g,salla.url.cdn(`images/payment/${s}_mini.png`,58,58)).replace(/\{payment\}/g,s)}))),i&&t("div",{key:"5f69b3c936edf8039006d6ecd73e3c44b74b9167",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/${i}`)})))}componentDidLoad(){var s;(s=document.lazyLoadInstance)===null||s===void 0?void 0:s.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((s=>{s.addEventListener("load",(()=>{s.setAttribute("width","100%");s.setAttribute("height","100%")}))}))}componentDidRender(){var s,t,a;this.host.querySelectorAll("#payment-slot").forEach((s=>s.replaceWith(s.firstChild)));this.host.querySelectorAll("#sbc-slot").forEach((s=>s.replaceWith(s.firstChild)));this.host.querySelectorAll("#cod-slot").forEach((s=>s.replaceWith(s.firstChild)));(s=this.host.querySelector('[slot="payment"]'))===null||s===void 0?void 0:s.remove();(t=this.host.querySelector('[slot="sbc"]'))===null||t===void 0?void 0:t.remove();(a=this.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.remove()}get host(){return i(this)}};l.style=e;export{l as salla_payments};
5
- //# sourceMappingURL=p-9c7abe6a.entry.js.map
4
+ import{r as s,h as t,H as a,g as i}from"./p-DtlYcjlJ.js";const e=":host{display:block}";const l=class{constructor(t){s(this,t);this.exclude=[]}componentWillLoad(){return salla.onReady().then((()=>{var s,t,a;if(typeof this.exclude==="string"){try{this.exclude=JSON.parse(this.exclude)}catch(s){salla.logger.error("salla-payments:: failed to parse the exclude props!",this.exclude);this.exclude=[]}}this.placeholderImage=salla.url.cdn(`images/s-empty.png`);this.paymentSlot=((s=this.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="${this.placeholderImage}" data-src="{image}" alt={payment} /><li>`;this.sbcSlot=((t=this.host.querySelector('[slot="sbc"]'))===null||t===void 0?void 0:t.innerHTML)||`<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="${this.placeholderImage}" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>`;this.codSlot=((a=this.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.innerHTML)||`<li class="s-payments-list-item"> <img width="100%" height="100%" src="${this.placeholderImage}" data-src={image} class="lazy" alt="COD"/><li>`;this.payments=salla.config.get("store.settings.payments")}))}render(){const s=!this.exclude.includes("made-in-ksa")&&salla.config.get("store.settings.made_in_ksa");const i=this.exclude.includes("sbc")?null:salla.config.get("store.settings.certificate.id");return t(a,{key:"a1a26ba03aa60491071f0e63bac40de3ad91bce6",class:"s-payments-list-wrap"},t("ul",{key:"d31ca162e83aade956f45d8f517029942a748646",class:"s-payments-list"},s&&t("li",{key:"552e3e57345d01ab33bfd20094cbcf8f702c6efa",class:"s-payments-list-item"},t("img",{key:"04eb9c9a1950edc9ea3c2e218fbe6c5c21d65f6a",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((s=>s=="cod"?t("div",{id:"cod-slot",innerHTML:this.codSlot.replace(/\{image\}/g,salla.url.cdn(`images/payment/cod_mini.png`,58,58))}):t("div",{id:"payment-slot",innerHTML:this.paymentSlot.replace(/\{image\}/g,salla.url.cdn(`images/payment/${s}_mini.png`,58,58)).replace(/\{payment\}/g,s)}))),i&&t("div",{key:"5f69b3c936edf8039006d6ecd73e3c44b74b9167",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/${i}`)})))}componentDidLoad(){var s;(s=document.lazyLoadInstance)===null||s===void 0?void 0:s.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((s=>{s.addEventListener("load",(()=>{s.setAttribute("width","100%");s.setAttribute("height","100%")}))}))}componentDidRender(){var s,t,a;this.host.querySelectorAll("#payment-slot").forEach((s=>s.replaceWith(s.firstChild)));this.host.querySelectorAll("#sbc-slot").forEach((s=>s.replaceWith(s.firstChild)));this.host.querySelectorAll("#cod-slot").forEach((s=>s.replaceWith(s.firstChild)));(s=this.host.querySelector('[slot="payment"]'))===null||s===void 0?void 0:s.remove();(t=this.host.querySelector('[slot="sbc"]'))===null||t===void 0?void 0:t.remove();(a=this.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.remove()}get host(){return i(this)}};l.style=e;export{l as salla_payments};
5
+ //# sourceMappingURL=p-cbcfb963.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BL8Qlvzz.system.js"],(function(t){"use strict";var s,n,a,i;return{setters:[function(t){s=t.r;n=t.h;a=t.H;i=t.g}],execute:function(){var r=":host{display:block}";var e=t("salla_apps_icons",function(){function t(t){var n=this;s(this,t);var a;this.apps=salla.config.get("store.apps");this.appSlot=((a=this.host.querySelector('[slot="app"]'))===null||a===void 0?void 0:a.innerHTML)||"<img alt={name} src={icon} />";salla.onReady((function(){n.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((function(){n.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}t.prototype.getAppsArray=function(){return Object.entries(this.apps).map((function(t){var s=t[0],n=t[1];return{name:s,value:n}}))};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return n(a,{class:"s-apps-icons"},!this.hideTitle&&n("h3",null,this.appsTitle),n("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map((function(s,a){return n("a",{key:a,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:t.appSlot.replace(/\{icon\}/g,salla.url.cdn("images/".concat(s.name,".png"))).replace(/\{name\}/g,s.name)})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());e.style=r}}}));
5
- //# sourceMappingURL=p-e27633d6.system.entry.js.map
4
+ System.register(["./p-DiFVtThr.system.js"],(function(t){"use strict";var s,n,a,i;return{setters:[function(t){s=t.r;n=t.h;a=t.H;i=t.g}],execute:function(){var r=":host{display:block}";var e=t("salla_apps_icons",function(){function t(t){var n=this;s(this,t);var a;this.apps=salla.config.get("store.apps");this.appSlot=((a=this.host.querySelector('[slot="app"]'))===null||a===void 0?void 0:a.innerHTML)||"<img alt={name} src={icon} />";salla.onReady((function(){n.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((function(){n.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}t.prototype.getAppsArray=function(){return Object.entries(this.apps).map((function(t){var s=t[0],n=t[1];return{name:s,value:n}}))};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return n(a,{class:"s-apps-icons"},!this.hideTitle&&n("h3",null,this.appsTitle),n("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map((function(s,a){return n("a",{key:a,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:t.appSlot.replace(/\{icon\}/g,salla.url.cdn("images/".concat(s.name,".png"))).replace(/\{name\}/g,s.name)})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());e.style=r}}}));
5
+ //# sourceMappingURL=p-ce103d4c.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BL8Qlvzz.system.js"],(function(i){"use strict";var s,t,r;return{setters:[function(i){s=i.r;t=i.h;r=i.H}],execute:function(){var l="";var n=i("salla_order_details_multiple_bundle_product",function(){function i(i){s(this,i);this.placeholderImage=salla.url.cdn("images/s-empty.png")}i.prototype.getProductImage=function(){var i;if(!((i=this.productDetails)===null||i===void 0?void 0:i.image)){return this.placeholderImage}if(typeof this.productDetails.image==="string"){return this.productDetails.image}return this.productDetails.image.url||this.placeholderImage||salla.url.cdn("images/s-empty.png")};i.prototype.getProductImageAlt=function(){var i,s,t;if(!((i=this.productDetails)===null||i===void 0?void 0:i.image)||typeof this.productDetails.image==="string"){return((s=this.productDetails)===null||s===void 0?void 0:s.name)||""}return this.productDetails.image.alt||((t=this.productDetails)===null||t===void 0?void 0:t.name)||""};i.prototype.getAccordionId=function(){var i;return"accordion-".concat(((i=this.productDetails)===null||i===void 0?void 0:i.id)||"default")};i.prototype.getAccordionKey=function(){var i;return((i=this.productDetails)===null||i===void 0?void 0:i.id)||"default"};i.prototype.shouldBeCollapsible=function(){var i,s;if(this.collapsible!==undefined){return this.collapsible}return((s=(i=this.productDetails)===null||i===void 0?void 0:i.options)===null||s===void 0?void 0:s.length)>0};i.prototype.renderProductPrice=function(){if(!this.productDetails){return null}var i=this.productDetails,s=i.is_on_sale,r=i.sale_price,l=i.regular_price,n=i.price;if(s&&r){return t("div",null,t("span",{class:"s-order-details-product-price s-order-details-product-price-sale"},t("span",{innerHTML:salla.money(r)})),l&&t("span",{class:"s-order-details-product-regular-price"},t("span",{innerHTML:salla.money(l)})))}return t("span",{class:"s-order-details-product-price"},t("span",{innerHTML:salla.money(n)}))};i.prototype.renderOptions=function(){var i,s;if(!((s=(i=this.productDetails)===null||i===void 0?void 0:i.options)===null||s===void 0?void 0:s.length)){return null}return t("salla-accordion-body",null,t("div",{class:"s-order-details-options"},t("salla-order-details-options",{options:this.productDetails.options})))};i.prototype.render=function(){var i,s,l;if(!this.productDetails){return null}var n=this.shouldBeCollapsible();return t(r,{class:"s-order-details-bundle-wrapper"},t("salla-accordion",{key:this.getAccordionKey(),collapsed:false,bordered:true,collapsible:n,id:this.getAccordionId(),size:"sm"},t("salla-accordion-head",null,t("div",{class:"s-order-details-product"},t("div",{class:"s-order-details-product-content"},t("div",{class:"s-order-details-product-info"},t("div",{class:"s-order-details-product-image"},t("img",{src:this.getProductImage(),alt:this.getProductImageAlt()})),t("div",{class:"s-order-details-product-details"},t("a",{href:((i=this.productDetails)===null||i===void 0?void 0:i.url)||"#",class:"s-order-details-product-name"},((s=this.productDetails)===null||s===void 0?void 0:s.name)||""),this.renderProductPrice(),((l=this.productDetails)===null||l===void 0?void 0:l.quantity)&&t("span",{class:"s-order-details-product-quantity"},"×",this.productDetails.quantity)))))),this.renderOptions()))};return i}());n.style=l}}}));
5
- //# sourceMappingURL=p-da2c57dd.system.entry.js.map
4
+ System.register(["./p-DiFVtThr.system.js"],(function(i){"use strict";var s,t,r;return{setters:[function(i){s=i.r;t=i.h;r=i.H}],execute:function(){var l="";var n=i("salla_order_details_multiple_bundle_product",function(){function i(i){s(this,i);this.placeholderImage=salla.url.cdn("images/s-empty.png")}i.prototype.getProductImage=function(){var i;if(!((i=this.productDetails)===null||i===void 0?void 0:i.image)){return this.placeholderImage}if(typeof this.productDetails.image==="string"){return this.productDetails.image}return this.productDetails.image.url||this.placeholderImage||salla.url.cdn("images/s-empty.png")};i.prototype.getProductImageAlt=function(){var i,s,t;if(!((i=this.productDetails)===null||i===void 0?void 0:i.image)||typeof this.productDetails.image==="string"){return((s=this.productDetails)===null||s===void 0?void 0:s.name)||""}return this.productDetails.image.alt||((t=this.productDetails)===null||t===void 0?void 0:t.name)||""};i.prototype.getAccordionId=function(){var i;return"accordion-".concat(((i=this.productDetails)===null||i===void 0?void 0:i.id)||"default")};i.prototype.getAccordionKey=function(){var i;return((i=this.productDetails)===null||i===void 0?void 0:i.id)||"default"};i.prototype.shouldBeCollapsible=function(){var i,s;if(this.collapsible!==undefined){return this.collapsible}return((s=(i=this.productDetails)===null||i===void 0?void 0:i.options)===null||s===void 0?void 0:s.length)>0};i.prototype.renderProductPrice=function(){if(!this.productDetails){return null}var i=this.productDetails,s=i.is_on_sale,r=i.sale_price,l=i.regular_price,n=i.price;if(s&&r){return t("div",null,t("span",{class:"s-order-details-product-price s-order-details-product-price-sale"},t("span",{innerHTML:salla.money(r)})),l&&t("span",{class:"s-order-details-product-regular-price"},t("span",{innerHTML:salla.money(l)})))}return t("span",{class:"s-order-details-product-price"},t("span",{innerHTML:salla.money(n)}))};i.prototype.renderOptions=function(){var i,s;if(!((s=(i=this.productDetails)===null||i===void 0?void 0:i.options)===null||s===void 0?void 0:s.length)){return null}return t("salla-accordion-body",null,t("div",{class:"s-order-details-options"},t("salla-order-details-options",{options:this.productDetails.options})))};i.prototype.render=function(){var i,s,l;if(!this.productDetails){return null}var n=this.shouldBeCollapsible();return t(r,{class:"s-order-details-bundle-wrapper"},t("salla-accordion",{key:this.getAccordionKey(),collapsed:false,bordered:true,collapsible:n,id:this.getAccordionId(),size:"sm"},t("salla-accordion-head",null,t("div",{class:"s-order-details-product"},t("div",{class:"s-order-details-product-content"},t("div",{class:"s-order-details-product-info"},t("div",{class:"s-order-details-product-image"},t("img",{src:this.getProductImage(),alt:this.getProductImageAlt()})),t("div",{class:"s-order-details-product-details"},t("a",{href:((i=this.productDetails)===null||i===void 0?void 0:i.url)||"#",class:"s-order-details-product-name"},((s=this.productDetails)===null||s===void 0?void 0:s.name)||""),this.renderProductPrice(),((l=this.productDetails)===null||l===void 0?void 0:l.quantity)&&t("span",{class:"s-order-details-product-quantity"},"×",this.productDetails.quantity)))))),this.renderOptions()))};return i}());n.style=l}}}));
5
+ //# sourceMappingURL=p-d14a8edc.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as i,h as t,H as e}from"./p-Dr_h0iSH.js";var s;(function(i){i["PERCENTAGE"]="percentage";i["FIXED"]="fixed";i["FREE_PRODUCT"]="free_product"})(s||(s={}));var n;(function(i){i["PRODUCT_COUNT"]="products_count";i["PRODUCT_PURCHASE"]="order_amount"})(n||(n={}));const o=":host{display:block}";const l=class{constructor(t){i(this,t);this.offer=null;this.products={};this.isLoading=false;this.canRender=true}componentWillLoad(){salla.onReady().then((()=>{var i,t,e;if(!((i=salla.config.get("store.features"))===null||i===void 0?void 0:i.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((e=(t=salla.storage.get("cart"))===null||t===void 0?void 0:t.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:i})=>{this.offer=i.find((i=>i.type==="conditional"));if(!this.offer){this.canRender=false;return}this.isLoading=true;this.offer.details.discounts.unshift({value:0,min_spend:0});return this.updateInitialOfferValue()})).then((()=>{if(!this.offer)return;return this.getProducts()})).then((()=>{if(!this.offer)return;salla.event.on("cart::updated",(i=>this.updateOfferValues(i)))})).catch((i=>{this.canRender=false;salla.logger.warn("salla-conditional-offer:: ",i)})).finally((()=>{this.isLoading=false}))}getProducts(){const i=this.offer.details.discounts.filter((({type:i})=>i===s.FREE_PRODUCT)).map((({value:i})=>i));if(i.length>0){return salla.product.fetch({source:"selected",source_value:i}).then((({data:i})=>{i.forEach((({id:i,url:t,image:e})=>{this.products[i]={url:t,image:e}}))}))}}updateInitialOfferValue(){return salla.api.cart.details().then((({data:{cart:i}})=>this.updateOfferValues(i)))}updateOfferValues({items:i,sub_total:t}){var e,s;const o=this.offer.details.based_on===n.PRODUCT_COUNT?(e=i===null||i===void 0?void 0:i.reduce(((i,{quantity:t})=>i+t),0))!==null&&e!==void 0?e:0:t;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(s=this.offer)===null||s===void 0?void 0:s.details),{current_value:o})});return this.offer}getCheckpointContent(i){var e,n;if(i.type===s.PERCENTAGE)return`${i.value}%`;if(i.type===s.FIXED)return salla.money(i.value);if(i.type!==s.FREE_PRODUCT){salla.logger.error(`salla-conditional-offer:: unexpected type (${i.type})!`);return""}const o=this.products[i.value];if(!o){salla.logger.error(`salla-conditional-offer:: there is no product with id (${i.value})!`);return""}return t("a",{class:"s-conditional-offer-product-link",href:o.url},t("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:((e=o===null||o===void 0?void 0:o.image)===null||e===void 0?void 0:e.alt)||"",src:(n=o===null||o===void 0?void 0:o.image)===null||n===void 0?void 0:n.url}))}getOfferType(i){var t;const e=(t=this.offer.details)===null||t===void 0?void 0:t.based_on;if(e===n.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",i.min_spend);if(e===n.PRODUCT_PURCHASE)return salla.money(i.min_spend);salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${e}`);return`${i.min_spend}`}clamp(i,t,e){return Math.max(t,Math.min(i,e))}mapValueRanges(i,t,e,s,n){const o=(i-t)*(n-s)/(e-t)+s;if(o===Number.POSITIVE_INFINITY)return 100;if(o===Number.NEGATIVE_INFINITY)return 0;return this.clamp(o,0,100)}getCheckPointView(i,e){var s,n;const o=this.offer.details.discounts.findIndex((({min_spend:t})=>t===i.min_spend));const l=(n=(s=this.offer.details.discounts[o-1])===null||s===void 0?void 0:s.min_spend)!==null&&n!==void 0?n:0;const a=this.mapValueRanges(this.offer.details.current_value,l,i.min_spend,0,100);const r=i.min_spend<=this.offer.details.current_value;return t("div",{class:"s-conditional-offer-checkpoint-container"},e>0?[t("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},t("div",{class:"s-conditional-offer-progress-line-inactive"}),t("div",{class:"s-conditional-offer-progress-line-active",style:{width:`${a}%`}})),t("div",{key:"checkpoint",class:`s-conditional-offer-checkpoint ${r?"s-conditional-offer-active-checkpoint":""}`},t("div",{class:`s-conditional-offer-item-avatar-content ${r?"active":""}`,innerHTML:this.products&&this.getCheckpointContent(i)}),t("div",{class:`s-conditional-offer-checkpoint-label ${r?"active":""}`,innerHTML:this.getOfferType(i)}))]:t("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":e===0,active:r},innerHTML:this.getOfferType(i)}))}getLoadingSkeletonView(){return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-skeleton-inner-container"},t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"30%"})),t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"35%"})),t("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((()=>[t("salla-skeleton",{key:"checkpoint-line",height:"8px"}),t("div",{key:"checkpoint"},t("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))])))))}render(){if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();if(!this.offer)return null;return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-title-wrapper"},t("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?t("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",t("i",{class:"sicon-information"})):null),t("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map(((i,e)=>t("div",{class:{"flex-1":e>0},key:i.min_spend},this.getCheckPointView(i,e))))))}};l.style=o;export{l as salla_conditional_offer};
5
- //# sourceMappingURL=p-12dd0623.entry.js.map
4
+ import{r as i,h as t,H as e}from"./p-DtlYcjlJ.js";var s;(function(i){i["PERCENTAGE"]="percentage";i["FIXED"]="fixed";i["FREE_PRODUCT"]="free_product"})(s||(s={}));var n;(function(i){i["PRODUCT_COUNT"]="products_count";i["PRODUCT_PURCHASE"]="order_amount"})(n||(n={}));const o=":host{display:block}";const l=class{constructor(t){i(this,t);this.offer=null;this.products={};this.isLoading=false;this.canRender=true}componentWillLoad(){salla.onReady().then((()=>{var i,t,e;if(!((i=salla.config.get("store.features"))===null||i===void 0?void 0:i.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((e=(t=salla.storage.get("cart"))===null||t===void 0?void 0:t.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:i})=>{this.offer=i.find((i=>i.type==="conditional"));if(!this.offer){this.canRender=false;return}this.isLoading=true;this.offer.details.discounts.unshift({value:0,min_spend:0});return this.updateInitialOfferValue()})).then((()=>{if(!this.offer)return;return this.getProducts()})).then((()=>{if(!this.offer)return;salla.event.on("cart::updated",(i=>this.updateOfferValues(i)))})).catch((i=>{this.canRender=false;salla.logger.warn("salla-conditional-offer:: ",i)})).finally((()=>{this.isLoading=false}))}getProducts(){const i=this.offer.details.discounts.filter((({type:i})=>i===s.FREE_PRODUCT)).map((({value:i})=>i));if(i.length>0){return salla.product.fetch({source:"selected",source_value:i}).then((({data:i})=>{i.forEach((({id:i,url:t,image:e})=>{this.products[i]={url:t,image:e}}))}))}}updateInitialOfferValue(){return salla.api.cart.details().then((({data:{cart:i}})=>this.updateOfferValues(i)))}updateOfferValues({items:i,sub_total:t}){var e,s;const o=this.offer.details.based_on===n.PRODUCT_COUNT?(e=i===null||i===void 0?void 0:i.reduce(((i,{quantity:t})=>i+t),0))!==null&&e!==void 0?e:0:t;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(s=this.offer)===null||s===void 0?void 0:s.details),{current_value:o})});return this.offer}getCheckpointContent(i){var e,n;if(i.type===s.PERCENTAGE)return`${i.value}%`;if(i.type===s.FIXED)return salla.money(i.value);if(i.type!==s.FREE_PRODUCT){salla.logger.error(`salla-conditional-offer:: unexpected type (${i.type})!`);return""}const o=this.products[i.value];if(!o){salla.logger.error(`salla-conditional-offer:: there is no product with id (${i.value})!`);return""}return t("a",{class:"s-conditional-offer-product-link",href:o.url},t("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:((e=o===null||o===void 0?void 0:o.image)===null||e===void 0?void 0:e.alt)||"",src:(n=o===null||o===void 0?void 0:o.image)===null||n===void 0?void 0:n.url}))}getOfferType(i){var t;const e=(t=this.offer.details)===null||t===void 0?void 0:t.based_on;if(e===n.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",i.min_spend);if(e===n.PRODUCT_PURCHASE)return salla.money(i.min_spend);salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${e}`);return`${i.min_spend}`}clamp(i,t,e){return Math.max(t,Math.min(i,e))}mapValueRanges(i,t,e,s,n){const o=(i-t)*(n-s)/(e-t)+s;if(o===Number.POSITIVE_INFINITY)return 100;if(o===Number.NEGATIVE_INFINITY)return 0;return this.clamp(o,0,100)}getCheckPointView(i,e){var s,n;const o=this.offer.details.discounts.findIndex((({min_spend:t})=>t===i.min_spend));const l=(n=(s=this.offer.details.discounts[o-1])===null||s===void 0?void 0:s.min_spend)!==null&&n!==void 0?n:0;const a=this.mapValueRanges(this.offer.details.current_value,l,i.min_spend,0,100);const r=i.min_spend<=this.offer.details.current_value;return t("div",{class:"s-conditional-offer-checkpoint-container"},e>0?[t("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},t("div",{class:"s-conditional-offer-progress-line-inactive"}),t("div",{class:"s-conditional-offer-progress-line-active",style:{width:`${a}%`}})),t("div",{key:"checkpoint",class:`s-conditional-offer-checkpoint ${r?"s-conditional-offer-active-checkpoint":""}`},t("div",{class:`s-conditional-offer-item-avatar-content ${r?"active":""}`,innerHTML:this.products&&this.getCheckpointContent(i)}),t("div",{class:`s-conditional-offer-checkpoint-label ${r?"active":""}`,innerHTML:this.getOfferType(i)}))]:t("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":e===0,active:r},innerHTML:this.getOfferType(i)}))}getLoadingSkeletonView(){return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-skeleton-inner-container"},t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"30%"})),t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"35%"})),t("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((()=>[t("salla-skeleton",{key:"checkpoint-line",height:"8px"}),t("div",{key:"checkpoint"},t("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))])))))}render(){if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();if(!this.offer)return null;return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-title-wrapper"},t("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?t("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",t("i",{class:"sicon-information"})):null),t("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map(((i,e)=>t("div",{class:{"flex-1":e>0},key:i.min_spend},this.getCheckPointView(i,e))))))}};l.style=o;export{l as salla_conditional_offer};
5
+ //# sourceMappingURL=p-d1809737.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,i,n,e){function r(t){return t instanceof n?t:new n((function(i){i(t)}))}return new(n||(n=Promise))((function(n,s){function o(t){try{a(e.next(t))}catch(t){s(t)}}function u(t){try{a(e["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):r(t.value).then(o,u)}a((e=e.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},e,r,s,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(i){return a([t,i])}}function a(u){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(e=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1];s=u;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(u);break}if(s[2])n.ops.pop();n.trys.pop();continue}u=i.call(t,n)}catch(t){u=[6,t];r=0}finally{e=s=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-BL8Qlvzz.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var i,n,e,r,s,o;return{setters:[function(t){i=t.r;n=t.c;e=t.h;r=t.H;s=t.g},function(t){o=t.M}],execute:function(){var u='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n';var a="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";var f=t("salla_verify",function(){function t(t){var e=this;i(this,t);this.verified=n(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((function(){var t;e.translationLoaded=true;e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+e.type);(t=e.modal)===null||t===void 0?void 0:t.setTitle(e.title)}));if(this.display=="inline"){this.modal={open:function(){return""},close:function(){return""},setTitle:function(){return""}};return}salla.event.on("profile::verification",(function(t){var i;var n=Array.isArray(t)?t[0]:t;e.isProfileVerify=true;e.open(n);e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+n.type);(i=e.modal)===null||i===void 0?void 0:i.setTitle(e.title)}));salla.event.on("modalClosed",(function(){e.resendAfter=0;e.timer.innerHTML="30 : 00"}))}t.prototype.splitNumber=function(t){this.resetError();var i=t.data||t.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(t.target,i)};t.prototype.modifyNext=function(t,i){t.value=i[0];i=i.substring(1);if(t.nextElementSibling&&i.length){this.modifyNext(t.nextElementSibling,i)}else if(!t.nextElementSibling&&i.length===0){t.focus()}else if(t.nextElementSibling&&i.length===0){t.nextElementSibling.focus()}};t.prototype.checkAllInputs=function(){var t=true;for(var i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){t=false}}return t};t.prototype.handleKeyUp=function(t){var i,n,e,r;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key)){return}var s=t.keyCode||t.charCode;if(t.target.value){(i=t.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(n=t.target.nextElementSibling)===null||n===void 0?void 0:n.select()}else if([8,46].includes(s)){(e=t.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(r=t.target.previousElementSibling)===null||r===void 0?void 0:r.select()}if(t.target.value.length>1){this.splitNumber(t)}};t.prototype.handlePaste=function(t){this.resetError();var i=salla.helpers.number(t.clipboardData.getData("text"))||"";var n=i.replace(/[^0-9]/g,"");n=n.substring(0,this.otpInputs.length);this.otpInputs.forEach((function(t){return t.value=""}));this.modifyNext(this.otpInputs[0],n)};t.prototype.handleInput=function(t){var i=this;this.resetError();salla.helpers.inputDigitsOnly(t.target);if(this.checkAllInputs()){setTimeout((function(){i.toggleOTPSubmit()}),100)}};t.prototype.resetError=function(){this.hasError=false;this.errorMessage=""};t.prototype.handleFocus=function(t){var i;if(t.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(t.target.previousElementSibling.value==""){t.target.previousElementSibling.focus()}};t.prototype.getCode=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.code.value]}))}))};t.prototype.open=function(t){return __awaiter(this,void 0,void 0,(function(){var i,n;var e=this;return __generator(this,(function(r){this.data=t;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(n=this.firstOtpInput)===null||n===void 0?void 0:n.addEventListener("input",(function(t){return e.splitNumber(t)}));setTimeout((function(){return e.otpInputs[0].focus()}),100);return[2]}))}))};t.prototype.toggleOTPSubmit=function(){var t=[];this.otpInputs.forEach((function(i){return i.value&&t.push(i.value)}));this.code.value=t.join("");if(t.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()};t.prototype.reset=function(){this.otpInputs.forEach((function(t){return t.value=""}));this.code.value="";this.otpInputs[0].focus()};t.prototype.resendTimer=function(){var t=this;this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;var i=setInterval((function(){if(t.resendAfter<=0){clearInterval(i);t.resend.style.display="block";t.resendMessage.style.display="none"}else{t.timer.innerHTML="".concat(t.resendAfter>=10?t.resendAfter:"0"+t.resendAfter," : 00");t.resendAfter--}}),1e3)};t.prototype.resendCode=function(){var t=this;return this.btn.stop().then((function(){return t.btn.disable()})).then((function(){t.otpInputs.forEach((function(t){return t.value=""}));t.otpInputs[0].focus()})).then((function(){return salla.api.auth.resend(t.data)})).finally((function(){return t.resendTimer()}))};t.prototype.submit=function(){var t=this;if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}var i=Object.assign({code:this.code.value},this.data);return this.btn.load().then((function(){return t.btn.disable()})).then((function(){return t.isProfileVerify?salla.profile.verify(i):salla.auth.verify(i,t.supportWebAuth)})).then((function(i){return t.verified.emit(i)})).then((function(){return t.btn.stop()&&t.btn.disable()})).then((function(){return t.modal.close()})).then((function(){return t.autoReload&&window.location.reload()})).catch((function(i){var n,e,r;t.hasError=true;t.errorMessage=((r=(e=(n=i.response)===null||n===void 0?void 0:n.data)===null||e===void 0?void 0:e.error)===null||r===void 0?void 0:r.message)||salla.lang.get("common.errors.error_occurred");if(!i.response){console.log("Unexpected error",i)}else{salla.logger.error(i)}t.btn.stop()&&t.btn.enable()&&t.reset()}))};t.prototype.render=function(){var t=this;return this.display=="inline"?e(r,null,this.myBody()):e("salla-modal",{width:"xs",class:"s-verify",ref:function(i){return t.modal=i},"modal-title":this.title},e("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?u:o}),this.myBody())};t.prototype.myBody=function(){var t=this;return e("div",{class:"s-verify-body",ref:function(i){return t.body=i}},e("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),e("slot",{name:"mobile"}),e("slot",{name:"email"}),e("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:function(i){return t.code=i}}),e("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((function(i){return e("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:"otp-".concat(i),class:{"s-verify-input":true,"s-has-error":t.hasError},onInput:function(i){return t.handleInput(i)},onPaste:function(i){return t.handlePaste(i)},onKeyUp:function(i){return t.handleKeyUp(i)},onFocus:function(i){return t.handleFocus(i)},required:true})}))),this.hasError&&this.errorMessage?e("span",{class:"s-verify-error-message"},this.errorMessage):"",e("div",{slot:"footer",class:"s-verify-footer"},e("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:function(){return t.submit()},ref:function(i){return t.btn=i}},salla.lang.get("pages.profile.verify")),e("p",{class:"s-verify-resend-message",ref:function(i){return t.resendMessage=i}},salla.lang.get("blocks.header.resend_after"),e("b",{class:"s-verify-timer",ref:function(i){return t.timer=i}})),e("a",{href:"#",class:"s-verify-resend",onClick:function(){return t.resendCode()},ref:function(i){return t.resend=i}},salla.lang.get("blocks.comments.submit"))),e("slot",{name:"after-footer"}))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());f.style=a}}}));
5
- //# sourceMappingURL=p-f032b94d.system.entry.js.map
4
+ */System.register(["./p-DiFVtThr.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var i,n,e,r,s,o;return{setters:[function(t){i=t.r;n=t.c;e=t.h;r=t.H;s=t.g},function(t){o=t.M}],execute:function(){var u='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n';var a="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";var f=t("salla_verify",function(){function t(t){var e=this;i(this,t);this.verified=n(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((function(){var t;e.translationLoaded=true;e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+e.type);(t=e.modal)===null||t===void 0?void 0:t.setTitle(e.title)}));if(this.display=="inline"){this.modal={open:function(){return""},close:function(){return""},setTitle:function(){return""}};return}salla.event.on("profile::verification",(function(t){var i;var n=Array.isArray(t)?t[0]:t;e.isProfileVerify=true;e.open(n);e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+n.type);(i=e.modal)===null||i===void 0?void 0:i.setTitle(e.title)}));salla.event.on("modalClosed",(function(){e.resendAfter=0;e.timer.innerHTML="30 : 00"}))}t.prototype.splitNumber=function(t){this.resetError();var i=t.data||t.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(t.target,i)};t.prototype.modifyNext=function(t,i){t.value=i[0];i=i.substring(1);if(t.nextElementSibling&&i.length){this.modifyNext(t.nextElementSibling,i)}else if(!t.nextElementSibling&&i.length===0){t.focus()}else if(t.nextElementSibling&&i.length===0){t.nextElementSibling.focus()}};t.prototype.checkAllInputs=function(){var t=true;for(var i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){t=false}}return t};t.prototype.handleKeyUp=function(t){var i,n,e,r;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key)){return}var s=t.keyCode||t.charCode;if(t.target.value){(i=t.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(n=t.target.nextElementSibling)===null||n===void 0?void 0:n.select()}else if([8,46].includes(s)){(e=t.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(r=t.target.previousElementSibling)===null||r===void 0?void 0:r.select()}if(t.target.value.length>1){this.splitNumber(t)}};t.prototype.handlePaste=function(t){this.resetError();var i=salla.helpers.number(t.clipboardData.getData("text"))||"";var n=i.replace(/[^0-9]/g,"");n=n.substring(0,this.otpInputs.length);this.otpInputs.forEach((function(t){return t.value=""}));this.modifyNext(this.otpInputs[0],n)};t.prototype.handleInput=function(t){var i=this;this.resetError();salla.helpers.inputDigitsOnly(t.target);if(this.checkAllInputs()){setTimeout((function(){i.toggleOTPSubmit()}),100)}};t.prototype.resetError=function(){this.hasError=false;this.errorMessage=""};t.prototype.handleFocus=function(t){var i;if(t.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(t.target.previousElementSibling.value==""){t.target.previousElementSibling.focus()}};t.prototype.getCode=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.code.value]}))}))};t.prototype.open=function(t){return __awaiter(this,void 0,void 0,(function(){var i,n;var e=this;return __generator(this,(function(r){this.data=t;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(n=this.firstOtpInput)===null||n===void 0?void 0:n.addEventListener("input",(function(t){return e.splitNumber(t)}));setTimeout((function(){return e.otpInputs[0].focus()}),100);return[2]}))}))};t.prototype.toggleOTPSubmit=function(){var t=[];this.otpInputs.forEach((function(i){return i.value&&t.push(i.value)}));this.code.value=t.join("");if(t.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()};t.prototype.reset=function(){this.otpInputs.forEach((function(t){return t.value=""}));this.code.value="";this.otpInputs[0].focus()};t.prototype.resendTimer=function(){var t=this;this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;var i=setInterval((function(){if(t.resendAfter<=0){clearInterval(i);t.resend.style.display="block";t.resendMessage.style.display="none"}else{t.timer.innerHTML="".concat(t.resendAfter>=10?t.resendAfter:"0"+t.resendAfter," : 00");t.resendAfter--}}),1e3)};t.prototype.resendCode=function(){var t=this;return this.btn.stop().then((function(){return t.btn.disable()})).then((function(){t.otpInputs.forEach((function(t){return t.value=""}));t.otpInputs[0].focus()})).then((function(){return salla.api.auth.resend(t.data)})).finally((function(){return t.resendTimer()}))};t.prototype.submit=function(){var t=this;if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}var i=Object.assign({code:this.code.value},this.data);return this.btn.load().then((function(){return t.btn.disable()})).then((function(){return t.isProfileVerify?salla.profile.verify(i):salla.auth.verify(i,t.supportWebAuth)})).then((function(i){return t.verified.emit(i)})).then((function(){return t.btn.stop()&&t.btn.disable()})).then((function(){return t.modal.close()})).then((function(){return t.autoReload&&window.location.reload()})).catch((function(i){var n,e,r;t.hasError=true;t.errorMessage=((r=(e=(n=i.response)===null||n===void 0?void 0:n.data)===null||e===void 0?void 0:e.error)===null||r===void 0?void 0:r.message)||salla.lang.get("common.errors.error_occurred");if(!i.response){console.log("Unexpected error",i)}else{salla.logger.error(i)}t.btn.stop()&&t.btn.enable()&&t.reset()}))};t.prototype.render=function(){var t=this;return this.display=="inline"?e(r,null,this.myBody()):e("salla-modal",{width:"xs",class:"s-verify",ref:function(i){return t.modal=i},"modal-title":this.title},e("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?u:o}),this.myBody())};t.prototype.myBody=function(){var t=this;return e("div",{class:"s-verify-body",ref:function(i){return t.body=i}},e("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),e("slot",{name:"mobile"}),e("slot",{name:"email"}),e("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:function(i){return t.code=i}}),e("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((function(i){return e("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:"otp-".concat(i),class:{"s-verify-input":true,"s-has-error":t.hasError},onInput:function(i){return t.handleInput(i)},onPaste:function(i){return t.handlePaste(i)},onKeyUp:function(i){return t.handleKeyUp(i)},onFocus:function(i){return t.handleFocus(i)},required:true})}))),this.hasError&&this.errorMessage?e("span",{class:"s-verify-error-message"},this.errorMessage):"",e("div",{slot:"footer",class:"s-verify-footer"},e("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:function(){return t.submit()},ref:function(i){return t.btn=i}},salla.lang.get("pages.profile.verify")),e("p",{class:"s-verify-resend-message",ref:function(i){return t.resendMessage=i}},salla.lang.get("blocks.header.resend_after"),e("b",{class:"s-verify-timer",ref:function(i){return t.timer=i}})),e("a",{href:"#",class:"s-verify-resend",onClick:function(){return t.resendCode()},ref:function(i){return t.resend=i}},salla.lang.get("blocks.comments.submit"))),e("slot",{name:"after-footer"}))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());f.style=a}}}));
5
+ //# sourceMappingURL=p-d632f1fa.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as i,h as e}from"./p-Dr_h0iSH.js";const a="";const c=class{constructor(e){i(this,e)}render(){return e("a",{key:"15701825f2d0bb5b4bc21cf20114eae79af6b9aa",href:this.notification.url,class:{"s-notifications-item":true,"s-notifications-item-shadow":true,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"f87fba9d640a5c6cab81abe2d7537c2c89ee8857",class:"s-notifications-item-icon"},e("i",{key:"52590f17aacb20f87768a0dcc699e15303ca0e81",class:{"s-notifications-item-icon sicon-bell-ring":true,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"489bdb71b1caaa202604facffe47ce6a6825355b",class:"s-notifications-item-content"},e("div",{key:"53a0e1e2f2f1be650567c0b1b9cc779779bc2cdc",class:"s-notifications-item-content-leading"},e("h4",{key:"b7f6fd64ad3212d0810a4eb7ab0a33d4294498c7"},this.notification.title),e("p",{key:"3774bc0d5c619d73f97466283d28ed5204e9abe4"},this.notification.sub_title)),e("span",{key:"25c70649e341c3e7c659dec48e986945088b4dfa",class:"s-notifications-item-content-trailing"},e("i",{key:"eaca7d3e4b8254b5eb8ea7e864c5afac8529f019",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"de695990f5d2b6e5a131373d863f1d2e1e002613"},this.notification.date))))}};c.style=a;export{c as salla_notification_item};
5
- //# sourceMappingURL=p-61fcba71.entry.js.map
4
+ import{r as i,h as e}from"./p-DtlYcjlJ.js";const c="";const a=class{constructor(e){i(this,e)}render(){return e("a",{key:"15701825f2d0bb5b4bc21cf20114eae79af6b9aa",href:this.notification.url,class:{"s-notifications-item":true,"s-notifications-item-shadow":true,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"f87fba9d640a5c6cab81abe2d7537c2c89ee8857",class:"s-notifications-item-icon"},e("i",{key:"52590f17aacb20f87768a0dcc699e15303ca0e81",class:{"s-notifications-item-icon sicon-bell-ring":true,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"489bdb71b1caaa202604facffe47ce6a6825355b",class:"s-notifications-item-content"},e("div",{key:"53a0e1e2f2f1be650567c0b1b9cc779779bc2cdc",class:"s-notifications-item-content-leading"},e("h4",{key:"b7f6fd64ad3212d0810a4eb7ab0a33d4294498c7"},this.notification.title),e("p",{key:"3774bc0d5c619d73f97466283d28ed5204e9abe4"},this.notification.sub_title)),e("span",{key:"25c70649e341c3e7c659dec48e986945088b4dfa",class:"s-notifications-item-content-trailing"},e("i",{key:"eaca7d3e4b8254b5eb8ea7e864c5afac8529f019",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"de695990f5d2b6e5a131373d863f1d2e1e002613"},this.notification.date))))}};a.style=c;export{a as salla_notification_item};
5
+ //# sourceMappingURL=p-d71d6dff.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-BL8Qlvzz.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:"a1a26ba03aa60491071f0e63bac40de3ad91bce6",class:"s-payments-list-wrap"},a("ul",{key:"d31ca162e83aade956f45d8f517029942a748646",class:"s-payments-list"},s&&a("li",{key:"552e3e57345d01ab33bfd20094cbcf8f702c6efa",class:"s-payments-list-item"},a("img",{key:"04eb9c9a1950edc9ea3c2e218fbe6c5c21d65f6a",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:"5f69b3c936edf8039006d6ecd73e3c44b74b9167",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-4eb654dc.system.entry.js.map
4
+ System.register(["./p-DiFVtThr.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:"a1a26ba03aa60491071f0e63bac40de3ad91bce6",class:"s-payments-list-wrap"},a("ul",{key:"d31ca162e83aade956f45d8f517029942a748646",class:"s-payments-list"},s&&a("li",{key:"552e3e57345d01ab33bfd20094cbcf8f702c6efa",class:"s-payments-list-item"},a("img",{key:"04eb9c9a1950edc9ea3c2e218fbe6c5c21d65f6a",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:"5f69b3c936edf8039006d6ecd73e3c44b74b9167",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-d8aab17c.system.entry.js.map