@salla.sa/twilight-components 2.14.250 → 2.14.251

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 (316) hide show
  1. package/dist/cjs/{app-globals-BgNFpKiG.js → app-globals-0qyY-ElC.js} +3 -3
  2. package/dist/cjs/{app-globals-BgNFpKiG.js.map → app-globals-0qyY-ElC.js.map} +1 -1
  3. package/dist/cjs/{index-DFk4JQs_.js → index-CxIOfeMA.js} +4 -4
  4. package/dist/cjs/{index-DFk4JQs_.js.map → index-CxIOfeMA.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-offer.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 +22 -1
  31. package/dist/cjs/salla-product-options.cjs.entry.js.map +1 -1
  32. package/dist/cjs/salla-product-options.entry.cjs.js.map +1 -1
  33. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  41. package/dist/cjs/twilight.cjs.js +2 -2
  42. package/dist/collection/components/salla-product-options/salla-product-options.js +21 -0
  43. package/dist/collection/components/salla-product-options/salla-product-options.js.map +1 -1
  44. package/dist/components/index.js +2 -2
  45. package/dist/components/index.js.map +1 -1
  46. package/dist/components/salla-product-options.js +21 -0
  47. package/dist/components/salla-product-options.js.map +1 -1
  48. package/dist/esm/{app-globals-DoDOGg4t.js → app-globals-BBUHVW9U.js} +3 -3
  49. package/dist/esm/{app-globals-DoDOGg4t.js.map → app-globals-BBUHVW9U.js.map} +1 -1
  50. package/dist/esm/{index-Fh3juwdj.js → index-aC-cHVMV.js} +4 -4
  51. package/dist/esm/{index-Fh3juwdj.js.map → index-aC-cHVMV.js.map} +1 -1
  52. package/dist/esm/loader.js +3 -3
  53. package/dist/esm/salla-accordion-body.entry.js +1 -1
  54. package/dist/esm/salla-accordion-head.entry.js +1 -1
  55. package/dist/esm/salla-accordion.entry.js +1 -1
  56. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  57. package/dist/esm/salla-advertisement.entry.js +1 -1
  58. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  59. package/dist/esm/salla-apps-icons.entry.js +1 -1
  60. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  61. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  62. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  63. package/dist/esm/salla-contacts.entry.js +1 -1
  64. package/dist/esm/salla-filters-widget.entry.js +1 -1
  65. package/dist/esm/salla-filters.entry.js +1 -1
  66. package/dist/esm/salla-installment.entry.js +1 -1
  67. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  68. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  69. package/dist/esm/salla-metadata.entry.js +1 -1
  70. package/dist/esm/salla-notification-item.entry.js +1 -1
  71. package/dist/esm/salla-notifications.entry.js +1 -1
  72. package/dist/esm/salla-offer.entry.js +1 -1
  73. package/dist/esm/salla-order-summary.entry.js +1 -1
  74. package/dist/esm/salla-orders.entry.js +1 -1
  75. package/dist/esm/salla-payments.entry.js +1 -1
  76. package/dist/esm/salla-price-range.entry.js +1 -1
  77. package/dist/esm/salla-product-options.entry.js +22 -1
  78. package/dist/esm/salla-product-options.entry.js.map +1 -1
  79. package/dist/esm/salla-review-card.entry.js +1 -1
  80. package/dist/esm/salla-reviews-page.entry.js +1 -1
  81. package/dist/esm/salla-reviews.entry.js +1 -1
  82. package/dist/esm/salla-social.entry.js +1 -1
  83. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  84. package/dist/esm/salla-tooltip.entry.js +1 -1
  85. package/dist/esm/salla-verify.entry.js +1 -1
  86. package/dist/esm/salla-wallet.entry.js +1 -1
  87. package/dist/esm/twilight.js +3 -3
  88. package/dist/esm-es5/{app-globals-DoDOGg4t.js → app-globals-BBUHVW9U.js} +2 -2
  89. package/dist/esm-es5/{app-globals-DoDOGg4t.js.map → app-globals-BBUHVW9U.js.map} +1 -1
  90. package/dist/esm-es5/{index-Fh3juwdj.js → index-aC-cHVMV.js} +3 -3
  91. package/dist/esm-es5/{index-Fh3juwdj.js.map → index-aC-cHVMV.js.map} +1 -1
  92. package/dist/esm-es5/loader.js +1 -1
  93. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  94. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  95. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  96. package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
  97. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  98. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  99. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  100. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  101. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  102. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  103. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  104. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  105. package/dist/esm-es5/salla-filters.entry.js +1 -1
  106. package/dist/esm-es5/salla-installment.entry.js +1 -1
  107. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  108. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  109. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  110. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  111. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  112. package/dist/esm-es5/salla-offer.entry.js +1 -1
  113. package/dist/esm-es5/salla-order-summary.entry.js +1 -1
  114. package/dist/esm-es5/salla-orders.entry.js +1 -1
  115. package/dist/esm-es5/salla-payments.entry.js +1 -1
  116. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  117. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  118. package/dist/esm-es5/salla-product-options.entry.js.map +1 -1
  119. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  120. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  121. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  122. package/dist/esm-es5/salla-social.entry.js +1 -1
  123. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  124. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  125. package/dist/esm-es5/salla-verify.entry.js +1 -1
  126. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  127. package/dist/esm-es5/twilight.js +1 -1
  128. package/dist/twilight/p-03f5a937.entry.js +5 -0
  129. package/dist/twilight/{p-a4373a58.entry.js → p-0443edb2.entry.js} +2 -2
  130. package/dist/twilight/{p-15109abe.entry.js → p-04b3d375.entry.js} +2 -2
  131. package/dist/twilight/{p-2fc264a5.system.entry.js → p-08b3ea63.system.entry.js} +2 -2
  132. package/dist/twilight/{p-48c8c116.system.entry.js → p-09117f81.system.entry.js} +2 -2
  133. package/dist/twilight/{p-90b19a52.entry.js → p-0d0836f3.entry.js} +2 -2
  134. package/dist/twilight/{p-5aa8dd63.system.entry.js → p-0e931dd0.system.entry.js} +2 -2
  135. package/dist/twilight/{p-8e87d5bb.entry.js → p-18bd19bd.entry.js} +2 -2
  136. package/dist/twilight/{p-65e55582.system.entry.js → p-1b9e31b1.system.entry.js} +2 -2
  137. package/dist/twilight/{p-c143cae6.system.entry.js → p-1d08e23e.system.entry.js} +2 -2
  138. package/dist/twilight/{p-8422a030.entry.js → p-21c35fec.entry.js} +2 -2
  139. package/dist/twilight/{p-DFHtpaXy.system.js.map → p-24T5fnEM.system.js.map} +1 -1
  140. package/dist/twilight/{p-af947a45.system.entry.js → p-29440936.system.entry.js} +2 -2
  141. package/dist/twilight/{p-eab0ef43.system.entry.js → p-2d2fce30.system.entry.js} +2 -2
  142. package/dist/twilight/{p-0d5aa57d.system.entry.js → p-2f85174e.system.entry.js} +2 -2
  143. package/dist/twilight/{p-1d675685.entry.js → p-3407c5ef.entry.js} +2 -2
  144. package/dist/twilight/{p-d3177b59.entry.js → p-342eda73.entry.js} +2 -2
  145. package/dist/twilight/{p-dca1a091.entry.js → p-3438bc0c.entry.js} +2 -2
  146. package/dist/twilight/{p-4f532944.system.entry.js → p-3b207dc4.system.entry.js} +2 -2
  147. package/dist/twilight/{p-89bfcbd9.entry.js → p-3e82f611.entry.js} +2 -2
  148. package/dist/twilight/{p-yR-D_QVV.system.js.map → p-3etOZ9ok.system.js.map} +1 -1
  149. package/dist/twilight/{p-f4dd7c30.entry.js → p-3fb416fa.entry.js} +2 -2
  150. package/dist/twilight/{p-cc88bd11.entry.js → p-47fc4553.entry.js} +2 -2
  151. package/dist/twilight/{p-84efc4e5.system.entry.js → p-49051076.system.entry.js} +2 -2
  152. package/dist/twilight/{p-c5bdc891.system.entry.js → p-4a4cad07.system.entry.js} +3 -3
  153. package/dist/twilight/{p-0093b63c.system.entry.js → p-4d318ffc.system.entry.js} +2 -2
  154. package/dist/twilight/{p-31c2d596.entry.js → p-5054fc18.entry.js} +2 -2
  155. package/dist/twilight/{p-d6d41f95.entry.js → p-56074b1e.entry.js} +2 -2
  156. package/dist/twilight/{p-777970a0.system.entry.js → p-56628b3c.system.entry.js} +2 -2
  157. package/dist/twilight/{p-f8232bd5.entry.js → p-5dda0431.entry.js} +2 -2
  158. package/dist/twilight/p-61471a8d.system.entry.js +5 -0
  159. package/dist/twilight/{p-AKVBtuMk.system.js.map → p-63hxYOEG.system.js.map} +1 -1
  160. package/dist/twilight/{p-3011ae50.entry.js → p-65d9d657.entry.js} +2 -2
  161. package/dist/twilight/{p-2ae3f0e1.system.entry.js → p-6943af29.system.entry.js} +2 -2
  162. package/dist/twilight/{p-f0ad1f7a.system.entry.js → p-6a16b86d.system.entry.js} +2 -2
  163. package/dist/twilight/{p-07e383ed.entry.js → p-70688702.entry.js} +2 -2
  164. package/dist/twilight/{p-8c4ff806.entry.js → p-75203eae.entry.js} +2 -2
  165. package/dist/twilight/{p-72dbdf8a.entry.js → p-779536eb.entry.js} +2 -2
  166. package/dist/twilight/{p-CuT3SRo-.system.js.map → p-7HslI1sO.system.js.map} +1 -1
  167. package/dist/twilight/{p-3f5fc0ac.entry.js → p-7e1c3fd9.entry.js} +2 -2
  168. package/dist/twilight/{p-ef1c9026.system.entry.js → p-7f9f9400.system.entry.js} +2 -2
  169. package/dist/twilight/p-7f9f9400.system.entry.js.map +1 -0
  170. package/dist/twilight/{p-CQ0P5lf7.system.js.map → p-81UxRwTN.system.js.map} +1 -1
  171. package/dist/twilight/{p-67a30d9c.entry.js → p-8a55a076.entry.js} +2 -2
  172. package/dist/twilight/{p-feb47383.system.entry.js → p-8c2a97cf.system.entry.js} +2 -2
  173. package/dist/twilight/p-8d02af0b.system.entry.js +5 -0
  174. package/dist/twilight/{p-6e2c5013.system.entry.js → p-9297d5d0.system.entry.js} +2 -2
  175. package/dist/twilight/{p-5e07c206.system.entry.js → p-92a2ce11.system.entry.js} +2 -2
  176. package/dist/twilight/{p-12ec4275.entry.js → p-92fb3adc.entry.js} +2 -2
  177. package/dist/twilight/{p-c8409d01.system.entry.js → p-939b203a.system.entry.js} +2 -2
  178. package/dist/twilight/{p-b0342394.entry.js → p-94b99a34.entry.js} +2 -2
  179. package/dist/twilight/{p-41858b7a.entry.js → p-98ca67d7.entry.js} +2 -2
  180. package/dist/twilight/p-9b7b035c.entry.js +5 -0
  181. package/dist/twilight/{p-a74c3613.entry.js → p-9c2bf5c2.entry.js} +2 -2
  182. package/dist/twilight/{p-CXK1rNlC.system.js → p-9cvlynxW.system.js} +3 -3
  183. package/dist/twilight/{p-CXK1rNlC.system.js.map → p-9cvlynxW.system.js.map} +1 -1
  184. package/dist/twilight/{p-969a72ac.entry.js → p-9f75e64f.entry.js} +2 -2
  185. package/dist/twilight/{p-xqp4ddQE.system.js.map → p-B-6fJi1f.system.js.map} +1 -1
  186. package/dist/twilight/{p-D7rVz8w9.system.js.map → p-B6pAHU4P.system.js.map} +1 -1
  187. package/dist/twilight/{p-RTeyQLWy.system.js.map → p-BSHk_PNC.system.js.map} +1 -1
  188. package/dist/twilight/{p-0Yb-UePn.system.js.map → p-BZAlfa8A.system.js.map} +1 -1
  189. package/dist/twilight/{p-BGI8pwzX.system.js.map → p-BaUsKGrq.system.js.map} +1 -1
  190. package/dist/twilight/{p-CsNoOX-E.system.js → p-Bl7BRAvB.system.js} +2 -2
  191. package/dist/twilight/{p-CsNoOX-E.system.js.map → p-Bl7BRAvB.system.js.map} +1 -1
  192. package/dist/twilight/{p-F0k7g9iY.system.js.map → p-C3l3EpVC.system.js.map} +1 -1
  193. package/dist/twilight/{p-6K3EacFl.system.js → p-CBqvheHa.system.js} +2 -2
  194. package/dist/twilight/{p-6K3EacFl.system.js.map → p-CBqvheHa.system.js.map} +1 -1
  195. package/dist/twilight/{p-I3V9OjUh.system.js.map → p-CHKd1ZbK.system.js.map} +1 -1
  196. package/dist/twilight/{p-CJCijTkx.system.js.map → p-CbFmk86R.system.js.map} +1 -1
  197. package/dist/twilight/{p-C7pQcCCO.system.js.map → p-Chh9LXws.system.js.map} +1 -1
  198. package/dist/twilight/{p-DXIfbc_E.system.js.map → p-Cie2T8Bo.system.js.map} +1 -1
  199. package/dist/twilight/{p-B_e6C9C7.system.js.map → p-Craz4PUF.system.js.map} +1 -1
  200. package/dist/twilight/{p-BqsAYW_z.system.js.map → p-D1othg3r.system.js.map} +1 -1
  201. package/dist/twilight/{p-JqK0adg-.system.js.map → p-D74Dhmc1.system.js.map} +1 -1
  202. package/dist/twilight/{p-BeIXRKnY.system.js.map → p-DFTLMdWL.system.js.map} +1 -1
  203. package/dist/twilight/{p-C1ANpTev.system.js.map → p-DOCHKq2e.system.js.map} +1 -1
  204. package/dist/twilight/{p-kq1kexdS.system.js.map → p-DOHYAySQ.system.js.map} +1 -1
  205. package/dist/twilight/{p-C7zV68dE.system.js.map → p-DbkDylL6.system.js.map} +1 -1
  206. package/dist/twilight/{p-OPHJjNOp.system.js.map → p-De28Pl5h.system.js.map} +1 -1
  207. package/dist/twilight/{p-DDYb73x9.system.js.map → p-DobF7Qkv.system.js.map} +1 -1
  208. package/dist/twilight/{p-BEv7FXnl.system.js.map → p-Dohhf_R_.system.js.map} +1 -1
  209. package/dist/twilight/{p-oQO9FKN9.system.js.map → p-DoomSogT.system.js.map} +1 -1
  210. package/dist/twilight/{p-ClGf-mQe.system.js.map → p-QCD41AKz.system.js.map} +1 -1
  211. package/dist/twilight/{p-BlIQW2lO.system.js.map → p-Uzujt2uQ.system.js.map} +1 -1
  212. package/dist/twilight/{p-DL20L4sR.system.js.map → p-YRdrauTw.system.js.map} +1 -1
  213. package/dist/twilight/{p-51fff39f.entry.js → p-a3c00836.entry.js} +2 -2
  214. package/dist/twilight/{p-CV9enCHU.system.js.map → p-a3gxDXSb.system.js.map} +1 -1
  215. package/dist/twilight/{p-314b3b1d.system.entry.js → p-a5b4c38f.system.entry.js} +2 -2
  216. package/dist/twilight/{p-be0c1dee.entry.js → p-a94e5163.entry.js} +2 -2
  217. package/dist/twilight/{p-Fh3juwdj.js → p-aC-cHVMV.js} +3 -3
  218. package/dist/twilight/{p-Fh3juwdj.js.map → p-aC-cHVMV.js.map} +1 -1
  219. package/dist/twilight/p-af7ace10.entry.js +5 -0
  220. package/dist/twilight/p-af7ace10.entry.js.map +1 -0
  221. package/dist/twilight/{p-b07d4935.entry.js → p-b0584206.entry.js} +2 -2
  222. package/dist/twilight/{p-bcb8b7a7.system.entry.js → p-b1f25cb5.system.entry.js} +3 -3
  223. package/dist/twilight/{p-11c6d38a.system.entry.js → p-b75d729a.system.entry.js} +2 -2
  224. package/dist/twilight/{p-aa17ca75.system.entry.js → p-b7bb5a85.system.entry.js} +2 -2
  225. package/dist/twilight/{p-0ecc5067.system.entry.js → p-b9a992c8.system.entry.js} +2 -2
  226. package/dist/twilight/{p-C5ceUSVS.js → p-cW_hSk8i.js} +2 -2
  227. package/dist/twilight/{p-C5ceUSVS.js.map → p-cW_hSk8i.js.map} +1 -1
  228. package/dist/twilight/{p-9b377923.entry.js → p-d01c0575.entry.js} +2 -2
  229. package/dist/twilight/{p-ed74ff73.system.entry.js → p-e1a599fb.system.entry.js} +2 -2
  230. package/dist/twilight/{p-d2f4c095.system.entry.js → p-e29eb090.system.entry.js} +2 -2
  231. package/dist/twilight/{p-5b0c8164.system.entry.js → p-e5cd34c3.system.entry.js} +2 -2
  232. package/dist/twilight/{p-cbd8cbee.entry.js → p-efcf803a.entry.js} +2 -2
  233. package/dist/twilight/{p-b3e42e7f.system.entry.js → p-f777295c.system.entry.js} +2 -2
  234. package/dist/twilight/{p-caf5e9c0.system.entry.js → p-f9735e19.system.entry.js} +2 -2
  235. package/dist/twilight/{p-ea4cddf9.system.entry.js → p-fabacea5.system.entry.js} +2 -2
  236. package/dist/twilight/{p-CjFC0ce0.system.js.map → p-fkQosYiP.system.js.map} +1 -1
  237. package/dist/twilight/{p-Dm-9Eytr.system.js.map → p-gyc8toCS.system.js.map} +1 -1
  238. package/dist/twilight/p-o3nk7iqR.system.js.map +1 -0
  239. package/dist/twilight/{p-B5711wvS.system.js.map → p-sLrIToFR.system.js.map} +1 -1
  240. package/dist/twilight/salla-product-options.entry.esm.js.map +1 -1
  241. package/dist/twilight/twilight.esm.js +1 -1
  242. package/dist/twilight/twilight.js +1 -1
  243. package/dist/types/components/salla-product-options/salla-product-options.d.ts +1 -0
  244. package/package.json +5 -5
  245. package/dist/twilight/p-2c7106a0.entry.js +0 -5
  246. package/dist/twilight/p-3c7322ea.system.entry.js +0 -5
  247. package/dist/twilight/p-86a30b82.entry.js +0 -5
  248. package/dist/twilight/p-86a30b82.entry.js.map +0 -1
  249. package/dist/twilight/p-DydKtKGm.system.js.map +0 -1
  250. package/dist/twilight/p-ce2994fb.system.entry.js +0 -5
  251. package/dist/twilight/p-d8605d58.entry.js +0 -5
  252. package/dist/twilight/p-ef1c9026.system.entry.js.map +0 -1
  253. /package/dist/twilight/{p-d8605d58.entry.js.map → p-03f5a937.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-a4373a58.entry.js.map → p-0443edb2.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-15109abe.entry.js.map → p-04b3d375.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-2fc264a5.system.entry.js.map → p-08b3ea63.system.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-48c8c116.system.entry.js.map → p-09117f81.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-90b19a52.entry.js.map → p-0d0836f3.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-5aa8dd63.system.entry.js.map → p-0e931dd0.system.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-8e87d5bb.entry.js.map → p-18bd19bd.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-65e55582.system.entry.js.map → p-1b9e31b1.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-c143cae6.system.entry.js.map → p-1d08e23e.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-8422a030.entry.js.map → p-21c35fec.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-af947a45.system.entry.js.map → p-29440936.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-eab0ef43.system.entry.js.map → p-2d2fce30.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-0d5aa57d.system.entry.js.map → p-2f85174e.system.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-1d675685.entry.js.map → p-3407c5ef.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-d3177b59.entry.js.map → p-342eda73.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-dca1a091.entry.js.map → p-3438bc0c.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-4f532944.system.entry.js.map → p-3b207dc4.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-89bfcbd9.entry.js.map → p-3e82f611.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-f4dd7c30.entry.js.map → p-3fb416fa.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-cc88bd11.entry.js.map → p-47fc4553.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-84efc4e5.system.entry.js.map → p-49051076.system.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-c5bdc891.system.entry.js.map → p-4a4cad07.system.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-0093b63c.system.entry.js.map → p-4d318ffc.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-31c2d596.entry.js.map → p-5054fc18.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-d6d41f95.entry.js.map → p-56074b1e.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-777970a0.system.entry.js.map → p-56628b3c.system.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-f8232bd5.entry.js.map → p-5dda0431.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-ce2994fb.system.entry.js.map → p-61471a8d.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-3011ae50.entry.js.map → p-65d9d657.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-2ae3f0e1.system.entry.js.map → p-6943af29.system.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-f0ad1f7a.system.entry.js.map → p-6a16b86d.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-07e383ed.entry.js.map → p-70688702.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-8c4ff806.entry.js.map → p-75203eae.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-72dbdf8a.entry.js.map → p-779536eb.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-3f5fc0ac.entry.js.map → p-7e1c3fd9.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-67a30d9c.entry.js.map → p-8a55a076.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-feb47383.system.entry.js.map → p-8c2a97cf.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-3c7322ea.system.entry.js.map → p-8d02af0b.system.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-6e2c5013.system.entry.js.map → p-9297d5d0.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-5e07c206.system.entry.js.map → p-92a2ce11.system.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-12ec4275.entry.js.map → p-92fb3adc.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-c8409d01.system.entry.js.map → p-939b203a.system.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-b0342394.entry.js.map → p-94b99a34.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-41858b7a.entry.js.map → p-98ca67d7.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-2c7106a0.entry.js.map → p-9b7b035c.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-a74c3613.entry.js.map → p-9c2bf5c2.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-969a72ac.entry.js.map → p-9f75e64f.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-51fff39f.entry.js.map → p-a3c00836.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-314b3b1d.system.entry.js.map → p-a5b4c38f.system.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-be0c1dee.entry.js.map → p-a94e5163.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-b07d4935.entry.js.map → p-b0584206.entry.js.map} +0 -0
  305. /package/dist/twilight/{p-bcb8b7a7.system.entry.js.map → p-b1f25cb5.system.entry.js.map} +0 -0
  306. /package/dist/twilight/{p-11c6d38a.system.entry.js.map → p-b75d729a.system.entry.js.map} +0 -0
  307. /package/dist/twilight/{p-aa17ca75.system.entry.js.map → p-b7bb5a85.system.entry.js.map} +0 -0
  308. /package/dist/twilight/{p-0ecc5067.system.entry.js.map → p-b9a992c8.system.entry.js.map} +0 -0
  309. /package/dist/twilight/{p-9b377923.entry.js.map → p-d01c0575.entry.js.map} +0 -0
  310. /package/dist/twilight/{p-ed74ff73.system.entry.js.map → p-e1a599fb.system.entry.js.map} +0 -0
  311. /package/dist/twilight/{p-d2f4c095.system.entry.js.map → p-e29eb090.system.entry.js.map} +0 -0
  312. /package/dist/twilight/{p-5b0c8164.system.entry.js.map → p-e5cd34c3.system.entry.js.map} +0 -0
  313. /package/dist/twilight/{p-cbd8cbee.entry.js.map → p-efcf803a.entry.js.map} +0 -0
  314. /package/dist/twilight/{p-b3e42e7f.system.entry.js.map → p-f777295c.system.entry.js.map} +0 -0
  315. /package/dist/twilight/{p-caf5e9c0.system.entry.js.map → p-f9735e19.system.entry.js.map} +0 -0
  316. /package/dist/twilight/{p-ea4cddf9.system.entry.js.map → p-fabacea5.system.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"salla-product-options.entry.js","sources":["src/components/salla-product-options/interfaces.ts","src/components/salla-product-options/salla-product-options.scss?tag=salla-product-options","src/components/salla-product-options/salla-product-options.tsx"],"sourcesContent":["export enum DisplayType {\n COLOR = \"color\",\n DATE = \"date\",\n DATETIME = \"datetime\",\n DONATION = \"donation\",\n IMAGE = \"image\",\n MULTIPLE_OPTIONS = \"multiple-options\",\n NUMBER = \"number\",\n SINGLE_OPTION = \"single-option\",\n DIGITAL_CARD_VALUE = \"digital-code-value\",\n COUNTRY = \"country\",\n SPLITTER = \"splitter\",\n TEXT = \"text\",\n TEXTAREA = \"textarea\",\n THUMBNAIL = \"thumbnail\",\n TIME = \"time\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\",\n MAP = \"map\",\n FILE = \"file\", // similar to image type (file-uploader component)\n COLOR_PICKER = \"color_picker\",\n BOOKING = \"booking\"\n}\n\nexport interface ProductDetail {\n id: string;\n sku: string;\n name: string;\n description: string;\n url: string;\n promotion_title: string;\n subtitle: string;\n type: string;\n status: string;\n price: number;\n sale_price: number;\n regular_price: number;\n starting_price: null;\n quantity: number;\n max_quantity: number;\n discount_ends: number;\n is_taxable: boolean;\n has_read_more: boolean;\n can_add_note: boolean;\n can_show_remained_quantity: boolean;\n can_upload_file: boolean;\n has_custom_form: boolean;\n is_on_sale: boolean;\n is_hidden_quantity: boolean;\n is_available: boolean;\n is_out_of_stock: boolean;\n weight: null;\n calories: null;\n image: SimpleImage;\n brand: Brand;\n donation?: ProductDonation;\n images: Image[];\n tags: Tag[];\n notify_availability: null;\n rating: Rating;\n options: Option[];\n sold_quantity: number;\n category: Category;\n}\n\nexport interface SimpleImage {\n url: string;\n alt: string;\n}\n\nexport interface Category {\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface ProductDonation {\n target_message?: string;\n collected_amount?: number;\n target_amount?: number;\n target_percent?: number;\n target_end_date?: string;\n can_donate: boolean;\n custom_amount_enabled: boolean;\n}\n\nexport interface Image {\n id: number;\n url: string;\n main: boolean;\n three_d_image_url: string;\n alt: string;\n video_url: string;\n type: string;\n sort: number;\n}\n\nexport interface Option {\n id: number;\n name: string;\n required: boolean;\n type: string;\n placeholder: string;\n option_type: string;\n not_same_day_order: boolean;\n availability_range: number;\n from_date_time: null;\n to_date_time: null;\n visibility_condition?: { option: number, operator: \"=\" | \"!=\", value: number };\n details?: Detail[];\n condition_attributes: string;\n value?: any;\n length?: number;\n donation?: Donation\n}\n\nexport interface Donation {\n custom_amount_enabled: boolean;\n target_message?: string;\n target_date: string | \"2023-04-18\";\n target_end_date: string | \"2023-04-18\";\n target_amount: number;\n collected_amount: number;\n can_donate: boolean;\n}\n\nexport interface Detail {\n id: number;\n option_id: number;\n name: string;\n additional_price: number;\n option_value: null | string;\n image: null | string;\n color: null | string;\n is_out: boolean;\n skus_availability?: { [sku_id: number]: boolean };\n is_selected: boolean;\n is_default?: 0 | 1;\n code?: string;\n type?: string;\n\n}\n\nexport interface Brand {\n id: string;\n url: string;\n name: string;\n logo: string;\n}\n\nexport interface PreTaxPrice {\n amount: number;\n currency: Currency;\n}\n\nexport enum Currency {\n Sar = \"SAR\",\n}\n\nexport interface Promotion {\n title: string;\n sub_title: string;\n}\n\nexport interface Rating {\n count: number;\n stars: number;\n}\n\nexport interface Tag {\n name: string;\n url: string;\n}\n\nexport interface OptionConfig {\n singleOption?: OptionDisplayType;\n multipleOption?: OptionDisplayType;\n}\n\nexport interface OptionDisplayType {\n type: 'button' | 'default'; // defaults to 'default', which is select and checkbox for single and multiple options respectivly\n}\n","\n.s-product-options{\n &-wrapper{\n\n }\n &-option-container{\n\n }\n &-option{\n\n }\n &-option-label{\n\n }\n &-option-content{\n\n }\n &-colors-wrapper{\n\n }\n &-date-element{\n\n }\n &-time-element{\n \n }\n &-datetime-element{\n\n }\n &-image-input{\n\n }\n &-multiple-options-wrapper{\n\n }\n &-splitter{\n\n }\n &-text{\n\n }\n &-textarea{\n\n }\n &-thumbnails-wrapper{\n\n }\n}\n","import { Component, Prop, h, State, Element, Host, Event, type EventEmitter, Method } from '@stencil/core';\nimport { type Option, DisplayType, type Detail, OptionConfig } from './interfaces';\nimport CheckCircleIcon from '../../assets/svg/check.svg';\nimport CameraIcon from '../../assets/svg/camera.svg';\nimport FileIcon from '../../assets/svg/file-upload.svg';\n\n@Component({\n tag: 'salla-product-options',\n styleUrl: 'salla-product-options.scss',\n})\nexport class SallaProductOptions {\n\n constructor() {\n this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');\n salla.lang.onLoaded(() => {\n this.outOfStockText = salla.lang.get(\"pages.products.out_of_stock\");\n this.donationAmount = salla.lang.get('pages.products.donation_amount');\n this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');\n this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');\n });\n\n if (this.options) {\n try {\n this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));\n return;\n } catch (e) {\n salla.log('Bad json passed via options prop');\n }\n }\n if (!Array.isArray(this.optionsData)) {\n salla.log('Options is not an array[] ---> ', this.optionsData);\n this.setOptionsData([]);\n }\n\n if (this.productId && !salla.url.is_page('cart')) {\n salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));\n }\n }\n /**\n * Sets the options data for the product\n * @param optionsData - Array of product options\n */\n @Method()\n async setOptionsData(optionsData: Option[]) {\n this.optionsData = optionsData;\n const that = this\n this.optionsData[0]?.details?.forEach(function (detail) {\n Object.entries(detail.skus_availability || {})\n .filter(sku => !sku[1])\n .map(sku => that.outSkus.push(Number(sku[0])));\n });\n }\n\n @Element() host: HTMLElement;\n\n private fileTypes: Record<string, string> = {\n pdf: 'application/pdf',\n png: 'image/png',\n jpg: 'image/jpeg',\n word: 'application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n txt: 'text/plain',\n };\n\n @State() optionsData: Option[]\n @State() outOfStockText = \"\"\n @State() donationAmount: string = salla.lang.get('pages.products.donation_amount')\n @State() selectDonationAmount: string = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع')\n @State() selectAmount: string = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ')\n @State() isCustomDonation = false;\n @State() selectedOptions = [];\n @State() canDisabled: boolean;\n @State() selectedSkus?: Array<string | number>;\n @State() selectedOutSkus?: Array<string | number>;\n @State() disableCardValue = true\n @State() availableDigitalCardValues: Detail[] = []\n\n private outSkus: Array<string | number> = [];\n private donationInput?: HTMLInputElement;\n private optionConfig: OptionConfig;\n /**\n * Avoid selection of previous default or selected card value option \n * when switching between digital card country options for the 1st time\n */\n private ignoreDefaultCardValue = false\n /**\n * The id of the product to which the options are going to be fetched for.\n */\n @Prop() productId: number = salla.config.get('page.id');\n\n /**\n * Product detail information.\n */\n @Prop() options: string\n\n /**\n * Hide the out of stock label.\n * Will be used in the case of live validation such as cart page and inline checkout\n */\n @Prop() hideOutLabel: string\n\n /**\n * A unique key used to generate distinct identifiers.\n * \n * This key is appended to a default value to ensure uniqueness\n * across instances or components where differentiation is required.\n */\n @Prop() uniqueKey: string\n\n /**\n * Configuration for customizing the display layout of product options.\n * The `config` prop accepts a JSON string that specifies the layout type for rendering options.\n * It allows customization of how single-option and multiple-option selections are displayed.\n * \n * Example Usage:\n * ```html\n * <salla-product-options \n * options=\"{{ product.options }}\" \n * product-id=\"{{ product.id }}\" \n * unique-key=\"abc123\"\n * config='{\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"button\" }\n * }'>\n * </salla-product-options>\n * ```\n * \n * Example Config JSON:\n * ```json\n * {\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"default\" }\n * }\n * ```\n * \n * - `single-option`:\n * - Defines the display style for single-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a dropdown (default).\n * \n * - `multiple-option`:\n * - Defines the display style for multiple-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a list of checkboxes (default).\n */\n @Prop() config: string;\n\n /**\n * Get the id's of the selected options.\n * */\n @Method()\n async getSelectedOptionsData() {\n const selectedOptions = {}\n const formData = (this.host as HTMLElement & { getElementSallaData: () => FormData }).getElementSallaData();\n formData.forEach((value, key) => {\n if (key.startsWith('options[')) { (selectedOptions[key.replace('options[', '').replace(']', '')] = value) }\n });\n return selectedOptions;\n }\n\n /**\n * Report options form validity.\n * */\n @Method()\n async reportValidity() {\n const requiredElements = this.host.querySelectorAll('[required]') as unknown as Array<HTMLInputElement>;\n let pass = true;\n for (let i = 0; i < requiredElements.length; i++) {\n //if there is only one invalid option, return false\n if ('reportValidity' in requiredElements[i] && !requiredElements[i].reportValidity()) {\n pass = false;\n }\n }\n return pass;\n }\n\n /**\n * Return true if there is any out of stock options are selected and vise versa.\n * */\n @Method()\n async hasOutOfStockOption() {\n return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus?.length && this.selectedSkus?.every(sku => this.outSkus.includes(sku)));\n }\n\n /**\n * Get selected options.\n * */\n @Method()\n async getSelectedOptions() {\n return this.selectedOptions;\n }\n\n /**\n * Get a specific option by its id.\n * */\n @Method()\n async getOption(option_id) {\n return this.optionsData.find(option => option.id === option_id);\n }\n\n /**\n * An event that emitted when any option is changed.\n */\n @Event() changed: EventEmitter;\n\n // @ts-ignore\n private invalidHandler(event: Event, option: Option) {\n const closestProductOption = (event.target as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n\n if (!closestProductOption.classList.contains('s-product-options-option-error')) {\n closestProductOption.classList.add('s-product-options-option-error');\n }\n\n if (!salla.url.is_page('cart')) {\n const firstInvalidElement = this.host.querySelector('.s-product-options-option-error');\n if (firstInvalidElement === closestProductOption) {\n this.scrollToElement(closestProductOption);\n }\n }\n }\n\n private scrollToElement(element: HTMLElement) {\n if (element) {\n element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n }\n\n private changedHandler(event, option, fireChangeEvent = true) {\n const data = {\n event: event,\n option: option,\n detail: null,\n productId: this.productId\n };\n\n if (option.details) {\n const detail = option.details.find((detail) => {\n return Number(detail.id) === Number(event.target.value);\n });\n data.detail = detail;\n }\n\n if (option.type === 'country') {\n this.handleCountryOptionChange(event, data.detail);\n }\n\n const optionElement = event.target.closest('.s-product-options-option');\n if (event.target.value ||\n ((option.type === DisplayType.FILE || option.type === DisplayType.IMAGE) && event.type === 'added') ||\n (option.type === DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {\n setTimeout(() => {\n optionElement.classList.remove('s-product-options-option-error');\n }, 200);\n }\n\n if (option.type === DisplayType.DONATION) {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n\n this.setSelectedSkus();\n this.handleRequiredMultipleOptions(option);\n\n const index = this.selectedOptions.findIndex(opt => opt.option_id === data.option.id);\n\n if (data.option.type === DisplayType.MULTIPLE_OPTIONS) {\n // Handle multiple selections\n const detailIndex = this.selectedOptions.findIndex(\n opt => opt.option_id === data.option.id && opt?.id === data.detail?.id\n );\n if (detailIndex > -1) {\n // If the option is already selected, remove it (unselect)\n this.selectedOptions.splice(detailIndex, 1);\n } else {\n // If the option is not selected, add it to the selectedOptions array\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n } else {\n // Handle single selection\n if (!data.detail || Object.keys(data.detail).length === 0) {\n // If there is no value for the single-select, remove it from the selectedOptions array\n if (index > -1) {\n this.selectedOptions.splice(index, 1);\n }\n } else {\n // If a value exists, update or add the selection\n if (index > -1) {\n // Replace the existing selection with the new one\n this.selectedOptions[index] = { ...data.detail, option_id: data.option.id };\n } else {\n // If no selection exists for this input, add the new selection\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n }\n }\n\n \n // Update optionsData directly\n this.optionsData = this.optionsData.map(opt => {\n if (opt.id === data.option.id) {\n return {\n ...opt,\n details: opt.details.map(detail => ({\n ...detail,\n is_selected: data.option.type === DisplayType.MULTIPLE_OPTIONS\n ? this.selectedOptions.some(selected => selected.id === detail.id)\n : Number(detail.id) === Number(data.detail?.id),\n value: data.detail?.value\n }))\n };\n }\n return opt;\n });\n // Emit the event only if fireChangeEvent is true\n if (fireChangeEvent) {\n this.changed.emit(data);\n salla.event.emit('product-options::change', data);\n }\n }\n\n\n private handleDonationOptions = (event, detail, type) => {\n if (detail === 'custom' && type === 'input') {\n salla.helpers.inputDigitsOnly(event.target)\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n this.isCustomDonation = event.target.value === 'custom';\n if (this.donationInput) {\n if (event.target.value === 'custom') {\n this.donationInput.value = '';\n this.donationInput.focus()\n } else {\n this.donationInput.value = event.target.value;\n }\n if (detail === 'custom') {\n return\n }\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n }\n\n private hideLabel = (option) => {\n if (option.type === DisplayType.DONATION && (option.donation && !option.donation.can_donate)) {\n return true;\n }\n return false;\n }\n\n private getExpireDonationMessage = (option) => {\n if (!option.donation) {\n return;\n }\n const completed = option.donation.target_amount <= option.donation.collected_amount;\n return <div class={{ \"s-product-options-donation-message\": true, \"s-product-options-donation-completed\": completed, \"s-product-options-donation-expired\": !completed }}>\n <p>{option.donation.target_message}</p>\n <span innerHTML={completed ? salla.money(option.donation.target_amount) : ''}></span>\n </div>\n }\n /**\n * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;\n */\n private setSelectedSkus() {\n this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))\n .reduce((p, c) => p.filter(e => c.includes(e)), []) // Initialize accumulator as an empty array\n .map(sku => Number(sku));\n }\n \n\n private handleRequiredMultipleOptions(option) {\n if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {\n return;\n }\n const optionContainer = this.host.querySelector(`[data-option-id=\"${option.id}\"]`);\n const hasChecked = optionContainer.querySelectorAll('input:checked').length;\n optionContainer.querySelectorAll('input').forEach(input => input.toggleAttribute('required', !hasChecked));\n }\n\n private getLatLng(value, type: 'lat' | 'lng') {\n return value\n ? value.split(',')[type === 'lat' ? 0 : 1]\n : '';\n }\n\n private getDisplayForType(option: Option) {\n if (this[`${option.type}Option`]) {\n return this[`${option.type}Option`](option);\n }\n\n if (option.type === DisplayType.COLOR_PICKER) {\n return this.colorPickerOption(option)\n }\n\n if (option.type === DisplayType.MULTIPLE_OPTIONS) {\n return this.multipleOptions(option);\n }\n\n if (option.type === DisplayType.SINGLE_OPTION) {\n return this.singleOption(option);\n }\n\n if (option.type === DisplayType.DIGITAL_CARD_VALUE) {\n return this.digitalCardValuesOption(option);\n }\n if (option.type === DisplayType.COUNTRY) {\n return this.countryOption(option);\n }\n\n if (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) {\n return <salla-booking-field onInvalidInput={(e) => this.invalidHandler(e, option)} option={option as any} productId={option.value}></salla-booking-field>\n }\n\n salla.log(`Couldn't find options type(${option.type})😢`);\n return '';\n }\n\n protected getOptionShownWhen(option: Option) {\n return option.visibility_condition\n ? { \"data-show-when\": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}` }\n : {};\n }\n\n private getAvailableDigitalCardSKUs(detail: Detail) {\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n const outofStockSKUs = Object.keys(detail.skus_availability).filter(key => detail.skus_availability[key] === false)\n\n this.availableDigitalCardValues = digitalCardOption.details.filter((op) => {\n\n return !Object.keys(op.skus_availability).filter(SKU_key => outofStockSKUs.includes(SKU_key)).length\n\n })\n\n }\n private handleCountryOptionChange(event: Event, detail: Detail) {\n event.stopImmediatePropagation()\n\n this.ignoreDefaultCardValue = true\n\n const currentCardValue = this.host.querySelector(\"input[data-code-value]:checked\") as HTMLInputElement | null\n\n if (currentCardValue) currentCardValue.checked = false\n\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n this.getAvailableDigitalCardSKUs(detail)\n }\n\n private getSelectedDigitalCardOptions(option: Option) {\n const selectedOption = option.details.find(detail => detail.is_selected)\n const defaultOption = option.details.find(detail => !!detail.is_default) || option.details[0] /*option.details[0] only applys for counrty options*/\n if (!['digital-code-value', 'country'].includes(option.type)) return\n\n return selectedOption || defaultOption\n\n\n }\n\n //we need the cart Id for productOption Image\n async componentWillLoad() {\n if(salla.url.is_page(\"cart\")){\n this.disableCardValue=false\n this.fillSelectedOptions();\n }\n\n if (this.config) {\n try {\n this.optionConfig = typeof this.config === 'string' ? JSON.parse(this.config) : this.config;\n } catch (error) {\n console.error('Failed to parse JSON in config prop:', error);\n }\n }\n\n const shouldSelectDefaultOption = this.optionsData.filter(({ type }) => [\"country\", \"digital-card-value\"].includes(type)).length > 0 && salla.url.is_page('cart')\n\n if (shouldSelectDefaultOption) {\n const countryOption = this.optionsData.find(option => option.type === 'country')\n\n const defaultSelection = countryOption && this.getSelectedDigitalCardOptions(countryOption)\n\n if (defaultSelection) {\n this.getAvailableDigitalCardSKUs(defaultSelection)\n }\n }\n this.outOfStockText = salla.lang.get('pages.products.out_of_stock')\n await salla.onReady();\n document.addEventListener(\"paste\", this.handlePaste.bind(this));\n const needsCartId = (!salla.storage.get('cart.id') && this.optionsData.some(option => ['file', 'image'].includes(option.type)));\n return needsCartId ? salla.api.cart.getCurrentCartId(false, \"salla-product-options\") : null;\n }\n\n /**\n * This is a workaround for a bug in iOS 26 Safari, when pasting English text to RTL inputs, it adds extra text!!\n * To avoid any break changes, we will make it only work on these conditions:\n * - content_copyright is on\n * - Apple Pay is enabled (means it's iOS/safari)\n * - Input is an input or textarea\n * - Salla form control\n * - Options array\n */\n private handlePaste(event: ClipboardEvent) {\n const target = event.target;\n if (\n !Salla.config.get('store.settings.content_copyright')\n || !Salla.helpers.hasApplePay()\n || !(target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement)\n || !target.classList.contains('s-form-control')\n || !target.name.startsWith('options[')) {\n return;\n }\n // Prevent default paste (to avoid Safari inserting extra content)\n event.preventDefault();\n\n // Read only the clipboard data\n const text = event.clipboardData?.getData(\"text\") || \"\";\n\n // Insert it manually at cursor if you want\n const start = target.selectionStart;\n const end = target.selectionEnd;\n\n const newValue = target.value.slice(0, start) + text + target.value.slice(end);\n\n target.value = newValue;\n\n // Reset cursor position\n target.setSelectionRange(start + text.length, start + text.length);\n }\n\n private hideDigitalCardsOptions(option:Option){\n return (this.disableCardValue && option.type===DisplayType.DIGITAL_CARD_VALUE && !salla.url.is_page(\"cart\"))\n }\n\n render() {\n if (this.optionsData?.length === 0) {\n return;\n }\n\n return (\n <Host class=\"s-product-options-wrapper\">\n {/* TODO:: move salla-conditional-field logic to here, no need of another component*/}\n <salla-conditional-fields>\n {this.optionsData.map((option: Option) =>\n <div key={option.id} class={`s-product-options-option-container${option.visibility_condition || this.hideDigitalCardsOptions(option) ? ' hidden' : ''}`}\n data-option-id={option.id}\n {...this.getOptionShownWhen(option)}>\n {option.name === 'splitter' ?\n this.splitterOption()\n : <div class={{ \"s-product-options-option\": true, \"s-product-options-option-booking\": option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\") }} data-option-type={option.type}\n data-option-required={`${option.required}`}>\n <label htmlFor={`options[${option.id}]`} class={`s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}`}>\n <b>\n {option.name}\n {option.required && <span> * </span>} </b>\n <small>{option.placeholder}</small>\n </label>\n <div class={`s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) ? 's-product-options-option-content-full-width' : ''}`}>\n {this.getDisplayForType(option)}\n </div>\n </div>}\n </div>\n )}\n </salla-conditional-fields>\n </Host>\n );\n\n }\n\n private generateUniqueKey(defaultValue: string): string {\n return this.uniqueKey ? `${defaultValue}-${this.uniqueKey}` : defaultValue;\n }\n private fillSelectedOptions() {\n this.selectedOptions = this.optionsData.reduce((acc, opt) => {\n const selectedDetails = opt.details.filter(detail => detail.is_selected);\n const mappedDetails = selectedDetails.map(detail => ({\n ...detail,\n option_id: opt.id\n }));\n return acc.concat(mappedDetails);\n }, []);\n }\n\n componentDidLoad() {\n if (this.optionsData?.length === 0 && !this.optionsData.some(option => option.type === DisplayType.DONATION)) {\n return;\n }\n const selectedDonationOption = this.optionsData.find(option => option.type === DisplayType.DONATION)?.details.find(detail => detail.is_selected);\n if (!selectedDonationOption) {\n return;\n }\n setTimeout(() => {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: selectedDonationOption.additional_price\n });\n }, 1000);\n }\n //@ts-ignore\n private donationOption(option: Option, product: Product) {\n return <div class=\"s-product-options-donation-wrapper\">\n\n {option.donation?.can_donate ? [\n option.donation ?\n <div key={option.id} class=\"s-product-options-donation-progress\">\n <salla-progress-bar donation={option.donation}>\n </salla-progress-bar>\n </div>\n : '',\n option.details.length ?\n [<h4 key={option.id}>{this.selectAmount}</h4>,\n <div key={option.id} class=\"s-product-options-donation-options\">\n {option.details.map((detail, i) =>\n <div key={option.id} class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(`donation-option-${i}`)} type=\"radio\" name=\"donating_option\" checked={detail.is_selected} value={detail.additional_price} onChange={e => this.handleDonationOptions(e, detail, 'option')} />\n <label htmlFor={this.generateUniqueKey(`donation-option-${i}`)}>\n <span innerHTML={salla.money(detail.name)}></span>\n </label>\n </div>\n )}\n {option.donation?.custom_amount_enabled ?\n <div class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(\"donation-option-custom\")} type=\"radio\" name=\"donating_option\" value=\"custom\" onChange={e => this.handleDonationOptions(e, 'custom', 'option')} />\n <label htmlFor={this.generateUniqueKey(\"donation-option-custom\")}>\n <span> {this.selectDonationAmount} </span>\n </label>\n </div>\n : ''\n }\n </div>] : '',\n\n <div key={option.id} class={{ \"s-product-options-donation-input-group\": true, \"shown\": !option.details.length || (option.details.length && this.isCustomDonation) }}>\n <input\n type=\"text\"\n id=\"donating-amount\"\n name=\"donation_amount\"\n class=\"s-form-control\"\n ref={el => { this.donationInput = el as HTMLInputElement }}\n value={\n option.details.length\n && option.details.some(detail => detail.is_selected)\n ? option.details.find(detail => detail.is_selected).additional_price\n : option.value}\n // required\n placeholder={option.placeholder}\n onInput={e => this.handleDonationOptions(e, 'custom', 'input')}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n />\n {/* value={option.value} */}\n <span class=\"s-product-options-donation-amount-currency\">\n {salla.config.currency(salla.config.get('user.currency_code')).symbol}\n </span>\n </div>\n ] :\n this.getExpireDonationMessage(option)\n }\n </div>\n }\n\n private fileUploader(option: Option, additions: Record<string, unknown> | null = null) {\n return <salla-file-upload\n {...(additions || {})}\n payload-name=\"file\"\n value={option.value}\n instant-upload={true}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n height=\"120px\"\n onAdded={(e) => this.changedHandler(e, option)}\n url={salla.cart.api.getUploadImageEndpoint()}\n form-data={{ cart_item_id: this.productId, product_id: this.productId }}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n class={{ \"s-product-options-image-input\": true, required: option.required }}\n >\n <div class=\"s-product-options-filepond-placeholder\">\n <span class=\"s-product-options-filepond-placeholder-icon\"\n innerHTML={(additions as { accept: string }).accept?.split(',').every(type => type.includes('image'))\n ? CameraIcon\n : FileIcon}\n />\n <p class=\"s-product-options-filepond-placeholder-text\">{salla.lang.get('common.uploader.drag_and_drop')}</p>\n <span class=\"filepond--label-action\">{salla.lang.get('common.uploader.browse')}</span>\n </div>\n </salla-file-upload>\n }\n\n //@ts-ignore\n private imageOption(option: Option) {\n return this.fileUploader(option, { accept: 'image/png,image/jpeg,image/jpg,image/gif' });\n }\n\n //@ts-ignore\n private fileOption(option: Option) {\n const types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);\n return types?.length\n ? this.fileUploader(option, { accept: types.join(',') })\n : 'File types not selected.';\n }\n\n // TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption\n //@ts-ignore\n private numberOption(option: Option) {\n return <input\n type=\"text\"\n value={option.value}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)} />\n }\n\n //@ts-ignore\n private splitterOption() {\n return <div class=\"s-product-options-splitter\" />\n }\n\n //@ts-ignore\n private textOption(option: Option) {\n return <div class=\"s-product-options-text\">\n <input\n type=\"text\"\n value={option.value}\n maxLength={option?.length}\n class='s-form-control'\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private textareaOption(option: Option) {\n //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great\n return <div class=\"s-product-options-textarea\">\n <div class=\"mt-1\">\n <textarea\n rows={4}\n value={option.value}\n maxLength={option?.length}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n id={`options[${option.id}]`}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n </div>\n </div>\n }\n\n //@ts-ignore\n private mapOption(option: Option) {\n return <salla-map\n zoom={15}\n lat={this.getLatLng(option.value, 'lat')}\n lng={this.getLatLng(option.value, 'lng')}\n name={`options[${option.id}]`}\n searchable={true}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onSelected={e => this.changedHandler(e, option)} />\n }\n\n private colorPickerOption(option: Option) {\n return <salla-color-picker\n onSubmitted={e => this.changedHandler(e, option)}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n color={option.value} />\n }\n\n /**\n * ============= Date Time options =============\n */\n //@ts-ignore\n private timeOption(option: Option) {\n return <salla-datetime-picker\n noCalendar={true}\n enableTime={true}\n dateFormat=\"h:i K\"\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n class=\"s-product-options-time-element\"\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n }\n\n //@ts-ignore\n private dateOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-date-element\">\n <salla-datetime-picker\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n minDate={new Date()}\n name={`options[${option.id}]`}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private datetimeOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-datetime-element\">\n <salla-datetime-picker\n enableTime={true}\n value={option.value}\n dateFormat=\"Y-m-d G:i:K\"\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n maxDate={option.to_date_time}\n minDate={option.from_date_time}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n /**\n * ============= Advanced options =============\n */\n protected getOptionDetailName(detail: Detail, outOfStock = true, optionType?: string) {\n let detailName;\n if (optionType && optionType === DisplayType.COLOR) {\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` <br/> <p> ${this.outOfStockText} </p>` : '')\n + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price, false)}) </p>` : '');\n }\n\n if(!detailName){\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` - ${this.outOfStockText}` : '')\n + (detail.additional_price ? ` (${salla.money(detail.additional_price, false)})` : '');\n }\n\n //Some merchants adding price to the names of the options,\n //and because we are using this inside select option, we need to replace the html currency symbol with the store currency symbol\n return detailName.replace('<i class=sicon-sar></i>',salla.config.currency()?.symbol || 'ر.س');\n }\n\n\n protected isOptionDetailOut(detail: Detail) {\n if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {\n return detail.is_out;\n }\n\n const isDetailSelected = this.selectedOptions.filter(option => option.id === detail.id).length;\n //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet\n if (isDetailSelected && this.selectedOptions.length === 1) {\n return false;\n }\n\n //if current details has sku in the possible outSkus it's out for sure\n if (isDetailSelected) {\n //here we will get the possible outSkus for current selected options\n const outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));\n return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)))\n }\n\n return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id)\n\n }\n\n /**\n * Renders a single input element (radio or checkbox) for an option detail.\n * @param type - The type of input element ('radio' or 'checkbox').\n * @param detail - The detail object representing an option detail.\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the input is required based on the option's rules.\n * @param name - The name attribute for the input element.\n * @returns HTMLElement - A labeled input element.\n */\n private renderInput(\n type: 'radio' | 'checkbox',\n detail: Detail,\n option: Option,\n isRequired: boolean,\n name: string,\n buttonStyle: boolean,\n ): HTMLElement {\n const id = this.generateUniqueKey(`${type}-${option.id}-${detail.id}`);\n const isDisabled = this.isOptionDetailOut(detail);\n return (\n <label class={{\n \"s-product-options-disabled\": isDisabled,\n }}>\n <input\n id={id}\n type={type}\n name={name}\n value={detail.id}\n disabled={isDisabled}\n required={isRequired}\n checked={detail.is_selected}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <div class={{\"s-product-options-grid-mode-span\": buttonStyle, \"s-product-options-disabled\": isDisabled}}>\n {this.getOptionDetailName(detail)}\n </div>\n </label>\n );\n }\n\n /**\n * Renders a collection of input elements for all details of an option.\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement[] - An array of labeled input elements.\n */\n private renderOptionDetails(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean,\n buttonStyle: boolean = false\n ): HTMLElement[] {\n const name = type === 'radio' ? `options[${option.id}]` : `options[${option.id}][]`;\n return option?.details.map((detail: Detail) =>\n this.renderInput(type, detail, option, isRequired, name, buttonStyle)\n );\n }\n\n /**\n * Renders a dropdown (select) element for a single-option selection.\n * @param option - The parent option object.\n * @returns HTMLElement - A select dropdown element with all option details.\n */\n private renderSelect(option: Option): HTMLElement {\n return (\n <div>\n <select\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n class=\"s-form-control\"\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n >\n <option value=\"\">{option.placeholder}</option>\n {option?.details.map((detail: Detail) => (\n <option\n key={detail.id}\n value={detail.id}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n selected={detail.is_selected}\n >\n {this.getOptionDetailName(detail)}\n </option>\n ))}\n </select>\n </div>\n );\n }\n\n /**\n * Renders a grid-based layout for option inputs (radio or checkbox).\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement - A grid-based container with input elements.\n */\n private renderButtonStyle(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean\n ): HTMLElement {\n return (\n <div class=\"s-product-options-grid-mode\">\n {this.renderOptionDetails(type, option, isRequired, true)}\n </div>\n );\n }\n\n /**\n * Renders a single-option selection, either as a grid or dropdown, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered single-option element.\n */\n private singleOption(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['single-option']?.type === 'button';\n const isRequired = !option.visibility_condition && option.required;\n\n return buttonStyle\n ? this.renderButtonStyle('radio', option, isRequired)\n : this.renderSelect(option);\n }\n\n /**\n * Renders a multiple-option selection, either as a grid or list, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered multiple-option element.\n */\n private multipleOptions(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['multiple-option']?.type === 'button';\n const isRequired =\n option.required &&\n !option.details.some((detail) => detail.is_selected) &&\n !option.visibility_condition;\n\n return buttonStyle\n ? this.renderButtonStyle('checkbox', option, isRequired)\n : (\n <div\n class={{\n 's-product-options-multiple-options-wrapper': true,\n required: option.required,\n }}\n >\n {this.renderOptionDetails('checkbox', option, isRequired)}\n </div>\n );\n }\n \n //@ts-ignore\n private colorOption(option: Option) {\n return (\n <fieldset\n class=\"s-product-options-colors-wrapper\"\n >\n {option?.details.map((detail) => (\n <div\n class=\"s-product-options-colors-item\"\n key={detail.id}\n >\n <input\n type=\"radio\"\n value={detail.id}\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <label htmlFor={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}>\n <span style={{ backgroundColor: detail.color }} />\n <div innerHTML={this.getOptionDetailName(detail, true, option.type)} />\n </label>\n </div>\n ))}\n </fieldset>\n );\n } \n\n //@ts-ignore\n private thumbnailOption(option: Option) {\n return <div class=\"s-product-options-thumbnails-wrapper\">\n {option.details.map((detail: Detail) => {\n return <div key={detail.id}>\n <input type=\"radio\"\n value={detail.id}\n data-itemid={detail.id} //todo:: why need this? it's already in the value!\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n data-img-id={detail.option_value}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n <label htmlFor={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n data-img-id={detail.option_value}\n class=\"go-to-slide\">\n <img data-src={detail.image} src={detail.image} title={detail.name} alt={detail.name} />\n <span innerHTML={CheckCircleIcon} class=\"s-product-options-thumbnails-icon\" />\n {this.isOptionDetailOut(detail) ?\n [\n <small key={detail.id} class=\"s-product-options-thumbnails-stock-badge\">{this.outOfStockText}</small>,\n this.canDisabled ? <div key={detail.id} class=\"s-product-options-thumbnails-badge-overlay\" /> : '',\n ]\n : ''}\n </label>\n <p>{this.getOptionDetailName(detail, false)} </p>\n </div>\n })}\n </div>\n }\n\n // Digital card options\n private digitalCardValuesOption(option: Option) {\n\n return <div class=\"s-product-options-digital-card-wrapper\">\n {this.availableDigitalCardValues.length > 0 ? this.availableDigitalCardValues.map((detail) => {\n const id = String(detail.id)\n return <label htmlFor={this.generateUniqueKey(id.toString())} key={id} class=\"s-product-options-digital-card-option\">\n <input type=\"radio\" data-code-value class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n id={this.generateUniqueKey(id.toString())}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n {...(!this.ignoreDefaultCardValue ? {defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <span>{detail.name} {salla.config?.currency()?.symbol}</span>\n </label>\n })\n : <div class=\"s-product-options-digital-card-out-of-stock\"/>\n }\n </div>\n }\n private countryOption(option: Option) {\n return <div class=\"s-product-options-digital-card-wrapper\">\n {option.details.map((detail) => {\n\n return <label htmlFor={this.generateUniqueKey(detail.id.toString())} key={detail.id} class={{\"s-product-options-digital-card-option\":true,\"s-product-options-digital-card-option-stock-out\":detail.is_out}}>\n <input id={this.generateUniqueKey(detail.id.toString())} type=\"radio\" class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n disabled={detail.is_out}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}\n onClick={()=>{ this.disableCardValue = false}}\n {...(salla.url.is_page(\"cart\") ? {defaultChecked:this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <img loading='lazy' alt={detail.code} height={24} width={24} class=\"s-product-options-country-flag\" src={`https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(detail.code).toLocaleLowerCase()}.svg`}/>\n <span >{detail.name}</span>\n </label>\n })\n }\n </div>\n\n }\n\n}"],"names":["CheckCircleIcon"],"mappings":";;;;;;;AAAA,IAAY,WAsBX;AAtBD,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,UAAA,CAAA,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jH,CAAA,EACG,CAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,MAAM,EAAC,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAC,gCAAgC,EAAC,GAAG,EAAE,CAAmE,gEAAA,EAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAM,IAAA,CAAA,EAAG,CAAA,EACjO,CAAA,CAAA,MAAA,EAAA,IAAA,EAAQ,MAAM,CAAC,IAAI,CAAQ,CACrB;SACb,CAAC,CAEM;;;;;;;;"}
1
+ {"version":3,"file":"salla-product-options.entry.js","sources":["src/components/salla-product-options/interfaces.ts","src/components/salla-product-options/salla-product-options.scss?tag=salla-product-options","src/components/salla-product-options/salla-product-options.tsx"],"sourcesContent":["export enum DisplayType {\n COLOR = \"color\",\n DATE = \"date\",\n DATETIME = \"datetime\",\n DONATION = \"donation\",\n IMAGE = \"image\",\n MULTIPLE_OPTIONS = \"multiple-options\",\n NUMBER = \"number\",\n SINGLE_OPTION = \"single-option\",\n DIGITAL_CARD_VALUE = \"digital-code-value\",\n COUNTRY = \"country\",\n SPLITTER = \"splitter\",\n TEXT = \"text\",\n TEXTAREA = \"textarea\",\n THUMBNAIL = \"thumbnail\",\n TIME = \"time\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\",\n MAP = \"map\",\n FILE = \"file\", // similar to image type (file-uploader component)\n COLOR_PICKER = \"color_picker\",\n BOOKING = \"booking\"\n}\n\nexport interface ProductDetail {\n id: string;\n sku: string;\n name: string;\n description: string;\n url: string;\n promotion_title: string;\n subtitle: string;\n type: string;\n status: string;\n price: number;\n sale_price: number;\n regular_price: number;\n starting_price: null;\n quantity: number;\n max_quantity: number;\n discount_ends: number;\n is_taxable: boolean;\n has_read_more: boolean;\n can_add_note: boolean;\n can_show_remained_quantity: boolean;\n can_upload_file: boolean;\n has_custom_form: boolean;\n is_on_sale: boolean;\n is_hidden_quantity: boolean;\n is_available: boolean;\n is_out_of_stock: boolean;\n weight: null;\n calories: null;\n image: SimpleImage;\n brand: Brand;\n donation?: ProductDonation;\n images: Image[];\n tags: Tag[];\n notify_availability: null;\n rating: Rating;\n options: Option[];\n sold_quantity: number;\n category: Category;\n}\n\nexport interface SimpleImage {\n url: string;\n alt: string;\n}\n\nexport interface Category {\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface ProductDonation {\n target_message?: string;\n collected_amount?: number;\n target_amount?: number;\n target_percent?: number;\n target_end_date?: string;\n can_donate: boolean;\n custom_amount_enabled: boolean;\n}\n\nexport interface Image {\n id: number;\n url: string;\n main: boolean;\n three_d_image_url: string;\n alt: string;\n video_url: string;\n type: string;\n sort: number;\n}\n\nexport interface Option {\n id: number;\n name: string;\n required: boolean;\n type: string;\n placeholder: string;\n option_type: string;\n not_same_day_order: boolean;\n availability_range: number;\n from_date_time: null;\n to_date_time: null;\n visibility_condition?: { option: number, operator: \"=\" | \"!=\", value: number };\n details?: Detail[];\n condition_attributes: string;\n value?: any;\n length?: number;\n donation?: Donation\n}\n\nexport interface Donation {\n custom_amount_enabled: boolean;\n target_message?: string;\n target_date: string | \"2023-04-18\";\n target_end_date: string | \"2023-04-18\";\n target_amount: number;\n collected_amount: number;\n can_donate: boolean;\n}\n\nexport interface Detail {\n id: number;\n option_id: number;\n name: string;\n additional_price: number;\n option_value: null | string;\n image: null | string;\n color: null | string;\n is_out: boolean;\n skus_availability?: { [sku_id: number]: boolean };\n is_selected: boolean;\n is_default?: 0 | 1;\n code?: string;\n type?: string;\n\n}\n\nexport interface Brand {\n id: string;\n url: string;\n name: string;\n logo: string;\n}\n\nexport interface PreTaxPrice {\n amount: number;\n currency: Currency;\n}\n\nexport enum Currency {\n Sar = \"SAR\",\n}\n\nexport interface Promotion {\n title: string;\n sub_title: string;\n}\n\nexport interface Rating {\n count: number;\n stars: number;\n}\n\nexport interface Tag {\n name: string;\n url: string;\n}\n\nexport interface OptionConfig {\n singleOption?: OptionDisplayType;\n multipleOption?: OptionDisplayType;\n}\n\nexport interface OptionDisplayType {\n type: 'button' | 'default'; // defaults to 'default', which is select and checkbox for single and multiple options respectivly\n}\n","\n.s-product-options{\n &-wrapper{\n\n }\n &-option-container{\n\n }\n &-option{\n\n }\n &-option-label{\n\n }\n &-option-content{\n\n }\n &-colors-wrapper{\n\n }\n &-date-element{\n\n }\n &-time-element{\n \n }\n &-datetime-element{\n\n }\n &-image-input{\n\n }\n &-multiple-options-wrapper{\n\n }\n &-splitter{\n\n }\n &-text{\n\n }\n &-textarea{\n\n }\n &-thumbnails-wrapper{\n\n }\n}\n","import { Component, Prop, h, State, Element, Host, Event, type EventEmitter, Method } from '@stencil/core';\nimport { type Option, DisplayType, type Detail, OptionConfig } from './interfaces';\nimport CheckCircleIcon from '../../assets/svg/check.svg';\nimport CameraIcon from '../../assets/svg/camera.svg';\nimport FileIcon from '../../assets/svg/file-upload.svg';\n\n@Component({\n tag: 'salla-product-options',\n styleUrl: 'salla-product-options.scss',\n})\nexport class SallaProductOptions {\n\n constructor() {\n this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');\n salla.lang.onLoaded(() => {\n this.outOfStockText = salla.lang.get(\"pages.products.out_of_stock\");\n this.donationAmount = salla.lang.get('pages.products.donation_amount');\n this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');\n this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');\n });\n\n if (this.options) {\n try {\n this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));\n return;\n } catch (e) {\n salla.log('Bad json passed via options prop');\n }\n }\n if (!Array.isArray(this.optionsData)) {\n salla.log('Options is not an array[] ---> ', this.optionsData);\n this.setOptionsData([]);\n }\n\n if (this.productId && !salla.url.is_page('cart')) {\n salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));\n }\n }\n /**\n * Sets the options data for the product\n * @param optionsData - Array of product options\n */\n @Method()\n async setOptionsData(optionsData: Option[]) {\n this.optionsData = optionsData;\n const that = this\n this.optionsData[0]?.details?.forEach(function (detail) {\n Object.entries(detail.skus_availability || {})\n .filter(sku => !sku[1])\n .map(sku => that.outSkus.push(Number(sku[0])));\n });\n }\n\n @Element() host: HTMLElement;\n\n private fileTypes: Record<string, string> = {\n pdf: 'application/pdf',\n png: 'image/png',\n jpg: 'image/jpeg',\n word: 'application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n txt: 'text/plain',\n };\n\n @State() optionsData: Option[]\n @State() outOfStockText = \"\"\n @State() donationAmount: string = salla.lang.get('pages.products.donation_amount')\n @State() selectDonationAmount: string = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع')\n @State() selectAmount: string = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ')\n @State() isCustomDonation = false;\n @State() selectedOptions = [];\n @State() canDisabled: boolean;\n @State() selectedSkus?: Array<string | number>;\n @State() selectedOutSkus?: Array<string | number>;\n @State() disableCardValue = true\n @State() availableDigitalCardValues: Detail[] = []\n\n private outSkus: Array<string | number> = [];\n private donationInput?: HTMLInputElement;\n private optionConfig: OptionConfig;\n /**\n * Avoid selection of previous default or selected card value option \n * when switching between digital card country options for the 1st time\n */\n private ignoreDefaultCardValue = false\n /**\n * The id of the product to which the options are going to be fetched for.\n */\n @Prop() productId: number = salla.config.get('page.id');\n\n /**\n * Product detail information.\n */\n @Prop() options: string\n\n /**\n * Hide the out of stock label.\n * Will be used in the case of live validation such as cart page and inline checkout\n */\n @Prop() hideOutLabel: string\n\n /**\n * A unique key used to generate distinct identifiers.\n * \n * This key is appended to a default value to ensure uniqueness\n * across instances or components where differentiation is required.\n */\n @Prop() uniqueKey: string\n\n /**\n * Configuration for customizing the display layout of product options.\n * The `config` prop accepts a JSON string that specifies the layout type for rendering options.\n * It allows customization of how single-option and multiple-option selections are displayed.\n * \n * Example Usage:\n * ```html\n * <salla-product-options \n * options=\"{{ product.options }}\" \n * product-id=\"{{ product.id }}\" \n * unique-key=\"abc123\"\n * config='{\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"button\" }\n * }'>\n * </salla-product-options>\n * ```\n * \n * Example Config JSON:\n * ```json\n * {\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"default\" }\n * }\n * ```\n * \n * - `single-option`:\n * - Defines the display style for single-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a dropdown (default).\n * \n * - `multiple-option`:\n * - Defines the display style for multiple-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a list of checkboxes (default).\n */\n @Prop() config: string;\n\n /**\n * Get the id's of the selected options.\n * */\n @Method()\n async getSelectedOptionsData() {\n const selectedOptions = {}\n const formData = (this.host as HTMLElement & { getElementSallaData: () => FormData }).getElementSallaData();\n formData.forEach((value, key) => {\n if (key.startsWith('options[')) { (selectedOptions[key.replace('options[', '').replace(']', '')] = value) }\n });\n return selectedOptions;\n }\n\n /**\n * Report options form validity.\n * */\n @Method()\n async reportValidity() {\n const requiredElements = this.host.querySelectorAll('[required]') as unknown as Array<HTMLInputElement>;\n let pass = true;\n for (let i = 0; i < requiredElements.length; i++) {\n //if there is only one invalid option, return false\n if ('reportValidity' in requiredElements[i] && !requiredElements[i].reportValidity()) {\n pass = false;\n }\n }\n return pass;\n }\n\n /**\n * Return true if there is any out of stock options are selected and vise versa.\n * */\n @Method()\n async hasOutOfStockOption() {\n return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus?.length && this.selectedSkus?.every(sku => this.outSkus.includes(sku)));\n }\n\n /**\n * Get selected options.\n * */\n @Method()\n async getSelectedOptions() {\n return this.selectedOptions;\n }\n\n /**\n * Get a specific option by its id.\n * */\n @Method()\n async getOption(option_id) {\n return this.optionsData.find(option => option.id === option_id);\n }\n\n /**\n * An event that emitted when any option is changed.\n */\n @Event() changed: EventEmitter;\n\n // @ts-ignore\n private invalidHandler(event: Event, option: Option) {\n const closestProductOption = (event.target as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n\n if (!closestProductOption.classList.contains('s-product-options-option-error')) {\n closestProductOption.classList.add('s-product-options-option-error');\n }\n\n if (!salla.url.is_page('cart')) {\n const firstInvalidElement = this.host.querySelector('.s-product-options-option-error');\n if (firstInvalidElement === closestProductOption) {\n this.scrollToElement(closestProductOption);\n }\n }\n }\n\n private scrollToElement(element: HTMLElement) {\n if (element) {\n element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n }\n\n private changedHandler(event, option, fireChangeEvent = true) {\n const data = {\n event: event,\n option: option,\n detail: null,\n productId: this.productId\n };\n\n if (option.details) {\n const detail = option.details.find((detail) => {\n return Number(detail.id) === Number(event.target.value);\n });\n data.detail = detail;\n }\n\n if (option.type === 'country') {\n this.handleCountryOptionChange(event, data.detail);\n }\n\n const optionElement = event.target.closest('.s-product-options-option');\n if (event.target.value ||\n ((option.type === DisplayType.FILE || option.type === DisplayType.IMAGE) && event.type === 'added') ||\n (option.type === DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {\n setTimeout(() => {\n optionElement.classList.remove('s-product-options-option-error');\n }, 200);\n }\n\n if (option.type === DisplayType.DONATION) {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n\n this.setSelectedSkus();\n this.handleRequiredMultipleOptions(option);\n\n const index = this.selectedOptions.findIndex(opt => opt.option_id === data.option.id);\n\n if (data.option.type === DisplayType.MULTIPLE_OPTIONS) {\n // Handle multiple selections\n const detailIndex = this.selectedOptions.findIndex(\n opt => opt.option_id === data.option.id && opt?.id === data.detail?.id\n );\n if (detailIndex > -1) {\n // If the option is already selected, remove it (unselect)\n this.selectedOptions.splice(detailIndex, 1);\n } else {\n // If the option is not selected, add it to the selectedOptions array\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n } else {\n // Handle single selection\n if (!data.detail || Object.keys(data.detail).length === 0) {\n // If there is no value for the single-select, remove it from the selectedOptions array\n if (index > -1) {\n this.selectedOptions.splice(index, 1);\n }\n } else {\n // If a value exists, update or add the selection\n if (index > -1) {\n // Replace the existing selection with the new one\n this.selectedOptions[index] = { ...data.detail, option_id: data.option.id };\n } else {\n // If no selection exists for this input, add the new selection\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n }\n }\n\n \n // Update optionsData directly\n this.optionsData = this.optionsData.map(opt => {\n if (opt.id === data.option.id) {\n return {\n ...opt,\n details: opt.details.map(detail => ({\n ...detail,\n is_selected: data.option.type === DisplayType.MULTIPLE_OPTIONS\n ? this.selectedOptions.some(selected => selected.id === detail.id)\n : Number(detail.id) === Number(data.detail?.id),\n value: data.detail?.value\n }))\n };\n }\n return opt;\n });\n // Emit the event only if fireChangeEvent is true\n if (fireChangeEvent) {\n this.changed.emit(data);\n salla.event.emit('product-options::change', data);\n }\n }\n\n\n private handleDonationOptions = (event, detail, type) => {\n if (detail === 'custom' && type === 'input') {\n salla.helpers.inputDigitsOnly(event.target)\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n this.isCustomDonation = event.target.value === 'custom';\n if (this.donationInput) {\n if (event.target.value === 'custom') {\n this.donationInput.value = '';\n this.donationInput.focus()\n } else {\n this.donationInput.value = event.target.value;\n }\n if (detail === 'custom') {\n return\n }\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n }\n\n private hideLabel = (option) => {\n if (option.type === DisplayType.DONATION && (option.donation && !option.donation.can_donate)) {\n return true;\n }\n return false;\n }\n\n private getExpireDonationMessage = (option) => {\n if (!option.donation) {\n return;\n }\n const completed = option.donation.target_amount <= option.donation.collected_amount;\n return <div class={{ \"s-product-options-donation-message\": true, \"s-product-options-donation-completed\": completed, \"s-product-options-donation-expired\": !completed }}>\n <p>{option.donation.target_message}</p>\n <span innerHTML={completed ? salla.money(option.donation.target_amount) : ''}></span>\n </div>\n }\n /**\n * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;\n */\n private setSelectedSkus() {\n this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))\n .reduce((p, c) => p.filter(e => c.includes(e)), []) // Initialize accumulator as an empty array\n .map(sku => Number(sku));\n }\n \n\n private handleRequiredMultipleOptions(option) {\n if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {\n return;\n }\n const optionContainer = this.host.querySelector(`[data-option-id=\"${option.id}\"]`);\n const hasChecked = optionContainer.querySelectorAll('input:checked').length;\n optionContainer.querySelectorAll('input').forEach(input => input.toggleAttribute('required', !hasChecked));\n }\n\n private getLatLng(value, type: 'lat' | 'lng') {\n return value\n ? value.split(',')[type === 'lat' ? 0 : 1]\n : '';\n }\n\n private getDisplayForType(option: Option) {\n if (this[`${option.type}Option`]) {\n return this[`${option.type}Option`](option);\n }\n\n if (option.type === DisplayType.COLOR_PICKER) {\n return this.colorPickerOption(option)\n }\n\n if (option.type === DisplayType.MULTIPLE_OPTIONS) {\n return this.multipleOptions(option);\n }\n\n if (option.type === DisplayType.SINGLE_OPTION) {\n return this.singleOption(option);\n }\n\n if (option.type === DisplayType.DIGITAL_CARD_VALUE) {\n return this.digitalCardValuesOption(option);\n }\n if (option.type === DisplayType.COUNTRY) {\n return this.countryOption(option);\n }\n\n if (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) {\n return <salla-booking-field onInvalidInput={(e) => this.invalidHandler(e, option)} option={option as any} productId={option.value}></salla-booking-field>\n }\n\n salla.log(`Couldn't find options type(${option.type})😢`);\n return '';\n }\n\n protected getOptionShownWhen(option: Option) {\n return option.visibility_condition\n ? { \"data-show-when\": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}` }\n : {};\n }\n\n private getAvailableDigitalCardSKUs(detail: Detail) {\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n const outofStockSKUs = Object.keys(detail.skus_availability).filter(key => detail.skus_availability[key] === false)\n\n this.availableDigitalCardValues = digitalCardOption.details.filter((op) => {\n\n return !Object.keys(op.skus_availability).filter(SKU_key => outofStockSKUs.includes(SKU_key)).length\n\n })\n\n }\n private handleCountryOptionChange(event: Event, detail: Detail) {\n event.stopImmediatePropagation()\n\n this.ignoreDefaultCardValue = true\n\n const currentCardValue = this.host.querySelector(\"input[data-code-value]:checked\") as HTMLInputElement | null\n\n if (currentCardValue) currentCardValue.checked = false\n\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n this.getAvailableDigitalCardSKUs(detail)\n }\n\n private getSelectedDigitalCardOptions(option: Option) {\n const selectedOption = option.details.find(detail => detail.is_selected)\n const defaultOption = option.details.find(detail => !!detail.is_default) || option.details[0] /*option.details[0] only applys for counrty options*/\n if (!['digital-code-value', 'country'].includes(option.type)) return\n\n return selectedOption || defaultOption\n\n\n }\n\n //we need the cart Id for productOption Image\n async componentWillLoad() {\n if(salla.url.is_page(\"cart\")){\n this.disableCardValue=false\n this.fillSelectedOptions();\n }\n\n if (this.config) {\n try {\n this.optionConfig = typeof this.config === 'string' ? JSON.parse(this.config) : this.config;\n } catch (error) {\n console.error('Failed to parse JSON in config prop:', error);\n }\n }\n\n const shouldSelectDefaultOption = this.optionsData.filter(({ type }) => [\"country\", \"digital-card-value\"].includes(type)).length > 0 && salla.url.is_page('cart')\n\n if (shouldSelectDefaultOption) {\n const countryOption = this.optionsData.find(option => option.type === 'country')\n\n const defaultSelection = countryOption && this.getSelectedDigitalCardOptions(countryOption)\n\n if (defaultSelection) {\n this.getAvailableDigitalCardSKUs(defaultSelection)\n }\n }\n this.outOfStockText = salla.lang.get('pages.products.out_of_stock')\n await salla.onReady();\n document.addEventListener(\"paste\", this.handlePaste.bind(this));\n const needsCartId = (!salla.storage.get('cart.id') && this.optionsData.some(option => ['file', 'image'].includes(option.type)));\n return needsCartId ? salla.api.cart.getCurrentCartId(false, \"salla-product-options\") : null;\n }\n\n /**\n * This is a workaround for a bug in iOS 26 Safari, when pasting English text to RTL inputs, it adds extra text!!\n * To avoid any break changes, we will make it only work on these conditions:\n * - content_copyright is on\n * - Apple Pay is enabled (means it's iOS/safari)\n * - Input is an input or textarea\n * - Salla form control\n * - Options array\n */\n private handlePaste(event: ClipboardEvent) {\n const target = event.target;\n if (\n !Salla.config.get('store.settings.content_copyright')\n || !Salla.helpers.hasApplePay()\n || !(target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement)\n || !target.classList.contains('s-form-control')\n || !target.name.startsWith('options[')) {\n return;\n }\n // Prevent default paste (to avoid Safari inserting extra content)\n event.preventDefault();\n\n // Read only the clipboard data\n const text = event.clipboardData?.getData(\"text\") || \"\";\n\n // Insert it manually at cursor if you want\n const start = target.selectionStart;\n const end = target.selectionEnd;\n\n const newValue = target.value.slice(0, start) + text + target.value.slice(end);\n\n target.value = newValue;\n\n // Reset cursor position\n target.setSelectionRange(start + text.length, start + text.length);\n }\n\n private hideDigitalCardsOptions(option:Option){\n return (this.disableCardValue && option.type===DisplayType.DIGITAL_CARD_VALUE && !salla.url.is_page(\"cart\"))\n }\n\n render() {\n if (this.optionsData?.length === 0) {\n return;\n }\n\n return (\n <Host class=\"s-product-options-wrapper\">\n {/* TODO:: move salla-conditional-field logic to here, no need of another component*/}\n <salla-conditional-fields>\n {this.optionsData.map((option: Option) =>\n <div key={option.id} class={`s-product-options-option-container${option.visibility_condition || this.hideDigitalCardsOptions(option) ? ' hidden' : ''}`}\n data-option-id={option.id}\n {...this.getOptionShownWhen(option)}>\n {option.name === 'splitter' ?\n this.splitterOption()\n : <div class={{ \"s-product-options-option\": true, \"s-product-options-option-booking\": option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\") }} data-option-type={option.type}\n data-option-required={`${option.required}`}>\n <label htmlFor={`options[${option.id}]`} class={`s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}`}>\n <b>\n {option.name}\n {option.required && <span> * </span>} </b>\n <small>{option.placeholder}</small>\n </label>\n <div class={`s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) ? 's-product-options-option-content-full-width' : ''}`}>\n {this.getDisplayForType(option)}\n </div>\n </div>}\n </div>\n )}\n </salla-conditional-fields>\n </Host>\n );\n\n }\n\n private generateUniqueKey(defaultValue: string): string {\n return this.uniqueKey ? `${defaultValue}-${this.uniqueKey}` : defaultValue;\n }\n private fillSelectedOptions() {\n this.selectedOptions = this.optionsData.reduce((acc, opt) => {\n const selectedDetails = opt.details.filter(detail => detail.is_selected);\n const mappedDetails = selectedDetails.map(detail => ({\n ...detail,\n option_id: opt.id\n }));\n return acc.concat(mappedDetails);\n }, []);\n }\n\n private triggerProductFormSelectionEvents() {\n const trigger = (f: HTMLFormElement) =>\n ['change', 'input'].forEach(e => f.dispatchEvent(new window.Event(e, { bubbles: true })));\n const form = this.host.closest('form') as HTMLFormElement;\n if (form) {\n trigger(form);\n } else {\n // Fallback: wait for parent form to appear\n const observer = new MutationObserver(() => {\n const form = this.host.closest('form') as HTMLFormElement;\n if (form) {\n trigger(form);\n observer.disconnect();\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n\n componentDidLoad() {\n if (salla.url.is_page('product.single')) {\n this.triggerProductFormSelectionEvents();\n }\n if (this.optionsData?.length === 0 && !this.optionsData.some(option => option.type === DisplayType.DONATION)) {\n return;\n }\n const selectedDonationOption = this.optionsData.find(option => option.type === DisplayType.DONATION)?.details.find(detail => detail.is_selected);\n if (!selectedDonationOption) {\n return;\n }\n setTimeout(() => {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: selectedDonationOption.additional_price\n });\n }, 1000);\n }\n //@ts-ignore\n private donationOption(option: Option, product: Product) {\n return <div class=\"s-product-options-donation-wrapper\">\n\n {option.donation?.can_donate ? [\n option.donation ?\n <div key={option.id} class=\"s-product-options-donation-progress\">\n <salla-progress-bar donation={option.donation}>\n </salla-progress-bar>\n </div>\n : '',\n option.details.length ?\n [<h4 key={option.id}>{this.selectAmount}</h4>,\n <div key={option.id} class=\"s-product-options-donation-options\">\n {option.details.map((detail, i) =>\n <div key={option.id} class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(`donation-option-${i}`)} type=\"radio\" name=\"donating_option\" checked={detail.is_selected} value={detail.additional_price} onChange={e => this.handleDonationOptions(e, detail, 'option')} />\n <label htmlFor={this.generateUniqueKey(`donation-option-${i}`)}>\n <span innerHTML={salla.money(detail.name)}></span>\n </label>\n </div>\n )}\n {option.donation?.custom_amount_enabled ?\n <div class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(\"donation-option-custom\")} type=\"radio\" name=\"donating_option\" value=\"custom\" onChange={e => this.handleDonationOptions(e, 'custom', 'option')} />\n <label htmlFor={this.generateUniqueKey(\"donation-option-custom\")}>\n <span> {this.selectDonationAmount} </span>\n </label>\n </div>\n : ''\n }\n </div>] : '',\n\n <div key={option.id} class={{ \"s-product-options-donation-input-group\": true, \"shown\": !option.details.length || (option.details.length && this.isCustomDonation) }}>\n <input\n type=\"text\"\n id=\"donating-amount\"\n name=\"donation_amount\"\n class=\"s-form-control\"\n ref={el => { this.donationInput = el as HTMLInputElement }}\n value={\n option.details.length\n && option.details.some(detail => detail.is_selected)\n ? option.details.find(detail => detail.is_selected).additional_price\n : option.value}\n // required\n placeholder={option.placeholder}\n onInput={e => this.handleDonationOptions(e, 'custom', 'input')}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n />\n {/* value={option.value} */}\n <span class=\"s-product-options-donation-amount-currency\">\n {salla.config.currency(salla.config.get('user.currency_code')).symbol}\n </span>\n </div>\n ] :\n this.getExpireDonationMessage(option)\n }\n </div>\n }\n\n private fileUploader(option: Option, additions: Record<string, unknown> | null = null) {\n return <salla-file-upload\n {...(additions || {})}\n payload-name=\"file\"\n value={option.value}\n instant-upload={true}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n height=\"120px\"\n onAdded={(e) => this.changedHandler(e, option)}\n url={salla.cart.api.getUploadImageEndpoint()}\n form-data={{ cart_item_id: this.productId, product_id: this.productId }}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n class={{ \"s-product-options-image-input\": true, required: option.required }}\n >\n <div class=\"s-product-options-filepond-placeholder\">\n <span class=\"s-product-options-filepond-placeholder-icon\"\n innerHTML={(additions as { accept: string }).accept?.split(',').every(type => type.includes('image'))\n ? CameraIcon\n : FileIcon}\n />\n <p class=\"s-product-options-filepond-placeholder-text\">{salla.lang.get('common.uploader.drag_and_drop')}</p>\n <span class=\"filepond--label-action\">{salla.lang.get('common.uploader.browse')}</span>\n </div>\n </salla-file-upload>\n }\n\n //@ts-ignore\n private imageOption(option: Option) {\n return this.fileUploader(option, { accept: 'image/png,image/jpeg,image/jpg,image/gif' });\n }\n\n //@ts-ignore\n private fileOption(option: Option) {\n const types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);\n return types?.length\n ? this.fileUploader(option, { accept: types.join(',') })\n : 'File types not selected.';\n }\n\n // TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption\n //@ts-ignore\n private numberOption(option: Option) {\n return <input\n type=\"text\"\n value={option.value}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)} />\n }\n\n //@ts-ignore\n private splitterOption() {\n return <div class=\"s-product-options-splitter\" />\n }\n\n //@ts-ignore\n private textOption(option: Option) {\n return <div class=\"s-product-options-text\">\n <input\n type=\"text\"\n value={option.value}\n maxLength={option?.length}\n class='s-form-control'\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private textareaOption(option: Option) {\n //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great\n return <div class=\"s-product-options-textarea\">\n <div class=\"mt-1\">\n <textarea\n rows={4}\n value={option.value}\n maxLength={option?.length}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n id={`options[${option.id}]`}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n </div>\n </div>\n }\n\n //@ts-ignore\n private mapOption(option: Option) {\n return <salla-map\n zoom={15}\n lat={this.getLatLng(option.value, 'lat')}\n lng={this.getLatLng(option.value, 'lng')}\n name={`options[${option.id}]`}\n searchable={true}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onSelected={e => this.changedHandler(e, option)} />\n }\n\n private colorPickerOption(option: Option) {\n return <salla-color-picker\n onSubmitted={e => this.changedHandler(e, option)}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n color={option.value} />\n }\n\n /**\n * ============= Date Time options =============\n */\n //@ts-ignore\n private timeOption(option: Option) {\n return <salla-datetime-picker\n noCalendar={true}\n enableTime={true}\n dateFormat=\"h:i K\"\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n class=\"s-product-options-time-element\"\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n }\n\n //@ts-ignore\n private dateOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-date-element\">\n <salla-datetime-picker\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n minDate={new Date()}\n name={`options[${option.id}]`}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private datetimeOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-datetime-element\">\n <salla-datetime-picker\n enableTime={true}\n value={option.value}\n dateFormat=\"Y-m-d G:i:K\"\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n maxDate={option.to_date_time}\n minDate={option.from_date_time}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n /**\n * ============= Advanced options =============\n */\n protected getOptionDetailName(detail: Detail, outOfStock = true, optionType?: string) {\n let detailName;\n if (optionType && optionType === DisplayType.COLOR) {\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` <br/> <p> ${this.outOfStockText} </p>` : '')\n + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price, false)}) </p>` : '');\n }\n\n if(!detailName){\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` - ${this.outOfStockText}` : '')\n + (detail.additional_price ? ` (${salla.money(detail.additional_price, false)})` : '');\n }\n\n //Some merchants adding price to the names of the options,\n //and because we are using this inside select option, we need to replace the html currency symbol with the store currency symbol\n return detailName.replace('<i class=sicon-sar></i>',salla.config.currency()?.symbol || 'ر.س');\n }\n\n\n protected isOptionDetailOut(detail: Detail) {\n if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {\n return detail.is_out;\n }\n\n const isDetailSelected = this.selectedOptions.filter(option => option.id === detail.id).length;\n //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet\n if (isDetailSelected && this.selectedOptions.length === 1) {\n return false;\n }\n\n //if current details has sku in the possible outSkus it's out for sure\n if (isDetailSelected) {\n //here we will get the possible outSkus for current selected options\n const outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));\n return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)))\n }\n\n return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id)\n\n }\n\n /**\n * Renders a single input element (radio or checkbox) for an option detail.\n * @param type - The type of input element ('radio' or 'checkbox').\n * @param detail - The detail object representing an option detail.\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the input is required based on the option's rules.\n * @param name - The name attribute for the input element.\n * @returns HTMLElement - A labeled input element.\n */\n private renderInput(\n type: 'radio' | 'checkbox',\n detail: Detail,\n option: Option,\n isRequired: boolean,\n name: string,\n buttonStyle: boolean,\n ): HTMLElement {\n const id = this.generateUniqueKey(`${type}-${option.id}-${detail.id}`);\n const isDisabled = this.isOptionDetailOut(detail);\n return (\n <label class={{\n \"s-product-options-disabled\": isDisabled,\n }}>\n <input\n id={id}\n type={type}\n name={name}\n value={detail.id}\n disabled={isDisabled}\n required={isRequired}\n checked={detail.is_selected}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <div class={{\"s-product-options-grid-mode-span\": buttonStyle, \"s-product-options-disabled\": isDisabled}}>\n {this.getOptionDetailName(detail)}\n </div>\n </label>\n );\n }\n\n /**\n * Renders a collection of input elements for all details of an option.\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement[] - An array of labeled input elements.\n */\n private renderOptionDetails(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean,\n buttonStyle: boolean = false\n ): HTMLElement[] {\n const name = type === 'radio' ? `options[${option.id}]` : `options[${option.id}][]`;\n return option?.details.map((detail: Detail) =>\n this.renderInput(type, detail, option, isRequired, name, buttonStyle)\n );\n }\n\n /**\n * Renders a dropdown (select) element for a single-option selection.\n * @param option - The parent option object.\n * @returns HTMLElement - A select dropdown element with all option details.\n */\n private renderSelect(option: Option): HTMLElement {\n return (\n <div>\n <select\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n class=\"s-form-control\"\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n >\n <option value=\"\">{option.placeholder}</option>\n {option?.details.map((detail: Detail) => (\n <option\n key={detail.id}\n value={detail.id}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n selected={detail.is_selected}\n >\n {this.getOptionDetailName(detail)}\n </option>\n ))}\n </select>\n </div>\n );\n }\n\n /**\n * Renders a grid-based layout for option inputs (radio or checkbox).\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement - A grid-based container with input elements.\n */\n private renderButtonStyle(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean\n ): HTMLElement {\n return (\n <div class=\"s-product-options-grid-mode\">\n {this.renderOptionDetails(type, option, isRequired, true)}\n </div>\n );\n }\n\n /**\n * Renders a single-option selection, either as a grid or dropdown, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered single-option element.\n */\n private singleOption(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['single-option']?.type === 'button';\n const isRequired = !option.visibility_condition && option.required;\n\n return buttonStyle\n ? this.renderButtonStyle('radio', option, isRequired)\n : this.renderSelect(option);\n }\n\n /**\n * Renders a multiple-option selection, either as a grid or list, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered multiple-option element.\n */\n private multipleOptions(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['multiple-option']?.type === 'button';\n const isRequired =\n option.required &&\n !option.details.some((detail) => detail.is_selected) &&\n !option.visibility_condition;\n\n return buttonStyle\n ? this.renderButtonStyle('checkbox', option, isRequired)\n : (\n <div\n class={{\n 's-product-options-multiple-options-wrapper': true,\n required: option.required,\n }}\n >\n {this.renderOptionDetails('checkbox', option, isRequired)}\n </div>\n );\n }\n \n //@ts-ignore\n private colorOption(option: Option) {\n return (\n <fieldset\n class=\"s-product-options-colors-wrapper\"\n >\n {option?.details.map((detail) => (\n <div\n class=\"s-product-options-colors-item\"\n key={detail.id}\n >\n <input\n type=\"radio\"\n value={detail.id}\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <label htmlFor={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}>\n <span style={{ backgroundColor: detail.color }} />\n <div innerHTML={this.getOptionDetailName(detail, true, option.type)} />\n </label>\n </div>\n ))}\n </fieldset>\n );\n } \n\n //@ts-ignore\n private thumbnailOption(option: Option) {\n return <div class=\"s-product-options-thumbnails-wrapper\">\n {option.details.map((detail: Detail) => {\n return <div key={detail.id}>\n <input type=\"radio\"\n value={detail.id}\n data-itemid={detail.id} //todo:: why need this? it's already in the value!\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n data-img-id={detail.option_value}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n <label htmlFor={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n data-img-id={detail.option_value}\n class=\"go-to-slide\">\n <img data-src={detail.image} src={detail.image} title={detail.name} alt={detail.name} />\n <span innerHTML={CheckCircleIcon} class=\"s-product-options-thumbnails-icon\" />\n {this.isOptionDetailOut(detail) ?\n [\n <small key={detail.id} class=\"s-product-options-thumbnails-stock-badge\">{this.outOfStockText}</small>,\n this.canDisabled ? <div key={detail.id} class=\"s-product-options-thumbnails-badge-overlay\" /> : '',\n ]\n : ''}\n </label>\n <p>{this.getOptionDetailName(detail, false)} </p>\n </div>\n })}\n </div>\n }\n\n // Digital card options\n private digitalCardValuesOption(option: Option) {\n\n return <div class=\"s-product-options-digital-card-wrapper\">\n {this.availableDigitalCardValues.length > 0 ? this.availableDigitalCardValues.map((detail) => {\n const id = String(detail.id)\n return <label htmlFor={this.generateUniqueKey(id.toString())} key={id} class=\"s-product-options-digital-card-option\">\n <input type=\"radio\" data-code-value class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n id={this.generateUniqueKey(id.toString())}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n {...(!this.ignoreDefaultCardValue ? {defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <span>{detail.name} {salla.config?.currency()?.symbol}</span>\n </label>\n })\n : <div class=\"s-product-options-digital-card-out-of-stock\"/>\n }\n </div>\n }\n private countryOption(option: Option) {\n return <div class=\"s-product-options-digital-card-wrapper\">\n {option.details.map((detail) => {\n\n return <label htmlFor={this.generateUniqueKey(detail.id.toString())} key={detail.id} class={{\"s-product-options-digital-card-option\":true,\"s-product-options-digital-card-option-stock-out\":detail.is_out}}>\n <input id={this.generateUniqueKey(detail.id.toString())} type=\"radio\" class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n disabled={detail.is_out}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}\n onClick={()=>{ this.disableCardValue = false}}\n {...(salla.url.is_page(\"cart\") ? {defaultChecked:this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <img loading='lazy' alt={detail.code} height={24} width={24} class=\"s-product-options-country-flag\" src={`https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(detail.code).toLocaleLowerCase()}.svg`}/>\n <span >{detail.name}</span>\n </label>\n })\n }\n </div>\n\n }\n\n}\n"],"names":["CheckCircleIcon"],"mappings":";;;;;;;AAAA,IAAY,WAsBX;AAtBD,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,WAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/B,IAAA,WAAA,CAAA,oBAAA,CAAA,GAAA,oBAAyC;AACzC,IAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,KAAW;A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AC,6BAA6B,CAAC,MAAM,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,EAAE,MAAK,MAAM,CAAC,EAAE,EAAC,GAAC,EAAE,EAEjH,CAAA,EACG,CAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,MAAM,EAAC,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAC,gCAAgC,EAAC,GAAG,EAAE,CAAmE,gEAAA,EAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAM,IAAA,CAAA,EAAG,CAAA,EACjO,CAAA,CAAA,MAAA,EAAA,IAAA,EAAQ,MAAM,CAAC,IAAI,CAAQ,CACrB;SACb,CAAC,CAEM;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(i,t,e,r){function n(i){return i instanceof e?i:new e((function(t){t(i)}))}return new(e||(e=Promise))((function(e,s){function a(i){try{l(r.next(i))}catch(i){s(i)}}function o(i){try{l(r["throw"](i))}catch(i){s(i)}}function l(i){i.done?e(i.value):n(i.value).then(a,o)}l((r=r.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(i){return function(t){return l([i,t])}}function l(o){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(r=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=t.call(i,e)}catch(i){o=[6,i];n=0}finally{r=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{r as registerInstance,h,g as getElement}from"./index-Fh3juwdj.js";import{I as IconVerified}from"./check-uTyAzPSy.js";var IconStar2=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>';var IconStar2Muted=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>';var IconFire2=' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>';var sallaReviewCardCss=":host{display:block}";var SallaReviewCard=function(){function i(i){var t=this;registerInstance(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var e;if(!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.setPointerCapture(i.pointerId);t.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!t.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.isSwiping=false};this.goToSlide=function(i){t.currentSlide=Math.max(0,Math.min(i,t.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()};i.prototype.addEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})};i.prototype.removeEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var r=t-this.startPoint.y;this.processSwipe(e,r)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var r=i<0;var n=this.isRTL?!r:r;if(n){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,e){return h("span",{key:e,innerHTML:i.review.stars>=e+1?IconStar2:IconStar2Muted})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,e){var r=t.url;return h("button",{key:r||e,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===e?"active":""),onClick:function(){return i.goToSlide(e)},"aria-label":"Go to slide ".concat(e+1),onPointerDown:function(){return i.goToSlide(e)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return h("div",{class:"s-review-card-slider-container"},h("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return h("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},h("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),h("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return h("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return h("div",{class:"s-review-card-header"},h("div",{class:"s-review-card-reviewer-name"},h("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&h("span",{class:"s-review-card-verified-icon",innerHTML:IconVerified})),h("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,e,r,n;var s=(i=this.review)===null||i===void 0?void 0:i.product;if(!s)return null;return h("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},h("img",{alt:((r=s.image)===null||r===void 0?void 0:r.alt)||"Product",src:(n=s.image)===null||n===void 0?void 0:n.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),h("div",{class:"s-review-card-product-details"},h("p",{class:"s-review-card-product-details-name"},s.name),this.showPurchaseCount?h("p",{class:"s-review-card-product-details-purchase-count"},h("span",{innerHTML:IconFire2}),this.purchasedCount):null))};i.prototype.render=function(){var i;return h("div",{key:"8797bb6b8123ab8a8d4536eb990dcde15e1ddd06",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),renderDivider(),h("div",{key:"b2b3bdc4e8a63aae9103eca5274003b49d4bf19e",class:"s-review-card-content"},this.renderHeader(),h("p",{key:"0e64b3fe2ae5e59a1899515c04063f74b9828001",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),renderDivider(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();var renderDivider=function(i){return h("div",{class:"s-review-card-divider ".concat("")})};SallaReviewCard.style=sallaReviewCardCss;export{SallaReviewCard as salla_review_card};
4
+ */import{r as registerInstance,h,g as getElement}from"./index-aC-cHVMV.js";import{I as IconVerified}from"./check-uTyAzPSy.js";var IconStar2=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>';var IconStar2Muted=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>';var IconFire2=' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>';var sallaReviewCardCss=":host{display:block}";var SallaReviewCard=function(){function i(i){var t=this;registerInstance(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var e;if(!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.setPointerCapture(i.pointerId);t.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!t.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.isSwiping=false};this.goToSlide=function(i){t.currentSlide=Math.max(0,Math.min(i,t.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()};i.prototype.addEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})};i.prototype.removeEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var r=t-this.startPoint.y;this.processSwipe(e,r)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var r=i<0;var n=this.isRTL?!r:r;if(n){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,e){return h("span",{key:e,innerHTML:i.review.stars>=e+1?IconStar2:IconStar2Muted})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,e){var r=t.url;return h("button",{key:r||e,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===e?"active":""),onClick:function(){return i.goToSlide(e)},"aria-label":"Go to slide ".concat(e+1),onPointerDown:function(){return i.goToSlide(e)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return h("div",{class:"s-review-card-slider-container"},h("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return h("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},h("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),h("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return h("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return h("div",{class:"s-review-card-header"},h("div",{class:"s-review-card-reviewer-name"},h("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&h("span",{class:"s-review-card-verified-icon",innerHTML:IconVerified})),h("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,e,r,n;var s=(i=this.review)===null||i===void 0?void 0:i.product;if(!s)return null;return h("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},h("img",{alt:((r=s.image)===null||r===void 0?void 0:r.alt)||"Product",src:(n=s.image)===null||n===void 0?void 0:n.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),h("div",{class:"s-review-card-product-details"},h("p",{class:"s-review-card-product-details-name"},s.name),this.showPurchaseCount?h("p",{class:"s-review-card-product-details-purchase-count"},h("span",{innerHTML:IconFire2}),this.purchasedCount):null))};i.prototype.render=function(){var i;return h("div",{key:"8797bb6b8123ab8a8d4536eb990dcde15e1ddd06",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),renderDivider(),h("div",{key:"b2b3bdc4e8a63aae9103eca5274003b49d4bf19e",class:"s-review-card-content"},this.renderHeader(),h("p",{key:"0e64b3fe2ae5e59a1899515c04063f74b9828001",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),renderDivider(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();var renderDivider=function(i){return h("div",{class:"s-review-card-divider ".concat("")})};SallaReviewCard.style=sallaReviewCardCss;export{SallaReviewCard as salla_review_card};
5
5
  //# sourceMappingURL=salla-review-card.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,r,t,i){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function s(e){try{u(i.next(e))}catch(e){a(e)}}function o(e){try{u(i["throw"](e))}catch(e){a(e)}}function u(e){e.done?t(e.value):n(e.value).then(s,o)}u((i=i.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(r){return u([e,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(t=0)),t)try{if(i=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;n=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){t.label=o[1];break}if(o[0]===6&&t.label<a[1]){t.label=a[1];a=o;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(o);break}if(a[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];n=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var i=0,n=r.length,a;i<n;i++){if(a||!(i in r)){if(!a)a=Array.prototype.slice.call(r,0,i);a[i]=r[i]}}return e.concat(a||Array.prototype.slice.call(r))};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{a as require_root,d as requireIsObject,e as requireIsSymbol,f as getDefaultExportFromCjs,r as registerInstance,h,g as getElement}from"./index-Fh3juwdj.js";import{S as ShoppingBag}from"./shopping-bag-DiKTtDW5.js";import{H as Helper}from"./Helper-DGKT_pIJ.js";import"./anime.es-CgtvEd63.js";var now_1;var hasRequiredNow;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();var r=function(){return e.Date.now()};now_1=r;return now_1}var _trimmedEndIndex;var hasRequired_trimmedEndIndex;function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;function r(r){var t=r.length;while(t--&&e.test(r.charAt(t))){}return t}_trimmedEndIndex=r;return _trimmedEndIndex}var _baseTrim;var hasRequired_baseTrim;function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex();var r=/^\s+/;function t(t){return t?t.slice(0,e(t)+1).replace(r,""):t}_baseTrim=t;return _baseTrim}var toNumber_1;var hasRequiredToNumber;function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),r=requireIsObject(),t=requireIsSymbol();var i=0/0;var n=/^[-+]0x[0-9a-f]+$/i;var a=/^0b[01]+$/i;var s=/^0o[0-7]+$/i;var o=parseInt;function u(u){if(typeof u=="number"){return u}if(t(u)){return i}if(r(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=r(l)?l+"":l}if(typeof u!="string"){return u===0?u:+u}u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):n.test(u)?i:+u}toNumber_1=u;return toNumber_1}var debounce_1;var hasRequiredDebounce;function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),r=requireNow(),t=requireToNumber();var i="Expected a function";var n=Math.max,a=Math.min;function s(s,o,u){var l,f,c,d,h,v,m=0,p=false,b=false,_=true;if(typeof s!="function"){throw new TypeError(i)}o=t(o)||0;if(e(u)){p=!!u.leading;b="maxWait"in u;c=b?n(t(u.maxWait)||0,o):c;_="trailing"in u?!!u.trailing:_}function g(e){var r=l,t=f;l=f=undefined;m=e;d=s.apply(t,r);return d}function w(e){m=e;h=setTimeout(T,o);return p?g(e):d}function y(e){var r=e-v,t=e-m,i=o-r;return b?a(i,c-t):i}function q(e){var r=e-v,t=e-m;return v===undefined||r>=o||r<0||b&&t>=c}function T(){var e=r();if(q(e)){return R(e)}h=setTimeout(T,y(e))}function R(e){h=undefined;if(_&&l){return g(e)}l=f=undefined;return d}function E(){if(h!==undefined){clearTimeout(h)}m=0;l=v=f=h=undefined}function x(){return h===undefined?d:R(r())}function I(){var e=r(),t=q(e);l=arguments;f=this;v=e;if(t){if(h===undefined){return w(v)}if(b){clearTimeout(h);h=setTimeout(T,o);return g(v)}}if(h===undefined){h=setTimeout(T,o)}return d}I.cancel=E;I.flush=x;return I}debounce_1=s;return debounce_1}var throttle_1;var hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var e=requireDebounce(),r=requireIsObject();var t="Expected a function";function i(i,n,a){var s=true,o=true;if(typeof i!="function"){throw new TypeError(t)}if(r(a)){s="leading"in a?!!a.leading:s;o="trailing"in a?!!a.trailing:o}return e(i,n,{leading:s,maxWait:n,trailing:o})}throttle_1=i;return throttle_1}var throttleExports=requireThrottle();var throttle=getDefaultExportFromCjs(throttleExports);var MasonryLayout=function(){function e(e){var r=this;this.grid=e;this.create=function(){r.mutationObserver.observe(r.grid,{childList:true});for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];r.resizeObserver.observe(i)}};this.onContainerMutation=function(e){var t=e.flatMap((function(e){return Array.from(e.removedNodes)}));var i=e.flatMap((function(e){return Array.from(e.addedNodes)}));for(var n=0,a=t;n<a.length;n++){var s=a[n];if(s instanceof Element){r.resizeObserver.unobserve(s)}}for(var o=0,u=i;o<u.length;o++){var s=u[o];if(s instanceof Element){r.resizeObserver.observe(s)}}if(t.length>0&&i.length===0){r.update()}};this.onChildrenResize=function(e){var t=e.filter((function(e){return e.target.parentElement!==null}));if(t.length>0){r.update()}};this.update=throttle((function(){var e=window.getComputedStyle(r.grid);if(e.getPropertyValue("display").includes("grid")===false){r.clean();return}var t=parseGridTemplateColumns(r.grid);if(t.length<=1){r.clean();return}var i=Number.parseFloat(e.getPropertyValue("row-gap").trim())||0;var n=Array.from(r.grid.children);for(var a=0;a<t.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var o=0;o<n.length;o++){var u=n[o-t.length];var l=n[o];if(u!==undefined&&l!==undefined){var f=u.getBoundingClientRect().bottom;l.style.removeProperty("margin-top");var c=l.getBoundingClientRect().top;if(c-i!==f){var d=Math.round((f-(c-i)+Number.EPSILON)*100)/100;l.style.setProperty("margin-top","".concat(d,"px"))}}}}),32);this.destroy=function(){r.resizeObserver.disconnect();r.mutationObserver.disconnect();r.clean()};this.clean=function(){for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}e.prototype[Symbol.dispose]=function(){this.destroy()};return e}();function parseGridTemplateColumns(e){var r=window.getComputedStyle(e);var t=r.getPropertyValue("grid-template-columns");return t.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var sallaReviewsPageCss=":host{display:block}";var SallaReviewsPage=function(){function e(e){registerInstance(this,e);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}e.prototype.getUrlParams=function(){var e=new URLSearchParams(window.location.search);return{sort:e.get("sort")||null,page:Number.parseInt(e.get("page"))||1}};e.prototype.updateUrlParams=function(e){var r=new URL(window.location.href);for(var t=0,i=Object.entries(e);t<i.length;t++){var n=i[t],a=n[0],s=n[1];if(s){r.searchParams.set(a,s.toString())}else{r.searchParams.delete(a)}}window.history.replaceState({},"",r.toString())};e.prototype.fetchReviews=function(e,r){var t=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:r||t.page||1,sort:e||t.sort||null}})};e.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=this.el.querySelector(".s-reviews-page-grid");if(!e)return[2];try{new MasonryLayout(e);salla.logger.info("Masonry initialized successfully")}catch(e){salla.logger.error("Masonry initialization failed:",e)}return[2]}))}))};e.prototype.animateReviewCards=function(){var e=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");Helper.animateItems(e)};e.prototype.initiateInfiniteScroll=function(){var e=this;var r,t,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var r,t;return((t=(r=e.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)||null},history:false,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(){e.isLoading=true}));(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("load",(function(r){e.pagination=r.pagination;e.reviews=__spreadArray(__spreadArray([],e.reviews,true),r.data,true);e.isLoading=false;e.updateUrlParams({page:r.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(r){salla.logger.error("Error loading more reviews:",r);e.isLoading=false}))};e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){requestAnimationFrame(e.animateReviewCards.bind(e))}),176)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,r,t,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");r=this.getUrlParams();return[4,this.fetchReviews(r.sort)];case 2:t=n.sent();this.sort=r.sort;this.reviews=t.data;this.pagination=t.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(e=this.pagination)===null||e===void 0?void 0:e.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};e.prototype.handleSorting=function(e){return __awaiter(this,void 0,void 0,(function(){var r,t;return __generator(this,(function(i){switch(i.label){case 0:r=e.target.value;this.sort=r;this.updateUrlParams({sort:r,page:1});return[4,this.fetchReviews(r,1)];case 1:t=i.sent();this.reviews=t.data;this.pagination=t.pagination;return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.initializeMasonry()];case 1:e.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};e.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};e.prototype.renderSortingOptions=function(){var e=this;var r=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return r.map((function(r){return h("option",{key:r.value,value:r.value,selected:r.value===e.sort},r.label)}))};e.prototype.render=function(){var e=this;var r,t;return h("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},h("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},h("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,h("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),h("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},h("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),h("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(r){return e.handleSorting(r)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?h("main",{class:"s-reviews-page-grid",ref:function(r){e.wrapper=r}},this.reviews.map((function(e){return h("salla-review-card",{key:e.id,review:e})}))):h("div",{class:"s-products-list-placeholder"},h("span",{innerHTML:ShoppingBag}),h("p",null,this.placeholderText)),((t=(r=this.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)&&this.reviews.length?h("div",{class:"s-reviews-page-load-more-container"},h("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()},onKeyUp:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();SallaReviewsPage.style=sallaReviewsPageCss;export{SallaReviewsPage as salla_reviews_page};
4
+ */import{a as require_root,d as requireIsObject,e as requireIsSymbol,f as getDefaultExportFromCjs,r as registerInstance,h,g as getElement}from"./index-aC-cHVMV.js";import{S as ShoppingBag}from"./shopping-bag-DiKTtDW5.js";import{H as Helper}from"./Helper-DGKT_pIJ.js";import"./anime.es-CgtvEd63.js";var now_1;var hasRequiredNow;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();var r=function(){return e.Date.now()};now_1=r;return now_1}var _trimmedEndIndex;var hasRequired_trimmedEndIndex;function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;function r(r){var t=r.length;while(t--&&e.test(r.charAt(t))){}return t}_trimmedEndIndex=r;return _trimmedEndIndex}var _baseTrim;var hasRequired_baseTrim;function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex();var r=/^\s+/;function t(t){return t?t.slice(0,e(t)+1).replace(r,""):t}_baseTrim=t;return _baseTrim}var toNumber_1;var hasRequiredToNumber;function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),r=requireIsObject(),t=requireIsSymbol();var i=0/0;var n=/^[-+]0x[0-9a-f]+$/i;var a=/^0b[01]+$/i;var s=/^0o[0-7]+$/i;var o=parseInt;function u(u){if(typeof u=="number"){return u}if(t(u)){return i}if(r(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=r(l)?l+"":l}if(typeof u!="string"){return u===0?u:+u}u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):n.test(u)?i:+u}toNumber_1=u;return toNumber_1}var debounce_1;var hasRequiredDebounce;function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),r=requireNow(),t=requireToNumber();var i="Expected a function";var n=Math.max,a=Math.min;function s(s,o,u){var l,f,c,d,h,v,m=0,p=false,b=false,_=true;if(typeof s!="function"){throw new TypeError(i)}o=t(o)||0;if(e(u)){p=!!u.leading;b="maxWait"in u;c=b?n(t(u.maxWait)||0,o):c;_="trailing"in u?!!u.trailing:_}function g(e){var r=l,t=f;l=f=undefined;m=e;d=s.apply(t,r);return d}function w(e){m=e;h=setTimeout(T,o);return p?g(e):d}function y(e){var r=e-v,t=e-m,i=o-r;return b?a(i,c-t):i}function q(e){var r=e-v,t=e-m;return v===undefined||r>=o||r<0||b&&t>=c}function T(){var e=r();if(q(e)){return R(e)}h=setTimeout(T,y(e))}function R(e){h=undefined;if(_&&l){return g(e)}l=f=undefined;return d}function E(){if(h!==undefined){clearTimeout(h)}m=0;l=v=f=h=undefined}function x(){return h===undefined?d:R(r())}function I(){var e=r(),t=q(e);l=arguments;f=this;v=e;if(t){if(h===undefined){return w(v)}if(b){clearTimeout(h);h=setTimeout(T,o);return g(v)}}if(h===undefined){h=setTimeout(T,o)}return d}I.cancel=E;I.flush=x;return I}debounce_1=s;return debounce_1}var throttle_1;var hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var e=requireDebounce(),r=requireIsObject();var t="Expected a function";function i(i,n,a){var s=true,o=true;if(typeof i!="function"){throw new TypeError(t)}if(r(a)){s="leading"in a?!!a.leading:s;o="trailing"in a?!!a.trailing:o}return e(i,n,{leading:s,maxWait:n,trailing:o})}throttle_1=i;return throttle_1}var throttleExports=requireThrottle();var throttle=getDefaultExportFromCjs(throttleExports);var MasonryLayout=function(){function e(e){var r=this;this.grid=e;this.create=function(){r.mutationObserver.observe(r.grid,{childList:true});for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];r.resizeObserver.observe(i)}};this.onContainerMutation=function(e){var t=e.flatMap((function(e){return Array.from(e.removedNodes)}));var i=e.flatMap((function(e){return Array.from(e.addedNodes)}));for(var n=0,a=t;n<a.length;n++){var s=a[n];if(s instanceof Element){r.resizeObserver.unobserve(s)}}for(var o=0,u=i;o<u.length;o++){var s=u[o];if(s instanceof Element){r.resizeObserver.observe(s)}}if(t.length>0&&i.length===0){r.update()}};this.onChildrenResize=function(e){var t=e.filter((function(e){return e.target.parentElement!==null}));if(t.length>0){r.update()}};this.update=throttle((function(){var e=window.getComputedStyle(r.grid);if(e.getPropertyValue("display").includes("grid")===false){r.clean();return}var t=parseGridTemplateColumns(r.grid);if(t.length<=1){r.clean();return}var i=Number.parseFloat(e.getPropertyValue("row-gap").trim())||0;var n=Array.from(r.grid.children);for(var a=0;a<t.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var o=0;o<n.length;o++){var u=n[o-t.length];var l=n[o];if(u!==undefined&&l!==undefined){var f=u.getBoundingClientRect().bottom;l.style.removeProperty("margin-top");var c=l.getBoundingClientRect().top;if(c-i!==f){var d=Math.round((f-(c-i)+Number.EPSILON)*100)/100;l.style.setProperty("margin-top","".concat(d,"px"))}}}}),32);this.destroy=function(){r.resizeObserver.disconnect();r.mutationObserver.disconnect();r.clean()};this.clean=function(){for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}e.prototype[Symbol.dispose]=function(){this.destroy()};return e}();function parseGridTemplateColumns(e){var r=window.getComputedStyle(e);var t=r.getPropertyValue("grid-template-columns");return t.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var sallaReviewsPageCss=":host{display:block}";var SallaReviewsPage=function(){function e(e){registerInstance(this,e);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}e.prototype.getUrlParams=function(){var e=new URLSearchParams(window.location.search);return{sort:e.get("sort")||null,page:Number.parseInt(e.get("page"))||1}};e.prototype.updateUrlParams=function(e){var r=new URL(window.location.href);for(var t=0,i=Object.entries(e);t<i.length;t++){var n=i[t],a=n[0],s=n[1];if(s){r.searchParams.set(a,s.toString())}else{r.searchParams.delete(a)}}window.history.replaceState({},"",r.toString())};e.prototype.fetchReviews=function(e,r){var t=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:r||t.page||1,sort:e||t.sort||null}})};e.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=this.el.querySelector(".s-reviews-page-grid");if(!e)return[2];try{new MasonryLayout(e);salla.logger.info("Masonry initialized successfully")}catch(e){salla.logger.error("Masonry initialization failed:",e)}return[2]}))}))};e.prototype.animateReviewCards=function(){var e=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");Helper.animateItems(e)};e.prototype.initiateInfiniteScroll=function(){var e=this;var r,t,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var r,t;return((t=(r=e.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)||null},history:false,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(){e.isLoading=true}));(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("load",(function(r){e.pagination=r.pagination;e.reviews=__spreadArray(__spreadArray([],e.reviews,true),r.data,true);e.isLoading=false;e.updateUrlParams({page:r.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(r){salla.logger.error("Error loading more reviews:",r);e.isLoading=false}))};e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){requestAnimationFrame(e.animateReviewCards.bind(e))}),176)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,r,t,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");r=this.getUrlParams();return[4,this.fetchReviews(r.sort)];case 2:t=n.sent();this.sort=r.sort;this.reviews=t.data;this.pagination=t.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(e=this.pagination)===null||e===void 0?void 0:e.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};e.prototype.handleSorting=function(e){return __awaiter(this,void 0,void 0,(function(){var r,t;return __generator(this,(function(i){switch(i.label){case 0:r=e.target.value;this.sort=r;this.updateUrlParams({sort:r,page:1});return[4,this.fetchReviews(r,1)];case 1:t=i.sent();this.reviews=t.data;this.pagination=t.pagination;return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.initializeMasonry()];case 1:e.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};e.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};e.prototype.renderSortingOptions=function(){var e=this;var r=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return r.map((function(r){return h("option",{key:r.value,value:r.value,selected:r.value===e.sort},r.label)}))};e.prototype.render=function(){var e=this;var r,t;return h("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},h("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},h("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,h("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),h("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},h("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),h("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(r){return e.handleSorting(r)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?h("main",{class:"s-reviews-page-grid",ref:function(r){e.wrapper=r}},this.reviews.map((function(e){return h("salla-review-card",{key:e.id,review:e})}))):h("div",{class:"s-products-list-placeholder"},h("span",{innerHTML:ShoppingBag}),h("p",null,this.placeholderText)),((t=(r=this.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)&&this.reviews.length?h("div",{class:"s-reviews-page-load-more-container"},h("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()},onKeyUp:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();SallaReviewsPage.style=sallaReviewsPageCss;export{SallaReviewsPage as salla_reviews_page};
5
5
  //# sourceMappingURL=salla-reviews-page.entry.js.map