@salla.sa/twilight-components 2.14.243 → 2.14.245

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 (306) hide show
  1. package/dist/cjs/{app-globals-BBNXZqkK.js → app-globals-BlXsYXPz.js} +3 -3
  2. package/dist/cjs/{app-globals-BBNXZqkK.js.map → app-globals-BlXsYXPz.js.map} +1 -1
  3. package/dist/cjs/{index-PeQbW4nk.js → index-RtQ2qsYM.js} +4 -4
  4. package/dist/cjs/index-RtQ2qsYM.js.map +1 -0
  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 +1 -1
  31. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  39. package/dist/cjs/twilight.cjs.js +2 -2
  40. package/dist/components/index.js +2 -2
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/esm/{app-globals-D1P1rERf.js → app-globals-bcy23yOg.js} +3 -3
  43. package/dist/esm/{app-globals-D1P1rERf.js.map → app-globals-bcy23yOg.js.map} +1 -1
  44. package/dist/esm/{index-CuTX1FnY.js → index-TfrZPiHM.js} +4 -4
  45. package/dist/esm/index-TfrZPiHM.js.map +1 -0
  46. package/dist/esm/loader.js +3 -3
  47. package/dist/esm/salla-accordion-body.entry.js +1 -1
  48. package/dist/esm/salla-accordion-head.entry.js +1 -1
  49. package/dist/esm/salla-accordion.entry.js +1 -1
  50. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  51. package/dist/esm/salla-advertisement.entry.js +1 -1
  52. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  53. package/dist/esm/salla-apps-icons.entry.js +1 -1
  54. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  55. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  56. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  57. package/dist/esm/salla-contacts.entry.js +1 -1
  58. package/dist/esm/salla-filters-widget.entry.js +1 -1
  59. package/dist/esm/salla-filters.entry.js +1 -1
  60. package/dist/esm/salla-installment.entry.js +1 -1
  61. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  62. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  63. package/dist/esm/salla-metadata.entry.js +1 -1
  64. package/dist/esm/salla-notification-item.entry.js +1 -1
  65. package/dist/esm/salla-notifications.entry.js +1 -1
  66. package/dist/esm/salla-offer.entry.js +1 -1
  67. package/dist/esm/salla-order-summary.entry.js +1 -1
  68. package/dist/esm/salla-orders.entry.js +1 -1
  69. package/dist/esm/salla-payments.entry.js +1 -1
  70. package/dist/esm/salla-price-range.entry.js +1 -1
  71. package/dist/esm/salla-product-options.entry.js +1 -1
  72. package/dist/esm/salla-review-card.entry.js +1 -1
  73. package/dist/esm/salla-reviews-page.entry.js +1 -1
  74. package/dist/esm/salla-reviews.entry.js +1 -1
  75. package/dist/esm/salla-social.entry.js +1 -1
  76. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  77. package/dist/esm/salla-tooltip.entry.js +1 -1
  78. package/dist/esm/salla-verify.entry.js +1 -1
  79. package/dist/esm/salla-wallet.entry.js +1 -1
  80. package/dist/esm/twilight.js +3 -3
  81. package/dist/esm-es5/{app-globals-D1P1rERf.js → app-globals-bcy23yOg.js} +2 -2
  82. package/dist/esm-es5/{app-globals-D1P1rERf.js.map → app-globals-bcy23yOg.js.map} +1 -1
  83. package/dist/esm-es5/{index-CuTX1FnY.js → index-TfrZPiHM.js} +3 -3
  84. package/dist/esm-es5/index-TfrZPiHM.js.map +1 -0
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  87. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  88. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  89. package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
  90. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  91. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  92. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  93. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  94. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  95. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  96. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  97. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  98. package/dist/esm-es5/salla-filters.entry.js +1 -1
  99. package/dist/esm-es5/salla-installment.entry.js +1 -1
  100. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  101. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  102. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  103. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  104. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  105. package/dist/esm-es5/salla-offer.entry.js +1 -1
  106. package/dist/esm-es5/salla-order-summary.entry.js +1 -1
  107. package/dist/esm-es5/salla-orders.entry.js +1 -1
  108. package/dist/esm-es5/salla-payments.entry.js +1 -1
  109. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  110. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  111. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  112. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  113. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  114. package/dist/esm-es5/salla-social.entry.js +1 -1
  115. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  116. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  117. package/dist/esm-es5/salla-verify.entry.js +1 -1
  118. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  119. package/dist/esm-es5/twilight.js +1 -1
  120. package/dist/twilight/{p-b637209c.entry.js → p-021b3219.entry.js} +2 -2
  121. package/dist/twilight/{p-aedd03ef.system.entry.js → p-0a4eec00.system.entry.js} +2 -2
  122. package/dist/twilight/{p-c169aaf9.system.entry.js → p-0cfd54f6.system.entry.js} +2 -2
  123. package/dist/twilight/{p-f5cde0cf.system.entry.js → p-12d56016.system.entry.js} +2 -2
  124. package/dist/twilight/{p-08ee1adb.entry.js → p-1df83439.entry.js} +2 -2
  125. package/dist/twilight/{p-7ad55888.entry.js → p-1f975387.entry.js} +2 -2
  126. package/dist/twilight/{p-b8f6634f.entry.js → p-20a58fc9.entry.js} +2 -2
  127. package/dist/twilight/{p-27ebf315.entry.js → p-24389b0b.entry.js} +2 -2
  128. package/dist/twilight/{p-f5776c7f.system.entry.js → p-25614273.system.entry.js} +2 -2
  129. package/dist/twilight/{p-88aec04f.entry.js → p-279daf34.entry.js} +2 -2
  130. package/dist/twilight/{p-bfa87551.entry.js → p-28aa32df.entry.js} +2 -2
  131. package/dist/twilight/{p-334407c3.entry.js → p-29c5e915.entry.js} +2 -2
  132. package/dist/twilight/{p-b1478709.entry.js → p-2b355c74.entry.js} +2 -2
  133. package/dist/twilight/{p-32915043.entry.js → p-2d61d0e7.entry.js} +2 -2
  134. package/dist/twilight/{p-ea22747c.system.entry.js → p-377e8ae9.system.entry.js} +2 -2
  135. package/dist/twilight/{p-83cd5d0b.system.entry.js → p-3bdcb368.system.entry.js} +2 -2
  136. package/dist/twilight/{p-393e3ade.system.entry.js → p-41c5db98.system.entry.js} +2 -2
  137. package/dist/twilight/{p-f90fafa7.entry.js → p-45f5b923.entry.js} +2 -2
  138. package/dist/twilight/{p-bc4549b0.system.entry.js → p-4c4f98b4.system.entry.js} +2 -2
  139. package/dist/twilight/{p-b14283ef.system.entry.js → p-4d0b108b.system.entry.js} +2 -2
  140. package/dist/twilight/{p-56c6ed6f.system.entry.js → p-4e8e00aa.system.entry.js} +2 -2
  141. package/dist/twilight/{p-cf0431dc.entry.js → p-5d14ab42.entry.js} +2 -2
  142. package/dist/twilight/{p-9dd09d48.system.entry.js → p-5dc4a5c0.system.entry.js} +2 -2
  143. package/dist/twilight/{p-7426b31e.entry.js → p-6b501ee0.entry.js} +2 -2
  144. package/dist/twilight/{p-f3bae608.system.entry.js → p-6dd8e040.system.entry.js} +2 -2
  145. package/dist/twilight/{p-28ef27bf.system.entry.js → p-7273395e.system.entry.js} +2 -2
  146. package/dist/twilight/p-73f96869.system.entry.js +5 -0
  147. package/dist/twilight/{p-83b5566c.entry.js → p-74a31a87.entry.js} +2 -2
  148. package/dist/twilight/{p-74908f36.system.entry.js → p-827c909f.system.entry.js} +2 -2
  149. package/dist/twilight/{p-fc788f66.entry.js → p-849b5b1c.entry.js} +2 -2
  150. package/dist/twilight/{p-30d7fdbe.entry.js → p-853399af.entry.js} +2 -2
  151. package/dist/twilight/{p-8f374b32.entry.js → p-854c5ca2.entry.js} +2 -2
  152. package/dist/twilight/p-87c0a1ae.system.entry.js +5 -0
  153. package/dist/twilight/{p-f9bf2cb6.system.entry.js → p-90535622.system.entry.js} +2 -2
  154. package/dist/twilight/{p-39b35702.system.entry.js → p-929164d2.system.entry.js} +2 -2
  155. package/dist/twilight/{p-e2f8e416.entry.js → p-94cd1015.entry.js} +2 -2
  156. package/dist/twilight/{p-5ba5e28c.system.entry.js → p-9b4e8457.system.entry.js} +2 -2
  157. package/dist/twilight/{p-220790b2.system.entry.js → p-9d5433ec.system.entry.js} +2 -2
  158. package/dist/twilight/{p-CFGGBiPW.system.js.map → p-B4IOZQq2.system.js.map} +1 -1
  159. package/dist/twilight/{p-IKzuEIjQ.system.js.map → p-B7YoCPUj.system.js.map} +1 -1
  160. package/dist/twilight/{p-pCPxTgN4.system.js.map → p-BZNK2OhY.system.js.map} +1 -1
  161. package/dist/twilight/{p-DQUVo72n.system.js.map → p-Bf2t4sS7.system.js.map} +1 -1
  162. package/dist/twilight/{p-D5-Y1pzI.system.js → p-BoRn76FR.system.js} +3 -3
  163. package/dist/twilight/p-BoRn76FR.system.js.map +1 -0
  164. package/dist/twilight/{p-CCCFkKQu.system.js.map → p-BvZNuO_k.system.js.map} +1 -1
  165. package/dist/twilight/{p-fB8ikiKI.system.js.map → p-Bz6T5olt.system.js.map} +1 -1
  166. package/dist/twilight/{p-DcLr_jJB.system.js.map → p-C1j2Mybi.system.js.map} +1 -1
  167. package/dist/twilight/{p-uwvO2G-i.system.js.map → p-CCEzoQkr.system.js.map} +1 -1
  168. package/dist/twilight/{p-D7ZSa6fW.system.js.map → p-CF-5c0k9.system.js.map} +1 -1
  169. package/dist/twilight/{p-BYTS2SC9.system.js.map → p-CPLroejr.system.js.map} +1 -1
  170. package/dist/twilight/{p-CYSGJCmD.system.js.map → p-CRWuiy2w.system.js.map} +1 -1
  171. package/dist/twilight/{p-zJ65Et2a.system.js.map → p-C_0z-awL.system.js.map} +1 -1
  172. package/dist/twilight/{p-Dpndr6az.system.js.map → p-CcD3fLs8.system.js.map} +1 -1
  173. package/dist/twilight/{p-CkgcmCNn.system.js.map → p-CcQg-RDM.system.js.map} +1 -1
  174. package/dist/twilight/{p-BVv_u7n4.js → p-CfD5WVsV.js} +2 -2
  175. package/dist/twilight/{p-BVv_u7n4.js.map → p-CfD5WVsV.js.map} +1 -1
  176. package/dist/twilight/{p-fWxyHW35.system.js.map → p-CjjN4fNH.system.js.map} +1 -1
  177. package/dist/twilight/{p-B0AUXP9f.system.js.map → p-CwAje28k.system.js.map} +1 -1
  178. package/dist/twilight/{p-BBw9QCsf.system.js.map → p-D664QZA6.system.js.map} +1 -1
  179. package/dist/twilight/{p-DbIOy6jy.system.js.map → p-DBQBFt5P.system.js.map} +1 -1
  180. package/dist/twilight/{p-DHVOQr5r.system.js.map → p-DYlJ4rm0.system.js.map} +1 -1
  181. package/dist/twilight/{p-DybtpGuk.system.js.map → p-D_HaOyHH.system.js.map} +1 -1
  182. package/dist/twilight/{p-Bh4_ZPZ5.system.js.map → p-D_KVdrk5.system.js.map} +1 -1
  183. package/dist/twilight/{p-BHYlCBiV.system.js.map → p-D_z7TtNm.system.js.map} +1 -1
  184. package/dist/twilight/{p-BpP5yEur.system.js → p-DdS70ik4.system.js} +2 -2
  185. package/dist/twilight/{p-BpP5yEur.system.js.map → p-DdS70ik4.system.js.map} +1 -1
  186. package/dist/twilight/{p-Bhru9cVq.system.js.map → p-DfdxbQJV.system.js.map} +1 -1
  187. package/dist/twilight/{p-D62V7Hng.system.js.map → p-DmBhTkzL.system.js.map} +1 -1
  188. package/dist/twilight/{p-C04Q3gx_.system.js.map → p-DvSLTuZM.system.js.map} +1 -1
  189. package/dist/twilight/{p-NeruYUVP.system.js.map → p-IP42L3Dw.system.js.map} +1 -1
  190. package/dist/twilight/{p-DpO3Qexd.system.js.map → p-LtKpVQSC.system.js.map} +1 -1
  191. package/dist/twilight/{p-C0RKEO6f.system.js.map → p-NOU_yaZT.system.js.map} +1 -1
  192. package/dist/twilight/{p-B3kLCvjX.system.js.map → p-OD5oRGeI.system.js.map} +1 -1
  193. package/dist/twilight/{p-CuTX1FnY.js → p-TfrZPiHM.js} +3 -3
  194. package/dist/twilight/p-TfrZPiHM.js.map +1 -0
  195. package/dist/twilight/{p-8811aac2.system.entry.js → p-a3575677.system.entry.js} +2 -2
  196. package/dist/twilight/{p-1446a7c2.entry.js → p-a9ed20d0.entry.js} +2 -2
  197. package/dist/twilight/{p-D20TiGFZ.system.js.map → p-aJW8CizZ.system.js.map} +1 -1
  198. package/dist/twilight/{p-2736e1ff.entry.js → p-af63e71c.entry.js} +2 -2
  199. package/dist/twilight/{p-4e6ec042.system.entry.js → p-b78ec488.system.entry.js} +2 -2
  200. package/dist/twilight/{p-063fa20b.system.entry.js → p-b8acf49a.system.entry.js} +2 -2
  201. package/dist/twilight/{p-5da4dd8f.system.entry.js → p-b9a143df.system.entry.js} +2 -2
  202. package/dist/twilight/{p-0d0b4f23.entry.js → p-ba5e89ed.entry.js} +2 -2
  203. package/dist/twilight/{p-744e409d.entry.js → p-bba0aa9c.entry.js} +2 -2
  204. package/dist/twilight/{p-8aa88636.entry.js → p-bf2e161f.entry.js} +2 -2
  205. package/dist/twilight/{p-6e05d698.entry.js → p-cb22e781.entry.js} +2 -2
  206. package/dist/twilight/{p-05fb4f81.entry.js → p-ce9cde22.entry.js} +2 -2
  207. package/dist/twilight/{p-a1fa1c6b.system.entry.js → p-d149c3b0.system.entry.js} +2 -2
  208. package/dist/twilight/{p-80b4ae24.entry.js → p-d21d5b8d.entry.js} +2 -2
  209. package/dist/twilight/{p-003b86a2.entry.js → p-d270386d.entry.js} +2 -2
  210. package/dist/twilight/{p-daaf2576.system.entry.js → p-d552d660.system.entry.js} +2 -2
  211. package/dist/twilight/{p-95c80bb4.system.entry.js → p-dc026fbc.system.entry.js} +2 -2
  212. package/dist/twilight/{p-ec4270cd.system.entry.js → p-de5cdbf2.system.entry.js} +2 -2
  213. package/dist/twilight/{p-63e43b3e.system.entry.js → p-e45f155c.system.entry.js} +2 -2
  214. package/dist/twilight/{p-b65866f7.system.entry.js → p-e477c1c4.system.entry.js} +3 -3
  215. package/dist/twilight/p-e6a8977d.entry.js +5 -0
  216. package/dist/twilight/{p-0284f6e2.entry.js → p-eda69b6f.entry.js} +2 -2
  217. package/dist/twilight/{p-69ae28c3.entry.js → p-ee6033a9.entry.js} +2 -2
  218. package/dist/twilight/{p-5baa9220.entry.js → p-f3b9bca4.entry.js} +2 -2
  219. package/dist/twilight/{p-c7aebfba.system.entry.js → p-f5d36cd6.system.entry.js} +2 -2
  220. package/dist/twilight/{p-ba62fa0e.entry.js → p-f9464d95.entry.js} +2 -2
  221. package/dist/twilight/{p-63bd7c4d.system.entry.js → p-fbe14a39.system.entry.js} +2 -2
  222. package/dist/twilight/{p-b2f1072f.entry.js → p-fca90326.entry.js} +2 -2
  223. package/dist/twilight/{p-6c759bad.system.entry.js → p-fcea3994.system.entry.js} +2 -2
  224. package/dist/twilight/{p-C0sn7ZS2.system.js.map → p-g6P5C1-t.system.js.map} +1 -1
  225. package/dist/twilight/{p-DwHxzDwE.system.js.map → p-iC1de6J3.system.js.map} +1 -1
  226. package/dist/twilight/{p-BE-HKstx.system.js → p-lQgQAXVy.system.js} +2 -2
  227. package/dist/twilight/{p-BE-HKstx.system.js.map → p-lQgQAXVy.system.js.map} +1 -1
  228. package/dist/twilight/{p-B0j3eMiq.system.js.map → p-qe0eSxJZ.system.js.map} +1 -1
  229. package/dist/twilight/{p-BuUayMpr.system.js.map → p-v5fCQxe_.system.js.map} +1 -1
  230. package/dist/twilight/twilight.esm.js +1 -1
  231. package/dist/twilight/twilight.js +1 -1
  232. package/package.json +5 -5
  233. package/dist/cjs/index-PeQbW4nk.js.map +0 -1
  234. package/dist/esm/index-CuTX1FnY.js.map +0 -1
  235. package/dist/esm-es5/index-CuTX1FnY.js.map +0 -1
  236. package/dist/twilight/p-4e898b33.system.entry.js +0 -5
  237. package/dist/twilight/p-785c5a57.system.entry.js +0 -5
  238. package/dist/twilight/p-8f3dc4ca.entry.js +0 -5
  239. package/dist/twilight/p-CuTX1FnY.js.map +0 -1
  240. package/dist/twilight/p-D5-Y1pzI.system.js.map +0 -1
  241. /package/dist/twilight/{p-b637209c.entry.js.map → p-021b3219.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-aedd03ef.system.entry.js.map → p-0a4eec00.system.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-c169aaf9.system.entry.js.map → p-0cfd54f6.system.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-f5cde0cf.system.entry.js.map → p-12d56016.system.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-08ee1adb.entry.js.map → p-1df83439.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-7ad55888.entry.js.map → p-1f975387.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-b8f6634f.entry.js.map → p-20a58fc9.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-27ebf315.entry.js.map → p-24389b0b.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-f5776c7f.system.entry.js.map → p-25614273.system.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-88aec04f.entry.js.map → p-279daf34.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-bfa87551.entry.js.map → p-28aa32df.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-334407c3.entry.js.map → p-29c5e915.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-b1478709.entry.js.map → p-2b355c74.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-32915043.entry.js.map → p-2d61d0e7.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-ea22747c.system.entry.js.map → p-377e8ae9.system.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-83cd5d0b.system.entry.js.map → p-3bdcb368.system.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-393e3ade.system.entry.js.map → p-41c5db98.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-f90fafa7.entry.js.map → p-45f5b923.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-bc4549b0.system.entry.js.map → p-4c4f98b4.system.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-b14283ef.system.entry.js.map → p-4d0b108b.system.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-56c6ed6f.system.entry.js.map → p-4e8e00aa.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-cf0431dc.entry.js.map → p-5d14ab42.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-9dd09d48.system.entry.js.map → p-5dc4a5c0.system.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-7426b31e.entry.js.map → p-6b501ee0.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-f3bae608.system.entry.js.map → p-6dd8e040.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-28ef27bf.system.entry.js.map → p-7273395e.system.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-785c5a57.system.entry.js.map → p-73f96869.system.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-83b5566c.entry.js.map → p-74a31a87.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-74908f36.system.entry.js.map → p-827c909f.system.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-fc788f66.entry.js.map → p-849b5b1c.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-30d7fdbe.entry.js.map → p-853399af.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-8f374b32.entry.js.map → p-854c5ca2.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-4e898b33.system.entry.js.map → p-87c0a1ae.system.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-f9bf2cb6.system.entry.js.map → p-90535622.system.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-39b35702.system.entry.js.map → p-929164d2.system.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-e2f8e416.entry.js.map → p-94cd1015.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-5ba5e28c.system.entry.js.map → p-9b4e8457.system.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-220790b2.system.entry.js.map → p-9d5433ec.system.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-8811aac2.system.entry.js.map → p-a3575677.system.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-1446a7c2.entry.js.map → p-a9ed20d0.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-2736e1ff.entry.js.map → p-af63e71c.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-4e6ec042.system.entry.js.map → p-b78ec488.system.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-063fa20b.system.entry.js.map → p-b8acf49a.system.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-5da4dd8f.system.entry.js.map → p-b9a143df.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-0d0b4f23.entry.js.map → p-ba5e89ed.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-744e409d.entry.js.map → p-bba0aa9c.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-8aa88636.entry.js.map → p-bf2e161f.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-6e05d698.entry.js.map → p-cb22e781.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-05fb4f81.entry.js.map → p-ce9cde22.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-a1fa1c6b.system.entry.js.map → p-d149c3b0.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-80b4ae24.entry.js.map → p-d21d5b8d.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-003b86a2.entry.js.map → p-d270386d.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-daaf2576.system.entry.js.map → p-d552d660.system.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-95c80bb4.system.entry.js.map → p-dc026fbc.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-ec4270cd.system.entry.js.map → p-de5cdbf2.system.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-63e43b3e.system.entry.js.map → p-e45f155c.system.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-b65866f7.system.entry.js.map → p-e477c1c4.system.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-8f3dc4ca.entry.js.map → p-e6a8977d.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-0284f6e2.entry.js.map → p-eda69b6f.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-69ae28c3.entry.js.map → p-ee6033a9.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-5baa9220.entry.js.map → p-f3b9bca4.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-c7aebfba.system.entry.js.map → p-f5d36cd6.system.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-ba62fa0e.entry.js.map → p-f9464d95.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-63bd7c4d.system.entry.js.map → p-fbe14a39.system.entry.js.map} +0 -0
  305. /package/dist/twilight/{p-b2f1072f.entry.js.map → p-fca90326.entry.js.map} +0 -0
  306. /package/dist/twilight/{p-6c759bad.system.entry.js.map → p-fcea3994.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,r,s){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{l(s.next(t))}catch(t){o(t)}}function i(t){try{l(s["throw"](t))}catch(t){o(t)}}function l(t){t.done?r(t.value):n(t.value).then(a,i)}l((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,n,o,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(t){return function(e){return l([t,e])}}function l(i){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,i[0]&&(r=0)),r)try{if(s=1,n&&(o=i[0]&2?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;if(n=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){r.label=i[1];break}if(i[0]===6&&r.label<o[1]){r.label=o[1];o=i;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(i);break}if(o[2])r.ops.pop();r.trys.pop();continue}i=e.call(t,r)}catch(t){i=[6,t];n=0}finally{s=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{r as registerInstance,h,g as getElement}from"./index-CuTX1FnY.js";import{H as Helper}from"./Helper-CeeYyNjR.js";import"./anime.es-CgtvEd63.js";var sallaOrdersCss=":host{display:block}";var SallaOrder=function(){function t(t){var e=this;registerInstance(this,t);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((function(){e.languageCode=salla.lang.locale;e.orderNumberText=salla.lang.get("pages.thank_you.order_id");e.totalOrderText=salla.lang.get("pages.orders.total");e.orderDateText=salla.lang.get("pages.orders.date");e.orderStatusText=salla.lang.get("pages.orders.status");e.noOrderText=salla.lang.get("pages.orders.non_orders");e.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var e;var r=(e=this.status)===null||e===void 0?void 0:e.querySelector(".s-button-text");if(r){Helper.toggleElementClassIf(r,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.initiateInfiniteScroll=function(){var t=this;var e,r,s;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:false,nextPage:this.nextPage,scrollThreshold:false},true);(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("request",(function(e){t.loading()}));(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("load",(function(e){var r,s;t.loading(false);t.pagination=e.pagination;t.nextPage=((s=(r=e.pagination)===null||r===void 0?void 0:r.links)===null||s===void 0?void 0:s.next)||null;t.handleResponse(e.data).forEach((function(e){t.wrapper.append(e)}));var n=t.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");Helper.animateItems(n)}));(s=this.infiniteScroll)===null||s===void 0?void 0:s.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.infiniteScroll.loadNextPage();return[2]}))}))};t.prototype.handleResponse=function(t){var e=this;return t.map((function(t){return e.getSingleOrderItem(t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(r){switch(r.label){case 0:t=new URL(window.location.href);return[4,salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((function(t){var r,s,n,o;e.orders=t.data;e.hasInfiniteScroll=!!((r=t.pagination)===null||r===void 0?void 0:r.links.next);e.pagination=t.pagination;e.total=(s=t.pagination)===null||s===void 0?void 0:s.total;e.nextPage=((o=(n=t.pagination)===null||n===void 0?void 0:n.links)===null||o===void 0?void 0:o.next)||null;if(!e.orders.length){e.showPlaceholder=true;return e.loading(false)}setTimeout((function(){e.handleResponse(t.data).forEach((function(t){e.wrapper.append(t)}));e.initiateInfiniteScroll();var r=e.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");Helper.animateItems(r)}),100)})).catch((function(t){e.showPlaceholder=true;e.loading(false);salla.logger.error(t)}))];case 1:r.sent();return[2]}}))}))};t.prototype.getSingleOrderItem=function(t){var e=document.createElement("tr");e.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");var r=document.createElement("td");r.classList.add("s-orders-table-tbody-tr-td");var s=document.createElement("div");s.classList.add("s-orders-table-tbody-tr-td-content");var n=document.createElement("span");n.classList.add("s-orders-mobile-title");n.textContent=this.orderNumberText+":";var o=document.createElement("span");o.classList.add("s-orders-reference-id");o.textContent="#"+t.reference_id;s.appendChild(n);s.appendChild(o);if(t.source=="buy_as_gift"){var a=document.createElement("i");a.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");s.appendChild(a)}var i=document.createElement("a");i.href=t.url;s.appendChild(i);var l=document.createElement("div");l.classList.add("s-orders-copy-to-clipboard-button");var d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(function(t){Helper.copyToClipboard(t);Helper.toggleElementClassIf(d,"copied","code-to-copy",(function(){return true}));setTimeout((function(){Helper.toggleElementClassIf(d,"code-to-copy","copied",(function(){return true}))}),1e3)}));var u=document.createElement("span");u.textContent="#"+t.reference_id;var c=document.createElement("i");c.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");var h=salla.config.get("theme.is_rtl",true);if(h){d.appendChild(c);d.appendChild(u)}else{d.appendChild(u);d.appendChild(c)}l.appendChild(d);s.appendChild(l);r.appendChild(s);e.appendChild(r);var f=document.createElement("td");f.classList.add("s-orders-table-tbody-tr-td");var v=document.createElement("div");v.classList.add("s-orders-table-tbody-tr-td-content");var b=document.createElement("span");b.classList.add("s-orders-mobile-title");b.textContent=this.totalOrderText+":";var p=document.createElement("div");p.innerHTML=salla.money(t.total);var m=document.createElement("a");m.href=t.url;v.appendChild(b);v.appendChild(p);v.appendChild(m);f.appendChild(v);e.appendChild(f);var y=document.createElement("td");y.classList.add("s-orders-table-tbody-tr-td");var g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");var _=document.createElement("span");_.classList.add("s-orders-mobile-title");_.textContent=this.orderDateText+":";var w=document.createElement("div");w.textContent=Helper.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);var k=document.createElement("a");k.href=t.url;g.appendChild(_);g.appendChild(w);g.appendChild(k);y.appendChild(g);e.appendChild(y);var x=document.createElement("td");x.classList.add("s-orders-table-tbody-tr-td");var H=document.createElement("div");H.classList.add("s-orders-table-tbody-tr-td-content");var O=document.createElement("span");O.classList.add("s-orders-mobile-title");O.textContent=this.orderStatusText+":";var j=document.createElement("span");j.classList.add("s-orders-status-container");j.style.color=t.status.color;var C=document.createElement("i");C.classList.add(t.status.icon);var E=document.createElement("span");E.textContent=t.status.name;j.appendChild(C);j.appendChild(E);H.appendChild(O);H.appendChild(j);var S=document.createElement("i");S.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");H.appendChild(S);var T=document.createElement("a");T.href=t.url;H.appendChild(T);x.appendChild(H);e.appendChild(x);return e};t.prototype.render=function(){var t=this;var e;if(this.showPlaceholder){return h("div",{class:"s-orders-no-content"},h("i",{class:"sicon-packed-box icon"}),h("p",null,this.noOrderText))}return h("div",{class:"s-orders-wrapper"},h("table",{class:"s-orders-table"},h("thead",{class:"s-orders-table-head"},h("tr",{class:"s-orders-table-head-tr"},h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),h("tbody",{class:"s-orders-table-tbody",ref:function(e){return t.wrapper=e}})),this.nextPage&&h("div",{class:"s-infinite-scroll-wrapper",ref:function(e){return t.status=e}},h("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},h("span",{class:"s-button-text s-infinite-scroll-btn-text"},(e=this.loadMoreText)!==null&&e!==void 0?e:this.load_more_text_trans),h("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(e){return t.btnLoader=e},style:{display:"none"}}))))};t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadInitialData()})).then((function(){return t.initiateInfiniteScroll()}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaOrder.style=sallaOrdersCss;export{SallaOrder as salla_orders};
4
+ */import{r as registerInstance,h,g as getElement}from"./index-TfrZPiHM.js";import{H as Helper}from"./Helper-CeeYyNjR.js";import"./anime.es-CgtvEd63.js";var sallaOrdersCss=":host{display:block}";var SallaOrder=function(){function t(t){var e=this;registerInstance(this,t);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((function(){e.languageCode=salla.lang.locale;e.orderNumberText=salla.lang.get("pages.thank_you.order_id");e.totalOrderText=salla.lang.get("pages.orders.total");e.orderDateText=salla.lang.get("pages.orders.date");e.orderStatusText=salla.lang.get("pages.orders.status");e.noOrderText=salla.lang.get("pages.orders.non_orders");e.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var e;var r=(e=this.status)===null||e===void 0?void 0:e.querySelector(".s-button-text");if(r){Helper.toggleElementClassIf(r,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.initiateInfiniteScroll=function(){var t=this;var e,r,s;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:false,nextPage:this.nextPage,scrollThreshold:false},true);(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("request",(function(e){t.loading()}));(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("load",(function(e){var r,s;t.loading(false);t.pagination=e.pagination;t.nextPage=((s=(r=e.pagination)===null||r===void 0?void 0:r.links)===null||s===void 0?void 0:s.next)||null;t.handleResponse(e.data).forEach((function(e){t.wrapper.append(e)}));var n=t.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");Helper.animateItems(n)}));(s=this.infiniteScroll)===null||s===void 0?void 0:s.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.infiniteScroll.loadNextPage();return[2]}))}))};t.prototype.handleResponse=function(t){var e=this;return t.map((function(t){return e.getSingleOrderItem(t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(r){switch(r.label){case 0:t=new URL(window.location.href);return[4,salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((function(t){var r,s,n,o;e.orders=t.data;e.hasInfiniteScroll=!!((r=t.pagination)===null||r===void 0?void 0:r.links.next);e.pagination=t.pagination;e.total=(s=t.pagination)===null||s===void 0?void 0:s.total;e.nextPage=((o=(n=t.pagination)===null||n===void 0?void 0:n.links)===null||o===void 0?void 0:o.next)||null;if(!e.orders.length){e.showPlaceholder=true;return e.loading(false)}setTimeout((function(){e.handleResponse(t.data).forEach((function(t){e.wrapper.append(t)}));e.initiateInfiniteScroll();var r=e.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");Helper.animateItems(r)}),100)})).catch((function(t){e.showPlaceholder=true;e.loading(false);salla.logger.error(t)}))];case 1:r.sent();return[2]}}))}))};t.prototype.getSingleOrderItem=function(t){var e=document.createElement("tr");e.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");var r=document.createElement("td");r.classList.add("s-orders-table-tbody-tr-td");var s=document.createElement("div");s.classList.add("s-orders-table-tbody-tr-td-content");var n=document.createElement("span");n.classList.add("s-orders-mobile-title");n.textContent=this.orderNumberText+":";var o=document.createElement("span");o.classList.add("s-orders-reference-id");o.textContent="#"+t.reference_id;s.appendChild(n);s.appendChild(o);if(t.source=="buy_as_gift"){var a=document.createElement("i");a.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");s.appendChild(a)}var i=document.createElement("a");i.href=t.url;s.appendChild(i);var l=document.createElement("div");l.classList.add("s-orders-copy-to-clipboard-button");var d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(function(t){Helper.copyToClipboard(t);Helper.toggleElementClassIf(d,"copied","code-to-copy",(function(){return true}));setTimeout((function(){Helper.toggleElementClassIf(d,"code-to-copy","copied",(function(){return true}))}),1e3)}));var u=document.createElement("span");u.textContent="#"+t.reference_id;var c=document.createElement("i");c.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");var h=salla.config.get("theme.is_rtl",true);if(h){d.appendChild(c);d.appendChild(u)}else{d.appendChild(u);d.appendChild(c)}l.appendChild(d);s.appendChild(l);r.appendChild(s);e.appendChild(r);var f=document.createElement("td");f.classList.add("s-orders-table-tbody-tr-td");var v=document.createElement("div");v.classList.add("s-orders-table-tbody-tr-td-content");var b=document.createElement("span");b.classList.add("s-orders-mobile-title");b.textContent=this.totalOrderText+":";var p=document.createElement("div");p.innerHTML=salla.money(t.total);var m=document.createElement("a");m.href=t.url;v.appendChild(b);v.appendChild(p);v.appendChild(m);f.appendChild(v);e.appendChild(f);var y=document.createElement("td");y.classList.add("s-orders-table-tbody-tr-td");var g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");var _=document.createElement("span");_.classList.add("s-orders-mobile-title");_.textContent=this.orderDateText+":";var w=document.createElement("div");w.textContent=Helper.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);var k=document.createElement("a");k.href=t.url;g.appendChild(_);g.appendChild(w);g.appendChild(k);y.appendChild(g);e.appendChild(y);var x=document.createElement("td");x.classList.add("s-orders-table-tbody-tr-td");var H=document.createElement("div");H.classList.add("s-orders-table-tbody-tr-td-content");var O=document.createElement("span");O.classList.add("s-orders-mobile-title");O.textContent=this.orderStatusText+":";var j=document.createElement("span");j.classList.add("s-orders-status-container");j.style.color=t.status.color;var C=document.createElement("i");C.classList.add(t.status.icon);var E=document.createElement("span");E.textContent=t.status.name;j.appendChild(C);j.appendChild(E);H.appendChild(O);H.appendChild(j);var S=document.createElement("i");S.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");H.appendChild(S);var T=document.createElement("a");T.href=t.url;H.appendChild(T);x.appendChild(H);e.appendChild(x);return e};t.prototype.render=function(){var t=this;var e;if(this.showPlaceholder){return h("div",{class:"s-orders-no-content"},h("i",{class:"sicon-packed-box icon"}),h("p",null,this.noOrderText))}return h("div",{class:"s-orders-wrapper"},h("table",{class:"s-orders-table"},h("thead",{class:"s-orders-table-head"},h("tr",{class:"s-orders-table-head-tr"},h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),h("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),h("tbody",{class:"s-orders-table-tbody",ref:function(e){return t.wrapper=e}})),this.nextPage&&h("div",{class:"s-infinite-scroll-wrapper",ref:function(e){return t.status=e}},h("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},h("span",{class:"s-button-text s-infinite-scroll-btn-text"},(e=this.loadMoreText)!==null&&e!==void 0?e:this.load_more_text_trans),h("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(e){return t.btnLoader=e},style:{display:"none"}}))))};t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadInitialData()})).then((function(){return t.initiateInfiniteScroll()}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaOrder.style=sallaOrdersCss;export{SallaOrder as salla_orders};
5
5
  //# sourceMappingURL=salla-orders.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-CuTX1FnY.js";var sallaPaymentsCss=":host{display:block}";var SallaPayments=function(){function s(s){registerInstance(this,s);this.exclude=[]}s.prototype.componentWillLoad=function(){var s=this;return salla.onReady().then((function(){var a,t,i;if(typeof s.exclude==="string"){try{s.exclude=JSON.parse(s.exclude)}catch(a){salla.logger.error("salla-payments:: failed to parse the exclude props!",s.exclude);s.exclude=[]}}s.placeholderImage=salla.url.cdn("images/s-empty.png");s.paymentSlot=((a=s.host.querySelector('[slot="payment"]'))===null||a===void 0?void 0:a.innerHTML)||'<li class="s-payments-list-item"><img class="lazy" width="100%" height="100%" src="'.concat(s.placeholderImage,'" data-src="{image}" alt={payment} /><li>');s.sbcSlot=((t=s.host.querySelector('[slot="sbc"]'))===null||t===void 0?void 0:t.innerHTML)||'<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="'.concat(s.placeholderImage,'" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>');s.codSlot=((i=s.host.querySelector('[slot="cod"]'))===null||i===void 0?void 0:i.innerHTML)||'<li class="s-payments-list-item"> <img width="100%" height="100%" src="'.concat(s.placeholderImage,'" data-src={image} class="lazy" alt="COD"/><li>');s.payments=salla.config.get("store.settings.payments")}))};s.prototype.render=function(){var s=this;var a=!this.exclude.includes("made-in-ksa")&&salla.config.get("store.settings.made_in_ksa");var t=this.exclude.includes("sbc")?null:salla.config.get("store.settings.certificate.id");return h(Host,{key:"6c8a1fd050822882224ee1e419f6f6dbdbfaf12d",class:"s-payments-list-wrap"},h("ul",{key:"773195024ce6f616ad9b87091c8ddfd0e153f9ec",class:"s-payments-list"},a&&h("li",{key:"203bebb61c41ca108c0ec969661d5922db2ac378",class:"s-payments-list-item"},h("img",{key:"a687fac0d968f0485a0a59d1205a0f0db1f100f4",class:"lazy",width:"100%",height:"100%",decoding:"async",loading:"lazy","data-src":salla.url.cdn("images/made-in-ksa.svg",58,58),alt:"made in KSA certified"})),this.payments.map((function(a){return a=="cod"?h("div",{id:"cod-slot",innerHTML:s.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png",58,58))}):h("div",{id:"payment-slot",innerHTML:s.paymentSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/".concat(a,"_mini.png"),58,58)).replace(/\{payment\}/g,a)})})),t&&h("div",{key:"f571920327b81c48f502c1d6e497955978634c08",id:"sbc-slot",innerHTML:this.sbcSlot.replace(/\{image\}/g,salla.url.cdn("images/sbc.png",58,58)).replace(/\{link\}/g,"https://eauthenticate.saudibusiness.gov.sa/certificate-details/".concat(t))})))};s.prototype.componentDidLoad=function(){var s;(s=document.lazyLoadInstance)===null||s===void 0?void 0:s.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((function(s){s.addEventListener("load",(function(){s.setAttribute("width","100%");s.setAttribute("height","100%")}))}))};s.prototype.componentDidRender=function(){var s,a,t;this.host.querySelectorAll("#payment-slot").forEach((function(s){return s.replaceWith(s.firstChild)}));this.host.querySelectorAll("#sbc-slot").forEach((function(s){return s.replaceWith(s.firstChild)}));this.host.querySelectorAll("#cod-slot").forEach((function(s){return s.replaceWith(s.firstChild)}));(s=this.host.querySelector('[slot="payment"]'))===null||s===void 0?void 0:s.remove();(a=this.host.querySelector('[slot="sbc"]'))===null||a===void 0?void 0:a.remove();(t=this.host.querySelector('[slot="cod"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(s.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return s}();SallaPayments.style=sallaPaymentsCss;export{SallaPayments as salla_payments};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-TfrZPiHM.js";var sallaPaymentsCss=":host{display:block}";var SallaPayments=function(){function s(s){registerInstance(this,s);this.exclude=[]}s.prototype.componentWillLoad=function(){var s=this;return salla.onReady().then((function(){var a,t,i;if(typeof s.exclude==="string"){try{s.exclude=JSON.parse(s.exclude)}catch(a){salla.logger.error("salla-payments:: failed to parse the exclude props!",s.exclude);s.exclude=[]}}s.placeholderImage=salla.url.cdn("images/s-empty.png");s.paymentSlot=((a=s.host.querySelector('[slot="payment"]'))===null||a===void 0?void 0:a.innerHTML)||'<li class="s-payments-list-item"><img class="lazy" width="100%" height="100%" src="'.concat(s.placeholderImage,'" data-src="{image}" alt={payment} /><li>');s.sbcSlot=((t=s.host.querySelector('[slot="sbc"]'))===null||t===void 0?void 0:t.innerHTML)||'<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="'.concat(s.placeholderImage,'" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>');s.codSlot=((i=s.host.querySelector('[slot="cod"]'))===null||i===void 0?void 0:i.innerHTML)||'<li class="s-payments-list-item"> <img width="100%" height="100%" src="'.concat(s.placeholderImage,'" data-src={image} class="lazy" alt="COD"/><li>');s.payments=salla.config.get("store.settings.payments")}))};s.prototype.render=function(){var s=this;var a=!this.exclude.includes("made-in-ksa")&&salla.config.get("store.settings.made_in_ksa");var t=this.exclude.includes("sbc")?null:salla.config.get("store.settings.certificate.id");return h(Host,{key:"6c8a1fd050822882224ee1e419f6f6dbdbfaf12d",class:"s-payments-list-wrap"},h("ul",{key:"773195024ce6f616ad9b87091c8ddfd0e153f9ec",class:"s-payments-list"},a&&h("li",{key:"203bebb61c41ca108c0ec969661d5922db2ac378",class:"s-payments-list-item"},h("img",{key:"a687fac0d968f0485a0a59d1205a0f0db1f100f4",class:"lazy",width:"100%",height:"100%",decoding:"async",loading:"lazy","data-src":salla.url.cdn("images/made-in-ksa.svg",58,58),alt:"made in KSA certified"})),this.payments.map((function(a){return a=="cod"?h("div",{id:"cod-slot",innerHTML:s.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png",58,58))}):h("div",{id:"payment-slot",innerHTML:s.paymentSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/".concat(a,"_mini.png"),58,58)).replace(/\{payment\}/g,a)})})),t&&h("div",{key:"f571920327b81c48f502c1d6e497955978634c08",id:"sbc-slot",innerHTML:this.sbcSlot.replace(/\{image\}/g,salla.url.cdn("images/sbc.png",58,58)).replace(/\{link\}/g,"https://eauthenticate.saudibusiness.gov.sa/certificate-details/".concat(t))})))};s.prototype.componentDidLoad=function(){var s;(s=document.lazyLoadInstance)===null||s===void 0?void 0:s.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((function(s){s.addEventListener("load",(function(){s.setAttribute("width","100%");s.setAttribute("height","100%")}))}))};s.prototype.componentDidRender=function(){var s,a,t;this.host.querySelectorAll("#payment-slot").forEach((function(s){return s.replaceWith(s.firstChild)}));this.host.querySelectorAll("#sbc-slot").forEach((function(s){return s.replaceWith(s.firstChild)}));this.host.querySelectorAll("#cod-slot").forEach((function(s){return s.replaceWith(s.firstChild)}));(s=this.host.querySelector('[slot="payment"]'))===null||s===void 0?void 0:s.remove();(a=this.host.querySelector('[slot="sbc"]'))===null||a===void 0?void 0:a.remove();(t=this.host.querySelector('[slot="cod"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(s.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return s}();SallaPayments.style=sallaPaymentsCss;export{SallaPayments as salla_payments};
5
5
  //# sourceMappingURL=salla-payments.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,i,r){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function a(t){try{l(r.next(t))}catch(t){s(t)}}function c(t){try{l(r["throw"](t))}catch(t){s(t)}}function l(t){t.done?i(t.value):n(t.value).then(a,c)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(t){return function(e){return l([t,e])}}function l(c){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(r=1,n&&(s=c[0]&2?n["return"]:c[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;if(n=0,s)c=[c[0]&2,s.value];switch(c[0]){case 0:case 1:s=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;n=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){i.label=c[1];break}if(c[0]===6&&i.label<s[1]){i.label=s[1];s=c;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(c);break}if(s[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];n=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{r as registerInstance,c as createEvent,h,H as Host}from"./index-CuTX1FnY.js";import{a as arrowLeft}from"./arrow-left-BedNk7k1.js";var arrowRight='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var sallaPriceRangeCss=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";var SallaPriceRange=function(){function t(t){registerInstance(this,t);this.changed=createEvent(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var r=0;r<this.option.values.length;r+=i){this.filterValues.push(this.option.values.slice(r,r+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return h(Host,{key:"e257e65621d724438fd4fdd74cdec45596a81cd0"},this.filterValues.map((function(e,i){return h("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},h("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),h("span",{innerHTML:t.getPriceLabel(e)}))})),h("div",{key:"097faf8d72b3c441bc22041a5643f91f61bbdd40",class:"flex justify-center items-center"},h("div",{key:"6adaa2b16c015de4ab5e254d4a9be05bb65b7848",class:"relative max-w-xl w-full"},h("div",{key:"3667d98c1e0886fc31600d23dd5a41a18d5ff8d0",class:"s-price-range-inputs"},h("div",{key:"98fdc0fdc9632318daa4664d4798154a17fe700a",class:"s-price-range-relative"},h("div",{key:"addd7b56c1e2496dba50db7ec320f8f5ea129d42",class:"s-price-range-currency"}," ",salla.config.currency().symbol),h("input",{key:"d36e129fd777ccfe30cf8d974dd96cf82e64c805",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),h("div",{key:"b1fcc176d31d724c646291262e42c6a74e75f299",class:"s-price-range-gray-text"}," -"),h("div",{key:"93db8728b9f118be78549c6839a4d85d4664a3dc",class:"s-price-range-relative"},h("div",{key:"7b63ca0ffd946d34549768bf87876868842478a4",class:"s-price-range-currency"}," ",salla.config.currency().symbol),h("input",{key:"ba005f3834bc2179e1346cae746b7c734abaf0dd",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),h("salla-button",{key:"74283ca210bf2f85a4e5d7dde69372e55453a5a5",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},h("span",{key:"04600f026e465f96f98d54841e8c7bd7d1c849bd",innerHTML:this.isRTL?arrowLeft:arrowRight}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}();SallaPriceRange.style=sallaPriceRangeCss;export{SallaPriceRange as salla_price_range};
4
+ */import{r as registerInstance,c as createEvent,h,H as Host}from"./index-TfrZPiHM.js";import{a as arrowLeft}from"./arrow-left-BedNk7k1.js";var arrowRight='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var sallaPriceRangeCss=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";var SallaPriceRange=function(){function t(t){registerInstance(this,t);this.changed=createEvent(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var r=0;r<this.option.values.length;r+=i){this.filterValues.push(this.option.values.slice(r,r+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return h(Host,{key:"e257e65621d724438fd4fdd74cdec45596a81cd0"},this.filterValues.map((function(e,i){return h("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},h("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),h("span",{innerHTML:t.getPriceLabel(e)}))})),h("div",{key:"097faf8d72b3c441bc22041a5643f91f61bbdd40",class:"flex justify-center items-center"},h("div",{key:"6adaa2b16c015de4ab5e254d4a9be05bb65b7848",class:"relative max-w-xl w-full"},h("div",{key:"3667d98c1e0886fc31600d23dd5a41a18d5ff8d0",class:"s-price-range-inputs"},h("div",{key:"98fdc0fdc9632318daa4664d4798154a17fe700a",class:"s-price-range-relative"},h("div",{key:"addd7b56c1e2496dba50db7ec320f8f5ea129d42",class:"s-price-range-currency"}," ",salla.config.currency().symbol),h("input",{key:"d36e129fd777ccfe30cf8d974dd96cf82e64c805",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),h("div",{key:"b1fcc176d31d724c646291262e42c6a74e75f299",class:"s-price-range-gray-text"}," -"),h("div",{key:"93db8728b9f118be78549c6839a4d85d4664a3dc",class:"s-price-range-relative"},h("div",{key:"7b63ca0ffd946d34549768bf87876868842478a4",class:"s-price-range-currency"}," ",salla.config.currency().symbol),h("input",{key:"ba005f3834bc2179e1346cae746b7c734abaf0dd",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),h("salla-button",{key:"74283ca210bf2f85a4e5d7dde69372e55453a5a5",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},h("span",{key:"04600f026e465f96f98d54841e8c7bd7d1c849bd",innerHTML:this.isRTL?arrowLeft:arrowRight}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}();SallaPriceRange.style=sallaPriceRangeCss;export{SallaPriceRange as salla_price_range};
5
5
  //# sourceMappingURL=salla-price-range.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,n,i,o){function r(t){return t instanceof i?t:new i((function(n){n(t)}))}return new(i||(i=Promise))((function(i,e){function a(t){try{u(o.next(t))}catch(t){e(t)}}function s(t){try{u(o["throw"](t))}catch(t){e(t)}}function u(t){t.done?i(t.value):r(t.value).then(a,s)}u((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var i={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},o,r,e,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(n){return u([t,n])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(i=0)),i)try{if(o=1,r&&(e=s[0]&2?r["return"]:s[0]?r["throw"]||((e=r["return"])&&e.call(r),0):r.next)&&!(e=e.call(r,s[1])).done)return e;if(r=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(e=i.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){i.label=s[1];break}if(s[0]===6&&i.label<e[1]){i.label=e[1];e=s;break}if(e&&i.label<e[2]){i.label=e[2];i.ops.push(s);break}if(e[2])i.ops.pop();i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t];r=0}finally{o=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-CuTX1FnY.js";import{I as IconVerified}from"./check-uTyAzPSy.js";import{C as CameraIcon}from"./camera-C6jIkM-X.js";var DisplayType;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(DisplayType||(DisplayType={}));var Currency;(function(t){t["Sar"]="SAR"})(Currency||(Currency={}));var FileIcon='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var sallaProductOptionsCss="";var SallaProductOptions=function(){function t(t){var n=this;registerInstance(this,t);this.changed=createEvent(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=function(t,i,o){if(i==="custom"&&o==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:n.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();n.isCustomDonation=t.target.value==="custom";if(n.donationInput){if(t.target.value==="custom"){n.donationInput.value="";n.donationInput.focus()}else{n.donationInput.value=t.target.value}if(i==="custom"){return}salla.event.emit("product-options::donation-changed",{id:n.productId,price:t.target.value})}};this.hideLabel=function(t){if(t.type===DisplayType.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=function(t){if(!t.donation){return}var n=t.donation.target_amount<=t.donation.collected_amount;return h("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":n,"s-product-options-donation-expired":!n}},h("p",null,t.donation.target_message),h("span",{innerHTML:n?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((function(){n.outOfStockText=salla.lang.get("pages.products.out_of_stock");n.donationAmount=salla.lang.get("pages.products.donation_amount");n.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");n.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){return n.setOptionsData(t.data.options)}))}}t.prototype.setOptionsData=function(t){return __awaiter(this,void 0,void 0,(function(){var n,i,o;return __generator(this,(function(r){this.optionsData=t;o=this;(i=(n=this.optionsData[0])===null||n===void 0?void 0:n.details)===null||i===void 0?void 0:i.forEach((function(t){Object.entries(t.skus_availability||{}).filter((function(t){return!t[1]})).map((function(t){return o.outSkus.push(Number(t[0]))}))}));return[2]}))}))};t.prototype.getSelectedOptionsData=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(i){t={};n=this.host.getElementSallaData();n.forEach((function(n,i){if(i.startsWith("options[")){t[i.replace("options[","").replace("]","")]=n}}));return[2,t]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){t=this.host.querySelectorAll("[required]");n=true;for(i=0;i<t.length;i++){if("reportValidity"in t[i]&&!t[i].reportValidity()){n=false}}return[2,n]}))}))};t.prototype.hasOutOfStockOption=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var i=this;return __generator(this,(function(o){return[2,this.selectedOptions.some((function(t){return t.is_out}))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((n=this.selectedSkus)===null||n===void 0?void 0:n.every((function(t){return i.outSkus.includes(t)})))]}))}))};t.prototype.getSelectedOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedOptions]}))}))};t.prototype.getOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.optionsData.find((function(n){return n.id===t}))]}))}))};t.prototype.invalidHandler=function(t,n){var i=t.target.closest(".s-product-options-option");if(!i.classList.contains("s-product-options-option-error")){i.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){var o=this.host.querySelector(".s-product-options-option-error");if(o===i){this.scrollToElement(i)}}};t.prototype.scrollToElement=function(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.changedHandler=function(t,n,i){var o=this;if(i===void 0){i=true}var r={event:t,option:n,detail:null,productId:this.productId};if(n.details){var e=n.details.find((function(n){return Number(n.id)===Number(t.target.value)}));r.detail=e}if(n.type==="country"){this.handleCountryOptionChange(t,r.detail)}var a=t.target.closest(".s-product-options-option");if(t.target.value||(n.type===DisplayType.FILE||n.type===DisplayType.IMAGE)&&t.type==="added"||n.type===DisplayType.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((function(){a.classList.remove("s-product-options-option-error")}),200)}if(n.type===DisplayType.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(n);var s=this.selectedOptions.findIndex((function(t){return t.option_id===r.option.id}));if(r.option.type===DisplayType.MULTIPLE_OPTIONS){var u=this.selectedOptions.findIndex((function(t){var n;return t.option_id===r.option.id&&(t===null||t===void 0?void 0:t.id)===((n=r.detail)===null||n===void 0?void 0:n.id)}));if(u>-1){this.selectedOptions.splice(u,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}else{if(!r.detail||Object.keys(r.detail).length===0){if(s>-1){this.selectedOptions.splice(s,1)}}else{if(s>-1){this.selectedOptions[s]=Object.assign(Object.assign({},r.detail),{option_id:r.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}}this.optionsData=this.optionsData.map((function(t){if(t.id===r.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((function(t){var n,i;return Object.assign(Object.assign({},t),{is_selected:r.option.type===DisplayType.MULTIPLE_OPTIONS?o.selectedOptions.some((function(n){return n.id===t.id})):Number(t.id)===Number((n=r.detail)===null||n===void 0?void 0:n.id),value:(i=r.detail)===null||i===void 0?void 0:i.value})}))})}return t}));if(i){this.changed.emit(r);salla.event.emit("product-options::change",r)}};t.prototype.setSelectedSkus=function(){this.selectedSkus=this.selectedOptions.map((function(t){return Object.keys(t.skus_availability||{})})).reduce((function(t,n){return t.filter((function(t){return n.includes(t)}))}),[]).map((function(t){return Number(t)}))};t.prototype.handleRequiredMultipleOptions=function(t){if(t.type!==DisplayType.MULTIPLE_OPTIONS||!t.required){return}var n=this.host.querySelector('[data-option-id="'.concat(t.id,'"]'));var i=n.querySelectorAll("input:checked").length;n.querySelectorAll("input").forEach((function(t){return t.toggleAttribute("required",!i)}))};t.prototype.getLatLng=function(t,n){return t?t.split(",")[n==="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){var n=this;if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===DisplayType.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===DisplayType.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===DisplayType.SINGLE_OPTION){return this.singleOption(t)}if(t.type===DisplayType.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===DisplayType.COUNTRY){return this.countryOption(t)}if(t.type===DisplayType.BOOKING&&salla.url.is_page("cart")){return h("salla-booking-field",{onInvalidInput:function(i){return n.invalidHandler(i,t)},option:t,productId:t.value})}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.getAvailableDigitalCardSKUs=function(t){var n=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!n)throw new Error("product-options:: No digital card options found");var i=Object.keys(t.skus_availability).filter((function(n){return t.skus_availability[n]===false}));this.availableDigitalCardValues=n.details.filter((function(t){return!Object.keys(t.skus_availability).filter((function(t){return i.includes(t)})).length}))};t.prototype.handleCountryOptionChange=function(t,n){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;var i=this.host.querySelector("input[data-code-value]:checked");if(i)i.checked=false;var o=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!o)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(n)};t.prototype.getSelectedDigitalCardOptions=function(t){var n=t.details.find((function(t){return t.is_selected}));var i=t.details.find((function(t){return!!t.is_default}))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return n||i};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i,o;return __generator(this,(function(r){switch(r.label){case 0:if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}t=this.optionsData.filter((function(t){var n=t.type;return["country","digital-card-value"].includes(n)})).length>0&&salla.url.is_page("cart");if(t){n=this.optionsData.find((function(t){return t.type==="country"}));i=n&&this.getSelectedDigitalCardOptions(n);if(i){this.getAvailableDigitalCardSKUs(i)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return[4,salla.onReady()];case 1:r.sent();document.addEventListener("paste",this.handlePaste.bind(this));o=!salla.storage.get("cart.id")&&this.optionsData.some((function(t){return["file","image"].includes(t.type)}));return[2,o?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null]}}))}))};t.prototype.handlePaste=function(t){var n;var i=t.target;if(!Salla.config.get("store.settings.content_copyright")||!Salla.helpers.hasApplePay()||!(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)||!i.classList.contains("s-form-control")||!i.name.startsWith("options[")){return}t.preventDefault();var o=((n=t.clipboardData)===null||n===void 0?void 0:n.getData("text"))||"";var r=i.selectionStart;var e=i.selectionEnd;var a=i.value.slice(0,r)+o+i.value.slice(e);i.value=a;i.setSelectionRange(r+o.length,r+o.length)};t.prototype.hideDigitalCardsOptions=function(t){return this.disableCardValue&&t.type===DisplayType.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")};t.prototype.render=function(){var t=this;var n;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0){return}return h(Host,{class:"s-product-options-wrapper"},h("salla-conditional-fields",null,this.optionsData.map((function(n){return h("div",Object.assign({key:n.id,class:"s-product-options-option-container".concat(n.visibility_condition||t.hideDigitalCardsOptions(n)?" hidden":""),"data-option-id":n.id},t.getOptionShownWhen(n)),n.name==="splitter"?t.splitterOption():h("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":n.type===DisplayType.BOOKING&&salla.url.is_page("cart")},"data-option-type":n.type,"data-option-required":"".concat(n.required)},h("label",{htmlFor:"options[".concat(n.id,"]"),class:"s-product-options-option-label ".concat(t.hideLabel(n)?"s-product-options-option-label-hidden":"")},h("b",null,n.name,n.required&&h("span",null," * ")," "),h("small",null,n.placeholder)),h("div",{class:"s-product-options-option-content ".concat(t.hideLabel(n)||n.type===DisplayType.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":"")},t.getDisplayForType(n))))}))))};t.prototype.generateUniqueKey=function(t){return this.uniqueKey?"".concat(t,"-").concat(this.uniqueKey):t};t.prototype.fillSelectedOptions=function(){this.selectedOptions=this.optionsData.reduce((function(t,n){var i=n.details.filter((function(t){return t.is_selected}));var o=i.map((function(t){return Object.assign(Object.assign({},t),{option_id:n.id})}));return t.concat(o)}),[])};t.prototype.componentDidLoad=function(){var t=this;var n,i;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0&&!this.optionsData.some((function(t){return t.type===DisplayType.DONATION}))){return}var o=(i=this.optionsData.find((function(t){return t.type===DisplayType.DONATION})))===null||i===void 0?void 0:i.details.find((function(t){return t.is_selected}));if(!o){return}setTimeout((function(){salla.event.emit("product-options::donation-changed",{id:t.productId,price:o.additional_price})}),1e3)};t.prototype.donationOption=function(t,n){var i=this;var o,r;return h("div",{class:"s-product-options-donation-wrapper"},((o=t.donation)===null||o===void 0?void 0:o.can_donate)?[t.donation?h("div",{key:t.id,class:"s-product-options-donation-progress"},h("salla-progress-bar",{donation:t.donation})):"",t.details.length?[h("h4",{key:t.id},this.selectAmount),h("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map((function(n,o){return h("div",{key:t.id,class:"s-product-options-donation-options-item"},h("input",{id:i.generateUniqueKey("donation-option-".concat(o)),type:"radio",name:"donating_option",checked:n.is_selected,value:n.additional_price,onChange:function(t){return i.handleDonationOptions(t,n,"option")}}),h("label",{htmlFor:i.generateUniqueKey("donation-option-".concat(o))},h("span",{innerHTML:salla.money(n.name)})))})),((r=t.donation)===null||r===void 0?void 0:r.custom_amount_enabled)?h("div",{class:"s-product-options-donation-options-item"},h("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:function(t){return i.handleDonationOptions(t,"custom","option")}}),h("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},h("span",null," ",this.selectDonationAmount," "))):"")]:"",h("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},h("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:function(t){i.donationInput=t},value:t.details.length&&t.details.some((function(t){return t.is_selected}))?t.details.find((function(t){return t.is_selected})).additional_price:t.value,placeholder:t.placeholder,onInput:function(t){return i.handleDonationOptions(t,"custom","input")},onBlur:function(n){return i.changedHandler(n,t)},onInvalid:function(n){return i.invalidHandler(n,t)}}),h("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))};t.prototype.fileUploader=function(t,n){var i=this;if(n===void 0){n=null}var o;return h("salla-file-upload",Object.assign({},n||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,height:"120px",onAdded:function(n){return i.changedHandler(n,t)},url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:function(n){return i.invalidHandler(n,t)},class:{"s-product-options-image-input":true,required:t.required}}),h("div",{class:"s-product-options-filepond-placeholder"},h("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((o=n.accept)===null||o===void 0?void 0:o.split(",").every((function(t){return t.includes("image")})))?CameraIcon:FileIcon}),h("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),h("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var n=this;var i=t.details.map((function(t){return n.fileTypes[t.name]})).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var n=this;return h("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(i){return n.changedHandler(i,t)},onInvalid:function(i){return n.invalidHandler(i,t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return h("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var n=this;return h("div",{class:"s-product-options-text"},h("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}))};t.prototype.textareaOption=function(t){var n=this;return h("div",{class:"s-product-options-textarea"},h("div",{class:"mt-1"},h("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}})))};t.prototype.mapOption=function(t){var n=this;return h("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},onSelected:function(i){return n.changedHandler(i,t)}})};t.prototype.colorPickerOption=function(t){var n=this;return h("salla-color-picker",{onSubmitted:function(i){return n.changedHandler(i,t)},name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},color:t.value})};t.prototype.timeOption=function(t){var n=this;return h("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}})};t.prototype.dateOption=function(t){var n=this;return h("div",{class:"s-product-options-date-element"},h("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:"options[".concat(t.id,"]"),onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.datetimeOption=function(t){var n=this;return h("div",{class:"s-product-options-datetime-element"},h("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.getOptionDetailName=function(t,n,i){if(n===void 0){n=true}var o;var r;if(i&&i===DisplayType.COLOR){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" <br/> <p> ".concat(this.outOfStockText," </p>"):"")+(t.additional_price?" <p> (".concat(salla.money(t.additional_price,false),") </p>"):"")}if(!r){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price,false),")"):"")}return r.replace("<i class=sicon-sar></i>",((o=salla.config.currency())===null||o===void 0?void 0:o.symbol)||"ر.س")};t.prototype.isOptionDetailOut=function(t){var n=this;var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}var o=this.selectedOptions.filter((function(n){return n.id===t.id})).length;if(o&&this.selectedOptions.length===1){return false}if(o){var r=this.selectedSkus.filter((function(t){return n.outSkus.includes(t)}));return Object.keys(t.skus_availability).some((function(t){return r.includes(Number(t))}))}return this.selectedOptions.some((function(n){return n.is_out&&n.option_id!==t.option_id}))};t.prototype.renderInput=function(t,n,i,o,r,e){var a=this;var s=this.generateUniqueKey("".concat(t,"-").concat(i.id,"-").concat(n.id));var u=this.isOptionDetailOut(n);return h("label",{class:{"s-product-options-disabled":u}},h("input",{id:s,type:t,name:r,value:n.id,disabled:u,required:o,checked:n.is_selected,onInvalid:function(t){return a.invalidHandler(t,i)},onChange:function(t){return a.changedHandler(t,i)}}),h("div",{class:{"s-product-options-grid-mode-span":e,"s-product-options-disabled":u}},this.getOptionDetailName(n)))};t.prototype.renderOptionDetails=function(t,n,i,o){var r=this;if(o===void 0){o=false}var e=t==="radio"?"options[".concat(n.id,"]"):"options[".concat(n.id,"][]");return n===null||n===void 0?void 0:n.details.map((function(a){return r.renderInput(t,a,n,i,e,o)}))};t.prototype.renderSelect=function(t){var n=this;return h("div",null,h("select",{name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}},h("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return h("option",{key:t.id,value:t.id,disabled:n.canDisabled&&n.isOptionDetailOut(t),selected:t.is_selected},n.getOptionDetailName(t))}))))};t.prototype.renderButtonStyle=function(t,n,i){return h("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,n,i,true))};t.prototype.singleOption=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["single-option"])===null||i===void 0?void 0:i.type)==="button";var r=!t.visibility_condition&&t.required;return o?this.renderButtonStyle("radio",t,r):this.renderSelect(t)};t.prototype.multipleOptions=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["multiple-option"])===null||i===void 0?void 0:i.type)==="button";var r=t.required&&!t.details.some((function(t){return t.is_selected}))&&!t.visibility_condition;return o?this.renderButtonStyle("checkbox",t,r):h("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,r))};t.prototype.colorOption=function(t){var n=this;return h("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(i){return h("div",{class:"s-product-options-colors-item",key:i.id},h("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),h("label",{htmlFor:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id))},h("span",{style:{backgroundColor:i.color}}),h("div",{innerHTML:n.getOptionDetailName(i,true,t.type)})))})))};t.prototype.thumbnailOption=function(t){var n=this;return h("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(i){return h("div",{key:i.id},h("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":i.option_value,disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),h("label",{htmlFor:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),"data-img-id":i.option_value,class:"go-to-slide"},h("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),h("span",{innerHTML:IconVerified,class:"s-product-options-thumbnails-icon"}),n.isOptionDetailOut(i)?[h("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},n.outOfStockText),n.canDisabled?h("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),h("p",null,n.getOptionDetailName(i,false)," "))})))};t.prototype.digitalCardValuesOption=function(t){var n=this;return h("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((function(i){var o,r,e;var a=String(i.id);return h("label",{htmlFor:n.generateUniqueKey(a.toString()),key:a,class:"s-product-options-digital-card-option"},h("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),id:n.generateUniqueKey(a.toString()),required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)}},!n.ignoreDefaultCardValue?{defaultChecked:((o=n.getSelectedDigitalCardOptions(t))===null||o===void 0?void 0:o.id)===i.id}:{})),h("span",null,i.name," ",(e=(r=salla.config)===null||r===void 0?void 0:r.currency())===null||e===void 0?void 0:e.symbol))})):h("div",{class:"s-product-options-digital-card-out-of-stock"}))};t.prototype.countryOption=function(t){var n=this;return h("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((function(i){var o;return h("label",{htmlFor:n.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},h("input",Object.assign({id:n.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)},onClick:function(){n.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((o=n.getSelectedDigitalCardOptions(t))===null||o===void 0?void 0:o.id)===i.id}:{})),h("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:"https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/".concat(String(i.code).toLocaleLowerCase(),".svg")}),h("span",null,i.name))})))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaProductOptions.style=sallaProductOptionsCss;export{SallaProductOptions as salla_product_options};
4
+ */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-TfrZPiHM.js";import{I as IconVerified}from"./check-uTyAzPSy.js";import{C as CameraIcon}from"./camera-C6jIkM-X.js";var DisplayType;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(DisplayType||(DisplayType={}));var Currency;(function(t){t["Sar"]="SAR"})(Currency||(Currency={}));var FileIcon='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var sallaProductOptionsCss="";var SallaProductOptions=function(){function t(t){var n=this;registerInstance(this,t);this.changed=createEvent(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=function(t,i,o){if(i==="custom"&&o==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:n.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();n.isCustomDonation=t.target.value==="custom";if(n.donationInput){if(t.target.value==="custom"){n.donationInput.value="";n.donationInput.focus()}else{n.donationInput.value=t.target.value}if(i==="custom"){return}salla.event.emit("product-options::donation-changed",{id:n.productId,price:t.target.value})}};this.hideLabel=function(t){if(t.type===DisplayType.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=function(t){if(!t.donation){return}var n=t.donation.target_amount<=t.donation.collected_amount;return h("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":n,"s-product-options-donation-expired":!n}},h("p",null,t.donation.target_message),h("span",{innerHTML:n?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((function(){n.outOfStockText=salla.lang.get("pages.products.out_of_stock");n.donationAmount=salla.lang.get("pages.products.donation_amount");n.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");n.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){return n.setOptionsData(t.data.options)}))}}t.prototype.setOptionsData=function(t){return __awaiter(this,void 0,void 0,(function(){var n,i,o;return __generator(this,(function(r){this.optionsData=t;o=this;(i=(n=this.optionsData[0])===null||n===void 0?void 0:n.details)===null||i===void 0?void 0:i.forEach((function(t){Object.entries(t.skus_availability||{}).filter((function(t){return!t[1]})).map((function(t){return o.outSkus.push(Number(t[0]))}))}));return[2]}))}))};t.prototype.getSelectedOptionsData=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(i){t={};n=this.host.getElementSallaData();n.forEach((function(n,i){if(i.startsWith("options[")){t[i.replace("options[","").replace("]","")]=n}}));return[2,t]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){t=this.host.querySelectorAll("[required]");n=true;for(i=0;i<t.length;i++){if("reportValidity"in t[i]&&!t[i].reportValidity()){n=false}}return[2,n]}))}))};t.prototype.hasOutOfStockOption=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var i=this;return __generator(this,(function(o){return[2,this.selectedOptions.some((function(t){return t.is_out}))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((n=this.selectedSkus)===null||n===void 0?void 0:n.every((function(t){return i.outSkus.includes(t)})))]}))}))};t.prototype.getSelectedOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedOptions]}))}))};t.prototype.getOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.optionsData.find((function(n){return n.id===t}))]}))}))};t.prototype.invalidHandler=function(t,n){var i=t.target.closest(".s-product-options-option");if(!i.classList.contains("s-product-options-option-error")){i.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){var o=this.host.querySelector(".s-product-options-option-error");if(o===i){this.scrollToElement(i)}}};t.prototype.scrollToElement=function(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.changedHandler=function(t,n,i){var o=this;if(i===void 0){i=true}var r={event:t,option:n,detail:null,productId:this.productId};if(n.details){var e=n.details.find((function(n){return Number(n.id)===Number(t.target.value)}));r.detail=e}if(n.type==="country"){this.handleCountryOptionChange(t,r.detail)}var a=t.target.closest(".s-product-options-option");if(t.target.value||(n.type===DisplayType.FILE||n.type===DisplayType.IMAGE)&&t.type==="added"||n.type===DisplayType.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((function(){a.classList.remove("s-product-options-option-error")}),200)}if(n.type===DisplayType.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(n);var s=this.selectedOptions.findIndex((function(t){return t.option_id===r.option.id}));if(r.option.type===DisplayType.MULTIPLE_OPTIONS){var u=this.selectedOptions.findIndex((function(t){var n;return t.option_id===r.option.id&&(t===null||t===void 0?void 0:t.id)===((n=r.detail)===null||n===void 0?void 0:n.id)}));if(u>-1){this.selectedOptions.splice(u,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}else{if(!r.detail||Object.keys(r.detail).length===0){if(s>-1){this.selectedOptions.splice(s,1)}}else{if(s>-1){this.selectedOptions[s]=Object.assign(Object.assign({},r.detail),{option_id:r.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}}this.optionsData=this.optionsData.map((function(t){if(t.id===r.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((function(t){var n,i;return Object.assign(Object.assign({},t),{is_selected:r.option.type===DisplayType.MULTIPLE_OPTIONS?o.selectedOptions.some((function(n){return n.id===t.id})):Number(t.id)===Number((n=r.detail)===null||n===void 0?void 0:n.id),value:(i=r.detail)===null||i===void 0?void 0:i.value})}))})}return t}));if(i){this.changed.emit(r);salla.event.emit("product-options::change",r)}};t.prototype.setSelectedSkus=function(){this.selectedSkus=this.selectedOptions.map((function(t){return Object.keys(t.skus_availability||{})})).reduce((function(t,n){return t.filter((function(t){return n.includes(t)}))}),[]).map((function(t){return Number(t)}))};t.prototype.handleRequiredMultipleOptions=function(t){if(t.type!==DisplayType.MULTIPLE_OPTIONS||!t.required){return}var n=this.host.querySelector('[data-option-id="'.concat(t.id,'"]'));var i=n.querySelectorAll("input:checked").length;n.querySelectorAll("input").forEach((function(t){return t.toggleAttribute("required",!i)}))};t.prototype.getLatLng=function(t,n){return t?t.split(",")[n==="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){var n=this;if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===DisplayType.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===DisplayType.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===DisplayType.SINGLE_OPTION){return this.singleOption(t)}if(t.type===DisplayType.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===DisplayType.COUNTRY){return this.countryOption(t)}if(t.type===DisplayType.BOOKING&&salla.url.is_page("cart")){return h("salla-booking-field",{onInvalidInput:function(i){return n.invalidHandler(i,t)},option:t,productId:t.value})}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.getAvailableDigitalCardSKUs=function(t){var n=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!n)throw new Error("product-options:: No digital card options found");var i=Object.keys(t.skus_availability).filter((function(n){return t.skus_availability[n]===false}));this.availableDigitalCardValues=n.details.filter((function(t){return!Object.keys(t.skus_availability).filter((function(t){return i.includes(t)})).length}))};t.prototype.handleCountryOptionChange=function(t,n){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;var i=this.host.querySelector("input[data-code-value]:checked");if(i)i.checked=false;var o=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!o)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(n)};t.prototype.getSelectedDigitalCardOptions=function(t){var n=t.details.find((function(t){return t.is_selected}));var i=t.details.find((function(t){return!!t.is_default}))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return n||i};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i,o;return __generator(this,(function(r){switch(r.label){case 0:if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}t=this.optionsData.filter((function(t){var n=t.type;return["country","digital-card-value"].includes(n)})).length>0&&salla.url.is_page("cart");if(t){n=this.optionsData.find((function(t){return t.type==="country"}));i=n&&this.getSelectedDigitalCardOptions(n);if(i){this.getAvailableDigitalCardSKUs(i)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return[4,salla.onReady()];case 1:r.sent();document.addEventListener("paste",this.handlePaste.bind(this));o=!salla.storage.get("cart.id")&&this.optionsData.some((function(t){return["file","image"].includes(t.type)}));return[2,o?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null]}}))}))};t.prototype.handlePaste=function(t){var n;var i=t.target;if(!Salla.config.get("store.settings.content_copyright")||!Salla.helpers.hasApplePay()||!(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)||!i.classList.contains("s-form-control")||!i.name.startsWith("options[")){return}t.preventDefault();var o=((n=t.clipboardData)===null||n===void 0?void 0:n.getData("text"))||"";var r=i.selectionStart;var e=i.selectionEnd;var a=i.value.slice(0,r)+o+i.value.slice(e);i.value=a;i.setSelectionRange(r+o.length,r+o.length)};t.prototype.hideDigitalCardsOptions=function(t){return this.disableCardValue&&t.type===DisplayType.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")};t.prototype.render=function(){var t=this;var n;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0){return}return h(Host,{class:"s-product-options-wrapper"},h("salla-conditional-fields",null,this.optionsData.map((function(n){return h("div",Object.assign({key:n.id,class:"s-product-options-option-container".concat(n.visibility_condition||t.hideDigitalCardsOptions(n)?" hidden":""),"data-option-id":n.id},t.getOptionShownWhen(n)),n.name==="splitter"?t.splitterOption():h("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":n.type===DisplayType.BOOKING&&salla.url.is_page("cart")},"data-option-type":n.type,"data-option-required":"".concat(n.required)},h("label",{htmlFor:"options[".concat(n.id,"]"),class:"s-product-options-option-label ".concat(t.hideLabel(n)?"s-product-options-option-label-hidden":"")},h("b",null,n.name,n.required&&h("span",null," * ")," "),h("small",null,n.placeholder)),h("div",{class:"s-product-options-option-content ".concat(t.hideLabel(n)||n.type===DisplayType.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":"")},t.getDisplayForType(n))))}))))};t.prototype.generateUniqueKey=function(t){return this.uniqueKey?"".concat(t,"-").concat(this.uniqueKey):t};t.prototype.fillSelectedOptions=function(){this.selectedOptions=this.optionsData.reduce((function(t,n){var i=n.details.filter((function(t){return t.is_selected}));var o=i.map((function(t){return Object.assign(Object.assign({},t),{option_id:n.id})}));return t.concat(o)}),[])};t.prototype.componentDidLoad=function(){var t=this;var n,i;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0&&!this.optionsData.some((function(t){return t.type===DisplayType.DONATION}))){return}var o=(i=this.optionsData.find((function(t){return t.type===DisplayType.DONATION})))===null||i===void 0?void 0:i.details.find((function(t){return t.is_selected}));if(!o){return}setTimeout((function(){salla.event.emit("product-options::donation-changed",{id:t.productId,price:o.additional_price})}),1e3)};t.prototype.donationOption=function(t,n){var i=this;var o,r;return h("div",{class:"s-product-options-donation-wrapper"},((o=t.donation)===null||o===void 0?void 0:o.can_donate)?[t.donation?h("div",{key:t.id,class:"s-product-options-donation-progress"},h("salla-progress-bar",{donation:t.donation})):"",t.details.length?[h("h4",{key:t.id},this.selectAmount),h("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map((function(n,o){return h("div",{key:t.id,class:"s-product-options-donation-options-item"},h("input",{id:i.generateUniqueKey("donation-option-".concat(o)),type:"radio",name:"donating_option",checked:n.is_selected,value:n.additional_price,onChange:function(t){return i.handleDonationOptions(t,n,"option")}}),h("label",{htmlFor:i.generateUniqueKey("donation-option-".concat(o))},h("span",{innerHTML:salla.money(n.name)})))})),((r=t.donation)===null||r===void 0?void 0:r.custom_amount_enabled)?h("div",{class:"s-product-options-donation-options-item"},h("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:function(t){return i.handleDonationOptions(t,"custom","option")}}),h("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},h("span",null," ",this.selectDonationAmount," "))):"")]:"",h("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},h("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:function(t){i.donationInput=t},value:t.details.length&&t.details.some((function(t){return t.is_selected}))?t.details.find((function(t){return t.is_selected})).additional_price:t.value,placeholder:t.placeholder,onInput:function(t){return i.handleDonationOptions(t,"custom","input")},onBlur:function(n){return i.changedHandler(n,t)},onInvalid:function(n){return i.invalidHandler(n,t)}}),h("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))};t.prototype.fileUploader=function(t,n){var i=this;if(n===void 0){n=null}var o;return h("salla-file-upload",Object.assign({},n||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,height:"120px",onAdded:function(n){return i.changedHandler(n,t)},url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:function(n){return i.invalidHandler(n,t)},class:{"s-product-options-image-input":true,required:t.required}}),h("div",{class:"s-product-options-filepond-placeholder"},h("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((o=n.accept)===null||o===void 0?void 0:o.split(",").every((function(t){return t.includes("image")})))?CameraIcon:FileIcon}),h("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),h("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var n=this;var i=t.details.map((function(t){return n.fileTypes[t.name]})).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var n=this;return h("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(i){return n.changedHandler(i,t)},onInvalid:function(i){return n.invalidHandler(i,t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return h("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var n=this;return h("div",{class:"s-product-options-text"},h("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}))};t.prototype.textareaOption=function(t){var n=this;return h("div",{class:"s-product-options-textarea"},h("div",{class:"mt-1"},h("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}})))};t.prototype.mapOption=function(t){var n=this;return h("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},onSelected:function(i){return n.changedHandler(i,t)}})};t.prototype.colorPickerOption=function(t){var n=this;return h("salla-color-picker",{onSubmitted:function(i){return n.changedHandler(i,t)},name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},color:t.value})};t.prototype.timeOption=function(t){var n=this;return h("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}})};t.prototype.dateOption=function(t){var n=this;return h("div",{class:"s-product-options-date-element"},h("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:"options[".concat(t.id,"]"),onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.datetimeOption=function(t){var n=this;return h("div",{class:"s-product-options-datetime-element"},h("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.getOptionDetailName=function(t,n,i){if(n===void 0){n=true}var o;var r;if(i&&i===DisplayType.COLOR){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" <br/> <p> ".concat(this.outOfStockText," </p>"):"")+(t.additional_price?" <p> (".concat(salla.money(t.additional_price,false),") </p>"):"")}if(!r){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price,false),")"):"")}return r.replace("<i class=sicon-sar></i>",((o=salla.config.currency())===null||o===void 0?void 0:o.symbol)||"ر.س")};t.prototype.isOptionDetailOut=function(t){var n=this;var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}var o=this.selectedOptions.filter((function(n){return n.id===t.id})).length;if(o&&this.selectedOptions.length===1){return false}if(o){var r=this.selectedSkus.filter((function(t){return n.outSkus.includes(t)}));return Object.keys(t.skus_availability).some((function(t){return r.includes(Number(t))}))}return this.selectedOptions.some((function(n){return n.is_out&&n.option_id!==t.option_id}))};t.prototype.renderInput=function(t,n,i,o,r,e){var a=this;var s=this.generateUniqueKey("".concat(t,"-").concat(i.id,"-").concat(n.id));var u=this.isOptionDetailOut(n);return h("label",{class:{"s-product-options-disabled":u}},h("input",{id:s,type:t,name:r,value:n.id,disabled:u,required:o,checked:n.is_selected,onInvalid:function(t){return a.invalidHandler(t,i)},onChange:function(t){return a.changedHandler(t,i)}}),h("div",{class:{"s-product-options-grid-mode-span":e,"s-product-options-disabled":u}},this.getOptionDetailName(n)))};t.prototype.renderOptionDetails=function(t,n,i,o){var r=this;if(o===void 0){o=false}var e=t==="radio"?"options[".concat(n.id,"]"):"options[".concat(n.id,"][]");return n===null||n===void 0?void 0:n.details.map((function(a){return r.renderInput(t,a,n,i,e,o)}))};t.prototype.renderSelect=function(t){var n=this;return h("div",null,h("select",{name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}},h("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return h("option",{key:t.id,value:t.id,disabled:n.canDisabled&&n.isOptionDetailOut(t),selected:t.is_selected},n.getOptionDetailName(t))}))))};t.prototype.renderButtonStyle=function(t,n,i){return h("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,n,i,true))};t.prototype.singleOption=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["single-option"])===null||i===void 0?void 0:i.type)==="button";var r=!t.visibility_condition&&t.required;return o?this.renderButtonStyle("radio",t,r):this.renderSelect(t)};t.prototype.multipleOptions=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["multiple-option"])===null||i===void 0?void 0:i.type)==="button";var r=t.required&&!t.details.some((function(t){return t.is_selected}))&&!t.visibility_condition;return o?this.renderButtonStyle("checkbox",t,r):h("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,r))};t.prototype.colorOption=function(t){var n=this;return h("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(i){return h("div",{class:"s-product-options-colors-item",key:i.id},h("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),h("label",{htmlFor:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id))},h("span",{style:{backgroundColor:i.color}}),h("div",{innerHTML:n.getOptionDetailName(i,true,t.type)})))})))};t.prototype.thumbnailOption=function(t){var n=this;return h("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(i){return h("div",{key:i.id},h("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":i.option_value,disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),h("label",{htmlFor:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),"data-img-id":i.option_value,class:"go-to-slide"},h("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),h("span",{innerHTML:IconVerified,class:"s-product-options-thumbnails-icon"}),n.isOptionDetailOut(i)?[h("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},n.outOfStockText),n.canDisabled?h("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),h("p",null,n.getOptionDetailName(i,false)," "))})))};t.prototype.digitalCardValuesOption=function(t){var n=this;return h("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((function(i){var o,r,e;var a=String(i.id);return h("label",{htmlFor:n.generateUniqueKey(a.toString()),key:a,class:"s-product-options-digital-card-option"},h("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),id:n.generateUniqueKey(a.toString()),required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)}},!n.ignoreDefaultCardValue?{defaultChecked:((o=n.getSelectedDigitalCardOptions(t))===null||o===void 0?void 0:o.id)===i.id}:{})),h("span",null,i.name," ",(e=(r=salla.config)===null||r===void 0?void 0:r.currency())===null||e===void 0?void 0:e.symbol))})):h("div",{class:"s-product-options-digital-card-out-of-stock"}))};t.prototype.countryOption=function(t){var n=this;return h("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((function(i){var o;return h("label",{htmlFor:n.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},h("input",Object.assign({id:n.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)},onClick:function(){n.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((o=n.getSelectedDigitalCardOptions(t))===null||o===void 0?void 0:o.id)===i.id}:{})),h("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:"https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/".concat(String(i.code).toLocaleLowerCase(),".svg")}),h("span",null,i.name))})))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaProductOptions.style=sallaProductOptionsCss;export{SallaProductOptions as salla_product_options};
5
5
  //# sourceMappingURL=salla-product-options.entry.js.map
@@ -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-CuTX1FnY.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-TfrZPiHM.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-CuTX1FnY.js";import{S as ShoppingBag}from"./shopping-bag-DiKTtDW5.js";import{H as Helper}from"./Helper-CeeYyNjR.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,g=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;g="trailing"in u?!!u.trailing:g}function _(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?_(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(g&&l){return _(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 _(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-TfrZPiHM.js";import{S as ShoppingBag}from"./shopping-bag-DiKTtDW5.js";import{H as Helper}from"./Helper-CeeYyNjR.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,g=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;g="trailing"in u?!!u.trailing:g}function _(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?_(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(g&&l){return _(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 _(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
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as registerInstance,h}from"./index-CuTX1FnY.js";import{a as arrowLeft}from"./arrow-left-BedNk7k1.js";import{H as Helper}from"./Helper-CeeYyNjR.js";import"./anime.es-CgtvEd63.js";var IconQuoteOpen='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n';var sallaReviewsCss="";var SallaReviews=function(){function s(s){var e=this;registerInstance(this,s);this.limit=5;this.type="store";this.sort="latest";this.hideCustomerInfo=false;this.reviews=[];this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.displayAllURL=null;this.source=this.source;salla.onReady((function(){e.displayAllURL=salla.url.get("testimonials");e.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((function(){e.testimonialText=salla.lang.get("blocks.home.testimonials");e.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}s.prototype.fetchReviews=function(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}var s=["products","categories"].includes(this.source);var e={limit:this.limit,source:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue,sort:this.sort,type:this.type,hide_customer_info:this.hideCustomerInfo?1:0};return salla.api.request("reviews",{params:e},"get")};s.prototype.componentWillLoad=function(){var s=this;return new Promise((function(s){return salla.onReady(s)})).then((function(){return s.fetchReviews()})).then((function(s){return s.data||[]})).then((function(e){if(e.length){s.reviews=e;s.showReviews=true;Helper.generateReviewSchema(s.reviews)}}))};s.prototype.render=function(){return h("div",{key:"0ea9cab5b1f9d4d2b6b74cec987f24c858191217",class:"s-reviews-container"},h("div",{key:"6f17c3033b419b2eaf01f6dc858a4b7ce23bd2c4",class:"s-reviews-header-wrapper"},h("h1",{key:"1e043cca8a56542a297449e3ff5d3e52c93e0997",class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?h("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,h("span",{class:"s-reviews-display-all-icon",innerHTML:arrowLeft})):null),h("salla-slider",{key:"b5aee5d359c8604a5570991f2a7801b651d8321d",centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:"testimonials-".concat(this.source,"-slider")},h("div",{key:"98428b4fde7a2c81567d387c93a9b87ef3245923",slot:"items"},this.reviews.map((function(s,e){return h("div",{key:e,class:"s-reviews-swiper-slide"},h("div",{class:"s-reviews-testimonial"},h("div",{class:"s-reviews-testimonial__inner"},h("div",{class:"s-reviews-testimonial__avatar"},h("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),h("div",{class:"s-reviews-testimonial__text"},h("p",{innerHTML:s.content}),h("div",{class:"s-reviews-testimonial__name_wrapper"},h("div",{class:"s-reviews-testimonial__info"},s.name&&h("h2",null,"".concat(s.name))),h("div",{class:"s-reviews-testimonial__rating"},h("salla-rating-stars",{size:"small",value:s.stars})))),h("span",{class:"s-reviews-testimonial__icon",innerHTML:IconQuoteOpen}))))})))))};return s}();SallaReviews.style=sallaReviewsCss;export{SallaReviews as salla_reviews};
4
+ import{r as registerInstance,h}from"./index-TfrZPiHM.js";import{a as arrowLeft}from"./arrow-left-BedNk7k1.js";import{H as Helper}from"./Helper-CeeYyNjR.js";import"./anime.es-CgtvEd63.js";var IconQuoteOpen='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n';var sallaReviewsCss="";var SallaReviews=function(){function s(s){var e=this;registerInstance(this,s);this.limit=5;this.type="store";this.sort="latest";this.hideCustomerInfo=false;this.reviews=[];this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.displayAllURL=null;this.source=this.source;salla.onReady((function(){e.displayAllURL=salla.url.get("testimonials");e.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((function(){e.testimonialText=salla.lang.get("blocks.home.testimonials");e.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}s.prototype.fetchReviews=function(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}var s=["products","categories"].includes(this.source);var e={limit:this.limit,source:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue,sort:this.sort,type:this.type,hide_customer_info:this.hideCustomerInfo?1:0};return salla.api.request("reviews",{params:e},"get")};s.prototype.componentWillLoad=function(){var s=this;return new Promise((function(s){return salla.onReady(s)})).then((function(){return s.fetchReviews()})).then((function(s){return s.data||[]})).then((function(e){if(e.length){s.reviews=e;s.showReviews=true;Helper.generateReviewSchema(s.reviews)}}))};s.prototype.render=function(){return h("div",{key:"0ea9cab5b1f9d4d2b6b74cec987f24c858191217",class:"s-reviews-container"},h("div",{key:"6f17c3033b419b2eaf01f6dc858a4b7ce23bd2c4",class:"s-reviews-header-wrapper"},h("h1",{key:"1e043cca8a56542a297449e3ff5d3e52c93e0997",class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?h("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,h("span",{class:"s-reviews-display-all-icon",innerHTML:arrowLeft})):null),h("salla-slider",{key:"b5aee5d359c8604a5570991f2a7801b651d8321d",centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:"testimonials-".concat(this.source,"-slider")},h("div",{key:"98428b4fde7a2c81567d387c93a9b87ef3245923",slot:"items"},this.reviews.map((function(s,e){return h("div",{key:e,class:"s-reviews-swiper-slide"},h("div",{class:"s-reviews-testimonial"},h("div",{class:"s-reviews-testimonial__inner"},h("div",{class:"s-reviews-testimonial__avatar"},h("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),h("div",{class:"s-reviews-testimonial__text"},h("p",{innerHTML:s.content}),h("div",{class:"s-reviews-testimonial__name_wrapper"},h("div",{class:"s-reviews-testimonial__info"},s.name&&h("h2",null,"".concat(s.name))),h("div",{class:"s-reviews-testimonial__rating"},h("salla-rating-stars",{size:"small",value:s.stars})))),h("span",{class:"s-reviews-testimonial__icon",innerHTML:IconQuoteOpen}))))})))))};return s}();SallaReviews.style=sallaReviewsCss;export{SallaReviews as salla_reviews};
5
5
  //# sourceMappingURL=salla-reviews.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-CuTX1FnY.js";import{f as facebook,t as twitter}from"./twitter-Dz7o69vX.js";var instagram='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n';var youtube='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var snapchat='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var tiktok='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var sallaSocialCss=":host{display:block}";var SallaSocial=function(){function c(c){var l=this;registerInstance(this,c);var t;this.links=salla.config.get("store.social");this.iconsList={instagram:instagram,twitter:twitter,facebook:facebook,youtube:youtube,snapchat:snapchat,tiktok:tiktok};this.socialSlot=((t=this.host.querySelector('[slot="social-item"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){l.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return h(Host,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},h("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return h("li",{class:"s-social-link"},h("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return c}();SallaSocial.style=sallaSocialCss;export{SallaSocial as salla_social};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-TfrZPiHM.js";import{f as facebook,t as twitter}from"./twitter-Dz7o69vX.js";var instagram='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n';var youtube='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var snapchat='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var tiktok='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var sallaSocialCss=":host{display:block}";var SallaSocial=function(){function c(c){var l=this;registerInstance(this,c);var t;this.links=salla.config.get("store.social");this.iconsList={instagram:instagram,twitter:twitter,facebook:facebook,youtube:youtube,snapchat:snapchat,tiktok:tiktok};this.socialSlot=((t=this.host.querySelector('[slot="social-item"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){l.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return h(Host,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},h("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return h("li",{class:"s-social-link"},h("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return c}();SallaSocial.style=sallaSocialCss;export{SallaSocial as salla_social};
5
5
  //# sourceMappingURL=salla-social.entry.js.map