@salla.sa/twilight-components 2.14.255 → 2.14.256

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 (303) hide show
  1. package/dist/cjs/{app-globals-CRbtFdLh.js → app-globals-DecFm_m-.js} +3 -3
  2. package/dist/cjs/{app-globals-CRbtFdLh.js.map → app-globals-DecFm_m-.js.map} +1 -1
  3. package/dist/cjs/{index-CiB3mE81.js → index-UNWHm5vs.js} +4 -4
  4. package/dist/cjs/index-UNWHm5vs.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-CXaqPW0W.js → app-globals-BWI-Bb8y.js} +3 -3
  43. package/dist/esm/{app-globals-CXaqPW0W.js.map → app-globals-BWI-Bb8y.js.map} +1 -1
  44. package/dist/esm/{index-Cmh2bDlu.js → index-wQf8KFfR.js} +4 -4
  45. package/dist/esm/index-wQf8KFfR.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-CXaqPW0W.js → app-globals-BWI-Bb8y.js} +2 -2
  82. package/dist/esm-es5/{app-globals-CXaqPW0W.js.map → app-globals-BWI-Bb8y.js.map} +1 -1
  83. package/dist/esm-es5/{index-Cmh2bDlu.js → index-wQf8KFfR.js} +3 -3
  84. package/dist/esm-es5/index-wQf8KFfR.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 +1 -1
  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 +1 -1
  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 +1 -1
  107. package/dist/esm-es5/salla-orders.entry.js +1 -1
  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-6c2ffbdb.entry.js → p-043b451e.entry.js} +2 -2
  121. package/dist/twilight/{p-302eb45d.system.entry.js → p-075582a1.system.entry.js} +2 -2
  122. package/dist/twilight/{p-cdadd220.entry.js → p-094e1bfb.entry.js} +2 -2
  123. package/dist/twilight/{p-ad83b353.system.entry.js → p-0e9ab63f.system.entry.js} +2 -2
  124. package/dist/twilight/{p-470e16b4.entry.js → p-14bc7704.entry.js} +2 -2
  125. package/dist/twilight/{p-fb5d9736.system.entry.js → p-187f0de5.system.entry.js} +2 -2
  126. package/dist/twilight/{p-471d0c2a.entry.js → p-18a1f403.entry.js} +2 -2
  127. package/dist/twilight/{p-6bd9b65d.system.entry.js → p-1a4075f6.system.entry.js} +2 -2
  128. package/dist/twilight/{p-7cdfb2ff.system.entry.js → p-1d2dc3d6.system.entry.js} +2 -2
  129. package/dist/twilight/{p-BVYqexVV.system.js.map → p-1viHRpqo.system.js.map} +1 -1
  130. package/dist/twilight/{p-dade84c6.entry.js → p-24683c1b.entry.js} +2 -2
  131. package/dist/twilight/{p-bef4449d.system.entry.js → p-29137c7f.system.entry.js} +2 -2
  132. package/dist/twilight/{p-7d060cdd.entry.js → p-2d9b7946.entry.js} +2 -2
  133. package/dist/twilight/{p-68cbea08.system.entry.js → p-2df289d8.system.entry.js} +2 -2
  134. package/dist/twilight/{p-6bd4f5dd.entry.js → p-2e4b02b7.entry.js} +2 -2
  135. package/dist/twilight/{p-b1266dbc.entry.js → p-30a71342.entry.js} +2 -2
  136. package/dist/twilight/{p-c9736f8b.entry.js → p-3416d165.entry.js} +2 -2
  137. package/dist/twilight/{p-c93aca68.system.entry.js → p-3ba77caf.system.entry.js} +2 -2
  138. package/dist/twilight/{p-84b61e25.entry.js → p-3dea4ce1.entry.js} +2 -2
  139. package/dist/twilight/{p-13a215f8.system.entry.js → p-44736c1f.system.entry.js} +2 -2
  140. package/dist/twilight/{p-53fdce47.system.entry.js → p-47f2f18e.system.entry.js} +2 -2
  141. package/dist/twilight/{p-bd97e5ea.system.entry.js → p-48df560c.system.entry.js} +2 -2
  142. package/dist/twilight/{p-41a7a590.system.entry.js → p-48f5142e.system.entry.js} +2 -2
  143. package/dist/twilight/{p-7f0e3435.entry.js → p-50f4a9e2.entry.js} +2 -2
  144. package/dist/twilight/{p-c4741c01.system.entry.js → p-52acbaea.system.entry.js} +2 -2
  145. package/dist/twilight/{p-889ec51e.system.entry.js → p-54080ee2.system.entry.js} +2 -2
  146. package/dist/twilight/{p-6868caa4.system.entry.js → p-57fa02ea.system.entry.js} +2 -2
  147. package/dist/twilight/{p-e53e006e.entry.js → p-5adde2a6.entry.js} +2 -2
  148. package/dist/twilight/{p-51915628.entry.js → p-5ed5d8f9.entry.js} +2 -2
  149. package/dist/twilight/{p-231440bc.system.entry.js → p-63435ed9.system.entry.js} +2 -2
  150. package/dist/twilight/{p-8e14e730.entry.js → p-69492d2a.entry.js} +2 -2
  151. package/dist/twilight/{p-468a7324.entry.js → p-6dc24b2b.entry.js} +2 -2
  152. package/dist/twilight/{p-7e3906fc.system.entry.js → p-73f3f2c3.system.entry.js} +2 -2
  153. package/dist/twilight/{p-6ef02abc.system.entry.js → p-78cfef2d.system.entry.js} +2 -2
  154. package/dist/twilight/{p-963ba76e.system.entry.js → p-7bd77519.system.entry.js} +2 -2
  155. package/dist/twilight/{p-d54d7cd7.system.entry.js → p-7c699521.system.entry.js} +2 -2
  156. package/dist/twilight/{p-fc7c940d.system.entry.js → p-8177fa38.system.entry.js} +2 -2
  157. package/dist/twilight/{p-56a2493e.entry.js → p-83c23d48.entry.js} +2 -2
  158. package/dist/twilight/{p-f0e1cc94.entry.js → p-853d41e8.entry.js} +2 -2
  159. package/dist/twilight/{p-02187d79.system.entry.js → p-89bf2f70.system.entry.js} +2 -2
  160. package/dist/twilight/{p-55a9da25.entry.js → p-96daa987.entry.js} +2 -2
  161. package/dist/twilight/{p-47f2e097.entry.js → p-9ba75295.entry.js} +2 -2
  162. package/dist/twilight/{p-DvzE4oQS.system.js.map → p-B2GM_QS5.system.js.map} +1 -1
  163. package/dist/twilight/{p-CbJXYJ5O.system.js → p-B3l0Kfzh.system.js} +3 -3
  164. package/dist/twilight/p-B3l0Kfzh.system.js.map +1 -0
  165. package/dist/twilight/{p-CYB_tFv0.system.js.map → p-B4Pb5WLq.system.js.map} +1 -1
  166. package/dist/twilight/{p-Ceb-eX-0.system.js.map → p-B60IU5Vs.system.js.map} +1 -1
  167. package/dist/twilight/{p-uNkJ2LZM.system.js.map → p-B7Sj5qYJ.system.js.map} +1 -1
  168. package/dist/twilight/{p-C3pcK7CB.js → p-B8IZTKFP.js} +2 -2
  169. package/dist/twilight/{p-C3pcK7CB.js.map → p-B8IZTKFP.js.map} +1 -1
  170. package/dist/twilight/{p-DJvU6sZZ.system.js.map → p-BDPbAe1K.system.js.map} +1 -1
  171. package/dist/twilight/{p-BpfPcg3W.system.js.map → p-BQLYc2vY.system.js.map} +1 -1
  172. package/dist/twilight/{p-aI0YGy91.system.js.map → p-Bf0KbqEp.system.js.map} +1 -1
  173. package/dist/twilight/{p-smRaSeBI.system.js.map → p-Bj9MrCiB.system.js.map} +1 -1
  174. package/dist/twilight/{p-CzmyZ_Nd.system.js → p-Bt6Eygwn.system.js} +2 -2
  175. package/dist/twilight/{p-CzmyZ_Nd.system.js.map → p-Bt6Eygwn.system.js.map} +1 -1
  176. package/dist/twilight/{p-BLd878to.system.js.map → p-BxJh7xdc.system.js.map} +1 -1
  177. package/dist/twilight/{p-Dk6V-4d2.system.js.map → p-C7iKwuQD.system.js.map} +1 -1
  178. package/dist/twilight/{p-CCrcmQ6i.system.js.map → p-C8F-L_m4.system.js.map} +1 -1
  179. package/dist/twilight/{p-BTHt_nZ5.system.js → p-CDwjlI7z.system.js} +2 -2
  180. package/dist/twilight/{p-BTHt_nZ5.system.js.map → p-CDwjlI7z.system.js.map} +1 -1
  181. package/dist/twilight/{p-BPogbRgc.system.js.map → p-CF3S17YT.system.js.map} +1 -1
  182. package/dist/twilight/{p-DsgPAMoP.system.js.map → p-CUf0HPrr.system.js.map} +1 -1
  183. package/dist/twilight/{p-DDgmoM0z.system.js.map → p-C_HvnS58.system.js.map} +1 -1
  184. package/dist/twilight/{p-By_R4wyt.system.js.map → p-Ca2Teikb.system.js.map} +1 -1
  185. package/dist/twilight/{p-CsF4wF5j.system.js.map → p-CgeNmDtS.system.js.map} +1 -1
  186. package/dist/twilight/{p-DoENPAoP.system.js.map → p-CghqBHSf.system.js.map} +1 -1
  187. package/dist/twilight/{p-KFQPthVf.system.js.map → p-CpKX8XYB.system.js.map} +1 -1
  188. package/dist/twilight/{p-D5AOZnju.system.js.map → p-D0J_AaUC.system.js.map} +1 -1
  189. package/dist/twilight/{p-D9CSx3Wz.system.js.map → p-D4G2wIz6.system.js.map} +1 -1
  190. package/dist/twilight/{p-DGWMlRvt.system.js.map → p-D4zrpBeO.system.js.map} +1 -1
  191. package/dist/twilight/{p-Ccypd_SM.system.js.map → p-DKjm4rCf.system.js.map} +1 -1
  192. package/dist/twilight/{p-C_ju2ao2.system.js.map → p-DMAlL0R0.system.js.map} +1 -1
  193. package/dist/twilight/{p-CKwOWJLk.system.js.map → p-DZSy6aSK.system.js.map} +1 -1
  194. package/dist/twilight/{p-BrKg9FB7.system.js.map → p-DjpII3ev.system.js.map} +1 -1
  195. package/dist/twilight/{p-DRcmoz10.system.js.map → p-DwFLdhIc.system.js.map} +1 -1
  196. package/dist/twilight/{p-DBkWclyq.system.js.map → p-Dx_ROnUt.system.js.map} +1 -1
  197. package/dist/twilight/{p-DDduzQA-.system.js.map → p-DyFLUz8M.system.js.map} +1 -1
  198. package/dist/twilight/{p-CXiTCFrN.system.js.map → p-DzXtTDb4.system.js.map} +1 -1
  199. package/dist/twilight/{p-BhewmKn2.system.js.map → p-R6dLd-aW.system.js.map} +1 -1
  200. package/dist/twilight/{p-b6c991e2.entry.js → p-a14111b9.entry.js} +2 -2
  201. package/dist/twilight/{p-02b2de19.system.entry.js → p-a3a9afb0.system.entry.js} +2 -2
  202. package/dist/twilight/{p-cfe9931b.system.entry.js → p-a8460414.system.entry.js} +2 -2
  203. package/dist/twilight/{p-e5ff9041.entry.js → p-a9996489.entry.js} +2 -2
  204. package/dist/twilight/{p-85b17c34.system.entry.js → p-af2294d6.system.entry.js} +2 -2
  205. package/dist/twilight/{p-419eb9a7.entry.js → p-afdaa346.entry.js} +2 -2
  206. package/dist/twilight/{p-2ac46fd5.system.entry.js → p-b3dc741c.system.entry.js} +2 -2
  207. package/dist/twilight/{p-9cf6cc9f.system.entry.js → p-bae72263.system.entry.js} +2 -2
  208. package/dist/twilight/{p-8277f14f.entry.js → p-bbf5e97b.entry.js} +2 -2
  209. package/dist/twilight/{p-459fff65.system.entry.js → p-bcd16c4e.system.entry.js} +2 -2
  210. package/dist/twilight/{p-67c93900.entry.js → p-be905670.entry.js} +2 -2
  211. package/dist/twilight/{p-4f3c5294.entry.js → p-cd5ce889.entry.js} +2 -2
  212. package/dist/twilight/{p-CaIXPRFW.system.js.map → p-d1T8kqjG.system.js.map} +1 -1
  213. package/dist/twilight/{p-9470463b.entry.js → p-d457dc38.entry.js} +2 -2
  214. package/dist/twilight/{p-e574830f.system.entry.js → p-d772798f.system.entry.js} +2 -2
  215. package/dist/twilight/{p-4710f397.entry.js → p-e34e1fb8.entry.js} +2 -2
  216. package/dist/twilight/{p-3099db22.system.entry.js → p-e95b04e6.system.entry.js} +2 -2
  217. package/dist/twilight/{p-44206730.entry.js → p-ea5a7966.entry.js} +2 -2
  218. package/dist/twilight/{p-78bf11f2.system.entry.js → p-ecbb77d9.system.entry.js} +2 -2
  219. package/dist/twilight/{p-93bc2972.system.entry.js → p-ed841a03.system.entry.js} +2 -2
  220. package/dist/twilight/{p-059379d0.entry.js → p-f3ec2b53.entry.js} +2 -2
  221. package/dist/twilight/{p-6fd8031a.entry.js → p-fc5efdeb.entry.js} +2 -2
  222. package/dist/twilight/{p-78715871.system.entry.js → p-fe17bbb4.system.entry.js} +3 -3
  223. package/dist/twilight/{p-72a5b284.entry.js → p-fef4ac95.entry.js} +2 -2
  224. package/dist/twilight/{p-2f228be7.entry.js → p-ff382951.entry.js} +2 -2
  225. package/dist/twilight/{p-4f1f3a1a.entry.js → p-ffbb9af5.entry.js} +2 -2
  226. package/dist/twilight/{p-Cmh2bDlu.js → p-wQf8KFfR.js} +3 -3
  227. package/dist/twilight/p-wQf8KFfR.js.map +1 -0
  228. package/dist/twilight/{p-C8tnyQ_B.system.js.map → p-ySzjfVuw.system.js.map} +1 -1
  229. package/dist/twilight/{p-EEU49bnm.system.js.map → p-ys-31B6G.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-CiB3mE81.js.map +0 -1
  234. package/dist/esm/index-Cmh2bDlu.js.map +0 -1
  235. package/dist/esm-es5/index-Cmh2bDlu.js.map +0 -1
  236. package/dist/twilight/p-CbJXYJ5O.system.js.map +0 -1
  237. package/dist/twilight/p-Cmh2bDlu.js.map +0 -1
  238. /package/dist/twilight/{p-6c2ffbdb.entry.js.map → p-043b451e.entry.js.map} +0 -0
  239. /package/dist/twilight/{p-302eb45d.system.entry.js.map → p-075582a1.system.entry.js.map} +0 -0
  240. /package/dist/twilight/{p-cdadd220.entry.js.map → p-094e1bfb.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-ad83b353.system.entry.js.map → p-0e9ab63f.system.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-470e16b4.entry.js.map → p-14bc7704.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-fb5d9736.system.entry.js.map → p-187f0de5.system.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-471d0c2a.entry.js.map → p-18a1f403.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-6bd9b65d.system.entry.js.map → p-1a4075f6.system.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-7cdfb2ff.system.entry.js.map → p-1d2dc3d6.system.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-dade84c6.entry.js.map → p-24683c1b.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-bef4449d.system.entry.js.map → p-29137c7f.system.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-7d060cdd.entry.js.map → p-2d9b7946.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-68cbea08.system.entry.js.map → p-2df289d8.system.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-6bd4f5dd.entry.js.map → p-2e4b02b7.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-b1266dbc.entry.js.map → p-30a71342.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-c9736f8b.entry.js.map → p-3416d165.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-c93aca68.system.entry.js.map → p-3ba77caf.system.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-84b61e25.entry.js.map → p-3dea4ce1.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-13a215f8.system.entry.js.map → p-44736c1f.system.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-53fdce47.system.entry.js.map → p-47f2f18e.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-bd97e5ea.system.entry.js.map → p-48df560c.system.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-41a7a590.system.entry.js.map → p-48f5142e.system.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-7f0e3435.entry.js.map → p-50f4a9e2.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-c4741c01.system.entry.js.map → p-52acbaea.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-889ec51e.system.entry.js.map → p-54080ee2.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-6868caa4.system.entry.js.map → p-57fa02ea.system.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-e53e006e.entry.js.map → p-5adde2a6.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-51915628.entry.js.map → p-5ed5d8f9.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-231440bc.system.entry.js.map → p-63435ed9.system.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-8e14e730.entry.js.map → p-69492d2a.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-468a7324.entry.js.map → p-6dc24b2b.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-7e3906fc.system.entry.js.map → p-73f3f2c3.system.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-6ef02abc.system.entry.js.map → p-78cfef2d.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-963ba76e.system.entry.js.map → p-7bd77519.system.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-d54d7cd7.system.entry.js.map → p-7c699521.system.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-fc7c940d.system.entry.js.map → p-8177fa38.system.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-56a2493e.entry.js.map → p-83c23d48.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-f0e1cc94.entry.js.map → p-853d41e8.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-02187d79.system.entry.js.map → p-89bf2f70.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-55a9da25.entry.js.map → p-96daa987.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-47f2e097.entry.js.map → p-9ba75295.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-b6c991e2.entry.js.map → p-a14111b9.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-02b2de19.system.entry.js.map → p-a3a9afb0.system.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-cfe9931b.system.entry.js.map → p-a8460414.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-e5ff9041.entry.js.map → p-a9996489.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-85b17c34.system.entry.js.map → p-af2294d6.system.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-419eb9a7.entry.js.map → p-afdaa346.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-2ac46fd5.system.entry.js.map → p-b3dc741c.system.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-9cf6cc9f.system.entry.js.map → p-bae72263.system.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-8277f14f.entry.js.map → p-bbf5e97b.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-459fff65.system.entry.js.map → p-bcd16c4e.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-67c93900.entry.js.map → p-be905670.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-4f3c5294.entry.js.map → p-cd5ce889.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-9470463b.entry.js.map → p-d457dc38.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-e574830f.system.entry.js.map → p-d772798f.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-4710f397.entry.js.map → p-e34e1fb8.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-3099db22.system.entry.js.map → p-e95b04e6.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-44206730.entry.js.map → p-ea5a7966.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-78bf11f2.system.entry.js.map → p-ecbb77d9.system.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-93bc2972.system.entry.js.map → p-ed841a03.system.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-059379d0.entry.js.map → p-f3ec2b53.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-6fd8031a.entry.js.map → p-fc5efdeb.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-78715871.system.entry.js.map → p-fe17bbb4.system.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-72a5b284.entry.js.map → p-fef4ac95.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-2f228be7.entry.js.map → p-ff382951.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-4f1f3a1a.entry.js.map → p-ffbb9af5.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as s,g as o}from"./p-Cmh2bDlu.js";import{H as e}from"./p-CGaH6V1S.js";import"./p-CgtvEd63.js";const r=":host{display:block}";const a=class{constructor(s){t(this,s);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((()=>{this.languageCode=salla.lang.locale;this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=true){var s;let o=(s=this.status)===null||s===void 0?void 0:s.querySelector(".s-button-text");if(o){e.toggleElementClassIf(o,"s-button-hide","s-button-show",(()=>t));this.btnLoader.style.display=t?"inherit":"none"}}initiateInfiniteScroll(){var t,s,o;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:false,nextPage:this.nextPage,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(t=>{this.loading()}));(s=this.infiniteScroll)===null||s===void 0?void 0:s.on("load",(t=>{var s,o;this.loading(false);this.pagination=t.pagination;this.nextPage=((o=(s=t.pagination)===null||s===void 0?void 0:s.links)===null||o===void 0?void 0:o.next)||null;this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)}));let r=this.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(r)}));(o=this.infiniteScroll)===null||o===void 0?void 0:o.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))}async loadMore(){this.infiniteScroll.loadNextPage()}handleResponse(t){return t.map((t=>this.getSingleOrderItem(t)))}async loadInitialData(){const t=new URL(window.location.href);await salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((t=>{var s,o,r,a;this.orders=t.data;this.hasInfiniteScroll=!!((s=t.pagination)===null||s===void 0?void 0:s.links.next);this.pagination=t.pagination;this.total=(o=t.pagination)===null||o===void 0?void 0:o.total;this.nextPage=((a=(r=t.pagination)===null||r===void 0?void 0:r.links)===null||a===void 0?void 0:a.next)||null;if(!this.orders.length){this.showPlaceholder=true;return this.loading(false)}setTimeout((()=>{this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)}));this.initiateInfiniteScroll();let s=this.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(s)}),100)})).catch((t=>{this.showPlaceholder=true;this.loading(false);salla.logger.error(t)}))}getSingleOrderItem(t){const s=document.createElement("tr");s.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");const o=document.createElement("td");o.classList.add("s-orders-table-tbody-tr-td");const r=document.createElement("div");r.classList.add("s-orders-table-tbody-tr-td-content");const a=document.createElement("span");a.classList.add("s-orders-mobile-title");a.textContent=this.orderNumberText+":";const i=document.createElement("span");i.classList.add("s-orders-reference-id");i.textContent="#"+t.reference_id;r.appendChild(a);r.appendChild(i);if(t.source=="buy_as_gift"){const t=document.createElement("i");t.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");r.appendChild(t)}const n=document.createElement("a");n.href=t.url;r.appendChild(n);const l=document.createElement("div");l.classList.add("s-orders-copy-to-clipboard-button");const d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(t=>{e.copyToClipboard(t);e.toggleElementClassIf(d,"copied","code-to-copy",(()=>true));setTimeout((()=>{e.toggleElementClassIf(d,"code-to-copy","copied",(()=>true))}),1e3)}));const c=document.createElement("span");c.textContent="#"+t.reference_id;const h=document.createElement("i");h.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");let u=salla.config.get("theme.is_rtl",true);if(u){d.appendChild(h);d.appendChild(c)}else{d.appendChild(c);d.appendChild(h)}l.appendChild(d);r.appendChild(l);o.appendChild(r);s.appendChild(o);const b=document.createElement("td");b.classList.add("s-orders-table-tbody-tr-td");const m=document.createElement("div");m.classList.add("s-orders-table-tbody-tr-td-content");const p=document.createElement("span");p.classList.add("s-orders-mobile-title");p.textContent=this.totalOrderText+":";const v=document.createElement("div");v.innerHTML=salla.money(t.total);const f=document.createElement("a");f.href=t.url;m.appendChild(p);m.appendChild(v);m.appendChild(f);b.appendChild(m);s.appendChild(b);const y=document.createElement("td");y.classList.add("s-orders-table-tbody-tr-td");const g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");const _=document.createElement("span");_.classList.add("s-orders-mobile-title");_.textContent=this.orderDateText+":";const k=document.createElement("div");k.textContent=e.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);const w=document.createElement("a");w.href=t.url;g.appendChild(_);g.appendChild(k);g.appendChild(w);y.appendChild(g);s.appendChild(y);const x=document.createElement("td");x.classList.add("s-orders-table-tbody-tr-td");const j=document.createElement("div");j.classList.add("s-orders-table-tbody-tr-td-content");const C=document.createElement("span");C.classList.add("s-orders-mobile-title");C.textContent=this.orderStatusText+":";const I=document.createElement("span");I.classList.add("s-orders-status-container");I.style.color=t.status.color;const O=document.createElement("i");O.classList.add(t.status.icon);const S=document.createElement("span");S.textContent=t.status.name;I.appendChild(O);I.appendChild(S);j.appendChild(C);j.appendChild(I);const T=document.createElement("i");T.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");j.appendChild(T);const D=document.createElement("a");D.href=t.url;j.appendChild(D);x.appendChild(j);s.appendChild(x);return s}render(){var t;if(this.showPlaceholder){return s("div",{class:"s-orders-no-content"},s("i",{class:"sicon-packed-box icon"}),s("p",null,this.noOrderText))}return s("div",{class:"s-orders-wrapper"},s("table",{class:"s-orders-table"},s("thead",{class:"s-orders-table-head"},s("tr",{class:"s-orders-table-head-tr"},s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),s("tbody",{class:"s-orders-table-tbody",ref:t=>this.wrapper=t})),this.nextPage&&s("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},s("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},s("span",{class:"s-button-text s-infinite-scroll-btn-text"},(t=this.loadMoreText)!==null&&t!==void 0?t:this.load_more_text_trans),s("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}componentWillLoad(){return salla.onReady().then((()=>this.loadInitialData())).then((()=>this.initiateInfiniteScroll()))}get host(){return o(this)}};a.style=r;export{a as salla_orders};
5
- //# sourceMappingURL=p-e53e006e.entry.js.map
4
+ import{r as t,h as s,g as o}from"./p-wQf8KFfR.js";import{H as e}from"./p-CGaH6V1S.js";import"./p-CgtvEd63.js";const r=":host{display:block}";const a=class{constructor(s){t(this,s);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((()=>{this.languageCode=salla.lang.locale;this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=true){var s;let o=(s=this.status)===null||s===void 0?void 0:s.querySelector(".s-button-text");if(o){e.toggleElementClassIf(o,"s-button-hide","s-button-show",(()=>t));this.btnLoader.style.display=t?"inherit":"none"}}initiateInfiniteScroll(){var t,s,o;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:false,nextPage:this.nextPage,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(t=>{this.loading()}));(s=this.infiniteScroll)===null||s===void 0?void 0:s.on("load",(t=>{var s,o;this.loading(false);this.pagination=t.pagination;this.nextPage=((o=(s=t.pagination)===null||s===void 0?void 0:s.links)===null||o===void 0?void 0:o.next)||null;this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)}));let r=this.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(r)}));(o=this.infiniteScroll)===null||o===void 0?void 0:o.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))}async loadMore(){this.infiniteScroll.loadNextPage()}handleResponse(t){return t.map((t=>this.getSingleOrderItem(t)))}async loadInitialData(){const t=new URL(window.location.href);await salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((t=>{var s,o,r,a;this.orders=t.data;this.hasInfiniteScroll=!!((s=t.pagination)===null||s===void 0?void 0:s.links.next);this.pagination=t.pagination;this.total=(o=t.pagination)===null||o===void 0?void 0:o.total;this.nextPage=((a=(r=t.pagination)===null||r===void 0?void 0:r.links)===null||a===void 0?void 0:a.next)||null;if(!this.orders.length){this.showPlaceholder=true;return this.loading(false)}setTimeout((()=>{this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)}));this.initiateInfiniteScroll();let s=this.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(s)}),100)})).catch((t=>{this.showPlaceholder=true;this.loading(false);salla.logger.error(t)}))}getSingleOrderItem(t){const s=document.createElement("tr");s.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");const o=document.createElement("td");o.classList.add("s-orders-table-tbody-tr-td");const r=document.createElement("div");r.classList.add("s-orders-table-tbody-tr-td-content");const a=document.createElement("span");a.classList.add("s-orders-mobile-title");a.textContent=this.orderNumberText+":";const i=document.createElement("span");i.classList.add("s-orders-reference-id");i.textContent="#"+t.reference_id;r.appendChild(a);r.appendChild(i);if(t.source=="buy_as_gift"){const t=document.createElement("i");t.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");r.appendChild(t)}const n=document.createElement("a");n.href=t.url;r.appendChild(n);const l=document.createElement("div");l.classList.add("s-orders-copy-to-clipboard-button");const d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(t=>{e.copyToClipboard(t);e.toggleElementClassIf(d,"copied","code-to-copy",(()=>true));setTimeout((()=>{e.toggleElementClassIf(d,"code-to-copy","copied",(()=>true))}),1e3)}));const c=document.createElement("span");c.textContent="#"+t.reference_id;const h=document.createElement("i");h.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");let u=salla.config.get("theme.is_rtl",true);if(u){d.appendChild(h);d.appendChild(c)}else{d.appendChild(c);d.appendChild(h)}l.appendChild(d);r.appendChild(l);o.appendChild(r);s.appendChild(o);const b=document.createElement("td");b.classList.add("s-orders-table-tbody-tr-td");const m=document.createElement("div");m.classList.add("s-orders-table-tbody-tr-td-content");const p=document.createElement("span");p.classList.add("s-orders-mobile-title");p.textContent=this.totalOrderText+":";const v=document.createElement("div");v.innerHTML=salla.money(t.total);const f=document.createElement("a");f.href=t.url;m.appendChild(p);m.appendChild(v);m.appendChild(f);b.appendChild(m);s.appendChild(b);const y=document.createElement("td");y.classList.add("s-orders-table-tbody-tr-td");const g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");const _=document.createElement("span");_.classList.add("s-orders-mobile-title");_.textContent=this.orderDateText+":";const k=document.createElement("div");k.textContent=e.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);const w=document.createElement("a");w.href=t.url;g.appendChild(_);g.appendChild(k);g.appendChild(w);y.appendChild(g);s.appendChild(y);const x=document.createElement("td");x.classList.add("s-orders-table-tbody-tr-td");const j=document.createElement("div");j.classList.add("s-orders-table-tbody-tr-td-content");const C=document.createElement("span");C.classList.add("s-orders-mobile-title");C.textContent=this.orderStatusText+":";const I=document.createElement("span");I.classList.add("s-orders-status-container");I.style.color=t.status.color;const O=document.createElement("i");O.classList.add(t.status.icon);const R=document.createElement("span");R.textContent=t.status.name;I.appendChild(O);I.appendChild(R);j.appendChild(C);j.appendChild(I);const S=document.createElement("i");S.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");j.appendChild(S);const T=document.createElement("a");T.href=t.url;j.appendChild(T);x.appendChild(j);s.appendChild(x);return s}render(){var t;if(this.showPlaceholder){return s("div",{class:"s-orders-no-content"},s("i",{class:"sicon-packed-box icon"}),s("p",null,this.noOrderText))}return s("div",{class:"s-orders-wrapper"},s("table",{class:"s-orders-table"},s("thead",{class:"s-orders-table-head"},s("tr",{class:"s-orders-table-head-tr"},s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),s("tbody",{class:"s-orders-table-tbody",ref:t=>this.wrapper=t})),this.nextPage&&s("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},s("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},s("span",{class:"s-button-text s-infinite-scroll-btn-text"},(t=this.loadMoreText)!==null&&t!==void 0?t:this.load_more_text_trans),s("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}componentWillLoad(){return salla.onReady().then((()=>this.loadInitialData())).then((()=>this.initiateInfiniteScroll()))}get host(){return o(this)}};a.style=r;export{a as salla_orders};
5
+ //# sourceMappingURL=p-5adde2a6.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as s,H as a,g as c}from"./p-Cmh2bDlu.js";import{w as e}from"./p-DWksgowB.js";import{M as n}from"./p-DmgxDvXL.js";var i=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>iphone</title>\n<path d="M15.053 27.613c0.133 0.12 0.28 0.213 0.44 0.28s0.333 0.107 0.507 0.107c0.36 0 0.693-0.135 0.947-0.387 0.12-0.135 0.213-0.28 0.28-0.44 0.080-0.16 0.107-0.333 0.107-0.507 0-0.347-0.147-0.695-0.387-0.947-0.507-0.493-1.387-0.493-1.893 0-0.12 0.12-0.213 0.267-0.28 0.44-0.067 0.16-0.107 0.333-0.107 0.507s0.040 0.347 0.107 0.507 0.16 0.305 0.28 0.44zM24 0h-16c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h16c2.205 0 4-1.795 4-4v-24c0-2.205-1.795-4-4-4zM25.333 28c0 0.736-0.599 1.333-1.333 1.333h-16c-0.735 0-1.333-0.597-1.333-1.333v-4h18.667zM25.333 21.333h-18.667v-17.333c0-0.735 0.599-1.333 1.333-1.333h16c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n`;var o=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n`;var l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>paper-plane-o</title>\n<path d="M31.5 0.482c0.375 0.268 0.554 0.696 0.482 1.143l-4.571 27.429c-0.054 0.339-0.268 0.625-0.571 0.804-0.161 0.089-0.357 0.143-0.554 0.143-0.143 0-0.286-0.036-0.429-0.089l-9.411-3.839-5.321 5.839c-0.214 0.25-0.518 0.375-0.839 0.375-0.143 0-0.286-0.018-0.411-0.071-0.446-0.179-0.732-0.607-0.732-1.071v-8.071l-8.429-3.446c-0.411-0.161-0.679-0.536-0.714-0.982-0.036-0.429 0.196-0.839 0.571-1.054l29.714-17.143c0.375-0.232 0.857-0.214 1.214 0.036zM25.393 27.25l3.946-23.625-25.607 14.768 6 2.446 15.411-11.411-8.536 14.232z"></path>\n</svg>\n`;const h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";const r=class{constructor(s){t(this,s);var a;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:i,whatsapp:e,phone:o,telegram:l,email:n};this.contactSlot=((a=this.host.querySelector('[slot="contact"]'))===null||a===void 0?void 0:a.innerHTML)||`<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>${!this.iconsOnly&&"<span class='unicode'>{value}</span>"}</a>`;salla.onReady((()=>{this.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((()=>{this.contactsTitle=this.contactsTitle||salla.lang.get("blocks.footer.social")}))}getContactsArray(){return Object.entries(this.contacts).filter((([t,s])=>s!=="")).map((([t,s])=>({type:t,value:s})))}getContactLink(t){const s=this.contacts[t];switch(t){case"phone":case"mobile":return`tel:${s}`;case"whatsapp":return salla.url.get("whatsapp/send");case"email":return`mailto:${s}`;case"telegram":return s.startsWith("https://t.me/")?s:`https://t.me/${s}`;default:return s}}getContactIcon(t){return this.iconsList[t]}componentWillLoad(){return new Promise((t=>salla.onReady(t)))}render(){const t=this.getContactsArray();if(!t||t.length==0){return}if(this.isHeader){return s(a,{class:"s-contacts s-contacts-header"},t.filter((t=>t.type=="phone"||t.type=="email")).map(((t,a)=>s("a",{href:this.getContactLink(t.type),key:a,class:"s-contacts-topnav-link"},t.type==="email"?t.value:[s("span",null,this.contactsTitle,": "),s("a",{class:"unicode",href:this.iconsList[t.type]},t.value)]))))}return s(a,{class:"s-contacts"},!this.hideTitle&&s("h3",{class:"s-contacts-title"},this.contactsTitle),s("div",{class:{"s-contacts-list":true,"s-contacts-list-horizontal":this.horizontal,"s-contacts-list-vertical":!this.horizontal,"s-contacts-list-icons-only":this.iconsOnly}},t.map(((t,a)=>s("div",{key:a,id:"contact-slot",innerHTML:this.contactSlot.replace(/\{icon\}/g,this.getContactIcon(t.type)).replace(/\{value\}/g,t.value.toString()).replace(/\{link\}/g,this.getContactLink(t.type))})))))}componentDidRender(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()}get host(){return c(this)}};r.style=h;export{r as salla_contacts};
5
- //# sourceMappingURL=p-51915628.entry.js.map
4
+ import{r as t,h as s,H as a,g as c}from"./p-wQf8KFfR.js";import{w as e}from"./p-DWksgowB.js";import{M as n}from"./p-DmgxDvXL.js";var i=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>iphone</title>\n<path d="M15.053 27.613c0.133 0.12 0.28 0.213 0.44 0.28s0.333 0.107 0.507 0.107c0.36 0 0.693-0.135 0.947-0.387 0.12-0.135 0.213-0.28 0.28-0.44 0.080-0.16 0.107-0.333 0.107-0.507 0-0.347-0.147-0.695-0.387-0.947-0.507-0.493-1.387-0.493-1.893 0-0.12 0.12-0.213 0.267-0.28 0.44-0.067 0.16-0.107 0.333-0.107 0.507s0.040 0.347 0.107 0.507 0.16 0.305 0.28 0.44zM24 0h-16c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h16c2.205 0 4-1.795 4-4v-24c0-2.205-1.795-4-4-4zM25.333 28c0 0.736-0.599 1.333-1.333 1.333h-16c-0.735 0-1.333-0.597-1.333-1.333v-4h18.667zM25.333 21.333h-18.667v-17.333c0-0.735 0.599-1.333 1.333-1.333h16c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n`;var o=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n`;var l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>paper-plane-o</title>\n<path d="M31.5 0.482c0.375 0.268 0.554 0.696 0.482 1.143l-4.571 27.429c-0.054 0.339-0.268 0.625-0.571 0.804-0.161 0.089-0.357 0.143-0.554 0.143-0.143 0-0.286-0.036-0.429-0.089l-9.411-3.839-5.321 5.839c-0.214 0.25-0.518 0.375-0.839 0.375-0.143 0-0.286-0.018-0.411-0.071-0.446-0.179-0.732-0.607-0.732-1.071v-8.071l-8.429-3.446c-0.411-0.161-0.679-0.536-0.714-0.982-0.036-0.429 0.196-0.839 0.571-1.054l29.714-17.143c0.375-0.232 0.857-0.214 1.214 0.036zM25.393 27.25l3.946-23.625-25.607 14.768 6 2.446 15.411-11.411-8.536 14.232z"></path>\n</svg>\n`;const h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";const r=class{constructor(s){t(this,s);var a;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:i,whatsapp:e,phone:o,telegram:l,email:n};this.contactSlot=((a=this.host.querySelector('[slot="contact"]'))===null||a===void 0?void 0:a.innerHTML)||`<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>${!this.iconsOnly&&"<span class='unicode'>{value}</span>"}</a>`;salla.onReady((()=>{this.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((()=>{this.contactsTitle=this.contactsTitle||salla.lang.get("blocks.footer.social")}))}getContactsArray(){return Object.entries(this.contacts).filter((([t,s])=>s!=="")).map((([t,s])=>({type:t,value:s})))}getContactLink(t){const s=this.contacts[t];switch(t){case"phone":case"mobile":return`tel:${s}`;case"whatsapp":return salla.url.get("whatsapp/send");case"email":return`mailto:${s}`;case"telegram":return s.startsWith("https://t.me/")?s:`https://t.me/${s}`;default:return s}}getContactIcon(t){return this.iconsList[t]}componentWillLoad(){return new Promise((t=>salla.onReady(t)))}render(){const t=this.getContactsArray();if(!t||t.length==0){return}if(this.isHeader){return s(a,{class:"s-contacts s-contacts-header"},t.filter((t=>t.type=="phone"||t.type=="email")).map(((t,a)=>s("a",{href:this.getContactLink(t.type),key:a,class:"s-contacts-topnav-link"},t.type==="email"?t.value:[s("span",null,this.contactsTitle,": "),s("a",{class:"unicode",href:this.iconsList[t.type]},t.value)]))))}return s(a,{class:"s-contacts"},!this.hideTitle&&s("h3",{class:"s-contacts-title"},this.contactsTitle),s("div",{class:{"s-contacts-list":true,"s-contacts-list-horizontal":this.horizontal,"s-contacts-list-vertical":!this.horizontal,"s-contacts-list-icons-only":this.iconsOnly}},t.map(((t,a)=>s("div",{key:a,id:"contact-slot",innerHTML:this.contactSlot.replace(/\{icon\}/g,this.getContactIcon(t.type)).replace(/\{value\}/g,t.value.toString()).replace(/\{link\}/g,this.getContactLink(t.type))})))))}componentDidRender(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()}get host(){return c(this)}};r.style=h;export{r as salla_contacts};
5
+ //# sourceMappingURL=p-5ed5d8f9.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,n,i,o){function r(t){return t instanceof i?t:new i((function(n){n(t)}))}return new(i||(i=Promise))((function(i,e){function a(t){try{u(o.next(t))}catch(t){e(t)}}function s(t){try{u(o["throw"](t))}catch(t){e(t)}}function u(t){t.done?i(t.value):r(t.value).then(a,s)}u((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var i={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},o,r,e,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(n){return u([t,n])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(i=0)),i)try{if(o=1,r&&(e=s[0]&2?r["return"]:s[0]?r["throw"]||((e=r["return"])&&e.call(r),0):r.next)&&!(e=e.call(r,s[1])).done)return e;if(r=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(e=i.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){i.label=s[1];break}if(s[0]===6&&i.label<e[1]){i.label=e[1];e=s;break}if(e&&i.label<e[2]){i.label=e[2];i.ops.push(s);break}if(e[2])i.ops.pop();i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t];r=0}finally{o=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-CbJXYJ5O.system.js","./p-Dxc5oJG6.system.js","./p-DTevZS21.system.js"],(function(t){"use strict";var n,i,o,r,e,a,s;return{setters:[function(t){n=t.r;i=t.c;o=t.h;r=t.H;e=t.g},function(t){a=t.I},function(t){s=t.C}],execute:function(){var u;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(u||(u={}));var c;(function(t){t["Sar"]="SAR"})(c||(c={}));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>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var d="";var p=t("salla_product_options",function(){function t(t){var r=this;n(this,t);this.changed=i(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=function(t,n,i){if(n==="custom"&&i==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();r.isCustomDonation=t.target.value==="custom";if(r.donationInput){if(t.target.value==="custom"){r.donationInput.value="";r.donationInput.focus()}else{r.donationInput.value=t.target.value}if(n==="custom"){return}salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value})}};this.hideLabel=function(t){if(t.type===u.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=function(t){if(!t.donation){return}var n=t.donation.target_amount<=t.donation.collected_amount;return o("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":n,"s-product-options-donation-expired":!n}},o("p",null,t.donation.target_message),o("span",{innerHTML:n?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((function(){r.outOfStockText=salla.lang.get("pages.products.out_of_stock");r.donationAmount=salla.lang.get("pages.products.donation_amount");r.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");r.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){return r.setOptionsData(t.data.options)}))}}t.prototype.setOptionsData=function(t){return __awaiter(this,void 0,void 0,(function(){var n,i,o;return __generator(this,(function(r){this.optionsData=t;o=this;(i=(n=this.optionsData[0])===null||n===void 0?void 0:n.details)===null||i===void 0?void 0:i.forEach((function(t){Object.entries(t.skus_availability||{}).filter((function(t){return!t[1]})).map((function(t){return o.outSkus.push(Number(t[0]))}))}));return[2]}))}))};t.prototype.getSelectedOptionsData=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(i){t={};n=this.host.getElementSallaData();n.forEach((function(n,i){if(i.startsWith("options[")){t[i.replace("options[","").replace("]","")]=n}}));return[2,t]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){t=this.host.querySelectorAll("[required]");n=true;for(i=0;i<t.length;i++){if("reportValidity"in t[i]&&!t[i].reportValidity()){n=false}}return[2,n]}))}))};t.prototype.hasOutOfStockOption=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var i=this;return __generator(this,(function(o){return[2,this.selectedOptions.some((function(t){return t.is_out}))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((n=this.selectedSkus)===null||n===void 0?void 0:n.every((function(t){return i.outSkus.includes(t)})))]}))}))};t.prototype.getSelectedOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedOptions]}))}))};t.prototype.getOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.optionsData.find((function(n){return n.id===t}))]}))}))};t.prototype.invalidHandler=function(t,n){var i=t.target.closest(".s-product-options-option");if(!i.classList.contains("s-product-options-option-error")){i.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){var o=this.host.querySelector(".s-product-options-option-error");if(o===i){this.scrollToElement(i)}}};t.prototype.scrollToElement=function(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.changedHandler=function(t,n,i){var o=this;if(i===void 0){i=true}var r={event:t,option:n,detail:null,productId:this.productId};if(n.details){var e=n.details.find((function(n){return Number(n.id)===Number(t.target.value)}));r.detail=e}if(n.type==="country"){this.handleCountryOptionChange(t,r.detail)}var a=t.target.closest(".s-product-options-option");if(t.target.value||(n.type===u.FILE||n.type===u.IMAGE)&&t.type==="added"||n.type===u.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((function(){a.classList.remove("s-product-options-option-error")}),200)}if(n.type===u.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(n);var s=this.selectedOptions.findIndex((function(t){return t.option_id===r.option.id}));if(r.option.type===u.MULTIPLE_OPTIONS){var c=this.selectedOptions.findIndex((function(t){var n;return t.option_id===r.option.id&&(t===null||t===void 0?void 0:t.id)===((n=r.detail)===null||n===void 0?void 0:n.id)}));if(c>-1){this.selectedOptions.splice(c,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}else{if(!r.detail||Object.keys(r.detail).length===0){if(s>-1){this.selectedOptions.splice(s,1)}}else{if(s>-1){this.selectedOptions[s]=Object.assign(Object.assign({},r.detail),{option_id:r.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}}this.optionsData=this.optionsData.map((function(t){if(t.id===r.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((function(t){var n,i;return Object.assign(Object.assign({},t),{is_selected:r.option.type===u.MULTIPLE_OPTIONS?o.selectedOptions.some((function(n){return n.id===t.id})):Number(t.id)===Number((n=r.detail)===null||n===void 0?void 0:n.id),value:(i=r.detail)===null||i===void 0?void 0:i.value})}))})}return t}));if(i){this.changed.emit(r);salla.event.emit("product-options::change",r)}};t.prototype.setSelectedSkus=function(){this.selectedSkus=this.selectedOptions.map((function(t){return Object.keys(t.skus_availability||{})})).reduce((function(t,n){return t.filter((function(t){return n.includes(t)}))}),[]).map((function(t){return Number(t)}))};t.prototype.handleRequiredMultipleOptions=function(t){if(t.type!==u.MULTIPLE_OPTIONS||!t.required){return}var n=this.host.querySelector('[data-option-id="'.concat(t.id,'"]'));var i=n.querySelectorAll("input:checked").length;n.querySelectorAll("input").forEach((function(t){return t.toggleAttribute("required",!i)}))};t.prototype.getLatLng=function(t,n){return t?t.split(",")[n==="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){var n=this;if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===u.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===u.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===u.SINGLE_OPTION){return this.singleOption(t)}if(t.type===u.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===u.COUNTRY){return this.countryOption(t)}if(t.type===u.BOOKING&&salla.url.is_page("cart")){return o("salla-booking-field",{onInvalidInput:function(i){return n.invalidHandler(i,t)},option:t,productId:t.value})}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.getAvailableDigitalCardSKUs=function(t){var n=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!n)throw new Error("product-options:: No digital card options found");var i=Object.keys(t.skus_availability).filter((function(n){return t.skus_availability[n]===false}));this.availableDigitalCardValues=n.details.filter((function(t){return!Object.keys(t.skus_availability).filter((function(t){return i.includes(t)})).length}))};t.prototype.handleCountryOptionChange=function(t,n){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;var i=this.host.querySelector("input[data-code-value]:checked");if(i)i.checked=false;var o=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!o)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(n)};t.prototype.getSelectedDigitalCardOptions=function(t){var n=t.details.find((function(t){return t.is_selected}));var i=t.details.find((function(t){return!!t.is_default}))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return n||i};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i,o;return __generator(this,(function(r){switch(r.label){case 0:if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}t=this.optionsData.filter((function(t){var n=t.type;return["country","digital-card-value"].includes(n)})).length>0&&salla.url.is_page("cart");if(t){n=this.optionsData.find((function(t){return t.type==="country"}));i=n&&this.getSelectedDigitalCardOptions(n);if(i){this.getAvailableDigitalCardSKUs(i)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return[4,salla.onReady()];case 1:r.sent();document.addEventListener("paste",this.handlePaste.bind(this));o=!salla.storage.get("cart.id")&&this.optionsData.some((function(t){return["file","image"].includes(t.type)}));return[2,o?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null]}}))}))};t.prototype.handlePaste=function(t){var n;var i=t.target;if(!Salla.config.get("store.settings.content_copyright")||!Salla.helpers.hasApplePay()||!(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)||!i.classList.contains("s-form-control")||!i.name.startsWith("options[")){return}t.preventDefault();var o=((n=t.clipboardData)===null||n===void 0?void 0:n.getData("text"))||"";var r=i.selectionStart;var e=i.selectionEnd;var a=i.value.slice(0,r)+o+i.value.slice(e);i.value=a;i.setSelectionRange(r+o.length,r+o.length)};t.prototype.hideDigitalCardsOptions=function(t){return this.disableCardValue&&t.type===u.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")};t.prototype.render=function(){var t=this;var n;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0){return}return o(r,{class:"s-product-options-wrapper"},o("salla-conditional-fields",null,this.optionsData.map((function(n){return o("div",Object.assign({key:n.id,class:"s-product-options-option-container".concat(n.visibility_condition||t.hideDigitalCardsOptions(n)?" hidden":""),"data-option-id":n.id},t.getOptionShownWhen(n)),n.name==="splitter"?t.splitterOption():o("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":n.type===u.BOOKING&&salla.url.is_page("cart")},"data-option-type":n.type,"data-option-required":"".concat(n.required)},o("label",{htmlFor:"options[".concat(n.id,"]"),class:"s-product-options-option-label ".concat(t.hideLabel(n)?"s-product-options-option-label-hidden":"")},o("b",null,n.name,n.required&&o("span",null," * ")," "),o("small",null,n.placeholder)),o("div",{class:"s-product-options-option-content ".concat(t.hideLabel(n)||n.type===u.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":"")},t.getDisplayForType(n))))}))))};t.prototype.generateUniqueKey=function(t){return this.uniqueKey?"".concat(t,"-").concat(this.uniqueKey):t};t.prototype.fillSelectedOptions=function(){this.selectedOptions=this.optionsData.reduce((function(t,n){var i=n.details.filter((function(t){return t.is_selected}));var o=i.map((function(t){return Object.assign(Object.assign({},t),{option_id:n.id})}));return t.concat(o)}),[])};t.prototype.triggerProductFormSelectionEvents=function(){var t=this;var n=function(t){return["change","input"].forEach((function(n){return t.dispatchEvent(new window.Event(n,{bubbles:true}))}))};var i=this.host.closest("form");if(i){n(i)}else{var o=new MutationObserver((function(){var i=t.host.closest("form");if(i){n(i);o.disconnect()}}));o.observe(document.body,{childList:true,subtree:true})}};t.prototype.componentDidLoad=function(){var t=this;var n,i;if(salla.url.is_page("product.single")){this.triggerProductFormSelectionEvents()}if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0&&!this.optionsData.some((function(t){return t.type===u.DONATION}))){return}var o=(i=this.optionsData.find((function(t){return t.type===u.DONATION})))===null||i===void 0?void 0:i.details.find((function(t){return t.is_selected}));if(!o){return}setTimeout((function(){salla.event.emit("product-options::donation-changed",{id:t.productId,price:o.additional_price})}),1e3)};t.prototype.donationOption=function(t,n){var i=this;var r,e;return o("div",{class:"s-product-options-donation-wrapper"},((r=t.donation)===null||r===void 0?void 0:r.can_donate)?[t.donation?o("div",{key:t.id,class:"s-product-options-donation-progress"},o("salla-progress-bar",{donation:t.donation})):"",t.details.length?[o("h4",{key:t.id},this.selectAmount),o("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map((function(n,r){return o("div",{key:t.id,class:"s-product-options-donation-options-item"},o("input",{id:i.generateUniqueKey("donation-option-".concat(r)),type:"radio",name:"donating_option",checked:n.is_selected,value:n.additional_price,onChange:function(t){return i.handleDonationOptions(t,n,"option")}}),o("label",{htmlFor:i.generateUniqueKey("donation-option-".concat(r))},o("span",{innerHTML:salla.money(n.name)})))})),((e=t.donation)===null||e===void 0?void 0:e.custom_amount_enabled)?o("div",{class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:function(t){return i.handleDonationOptions(t,"custom","option")}}),o("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},o("span",null," ",this.selectDonationAmount," "))):"")]:"",o("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},o("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:function(t){i.donationInput=t},value:t.details.length&&t.details.some((function(t){return t.is_selected}))?t.details.find((function(t){return t.is_selected})).additional_price:t.value,placeholder:t.placeholder,onInput:function(t){return i.handleDonationOptions(t,"custom","input")},onBlur:function(n){return i.changedHandler(n,t)},onInvalid:function(n){return i.invalidHandler(n,t)}}),o("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))};t.prototype.fileUploader=function(t,n){var i=this;if(n===void 0){n=null}var r;return o("salla-file-upload",Object.assign({},n||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,height:"120px",onAdded:function(n){return i.changedHandler(n,t)},url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:function(n){return i.invalidHandler(n,t)},class:{"s-product-options-image-input":true,required:t.required}}),o("div",{class:"s-product-options-filepond-placeholder"},o("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((r=n.accept)===null||r===void 0?void 0:r.split(",").every((function(t){return t.includes("image")})))?s:l}),o("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),o("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var n=this;var i=t.details.map((function(t){return n.fileTypes[t.name]})).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var n=this;return o("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(i){return n.changedHandler(i,t)},onInvalid:function(i){return n.invalidHandler(i,t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return o("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var n=this;return o("div",{class:"s-product-options-text"},o("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}))};t.prototype.textareaOption=function(t){var n=this;return o("div",{class:"s-product-options-textarea"},o("div",{class:"mt-1"},o("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}})))};t.prototype.mapOption=function(t){var n=this;return o("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},onSelected:function(i){return n.changedHandler(i,t)}})};t.prototype.colorPickerOption=function(t){var n=this;return o("salla-color-picker",{onSubmitted:function(i){return n.changedHandler(i,t)},name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},color:t.value})};t.prototype.timeOption=function(t){var n=this;return o("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}})};t.prototype.dateOption=function(t){var n=this;return o("div",{class:"s-product-options-date-element"},o("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:"options[".concat(t.id,"]"),onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.datetimeOption=function(t){var n=this;return o("div",{class:"s-product-options-datetime-element"},o("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.getOptionDetailName=function(t,n,i){if(n===void 0){n=true}var o;var r;if(i&&i===u.COLOR){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" <br/> <p> ".concat(this.outOfStockText," </p>"):"")+(t.additional_price?" <p> (".concat(salla.money(t.additional_price,false),") </p>"):"")}if(!r){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price,false),")"):"")}return r.replace("<i class=sicon-sar></i>",((o=salla.config.currency())===null||o===void 0?void 0:o.symbol)||"ر.س")};t.prototype.isOptionDetailOut=function(t){var n=this;var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}var o=this.selectedOptions.filter((function(n){return n.id===t.id})).length;if(o&&this.selectedOptions.length===1){return false}if(o){var r=this.selectedSkus.filter((function(t){return n.outSkus.includes(t)}));return Object.keys(t.skus_availability).some((function(t){return r.includes(Number(t))}))}return this.selectedOptions.some((function(n){return n.is_out&&n.option_id!==t.option_id}))};t.prototype.renderInput=function(t,n,i,r,e,a){var s=this;var u=this.generateUniqueKey("".concat(t,"-").concat(i.id,"-").concat(n.id));var c=this.isOptionDetailOut(n);return o("label",{class:{"s-product-options-disabled":c}},o("input",{id:u,type:t,name:e,value:n.id,disabled:c,required:r,checked:n.is_selected,onInvalid:function(t){return s.invalidHandler(t,i)},onChange:function(t){return s.changedHandler(t,i)}}),o("div",{class:{"s-product-options-grid-mode-span":a,"s-product-options-disabled":c}},this.getOptionDetailName(n)))};t.prototype.renderOptionDetails=function(t,n,i,o){var r=this;if(o===void 0){o=false}var e=t==="radio"?"options[".concat(n.id,"]"):"options[".concat(n.id,"][]");return n===null||n===void 0?void 0:n.details.map((function(a){return r.renderInput(t,a,n,i,e,o)}))};t.prototype.renderSelect=function(t){var n=this;return o("div",null,o("select",{name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}},o("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return o("option",{key:t.id,value:t.id,disabled:n.canDisabled&&n.isOptionDetailOut(t),selected:t.is_selected},n.getOptionDetailName(t))}))))};t.prototype.renderButtonStyle=function(t,n,i){return o("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,n,i,true))};t.prototype.singleOption=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["single-option"])===null||i===void 0?void 0:i.type)==="button";var r=!t.visibility_condition&&t.required;return o?this.renderButtonStyle("radio",t,r):this.renderSelect(t)};t.prototype.multipleOptions=function(t){var n,i;var r=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["multiple-option"])===null||i===void 0?void 0:i.type)==="button";var e=t.required&&!t.details.some((function(t){return t.is_selected}))&&!t.visibility_condition;return r?this.renderButtonStyle("checkbox",t,e):o("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,e))};t.prototype.colorOption=function(t){var n=this;return o("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(i){return o("div",{class:"s-product-options-colors-item",key:i.id},o("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id))},o("span",{style:{backgroundColor:i.color}}),o("div",{innerHTML:n.getOptionDetailName(i,true,t.type)})))})))};t.prototype.thumbnailOption=function(t){var n=this;return o("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(i){return o("div",{key:i.id},o("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":i.option_value,disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),"data-img-id":i.option_value,class:"go-to-slide"},o("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),o("span",{innerHTML:a,class:"s-product-options-thumbnails-icon"}),n.isOptionDetailOut(i)?[o("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},n.outOfStockText),n.canDisabled?o("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),o("p",null,n.getOptionDetailName(i,false)," "))})))};t.prototype.digitalCardValuesOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((function(i){var r,e,a;var s=String(i.id);return o("label",{htmlFor:n.generateUniqueKey(s.toString()),key:s,class:"s-product-options-digital-card-option"},o("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),id:n.generateUniqueKey(s.toString()),required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)}},!n.ignoreDefaultCardValue?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("span",null,i.name," ",(a=(e=salla.config)===null||e===void 0?void 0:e.currency())===null||a===void 0?void 0:a.symbol))})):o("div",{class:"s-product-options-digital-card-out-of-stock"}))};t.prototype.countryOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((function(i){var r;return o("label",{htmlFor:n.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},o("input",Object.assign({id:n.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)},onClick:function(){n.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:"https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/".concat(String(i.code).toLocaleLowerCase(),".svg")}),o("span",null,i.name))})))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());p.style=d}}}));
5
- //# sourceMappingURL=p-231440bc.system.entry.js.map
4
+ */System.register(["./p-B3l0Kfzh.system.js","./p-Dxc5oJG6.system.js","./p-DTevZS21.system.js"],(function(t){"use strict";var n,i,o,r,e,a,s;return{setters:[function(t){n=t.r;i=t.c;o=t.h;r=t.H;e=t.g},function(t){a=t.I},function(t){s=t.C}],execute:function(){var u;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(u||(u={}));var c;(function(t){t["Sar"]="SAR"})(c||(c={}));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>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var d="";var p=t("salla_product_options",function(){function t(t){var r=this;n(this,t);this.changed=i(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=function(t,n,i){if(n==="custom"&&i==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();r.isCustomDonation=t.target.value==="custom";if(r.donationInput){if(t.target.value==="custom"){r.donationInput.value="";r.donationInput.focus()}else{r.donationInput.value=t.target.value}if(n==="custom"){return}salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value})}};this.hideLabel=function(t){if(t.type===u.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=function(t){if(!t.donation){return}var n=t.donation.target_amount<=t.donation.collected_amount;return o("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":n,"s-product-options-donation-expired":!n}},o("p",null,t.donation.target_message),o("span",{innerHTML:n?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((function(){r.outOfStockText=salla.lang.get("pages.products.out_of_stock");r.donationAmount=salla.lang.get("pages.products.donation_amount");r.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");r.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){return r.setOptionsData(t.data.options)}))}}t.prototype.setOptionsData=function(t){return __awaiter(this,void 0,void 0,(function(){var n,i,o;return __generator(this,(function(r){this.optionsData=t;o=this;(i=(n=this.optionsData[0])===null||n===void 0?void 0:n.details)===null||i===void 0?void 0:i.forEach((function(t){Object.entries(t.skus_availability||{}).filter((function(t){return!t[1]})).map((function(t){return o.outSkus.push(Number(t[0]))}))}));return[2]}))}))};t.prototype.getSelectedOptionsData=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(i){t={};n=this.host.getElementSallaData();n.forEach((function(n,i){if(i.startsWith("options[")){t[i.replace("options[","").replace("]","")]=n}}));return[2,t]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){t=this.host.querySelectorAll("[required]");n=true;for(i=0;i<t.length;i++){if("reportValidity"in t[i]&&!t[i].reportValidity()){n=false}}return[2,n]}))}))};t.prototype.hasOutOfStockOption=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var i=this;return __generator(this,(function(o){return[2,this.selectedOptions.some((function(t){return t.is_out}))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((n=this.selectedSkus)===null||n===void 0?void 0:n.every((function(t){return i.outSkus.includes(t)})))]}))}))};t.prototype.getSelectedOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedOptions]}))}))};t.prototype.getOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.optionsData.find((function(n){return n.id===t}))]}))}))};t.prototype.invalidHandler=function(t,n){var i=t.target.closest(".s-product-options-option");if(!i.classList.contains("s-product-options-option-error")){i.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){var o=this.host.querySelector(".s-product-options-option-error");if(o===i){this.scrollToElement(i)}}};t.prototype.scrollToElement=function(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.changedHandler=function(t,n,i){var o=this;if(i===void 0){i=true}var r={event:t,option:n,detail:null,productId:this.productId};if(n.details){var e=n.details.find((function(n){return Number(n.id)===Number(t.target.value)}));r.detail=e}if(n.type==="country"){this.handleCountryOptionChange(t,r.detail)}var a=t.target.closest(".s-product-options-option");if(t.target.value||(n.type===u.FILE||n.type===u.IMAGE)&&t.type==="added"||n.type===u.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((function(){a.classList.remove("s-product-options-option-error")}),200)}if(n.type===u.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(n);var s=this.selectedOptions.findIndex((function(t){return t.option_id===r.option.id}));if(r.option.type===u.MULTIPLE_OPTIONS){var c=this.selectedOptions.findIndex((function(t){var n;return t.option_id===r.option.id&&(t===null||t===void 0?void 0:t.id)===((n=r.detail)===null||n===void 0?void 0:n.id)}));if(c>-1){this.selectedOptions.splice(c,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}else{if(!r.detail||Object.keys(r.detail).length===0){if(s>-1){this.selectedOptions.splice(s,1)}}else{if(s>-1){this.selectedOptions[s]=Object.assign(Object.assign({},r.detail),{option_id:r.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}}this.optionsData=this.optionsData.map((function(t){if(t.id===r.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((function(t){var n,i;return Object.assign(Object.assign({},t),{is_selected:r.option.type===u.MULTIPLE_OPTIONS?o.selectedOptions.some((function(n){return n.id===t.id})):Number(t.id)===Number((n=r.detail)===null||n===void 0?void 0:n.id),value:(i=r.detail)===null||i===void 0?void 0:i.value})}))})}return t}));if(i){this.changed.emit(r);salla.event.emit("product-options::change",r)}};t.prototype.setSelectedSkus=function(){this.selectedSkus=this.selectedOptions.map((function(t){return Object.keys(t.skus_availability||{})})).reduce((function(t,n){return t.filter((function(t){return n.includes(t)}))}),[]).map((function(t){return Number(t)}))};t.prototype.handleRequiredMultipleOptions=function(t){if(t.type!==u.MULTIPLE_OPTIONS||!t.required){return}var n=this.host.querySelector('[data-option-id="'.concat(t.id,'"]'));var i=n.querySelectorAll("input:checked").length;n.querySelectorAll("input").forEach((function(t){return t.toggleAttribute("required",!i)}))};t.prototype.getLatLng=function(t,n){return t?t.split(",")[n==="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){var n=this;if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===u.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===u.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===u.SINGLE_OPTION){return this.singleOption(t)}if(t.type===u.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===u.COUNTRY){return this.countryOption(t)}if(t.type===u.BOOKING&&salla.url.is_page("cart")){return o("salla-booking-field",{onInvalidInput:function(i){return n.invalidHandler(i,t)},option:t,productId:t.value})}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.getAvailableDigitalCardSKUs=function(t){var n=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!n)throw new Error("product-options:: No digital card options found");var i=Object.keys(t.skus_availability).filter((function(n){return t.skus_availability[n]===false}));this.availableDigitalCardValues=n.details.filter((function(t){return!Object.keys(t.skus_availability).filter((function(t){return i.includes(t)})).length}))};t.prototype.handleCountryOptionChange=function(t,n){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;var i=this.host.querySelector("input[data-code-value]:checked");if(i)i.checked=false;var o=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!o)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(n)};t.prototype.getSelectedDigitalCardOptions=function(t){var n=t.details.find((function(t){return t.is_selected}));var i=t.details.find((function(t){return!!t.is_default}))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return n||i};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i,o;return __generator(this,(function(r){switch(r.label){case 0:if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}t=this.optionsData.filter((function(t){var n=t.type;return["country","digital-card-value"].includes(n)})).length>0&&salla.url.is_page("cart");if(t){n=this.optionsData.find((function(t){return t.type==="country"}));i=n&&this.getSelectedDigitalCardOptions(n);if(i){this.getAvailableDigitalCardSKUs(i)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return[4,salla.onReady()];case 1:r.sent();document.addEventListener("paste",this.handlePaste.bind(this));o=!salla.storage.get("cart.id")&&this.optionsData.some((function(t){return["file","image"].includes(t.type)}));return[2,o?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null]}}))}))};t.prototype.handlePaste=function(t){var n;var i=t.target;if(!Salla.config.get("store.settings.content_copyright")||!Salla.helpers.hasApplePay()||!(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)||!i.classList.contains("s-form-control")||!i.name.startsWith("options[")){return}t.preventDefault();var o=((n=t.clipboardData)===null||n===void 0?void 0:n.getData("text"))||"";var r=i.selectionStart;var e=i.selectionEnd;var a=i.value.slice(0,r)+o+i.value.slice(e);i.value=a;i.setSelectionRange(r+o.length,r+o.length)};t.prototype.hideDigitalCardsOptions=function(t){return this.disableCardValue&&t.type===u.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")};t.prototype.render=function(){var t=this;var n;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0){return}return o(r,{class:"s-product-options-wrapper"},o("salla-conditional-fields",null,this.optionsData.map((function(n){return o("div",Object.assign({key:n.id,class:"s-product-options-option-container".concat(n.visibility_condition||t.hideDigitalCardsOptions(n)?" hidden":""),"data-option-id":n.id},t.getOptionShownWhen(n)),n.name==="splitter"?t.splitterOption():o("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":n.type===u.BOOKING&&salla.url.is_page("cart")},"data-option-type":n.type,"data-option-required":"".concat(n.required)},o("label",{htmlFor:"options[".concat(n.id,"]"),class:"s-product-options-option-label ".concat(t.hideLabel(n)?"s-product-options-option-label-hidden":"")},o("b",null,n.name,n.required&&o("span",null," * ")," "),o("small",null,n.placeholder)),o("div",{class:"s-product-options-option-content ".concat(t.hideLabel(n)||n.type===u.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":"")},t.getDisplayForType(n))))}))))};t.prototype.generateUniqueKey=function(t){return this.uniqueKey?"".concat(t,"-").concat(this.uniqueKey):t};t.prototype.fillSelectedOptions=function(){this.selectedOptions=this.optionsData.reduce((function(t,n){var i=n.details.filter((function(t){return t.is_selected}));var o=i.map((function(t){return Object.assign(Object.assign({},t),{option_id:n.id})}));return t.concat(o)}),[])};t.prototype.triggerProductFormSelectionEvents=function(){var t=this;var n=function(t){return["change","input"].forEach((function(n){return t.dispatchEvent(new window.Event(n,{bubbles:true}))}))};var i=this.host.closest("form");if(i){n(i)}else{var o=new MutationObserver((function(){var i=t.host.closest("form");if(i){n(i);o.disconnect()}}));o.observe(document.body,{childList:true,subtree:true})}};t.prototype.componentDidLoad=function(){var t=this;var n,i;if(salla.url.is_page("product.single")){this.triggerProductFormSelectionEvents()}if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0&&!this.optionsData.some((function(t){return t.type===u.DONATION}))){return}var o=(i=this.optionsData.find((function(t){return t.type===u.DONATION})))===null||i===void 0?void 0:i.details.find((function(t){return t.is_selected}));if(!o){return}setTimeout((function(){salla.event.emit("product-options::donation-changed",{id:t.productId,price:o.additional_price})}),1e3)};t.prototype.donationOption=function(t,n){var i=this;var r,e;return o("div",{class:"s-product-options-donation-wrapper"},((r=t.donation)===null||r===void 0?void 0:r.can_donate)?[t.donation?o("div",{key:t.id,class:"s-product-options-donation-progress"},o("salla-progress-bar",{donation:t.donation})):"",t.details.length?[o("h4",{key:t.id},this.selectAmount),o("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map((function(n,r){return o("div",{key:t.id,class:"s-product-options-donation-options-item"},o("input",{id:i.generateUniqueKey("donation-option-".concat(r)),type:"radio",name:"donating_option",checked:n.is_selected,value:n.additional_price,onChange:function(t){return i.handleDonationOptions(t,n,"option")}}),o("label",{htmlFor:i.generateUniqueKey("donation-option-".concat(r))},o("span",{innerHTML:salla.money(n.name)})))})),((e=t.donation)===null||e===void 0?void 0:e.custom_amount_enabled)?o("div",{class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:function(t){return i.handleDonationOptions(t,"custom","option")}}),o("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},o("span",null," ",this.selectDonationAmount," "))):"")]:"",o("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},o("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:function(t){i.donationInput=t},value:t.details.length&&t.details.some((function(t){return t.is_selected}))?t.details.find((function(t){return t.is_selected})).additional_price:t.value,placeholder:t.placeholder,onInput:function(t){return i.handleDonationOptions(t,"custom","input")},onBlur:function(n){return i.changedHandler(n,t)},onInvalid:function(n){return i.invalidHandler(n,t)}}),o("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))};t.prototype.fileUploader=function(t,n){var i=this;if(n===void 0){n=null}var r;return o("salla-file-upload",Object.assign({},n||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,height:"120px",onAdded:function(n){return i.changedHandler(n,t)},url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:function(n){return i.invalidHandler(n,t)},class:{"s-product-options-image-input":true,required:t.required}}),o("div",{class:"s-product-options-filepond-placeholder"},o("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((r=n.accept)===null||r===void 0?void 0:r.split(",").every((function(t){return t.includes("image")})))?s:l}),o("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),o("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var n=this;var i=t.details.map((function(t){return n.fileTypes[t.name]})).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var n=this;return o("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(i){return n.changedHandler(i,t)},onInvalid:function(i){return n.invalidHandler(i,t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return o("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var n=this;return o("div",{class:"s-product-options-text"},o("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}))};t.prototype.textareaOption=function(t){var n=this;return o("div",{class:"s-product-options-textarea"},o("div",{class:"mt-1"},o("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}})))};t.prototype.mapOption=function(t){var n=this;return o("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},onSelected:function(i){return n.changedHandler(i,t)}})};t.prototype.colorPickerOption=function(t){var n=this;return o("salla-color-picker",{onSubmitted:function(i){return n.changedHandler(i,t)},name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},color:t.value})};t.prototype.timeOption=function(t){var n=this;return o("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}})};t.prototype.dateOption=function(t){var n=this;return o("div",{class:"s-product-options-date-element"},o("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:"options[".concat(t.id,"]"),onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.datetimeOption=function(t){var n=this;return o("div",{class:"s-product-options-datetime-element"},o("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.getOptionDetailName=function(t,n,i){if(n===void 0){n=true}var o;var r;if(i&&i===u.COLOR){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" <br/> <p> ".concat(this.outOfStockText," </p>"):"")+(t.additional_price?" <p> (".concat(salla.money(t.additional_price,false),") </p>"):"")}if(!r){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price,false),")"):"")}return r.replace("<i class=sicon-sar></i>",((o=salla.config.currency())===null||o===void 0?void 0:o.symbol)||"ر.س")};t.prototype.isOptionDetailOut=function(t){var n=this;var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}var o=this.selectedOptions.filter((function(n){return n.id===t.id})).length;if(o&&this.selectedOptions.length===1){return false}if(o){var r=this.selectedSkus.filter((function(t){return n.outSkus.includes(t)}));return Object.keys(t.skus_availability).some((function(t){return r.includes(Number(t))}))}return this.selectedOptions.some((function(n){return n.is_out&&n.option_id!==t.option_id}))};t.prototype.renderInput=function(t,n,i,r,e,a){var s=this;var u=this.generateUniqueKey("".concat(t,"-").concat(i.id,"-").concat(n.id));var c=this.isOptionDetailOut(n);return o("label",{class:{"s-product-options-disabled":c}},o("input",{id:u,type:t,name:e,value:n.id,disabled:c,required:r,checked:n.is_selected,onInvalid:function(t){return s.invalidHandler(t,i)},onChange:function(t){return s.changedHandler(t,i)}}),o("div",{class:{"s-product-options-grid-mode-span":a,"s-product-options-disabled":c}},this.getOptionDetailName(n)))};t.prototype.renderOptionDetails=function(t,n,i,o){var r=this;if(o===void 0){o=false}var e=t==="radio"?"options[".concat(n.id,"]"):"options[".concat(n.id,"][]");return n===null||n===void 0?void 0:n.details.map((function(a){return r.renderInput(t,a,n,i,e,o)}))};t.prototype.renderSelect=function(t){var n=this;return o("div",null,o("select",{name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}},o("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return o("option",{key:t.id,value:t.id,disabled:n.canDisabled&&n.isOptionDetailOut(t),selected:t.is_selected},n.getOptionDetailName(t))}))))};t.prototype.renderButtonStyle=function(t,n,i){return o("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,n,i,true))};t.prototype.singleOption=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["single-option"])===null||i===void 0?void 0:i.type)==="button";var r=!t.visibility_condition&&t.required;return o?this.renderButtonStyle("radio",t,r):this.renderSelect(t)};t.prototype.multipleOptions=function(t){var n,i;var r=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["multiple-option"])===null||i===void 0?void 0:i.type)==="button";var e=t.required&&!t.details.some((function(t){return t.is_selected}))&&!t.visibility_condition;return r?this.renderButtonStyle("checkbox",t,e):o("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,e))};t.prototype.colorOption=function(t){var n=this;return o("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(i){return o("div",{class:"s-product-options-colors-item",key:i.id},o("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id))},o("span",{style:{backgroundColor:i.color}}),o("div",{innerHTML:n.getOptionDetailName(i,true,t.type)})))})))};t.prototype.thumbnailOption=function(t){var n=this;return o("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(i){return o("div",{key:i.id},o("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":i.option_value,disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),"data-img-id":i.option_value,class:"go-to-slide"},o("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),o("span",{innerHTML:a,class:"s-product-options-thumbnails-icon"}),n.isOptionDetailOut(i)?[o("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},n.outOfStockText),n.canDisabled?o("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),o("p",null,n.getOptionDetailName(i,false)," "))})))};t.prototype.digitalCardValuesOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((function(i){var r,e,a;var s=String(i.id);return o("label",{htmlFor:n.generateUniqueKey(s.toString()),key:s,class:"s-product-options-digital-card-option"},o("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),id:n.generateUniqueKey(s.toString()),required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)}},!n.ignoreDefaultCardValue?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("span",null,i.name," ",(a=(e=salla.config)===null||e===void 0?void 0:e.currency())===null||a===void 0?void 0:a.symbol))})):o("div",{class:"s-product-options-digital-card-out-of-stock"}))};t.prototype.countryOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((function(i){var r;return o("label",{htmlFor:n.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},o("input",Object.assign({id:n.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)},onClick:function(){n.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:"https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/".concat(String(i.code).toLocaleLowerCase(),".svg")}),o("span",null,i.name))})))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());p.style=d}}}));
5
+ //# sourceMappingURL=p-63435ed9.system.entry.js.map
@@ -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}from"./p-Cmh2bDlu.js";import{a}from"./p-BedNk7k1.js";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>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n`;const l=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";const h=class{constructor(s){e(this,s);this.changed=t(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}connectedCallback(){var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((()=>{this.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",this.moreThanLabel);this.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",this.lessThanLabel);this.toLabel=salla.lang.getWithDefault("common.elements.to",this.toLabel);this.fromLabel=salla.lang.getWithDefault("common.elements.from",this.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}const t=Math.ceil(this.option.values.length/5);for(let e=0;e<this.option.values.length;e+=t){this.filterValues.push(this.option.values.slice(e,e+t).reduce(((e,t)=>{e.to=t.to;e.count+=t.count;return e})))}}async reset(){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null}getPriceLabel(e){if(isNaN(e.from)||e.from<1){return`${this.lessThanLabel} ${salla.money(e.to)}`}if(isNaN(e.to)||e.to<1){return`${this.moreThanLabel} ${salla.money(e.from)}`}return`${salla.money(e.from)} ${this.toLabel} ${salla.money(e.to)}`}minInputValidation(e){if(e&&(e>this.max||this.maxPrice&&e>this.maxPrice)){return}if(e<this.min){this.minPrice=this.min;return}if(e){this.minPrice=e}}maxInputValidation(e){if(e&&(e<this.min||this.minPrice&&e<this.minPrice)){return}if(e>this.max){this.maxPrice=this.max;return}}async changedEventHandler(e){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);const t=this.minPrice?+this.minPrice*1:null;const s=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(t)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(s)}this.isReady&&this.changed.emit({event:e,option:this.option,value:{max:this.maxPrice,min:this.minPrice}})}handleMinMaxPrice(e,t){this.minPrice=t.from;this.maxPrice=t.to!=="*"?t.to:"";this.changedEventHandler(e)}isChecked(e){if(!this.minPrice&&!this.maxPrice){return false}let t=(e.from<1||e.from=="*")&&this.minPrice==0||e.from==this.minPrice;let s=e.to=="*"||!e.to||e.to==this.maxPrice;return t&&s}handleMinPrice(e){this.isMin=true;const t=e.target.value;this.minPrice=t===""?0:t}handleMaxPrice(e){this.isMin=false;const t=e.target.value;this.maxPrice=t===undefined?"":t}render(){return s(i,{key:"dc09f4be81c3652da570b522894917f6b70faf61"},this.filterValues.map(((e,t)=>s("label",{class:"s-filters-label",htmlFor:`${this.option.key}-${t}`,key:t},s("input",{id:`${this.option.key}-${t}`,name:"price",type:"radio",checked:this.isChecked(e),class:"s-filters-radio",onChange:t=>this.handleMinMaxPrice(t,e)}),s("span",{innerHTML:this.getPriceLabel(e)})))),s("div",{key:"97f20e2bcff15d906dc5566a7f147339e4423138",class:"flex justify-center items-center"},s("div",{key:"4c631a9f5c77890bcffd365db6dab471ba989246",class:"relative max-w-xl w-full"},s("div",{key:"3e4c53b29c4e6fa90eba1a23f646d8391b1ce462",class:"s-price-range-inputs"},s("div",{key:"6bb515095db500d78c5cc22f2bd25635d157793d",class:"s-price-range-relative"},s("div",{key:"59617a36c7095a0766155521afb20d517fc5321a",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"bc1ae88ba28bcc11a7373cad13cdd2104646023b",type:"number",maxlength:"5",ref:e=>this.minInput=e,onBlur:e=>this.handleMinPrice(e),value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),s("div",{key:"49e12143570efe2f019e9a3240f9d1c184482f9c",class:"s-price-range-gray-text"}," -"),s("div",{key:"1e61ef602dbb0f1622bbd7279f15b5ef71d0f2db",class:"s-price-range-relative"},s("div",{key:"5aac7489a79f52156f382e0e4e181b6d0a8e5fb3",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"104a3ce0be1d461715fdc6a29d0df33a8a378ad3",type:"number",maxlength:"5",ref:e=>this.maxInput=e,onBlur:e=>this.handleMaxPrice(e),value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),s("salla-button",{key:"2e722552816b6ceabf030d596fac580e1fa8d41a",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:e=>this.changedEventHandler(e)},s("span",{key:"6f41a0dfa95c9910ab5d17e98ba815444fab8cca",innerHTML:this.isRTL?a:r}))))))}componentDidLoad(){this.isReady=true}};h.style=l;export{h as salla_price_range};
5
- //# sourceMappingURL=p-8e14e730.entry.js.map
4
+ import{r as e,c as t,h as s,H as i}from"./p-wQf8KFfR.js";import{a}from"./p-BedNk7k1.js";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>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n`;const l=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";const h=class{constructor(s){e(this,s);this.changed=t(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}connectedCallback(){var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((()=>{this.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",this.moreThanLabel);this.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",this.lessThanLabel);this.toLabel=salla.lang.getWithDefault("common.elements.to",this.toLabel);this.fromLabel=salla.lang.getWithDefault("common.elements.from",this.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}const t=Math.ceil(this.option.values.length/5);for(let e=0;e<this.option.values.length;e+=t){this.filterValues.push(this.option.values.slice(e,e+t).reduce(((e,t)=>{e.to=t.to;e.count+=t.count;return e})))}}async reset(){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null}getPriceLabel(e){if(isNaN(e.from)||e.from<1){return`${this.lessThanLabel} ${salla.money(e.to)}`}if(isNaN(e.to)||e.to<1){return`${this.moreThanLabel} ${salla.money(e.from)}`}return`${salla.money(e.from)} ${this.toLabel} ${salla.money(e.to)}`}minInputValidation(e){if(e&&(e>this.max||this.maxPrice&&e>this.maxPrice)){return}if(e<this.min){this.minPrice=this.min;return}if(e){this.minPrice=e}}maxInputValidation(e){if(e&&(e<this.min||this.minPrice&&e<this.minPrice)){return}if(e>this.max){this.maxPrice=this.max;return}}async changedEventHandler(e){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);const t=this.minPrice?+this.minPrice*1:null;const s=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(t)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(s)}this.isReady&&this.changed.emit({event:e,option:this.option,value:{max:this.maxPrice,min:this.minPrice}})}handleMinMaxPrice(e,t){this.minPrice=t.from;this.maxPrice=t.to!=="*"?t.to:"";this.changedEventHandler(e)}isChecked(e){if(!this.minPrice&&!this.maxPrice){return false}let t=(e.from<1||e.from=="*")&&this.minPrice==0||e.from==this.minPrice;let s=e.to=="*"||!e.to||e.to==this.maxPrice;return t&&s}handleMinPrice(e){this.isMin=true;const t=e.target.value;this.minPrice=t===""?0:t}handleMaxPrice(e){this.isMin=false;const t=e.target.value;this.maxPrice=t===undefined?"":t}render(){return s(i,{key:"dc09f4be81c3652da570b522894917f6b70faf61"},this.filterValues.map(((e,t)=>s("label",{class:"s-filters-label",htmlFor:`${this.option.key}-${t}`,key:t},s("input",{id:`${this.option.key}-${t}`,name:"price",type:"radio",checked:this.isChecked(e),class:"s-filters-radio",onChange:t=>this.handleMinMaxPrice(t,e)}),s("span",{innerHTML:this.getPriceLabel(e)})))),s("div",{key:"97f20e2bcff15d906dc5566a7f147339e4423138",class:"flex justify-center items-center"},s("div",{key:"4c631a9f5c77890bcffd365db6dab471ba989246",class:"relative max-w-xl w-full"},s("div",{key:"3e4c53b29c4e6fa90eba1a23f646d8391b1ce462",class:"s-price-range-inputs"},s("div",{key:"6bb515095db500d78c5cc22f2bd25635d157793d",class:"s-price-range-relative"},s("div",{key:"59617a36c7095a0766155521afb20d517fc5321a",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"bc1ae88ba28bcc11a7373cad13cdd2104646023b",type:"number",maxlength:"5",ref:e=>this.minInput=e,onBlur:e=>this.handleMinPrice(e),value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),s("div",{key:"49e12143570efe2f019e9a3240f9d1c184482f9c",class:"s-price-range-gray-text"}," -"),s("div",{key:"1e61ef602dbb0f1622bbd7279f15b5ef71d0f2db",class:"s-price-range-relative"},s("div",{key:"5aac7489a79f52156f382e0e4e181b6d0a8e5fb3",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"104a3ce0be1d461715fdc6a29d0df33a8a378ad3",type:"number",maxlength:"5",ref:e=>this.maxInput=e,onBlur:e=>this.handleMaxPrice(e),value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),s("salla-button",{key:"2e722552816b6ceabf030d596fac580e1fa8d41a",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:e=>this.changedEventHandler(e)},s("span",{key:"6f41a0dfa95c9910ab5d17e98ba815444fab8cca",innerHTML:this.isRTL?a:r}))))))}componentDidLoad(){this.isReady=true}};h.style=l;export{h as salla_price_range};
5
+ //# sourceMappingURL=p-69492d2a.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,c as t,h as i,H as e,g as a}from"./p-Cmh2bDlu.js";import{H as h}from"./p-CGaH6V1S.js";import{F as l}from"./p-DL4h2bc3.js";import"./p-CgtvEd63.js";const r=":host{display:block}";const c=class{constructor(i){s(this,i);this.changed=t(this,"changed");this.initHeight=195;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}connectedCallback(){this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((()=>{this.page=salla.config.get("page")}));salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.getWithDefault("common.titles.more",this.showMoreLabel);this.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.initHeight}px`);this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async setWidgetHeight(s=250){this.widgetContent.removeAttribute("style");setTimeout((()=>{let s=this.widgetContent.scrollHeight;this.widgetContent.style.height=s+"px"}),s)}async reset(){if(this.option.type===l.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((s=>s.checked=false))}async showMore(){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?`${this.widgetValues.scrollHeight}px`:`${this.initHeight}px`;setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen;h.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(s){if(![l.VALUES,l.MINIMUM,l.VARIANTS].includes(s.type)){return""}return s.values.map(((t,e)=>{let a=typeof t=="number"?t:t.key||t.value;return i("label",{class:"s-filters-label",htmlFor:`${s.key}-option-${a}`,key:`${s.key}-option-${a}`},i("input",{id:`${s.key}-option-${a}`,name:s.key,type:"radio",checked:this.isSelectedOption(s,a),class:`s-filters-radio`,onChange:t=>this.changed.emit({event:t,option:s,value:a})}),this.getOptionLabel(s,t))}))}isSelectedOption(s,t){if(s.type===l.MINIMUM){return this.filtersData[s.key]==t}if(s.type===l.VARIANTS){return this.filtersData[s.type]&&this.filtersData[s.type][Object.keys(this.filtersData[s.type])[0]]==t}if(s.type===l.RANGE){return this.filtersData[s.key]&&this.filtersData[s.key].min==t.min&&this.filtersData[s.key].max==t.max}if(s.type===l.VALUES){return this.filtersData[s.key]&&Number(this.filtersData[s.key])==Number(t)}return false}getOptionLabel(s,t){if(s.key=="rating"){return i("salla-rating-stars",{size:"small",value:t})}let e=t.value||"null";return i("span",{class:"s-filters-option-name"},e)}render(){return i(e,{key:"1987fec03cfe48cddc60af2d81bbc30a476dcb61",class:"s-filters-widget-container"},i("h3",{key:"4232775c4012d1be8bb3036d9d09e5d29d951ee4",class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},i("span",{key:"61cf9ea5a69f3ab5377502a396cc84478c6152a1"},this.option.label),i("span",{key:"b75914eb06f9d419d0a89da2a8f2da2f891f3d27",class:`s-filters-widget-plusminus ${this.isOpen?"s-filters-widget-plusminus-active":""}`})),i("div",{key:"f65e2f8a44648b034dacf1bda1aa64b5398627b7",class:"s-filters-widget-content",ref:s=>this.widgetContent=s},i("div",{key:"adcafe169ce8cbef671263f3624bce071b168c36",class:"s-filters-widget-values",ref:s=>this.widgetValues=s},i("slot",{key:"fa006556e44e508c3c64cc5ae76cc826b7e7601e"}),this.option.type!==l.RANGE?this.renderFilterOption(this.option):i("salla-price-range",{onChanged:s=>{this.changed.emit(s.detail)},ref:s=>this.priceRange=s,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&i("a",{key:"16a4ddeb365dc1d52fc51a8999fc6d7dbe094658",class:"s-filters-widget-more",onClick:()=>this.showMore()},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))}get host(){return a(this)}};c.style=r;export{c as salla_filters_widget};
5
- //# sourceMappingURL=p-468a7324.entry.js.map
4
+ import{r as s,c as t,h as i,H as e,g as a}from"./p-wQf8KFfR.js";import{H as h}from"./p-CGaH6V1S.js";import{F as l}from"./p-DL4h2bc3.js";import"./p-CgtvEd63.js";const r=":host{display:block}";const c=class{constructor(i){s(this,i);this.changed=t(this,"changed");this.initHeight=195;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}connectedCallback(){this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((()=>{this.page=salla.config.get("page")}));salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.getWithDefault("common.titles.more",this.showMoreLabel);this.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.initHeight}px`);this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async setWidgetHeight(s=250){this.widgetContent.removeAttribute("style");setTimeout((()=>{let s=this.widgetContent.scrollHeight;this.widgetContent.style.height=s+"px"}),s)}async reset(){if(this.option.type===l.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((s=>s.checked=false))}async showMore(){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?`${this.widgetValues.scrollHeight}px`:`${this.initHeight}px`;setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen;h.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(s){if(![l.VALUES,l.MINIMUM,l.VARIANTS].includes(s.type)){return""}return s.values.map(((t,e)=>{let a=typeof t=="number"?t:t.key||t.value;return i("label",{class:"s-filters-label",htmlFor:`${s.key}-option-${a}`,key:`${s.key}-option-${a}`},i("input",{id:`${s.key}-option-${a}`,name:s.key,type:"radio",checked:this.isSelectedOption(s,a),class:`s-filters-radio`,onChange:t=>this.changed.emit({event:t,option:s,value:a})}),this.getOptionLabel(s,t))}))}isSelectedOption(s,t){if(s.type===l.MINIMUM){return this.filtersData[s.key]==t}if(s.type===l.VARIANTS){return this.filtersData[s.type]&&this.filtersData[s.type][Object.keys(this.filtersData[s.type])[0]]==t}if(s.type===l.RANGE){return this.filtersData[s.key]&&this.filtersData[s.key].min==t.min&&this.filtersData[s.key].max==t.max}if(s.type===l.VALUES){return this.filtersData[s.key]&&Number(this.filtersData[s.key])==Number(t)}return false}getOptionLabel(s,t){if(s.key=="rating"){return i("salla-rating-stars",{size:"small",value:t})}let e=t.value||"null";return i("span",{class:"s-filters-option-name"},e)}render(){return i(e,{key:"1987fec03cfe48cddc60af2d81bbc30a476dcb61",class:"s-filters-widget-container"},i("h3",{key:"4232775c4012d1be8bb3036d9d09e5d29d951ee4",class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},i("span",{key:"61cf9ea5a69f3ab5377502a396cc84478c6152a1"},this.option.label),i("span",{key:"b75914eb06f9d419d0a89da2a8f2da2f891f3d27",class:`s-filters-widget-plusminus ${this.isOpen?"s-filters-widget-plusminus-active":""}`})),i("div",{key:"f65e2f8a44648b034dacf1bda1aa64b5398627b7",class:"s-filters-widget-content",ref:s=>this.widgetContent=s},i("div",{key:"adcafe169ce8cbef671263f3624bce071b168c36",class:"s-filters-widget-values",ref:s=>this.widgetValues=s},i("slot",{key:"fa006556e44e508c3c64cc5ae76cc826b7e7601e"}),this.option.type!==l.RANGE?this.renderFilterOption(this.option):i("salla-price-range",{onChanged:s=>{this.changed.emit(s.detail)},ref:s=>this.priceRange=s,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&i("a",{key:"16a4ddeb365dc1d52fc51a8999fc6d7dbe094658",class:"s-filters-widget-more",onClick:()=>this.showMore()},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))}get host(){return a(this)}};c.style=r;export{c as salla_filters_widget};
5
+ //# sourceMappingURL=p-6dc24b2b.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-CbJXYJ5O.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-7e3906fc.system.entry.js.map
4
+ System.register(["./p-B3l0Kfzh.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-73f3f2c3.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-CbJXYJ5O.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-6ef02abc.system.entry.js.map
4
+ System.register(["./p-B3l0Kfzh.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-78cfef2d.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function c(t){try{l(n["throw"](t))}catch(t){s(t)}}function l(t){t.done?i(t.value):r(t.value).then(a,c)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(t){return function(e){return l([t,e])}}function l(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(n=1,r&&(s=c[0]&2?r["return"]:c[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,c[1])).done)return s;if(r=0,s)c=[c[0]&2,s.value];switch(c[0]){case 0:case 1:s=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;r=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){i.label=c[1];break}if(c[0]===6&&i.label<s[1]){i.label=s[1];s=c;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(c);break}if(s[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];r=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-CbJXYJ5O.system.js","./p-D5o2VQTp.system.js"],(function(t){"use strict";var e,i,n,r,s;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H},function(t){s=t.a}],execute:function(){var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var c=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";var l=t("salla_price_range",function(){function t(t){e(this,t);this.changed=i(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var n=0;n<this.option.values.length;n+=i){this.filterValues.push(this.option.values.slice(n,n+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return n(r,{key:"dc09f4be81c3652da570b522894917f6b70faf61"},this.filterValues.map((function(e,i){return n("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},n("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),n("span",{innerHTML:t.getPriceLabel(e)}))})),n("div",{key:"97f20e2bcff15d906dc5566a7f147339e4423138",class:"flex justify-center items-center"},n("div",{key:"4c631a9f5c77890bcffd365db6dab471ba989246",class:"relative max-w-xl w-full"},n("div",{key:"3e4c53b29c4e6fa90eba1a23f646d8391b1ce462",class:"s-price-range-inputs"},n("div",{key:"6bb515095db500d78c5cc22f2bd25635d157793d",class:"s-price-range-relative"},n("div",{key:"59617a36c7095a0766155521afb20d517fc5321a",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"bc1ae88ba28bcc11a7373cad13cdd2104646023b",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),n("div",{key:"49e12143570efe2f019e9a3240f9d1c184482f9c",class:"s-price-range-gray-text"}," -"),n("div",{key:"1e61ef602dbb0f1622bbd7279f15b5ef71d0f2db",class:"s-price-range-relative"},n("div",{key:"5aac7489a79f52156f382e0e4e181b6d0a8e5fb3",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"104a3ce0be1d461715fdc6a29d0df33a8a378ad3",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),n("salla-button",{key:"2e722552816b6ceabf030d596fac580e1fa8d41a",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},n("span",{key:"6f41a0dfa95c9910ab5d17e98ba815444fab8cca",innerHTML:this.isRTL?s:a}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}());l.style=c}}}));
5
- //# sourceMappingURL=p-963ba76e.system.entry.js.map
4
+ */System.register(["./p-B3l0Kfzh.system.js","./p-D5o2VQTp.system.js"],(function(t){"use strict";var e,i,n,r,s;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H},function(t){s=t.a}],execute:function(){var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var c=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";var l=t("salla_price_range",function(){function t(t){e(this,t);this.changed=i(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var n=0;n<this.option.values.length;n+=i){this.filterValues.push(this.option.values.slice(n,n+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return n(r,{key:"dc09f4be81c3652da570b522894917f6b70faf61"},this.filterValues.map((function(e,i){return n("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},n("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),n("span",{innerHTML:t.getPriceLabel(e)}))})),n("div",{key:"97f20e2bcff15d906dc5566a7f147339e4423138",class:"flex justify-center items-center"},n("div",{key:"4c631a9f5c77890bcffd365db6dab471ba989246",class:"relative max-w-xl w-full"},n("div",{key:"3e4c53b29c4e6fa90eba1a23f646d8391b1ce462",class:"s-price-range-inputs"},n("div",{key:"6bb515095db500d78c5cc22f2bd25635d157793d",class:"s-price-range-relative"},n("div",{key:"59617a36c7095a0766155521afb20d517fc5321a",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"bc1ae88ba28bcc11a7373cad13cdd2104646023b",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),n("div",{key:"49e12143570efe2f019e9a3240f9d1c184482f9c",class:"s-price-range-gray-text"}," -"),n("div",{key:"1e61ef602dbb0f1622bbd7279f15b5ef71d0f2db",class:"s-price-range-relative"},n("div",{key:"5aac7489a79f52156f382e0e4e181b6d0a8e5fb3",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"104a3ce0be1d461715fdc6a29d0df33a8a378ad3",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),n("salla-button",{key:"2e722552816b6ceabf030d596fac580e1fa8d41a",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},n("span",{key:"6f41a0dfa95c9910ab5d17e98ba815444fab8cca",innerHTML:this.isRTL?s:a}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}());l.style=c}}}));
5
+ //# sourceMappingURL=p-7bd77519.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-CbJXYJ5O.system.js","./p-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){var o='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-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 2v0zM25 7v0z"></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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var r='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"499e2f4c68034191143f53bb4d4581e85e4066b0"},t("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
5
- //# sourceMappingURL=p-d54d7cd7.system.entry.js.map
4
+ System.register(["./p-B3l0Kfzh.system.js","./p-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){var o='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-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 2v0zM25 7v0z"></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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var r='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"499e2f4c68034191143f53bb4d4581e85e4066b0"},t("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
5
+ //# sourceMappingURL=p-7c699521.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-CbJXYJ5O.system.js"],(function(t){"use strict";var a,l,s,n;return{setters:[function(t){a=t.r;l=t.h;s=t.H;n=t.g}],execute:function(){var i=":host{display:block}";var e=t("salla_app_install_alert",function(){function t(t){a(this,t);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}t.prototype.connectedCallback=function(){var t=this;salla.onReady((function(){t.data=salla.config.get("store.app_install_prompt");if(!t.isMobileOrTabletDevice())return;if(!t.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");t.ctaLink=salla.url.get("app");t.alertDelay=setTimeout((function(){return t.open=true}),3e3)}))};t.prototype.disconnectedCallback=function(){clearTimeout(this.alertDelay)};t.prototype.isMobileOrTabletDevice=function(t){if(t===void 0){t=1024}var a=window.innerWidth<=t;var l=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);var s="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return l&&a&&s};t.prototype.closeAlert=function(){var t=this;salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(function(){t.closing=false;t.open=false}),{once:true})};t.prototype.render=function(){var t=this;return this.data?l(s,{class:"s-app-install-alert-wrapper ".concat(this.open?"open":""," ").concat(this.closing?"closing":""),position:this.data.position},l("div",null,l("img",{src:this.data.icon,width:"58",height:"58",alt:"".concat(salla.config.get("store.name"))})),l("div",{class:"s-app-install-alert-content"},l("h2",{class:"s-app-install-alert-title"},this.data.title),l("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",l("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),l("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:function(){return t.closeAlert()}},l("i",{class:"sicon-cancel"}))):null};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());e.style=i}}}));
5
- //# sourceMappingURL=p-fc7c940d.system.entry.js.map
4
+ System.register(["./p-B3l0Kfzh.system.js"],(function(t){"use strict";var a,l,s,n;return{setters:[function(t){a=t.r;l=t.h;s=t.H;n=t.g}],execute:function(){var i=":host{display:block}";var e=t("salla_app_install_alert",function(){function t(t){a(this,t);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}t.prototype.connectedCallback=function(){var t=this;salla.onReady((function(){t.data=salla.config.get("store.app_install_prompt");if(!t.isMobileOrTabletDevice())return;if(!t.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");t.ctaLink=salla.url.get("app");t.alertDelay=setTimeout((function(){return t.open=true}),3e3)}))};t.prototype.disconnectedCallback=function(){clearTimeout(this.alertDelay)};t.prototype.isMobileOrTabletDevice=function(t){if(t===void 0){t=1024}var a=window.innerWidth<=t;var l=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);var s="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return l&&a&&s};t.prototype.closeAlert=function(){var t=this;salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(function(){t.closing=false;t.open=false}),{once:true})};t.prototype.render=function(){var t=this;return this.data?l(s,{class:"s-app-install-alert-wrapper ".concat(this.open?"open":""," ").concat(this.closing?"closing":""),position:this.data.position},l("div",null,l("img",{src:this.data.icon,width:"58",height:"58",alt:"".concat(salla.config.get("store.name"))})),l("div",{class:"s-app-install-alert-content"},l("h2",{class:"s-app-install-alert-title"},this.data.title),l("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",l("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),l("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:function(){return t.closeAlert()}},l("i",{class:"sicon-cancel"}))):null};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());e.style=i}}}));
5
+ //# sourceMappingURL=p-8177fa38.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as l,h as a,H as t}from"./p-Cmh2bDlu.js";import{G as s}from"./p-C0JNGIpa.js";const o="";const r=l=>{if(!l)return"";return new Date(Number(l)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};const e=l=>{if(!l)return"";try{const a=l.toLowerCase();const t=salla.lang.get(`pages.loyalty_program.${a}`);return t===`pages.loyalty_program.${a}`?l:t}catch(a){return l}};const i=class{constructor(a){l(this,a);this.loyaltyPointsArray=[];this.isLoadingLoyalty=false;this.nextPageUrlLoyalty="";this.handleClick=()=>{this.loadMoreLoyaltyPoints()}}componentWillLoad(){return salla.onReady().then((()=>{this.loadLoyaltyPoints()}))}async loadLoyaltyPoints(){this.isLoadingLoyalty=true;try{let l=`/balance/points?page=1`;let a=await salla.api.request(l);this.loyaltyPointsArray=a.data;this.nextPageUrlLoyalty=a.cursor.next}catch(l){console.error("Error loading loyalty points transactions",l)}finally{this.isLoadingLoyalty=false}}async loadMoreLoyaltyPoints(){var l;if(!this.nextPageUrlLoyalty)return;this.isLoadingLoyalty=true;try{let a=await salla.api.request(this.nextPageUrlLoyalty);this.loyaltyPointsArray=[...this.loyaltyPointsArray,...a.data];this.nextPageUrlLoyalty=((l=a.cursor)===null||l===void 0?void 0:l.next)||""}catch(l){console.error("Error loading more loyalty points",l)}finally{this.isLoadingLoyalty=false}}render(){return a(t,{key:"300d58186edf747b1dd6dc7a1d67c0c93606aa5e"},a("div",{key:"98e3a15104e813c6798ccac75fbd1bb163735c54"},this.isLoadingLoyalty?a("salla-loading",null):a("div",null,this.loyaltyPointsArray.length>0?a("div",null,a("table",{class:"s-loyalty-program-table"},a("thead",{class:"s-loyalty-program-table-head"},a("tr",{class:"s-loyalty-program-table-head-tr"},a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),a("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((l=>a("tr",{class:"s-loyalty-program-table-tbody-tr"},a("td",{class:"s-loyalty-program-table-tbody-tr-td"},(l===null||l===void 0?void 0:l.type)==="plus"?"+":"",(l===null||l===void 0?void 0:l.points)||""," ",salla.lang.get("pages.loyalty_program.point")),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r((l===null||l===void 0?void 0:l.created_at)?Number(l.created_at)*1e3:undefined)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(l===null||l===void 0?void 0:l.points_expire_date)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.key)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.status_key))))))),a("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&a("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):a("div",null,a("div",{class:"s-loyalty-program-table-empty-state"},a("span",{innerHTML:s}),a("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),a("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))}};i.style=o;export{i as salla_loyalty_program};
5
- //# sourceMappingURL=p-56a2493e.entry.js.map
4
+ import{r as l,h as a,H as t}from"./p-wQf8KFfR.js";import{G as s}from"./p-C0JNGIpa.js";const o="";const r=l=>{if(!l)return"";return new Date(Number(l)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};const e=l=>{if(!l)return"";try{const a=l.toLowerCase();const t=salla.lang.get(`pages.loyalty_program.${a}`);return t===`pages.loyalty_program.${a}`?l:t}catch(a){return l}};const i=class{constructor(a){l(this,a);this.loyaltyPointsArray=[];this.isLoadingLoyalty=false;this.nextPageUrlLoyalty="";this.handleClick=()=>{this.loadMoreLoyaltyPoints()}}componentWillLoad(){return salla.onReady().then((()=>{this.loadLoyaltyPoints()}))}async loadLoyaltyPoints(){this.isLoadingLoyalty=true;try{let l=`/balance/points?page=1`;let a=await salla.api.request(l);this.loyaltyPointsArray=a.data;this.nextPageUrlLoyalty=a.cursor.next}catch(l){console.error("Error loading loyalty points transactions",l)}finally{this.isLoadingLoyalty=false}}async loadMoreLoyaltyPoints(){var l;if(!this.nextPageUrlLoyalty)return;this.isLoadingLoyalty=true;try{let a=await salla.api.request(this.nextPageUrlLoyalty);this.loyaltyPointsArray=[...this.loyaltyPointsArray,...a.data];this.nextPageUrlLoyalty=((l=a.cursor)===null||l===void 0?void 0:l.next)||""}catch(l){console.error("Error loading more loyalty points",l)}finally{this.isLoadingLoyalty=false}}render(){return a(t,{key:"300d58186edf747b1dd6dc7a1d67c0c93606aa5e"},a("div",{key:"98e3a15104e813c6798ccac75fbd1bb163735c54"},this.isLoadingLoyalty?a("salla-loading",null):a("div",null,this.loyaltyPointsArray.length>0?a("div",null,a("table",{class:"s-loyalty-program-table"},a("thead",{class:"s-loyalty-program-table-head"},a("tr",{class:"s-loyalty-program-table-head-tr"},a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),a("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),a("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((l=>a("tr",{class:"s-loyalty-program-table-tbody-tr"},a("td",{class:"s-loyalty-program-table-tbody-tr-td"},(l===null||l===void 0?void 0:l.type)==="plus"?"+":"",(l===null||l===void 0?void 0:l.points)||""," ",salla.lang.get("pages.loyalty_program.point")),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r((l===null||l===void 0?void 0:l.created_at)?Number(l.created_at)*1e3:undefined)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(l===null||l===void 0?void 0:l.points_expire_date)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.key)),a("td",{class:"s-loyalty-program-table-tbody-tr-td"},e(l===null||l===void 0?void 0:l.status_key))))))),a("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&a("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):a("div",null,a("div",{class:"s-loyalty-program-table-empty-state"},a("span",{innerHTML:s}),a("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),a("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))}};i.style=o;export{i as salla_loyalty_program};
5
+ //# sourceMappingURL=p-83c23d48.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}from"./p-Cmh2bDlu.js";import{I as a}from"./p-uTyAzPSy.js";var e=`\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 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>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 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>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 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>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`;const n=":host{display:block}";const h=class{constructor(t){s(this,t);this.codeCopied=null;this.noItemFound=true;this.order_items=[];this.isDigitalCard=s=>s.product.type==="codes";this.isDigitalProduct=s=>s.product.type==="digital"}async componentWillLoad(){salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes");this.copy_text=salla.lang.get("common.elements.copy");this.files_text=salla.lang.get("pages.thank_you.files");this.download_text=salla.lang.get("pages.thank_you.download")}));return await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s;this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id");const t="Failed to fetch order items";if(!s){salla.logger.error(t);throw new Error(t)}try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);const a=t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)));if(a){this.order_items=t;this.noItemFound=false}}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"14eed8e219bcde5b32d5fddb95bb8727e980c56c",class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:l}),t("span",null,s.code)),t("salla-button",{class:`s-order-summary-item-copy-button ${this.codeCopied===s.code?"copied":""}`,onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?a:i}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:e}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:c}),t("span",null,this.download_text))))))):null)))}};h.style=n;export{h as salla_order_summary};
5
- //# sourceMappingURL=p-f0e1cc94.entry.js.map
4
+ import{r as s,h as t}from"./p-wQf8KFfR.js";import{I as a}from"./p-uTyAzPSy.js";var e=`\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 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>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 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>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 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>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`;const n=":host{display:block}";const h=class{constructor(t){s(this,t);this.codeCopied=null;this.noItemFound=true;this.order_items=[];this.isDigitalCard=s=>s.product.type==="codes";this.isDigitalProduct=s=>s.product.type==="digital"}async componentWillLoad(){salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes");this.copy_text=salla.lang.get("common.elements.copy");this.files_text=salla.lang.get("pages.thank_you.files");this.download_text=salla.lang.get("pages.thank_you.download")}));return await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s;this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id");const t="Failed to fetch order items";if(!s){salla.logger.error(t);throw new Error(t)}try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);const a=t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)));if(a){this.order_items=t;this.noItemFound=false}}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"14eed8e219bcde5b32d5fddb95bb8727e980c56c",class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:l}),t("span",null,s.code)),t("salla-button",{class:`s-order-summary-item-copy-button ${this.codeCopied===s.code?"copied":""}`,onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?a:i}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:e}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:c}),t("span",null,this.download_text))))))):null)))}};h.style=n;export{h as salla_order_summary};
5
+ //# sourceMappingURL=p-853d41e8.entry.js.map