@salla.sa/twilight-components 2.14.549 → 2.14.550

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 (341) hide show
  1. package/dist/cjs/{Helper-6RI07gZo.js → Helper-D1YsoJud.js} +46 -0
  2. package/dist/cjs/{filepond-COUccQWv.js → filepond-B-8syvXC.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-B_yyvbJ6.js → filepond-plugin-file-poster-DxfU_d7d.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-KDZtJpSs.js → filepond-plugin-file-validate-size-C0XIW0bl.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-Dbm_-1V2.js → filepond-plugin-file-validate-type-BHyBHLOg.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-C-q8yFXi.js → filepond-plugin-image-edit-Dnni9gl-.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-C2Q2chpj.js → filepond-plugin-image-exif-orientation-C7pHXy9M.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-DVK8eIMv.js → filepond-plugin-image-preview-CFttWV9E.js} +1 -1
  9. package/dist/cjs/{index-CSq9uCjw.js → index-CHvvKGJc.js} +6 -2
  10. package/dist/cjs/{intlTelInput-NQOLNYxO.js → intlTelInput--yv-lZaU.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-applied-filters.cjs.entry.js +175 -0
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  21. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +10 -11
  38. package/dist/cjs/salla-filters.cjs.entry.js +14 -79
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  77. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
  83. package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
  86. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  87. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  91. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  105. package/dist/cjs/twilight.cjs.js +2 -2
  106. package/dist/cjs/{vanilla-picker-My41190Y.js → vanilla-picker-D-X0hQ7w.js} +1 -1
  107. package/dist/collection/Helpers/Helper.js +28 -0
  108. package/dist/collection/collection-manifest.json +1 -0
  109. package/dist/collection/components/salla-applied-filters/salla-applied-filters.css +115 -0
  110. package/dist/collection/components/salla-applied-filters/salla-applied-filters.js +185 -0
  111. package/dist/collection/components/salla-filters/salla-filters.css +0 -119
  112. package/dist/collection/components/salla-filters/salla-filters.js +27 -73
  113. package/dist/components/Helper.js +47 -1
  114. package/dist/components/index.js +2 -2
  115. package/dist/components/salla-applied-filters.d.ts +11 -0
  116. package/dist/components/salla-applied-filters.js +195 -0
  117. package/dist/components/salla-filters-widget2.js +2 -21
  118. package/dist/components/salla-filters.js +10 -76
  119. package/dist/esm/{Helper-CBmYxrzX.js → Helper-DsjZ6kte.js} +47 -1
  120. package/dist/esm/{filepond-plugin-file-poster-C4_NyGjO.js → filepond-plugin-file-poster-bfSOezL4.js} +1 -1
  121. package/dist/esm/{filepond-plugin-file-validate-size-DVV7mZ-K.js → filepond-plugin-file-validate-size-DagZiT3e.js} +1 -1
  122. package/dist/esm/{filepond-plugin-file-validate-type-DT1IX9KM.js → filepond-plugin-file-validate-type-Cf4JwDq-.js} +1 -1
  123. package/dist/esm/{filepond-plugin-image-edit-RrqhOPfq.js → filepond-plugin-image-edit-DWZ8nbdr.js} +1 -1
  124. package/dist/esm/{filepond-plugin-image-exif-orientation-Dc9_Qlva.js → filepond-plugin-image-exif-orientation-NHp2unXf.js} +1 -1
  125. package/dist/esm/{filepond-plugin-image-preview-Iu7ULzAy.js → filepond-plugin-image-preview-BSi_AIFs.js} +1 -1
  126. package/dist/esm/{filepond-CA4TWKuz.js → filepond-rGVsy4ep.js} +1 -1
  127. package/dist/esm/{index-C0qiFNJn.js → index-Bf2Z6A1M.js} +6 -2
  128. package/dist/esm/{intlTelInput-CrkMI_sC.js → intlTelInput-DLtsxnoY.js} +1 -1
  129. package/dist/esm/loader.js +3 -3
  130. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  131. package/dist/esm/salla-accordion_6.entry.js +2 -2
  132. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  133. package/dist/esm/salla-advertisement.entry.js +1 -1
  134. package/dist/esm/salla-alert_2.entry.js +1 -1
  135. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  136. package/dist/esm/salla-applied-filters.entry.js +173 -0
  137. package/dist/esm/salla-apps-icons.entry.js +1 -1
  138. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  139. package/dist/esm/salla-badge.entry.js +1 -1
  140. package/dist/esm/salla-basket-gap.entry.js +1 -1
  141. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  142. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  143. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  144. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  145. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  146. package/dist/esm/salla-comment-factors.entry.js +1 -1
  147. package/dist/esm/salla-comment-form_9.entry.js +2 -2
  148. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  149. package/dist/esm/salla-contacts.entry.js +1 -1
  150. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  151. package/dist/esm/salla-count-down.entry.js +1 -1
  152. package/dist/esm/salla-custom-fields.entry.js +1 -1
  153. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  154. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  155. package/dist/esm/salla-filters-widget.entry.js +2 -3
  156. package/dist/esm/salla-filters.entry.js +8 -73
  157. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  158. package/dist/esm/salla-gifting.entry.js +1 -1
  159. package/dist/esm/salla-hook.entry.js +1 -1
  160. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  161. package/dist/esm/salla-installment.entry.js +1 -1
  162. package/dist/esm/salla-list-tile.entry.js +1 -1
  163. package/dist/esm/salla-localization-modal.entry.js +1 -1
  164. package/dist/esm/salla-login-modal.entry.js +1 -1
  165. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  166. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  167. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  168. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  169. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  170. package/dist/esm/salla-loyalty.entry.js +1 -1
  171. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  172. package/dist/esm/salla-map_2.entry.js +1 -1
  173. package/dist/esm/salla-menu.entry.js +1 -1
  174. package/dist/esm/salla-metadata.entry.js +1 -1
  175. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  176. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  177. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  178. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  179. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  180. package/dist/esm/salla-offer-modal.entry.js +1 -1
  181. package/dist/esm/salla-offer.entry.js +1 -1
  182. package/dist/esm/salla-order-branch.entry.js +1 -1
  183. package/dist/esm/salla-order-cancel.entry.js +1 -1
  184. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  185. package/dist/esm/salla-order-details-options.entry.js +1 -1
  186. package/dist/esm/salla-order-details.entry.js +1 -1
  187. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  188. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  189. package/dist/esm/salla-order-edit.entry.js +1 -1
  190. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  191. package/dist/esm/salla-order-shipments.entry.js +1 -1
  192. package/dist/esm/salla-order-summary.entry.js +1 -1
  193. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  194. package/dist/esm/salla-orders.entry.js +2 -2
  195. package/dist/esm/salla-payments.entry.js +1 -1
  196. package/dist/esm/salla-placeholder.entry.js +1 -1
  197. package/dist/esm/salla-price-range.entry.js +1 -1
  198. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  199. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  200. package/dist/esm/salla-products-list.entry.js +2 -2
  201. package/dist/esm/salla-products-slider.entry.js +2 -2
  202. package/dist/esm/salla-quick-order.entry.js +1 -1
  203. package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
  204. package/dist/esm/salla-rating-modal.entry.js +2 -2
  205. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  206. package/dist/esm/salla-review-order-item.entry.js +1 -1
  207. package/dist/esm/salla-scopes.entry.js +1 -1
  208. package/dist/esm/salla-search.entry.js +2 -2
  209. package/dist/esm/salla-skeleton.entry.js +1 -1
  210. package/dist/esm/salla-slider.entry.js +1 -1
  211. package/dist/esm/salla-social-share.entry.js +1 -1
  212. package/dist/esm/salla-social.entry.js +1 -1
  213. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  214. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  215. package/dist/esm/salla-tooltip.entry.js +1 -1
  216. package/dist/esm/salla-trust-badges.entry.js +1 -1
  217. package/dist/esm/salla-user-menu.entry.js +1 -1
  218. package/dist/esm/salla-user-profile.entry.js +1 -1
  219. package/dist/esm/salla-user-settings.entry.js +1 -1
  220. package/dist/esm/salla-verify.entry.js +1 -1
  221. package/dist/esm/salla-wallet.entry.js +1 -1
  222. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  223. package/dist/esm/twilight.js +3 -3
  224. package/dist/esm/{vanilla-picker-Cf9pEgos.js → vanilla-picker-AjTapsL5.js} +1 -1
  225. package/dist/twilight/{p-ae96e338.entry.js → p-018456c8.entry.js} +1 -1
  226. package/dist/twilight/{p-7122a097.entry.js → p-03db1fe6.entry.js} +1 -1
  227. package/dist/twilight/p-0739e769.entry.js +4 -0
  228. package/dist/twilight/{p-b8da968d.entry.js → p-09c1d9c8.entry.js} +1 -1
  229. package/dist/twilight/{p-b217fea1.entry.js → p-0c4c4419.entry.js} +1 -1
  230. package/dist/twilight/{p-73db9793.entry.js → p-0ccba871.entry.js} +1 -1
  231. package/dist/twilight/{p-5d71c16a.entry.js → p-0d199866.entry.js} +1 -1
  232. package/dist/twilight/{p-34889d17.entry.js → p-0da8a64f.entry.js} +1 -1
  233. package/dist/twilight/{p-a9554697.entry.js → p-0dc61077.entry.js} +1 -1
  234. package/dist/twilight/{p-88148fed.entry.js → p-0e12c9ca.entry.js} +1 -1
  235. package/dist/twilight/{p-b73b7e15.entry.js → p-0fb44a3c.entry.js} +1 -1
  236. package/dist/twilight/{p-a5f477fd.entry.js → p-12d74e96.entry.js} +1 -1
  237. package/dist/twilight/{p-95117a08.entry.js → p-13fb9b74.entry.js} +1 -1
  238. package/dist/twilight/{p-fba13fd5.entry.js → p-1653256e.entry.js} +1 -1
  239. package/dist/twilight/{p-7bdf543a.entry.js → p-17c30aa6.entry.js} +1 -1
  240. package/dist/twilight/{p-c2005d4a.entry.js → p-1c662f1d.entry.js} +1 -1
  241. package/dist/twilight/{p-bbd2cb8c.entry.js → p-2607ac8e.entry.js} +1 -1
  242. package/dist/twilight/{p-8c086859.entry.js → p-27396f6f.entry.js} +1 -1
  243. package/dist/twilight/{p-e190e1cf.entry.js → p-277f3a46.entry.js} +1 -1
  244. package/dist/twilight/{p-4358c48e.entry.js → p-2c212d54.entry.js} +1 -1
  245. package/dist/twilight/p-2f2771de.entry.js +4 -0
  246. package/dist/twilight/{p-6da4a9b3.entry.js → p-33842645.entry.js} +1 -1
  247. package/dist/twilight/{p-5be5be8b.entry.js → p-34240222.entry.js} +1 -1
  248. package/dist/twilight/{p-7f11af86.entry.js → p-3615a99b.entry.js} +1 -1
  249. package/dist/twilight/{p-4ebdef90.entry.js → p-3627d945.entry.js} +1 -1
  250. package/dist/twilight/{p-1adf1893.entry.js → p-38b4dfa9.entry.js} +1 -1
  251. package/dist/twilight/{p-dc51e991.entry.js → p-3a4160c2.entry.js} +1 -1
  252. package/dist/twilight/{p-c15eeb62.entry.js → p-434f3557.entry.js} +1 -1
  253. package/dist/twilight/{p-84181d45.entry.js → p-44ee3af8.entry.js} +1 -1
  254. package/dist/twilight/{p-2a64e50b.entry.js → p-4d3e018b.entry.js} +1 -1
  255. package/dist/twilight/{p-0357b501.entry.js → p-4df5f9a0.entry.js} +1 -1
  256. package/dist/twilight/{p-ed5d8787.entry.js → p-4f1102f8.entry.js} +1 -1
  257. package/dist/twilight/{p-e2d501f5.entry.js → p-5256180e.entry.js} +1 -1
  258. package/dist/twilight/{p-354da069.entry.js → p-5383a324.entry.js} +1 -1
  259. package/dist/twilight/{p-a5185029.entry.js → p-57b7cd9f.entry.js} +1 -1
  260. package/dist/twilight/{p-e4c3ca60.entry.js → p-581eeaf8.entry.js} +1 -1
  261. package/dist/twilight/{p-ecaf7d87.entry.js → p-5a4f7313.entry.js} +1 -1
  262. package/dist/twilight/{p-f3bd1c09.entry.js → p-649ced48.entry.js} +1 -1
  263. package/dist/twilight/{p-32af49cd.entry.js → p-69d75b45.entry.js} +1 -1
  264. package/dist/twilight/{p-dc7f11e4.entry.js → p-6e78cc02.entry.js} +1 -1
  265. package/dist/twilight/{p-344f751a.entry.js → p-785cee9b.entry.js} +1 -1
  266. package/dist/twilight/{p-28efc3a8.entry.js → p-7b6fa77f.entry.js} +1 -1
  267. package/dist/twilight/{p-453f92f9.entry.js → p-7e101885.entry.js} +1 -1
  268. package/dist/twilight/{p-a72bf47b.entry.js → p-7e9d98c3.entry.js} +1 -1
  269. package/dist/twilight/{p-42efd1b1.entry.js → p-8838ad5c.entry.js} +1 -1
  270. package/dist/twilight/{p-6da0b2b3.entry.js → p-8cf65dbf.entry.js} +1 -1
  271. package/dist/twilight/{p-8fa81b10.entry.js → p-8e0bdbbc.entry.js} +1 -1
  272. package/dist/twilight/{p-5364f42e.entry.js → p-95a3b9b9.entry.js} +1 -1
  273. package/dist/twilight/{p-d322a3e8.entry.js → p-97136699.entry.js} +1 -1
  274. package/dist/twilight/{p-c82b8aa7.entry.js → p-9ae3a15c.entry.js} +1 -1
  275. package/dist/twilight/{p-368beadc.entry.js → p-9cbc4733.entry.js} +1 -1
  276. package/dist/twilight/{p-c72a1861.entry.js → p-9e702ebb.entry.js} +1 -1
  277. package/dist/twilight/p-9ee1e01c.entry.js +4 -0
  278. package/dist/twilight/{p-ee7530fe.entry.js → p-9f1d1b76.entry.js} +1 -1
  279. package/dist/twilight/{p-6bedb896.entry.js → p-9fdb6380.entry.js} +1 -1
  280. package/dist/twilight/{p-CyO2XGkr.js → p-B-Q5WD6p.js} +1 -1
  281. package/dist/twilight/{p-i-tkvIE0.js → p-B59qdBmY.js} +1 -1
  282. package/dist/twilight/{p-BeFR_h3q.js → p-BdsgfewR.js} +1 -1
  283. package/dist/twilight/{p-C0qiFNJn.js → p-Bf2Z6A1M.js} +1 -1
  284. package/dist/twilight/{p-l7Rr63jq.js → p-BlDax_46.js} +1 -1
  285. package/dist/twilight/{p-yV2X3Oc1.js → p-CG1Rwy3q.js} +1 -1
  286. package/dist/twilight/{p-CW2JQnYK.js → p-CMQ7Gxqu.js} +1 -1
  287. package/dist/twilight/{p-C7NprL2x.js → p-CPqpCDCi.js} +1 -1
  288. package/dist/twilight/p-D6rFREuQ.js +4 -0
  289. package/dist/twilight/p-DfIHi_xi.js +9 -0
  290. package/dist/twilight/{p-27b6fd51.entry.js → p-a3eb15e4.entry.js} +1 -1
  291. package/dist/twilight/{p-7a1169f6.entry.js → p-a818352a.entry.js} +1 -1
  292. package/dist/twilight/{p-bf9cc549.entry.js → p-a8d6804c.entry.js} +1 -1
  293. package/dist/twilight/{p-b3ba53c5.entry.js → p-aa71f393.entry.js} +1 -1
  294. package/dist/twilight/{p-4cfccc31.entry.js → p-b017b72e.entry.js} +1 -1
  295. package/dist/twilight/{p-e36310e2.entry.js → p-b19102f6.entry.js} +1 -1
  296. package/dist/twilight/{p-945b3f38.entry.js → p-b2380c6b.entry.js} +1 -1
  297. package/dist/twilight/{p-86cec54b.entry.js → p-b452c8a0.entry.js} +1 -1
  298. package/dist/twilight/{p-499ccb8b.entry.js → p-b603a180.entry.js} +1 -1
  299. package/dist/twilight/{p-0dea4239.entry.js → p-b7b4231f.entry.js} +1 -1
  300. package/dist/twilight/{p-3c99951e.entry.js → p-bc595ee3.entry.js} +1 -1
  301. package/dist/twilight/{p-0d44c47f.entry.js → p-bd3fef37.entry.js} +1 -1
  302. package/dist/twilight/{p-4a8b3e89.entry.js → p-bded58cb.entry.js} +1 -1
  303. package/dist/twilight/{p-adbf6324.entry.js → p-be95b40b.entry.js} +1 -1
  304. package/dist/twilight/{p-b5028411.entry.js → p-c0c561b9.entry.js} +1 -1
  305. package/dist/twilight/{p-8f2f8693.entry.js → p-c24f6325.entry.js} +1 -1
  306. package/dist/twilight/{p-a30ae3e6.entry.js → p-c31b966f.entry.js} +1 -1
  307. package/dist/twilight/{p-4d149e9e.entry.js → p-c56725b9.entry.js} +1 -1
  308. package/dist/twilight/{p-a9b9deb9.entry.js → p-c818e0eb.entry.js} +1 -1
  309. package/dist/twilight/{p-b2662a4f.entry.js → p-cd51e722.entry.js} +1 -1
  310. package/dist/twilight/{p-7e26332e.entry.js → p-cf21323d.entry.js} +1 -1
  311. package/dist/twilight/{p-862f7fda.entry.js → p-cfac0aa1.entry.js} +1 -1
  312. package/dist/twilight/{p-14f2c393.entry.js → p-cfbf287b.entry.js} +1 -1
  313. package/dist/twilight/{p-875beddd.entry.js → p-d2556680.entry.js} +1 -1
  314. package/dist/twilight/{p-e806b976.entry.js → p-d2c204f4.entry.js} +1 -1
  315. package/dist/twilight/{p-b6d259be.entry.js → p-d63ca8bb.entry.js} +1 -1
  316. package/dist/twilight/{p-709af483.entry.js → p-d65a6462.entry.js} +1 -1
  317. package/dist/twilight/{p-33c2f3bc.entry.js → p-dfaf0617.entry.js} +1 -1
  318. package/dist/twilight/{p-a243d3cc.entry.js → p-e284728d.entry.js} +1 -1
  319. package/dist/twilight/{p-a909aff5.entry.js → p-e54cc4f8.entry.js} +1 -1
  320. package/dist/twilight/{p-55c716a4.entry.js → p-e8a1c501.entry.js} +1 -1
  321. package/dist/twilight/{p-5d261682.entry.js → p-e8b220e1.entry.js} +1 -1
  322. package/dist/twilight/{p-a37a692a.entry.js → p-ebb73bcc.entry.js} +1 -1
  323. package/dist/twilight/{p-f51a1326.entry.js → p-efa79191.entry.js} +1 -1
  324. package/dist/twilight/{p-c0d89d74.entry.js → p-f1322c8e.entry.js} +1 -1
  325. package/dist/twilight/{p-ab86dc29.entry.js → p-f2e5f1fd.entry.js} +1 -1
  326. package/dist/twilight/{p-a8561cc8.entry.js → p-f586c239.entry.js} +1 -1
  327. package/dist/twilight/{p-c3bed022.entry.js → p-fc587040.entry.js} +1 -1
  328. package/dist/twilight/{p-ClV-F79e.js → p-uOF6Cufg.js} +1 -1
  329. package/dist/twilight/twilight.esm.js +1 -1
  330. package/dist/types/Helpers/Helper.d.ts +10 -0
  331. package/dist/types/components/salla-applied-filters/salla-applied-filters.d.ts +37 -0
  332. package/dist/types/components/salla-filters/salla-filters.d.ts +3 -11
  333. package/dist/types/components.d.ts +17 -0
  334. package/package.json +5 -5
  335. package/dist/cjs/interfaces-DZDQwN6-.js +0 -23
  336. package/dist/esm/interfaces-DL4h2bc3.js +0 -23
  337. package/dist/twilight/p-01b52f2f.entry.js +0 -4
  338. package/dist/twilight/p-B3th5No1.js +0 -9
  339. package/dist/twilight/p-DL4h2bc3.js +0 -4
  340. package/dist/twilight/p-DOBDDG4K.js +0 -4
  341. package/dist/twilight/p-c55c576c.entry.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,c as r,h as i,H as e,a as s}from"./p-C0qiFNJn.js";import{M as o}from"./p-DmgxDvXL.js";const a=class{constructor(i){t(this,i),this.verified=r(this,"verified"),this.translationLoaded=!1,this.display="modal",this.type="mobile",this.autoReload=!0,this.supportWebAuth=!0,this.resendAfter=30,this.isProfileVerify=!1,salla.lang.onLoaded((()=>{this.translationLoaded=!0,this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type),this.modal?.setTitle(this.title)})),"inline"!=this.display?(salla.event.on("profile::verification",(t=>{let r=Array.isArray(t)?t[0]:t;"delete_account"===r?.request_type||document.getElementById("salla-user-settings-delete-modal")?.hasAttribute("visible")||(this.isProfileVerify=!0,this.open(r),this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+r.type),this.modal?.setTitle(this.title))})),salla.event.on("modalClosed",(()=>{this.resendAfter=0,this.timer.innerHTML="30 : 00"}))):this.modal={open:()=>"",close:()=>"",setTitle:()=>""}}splitNumber(t){this.resetError();let r=t.data||t.target.value;r&&1!==r.length&&this.modifyNext(t.target,r)}modifyNext(t,r){t.value=r[0],r=r.substring(1),t.nextElementSibling&&r.length?this.modifyNext(t.nextElementSibling,r):t.nextElementSibling||0!==r.length?t.nextElementSibling&&0===r.length&&t.nextElementSibling.focus():t.focus()}checkAllInputs(){let t=!0;for(let r=0;r<this.otpInputs.length;r++)""===this.otpInputs[r].value&&(t=!1);return t}handleKeyUp(t){if(this.resetError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key))return;let r=t.keyCode||t.charCode;t.target.value?(t.target.nextElementSibling?.focus(),t.target.nextElementSibling?.select()):[8,46].includes(r)&&(t.target.previousElementSibling?.focus(),t.target.previousElementSibling?.select()),t.target.value.length>1&&this.splitNumber(t)}handlePaste(t){this.resetError();let r=(salla.helpers.number(t.clipboardData.getData("text"))||"").replace(/[^0-9]/g,"");r=r.substring(0,this.otpInputs.length),this.otpInputs.forEach((t=>t.value="")),this.modifyNext(this.otpInputs[0],r)}handleInput(t){this.resetError(),salla.helpers.inputDigitsOnly(t.target),this.checkAllInputs()&&setTimeout((()=>{this.toggleOTPSubmit()}),100)}resetError(){this.hasError=!1,this.errorMessage=""}handleFocus(t){t.target!==this.firstOtpInput&&(""==this.firstOtpInput?.value&&this.firstOtpInput.focus(),""==t.target.previousElementSibling.value&&t.target.previousElementSibling.focus())}async getCode(){return this.code.value}async open(t){this.data=t,this.data.type=this.data.type||this.type,this.type=this.data.type,this.resendTimer(),this.otpInputs=this.body.querySelectorAll(".s-verify-input"),this.firstOtpInput=this.body.querySelector("#otp-1"),this.reset(),this.resetError(),"modal"==this.display&&this.modal?.setTitle(this.title),this.modal.open(),this.firstOtpInput?.addEventListener("input",(t=>this.splitNumber(t))),setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let t=[];if(this.otpInputs.forEach((r=>r.value&&t.push(r.value))),this.code.value=t.join(""),4===t.length)return this.btn.disable(),void this.btn.click();this.btn.enable()}reset(){this.otpInputs.forEach((t=>t.value="")),this.code.value="",this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block",this.resend.style.display="none",this.resendAfter=30;let t=setInterval((()=>{this.resendAfter<=0?(clearInterval(t),this.resend.style.display="block",this.resendMessage.style.display="none"):(this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`,this.resendAfter--)}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((t=>t.value="")),this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4)return this.otpInputs[this.code.value.length].focus(),void salla.log("Trying to submit without 4 digits!");let t={code:this.code.value,...this.data};return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(t):salla.auth.verify(t,this.supportWebAuth))).then((t=>this.verified.emit(t))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((t=>{this.hasError=!0,this.errorMessage=t.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"),t.response?salla.logger.error(t):console.log("Unexpected error",t),this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return"inline"==this.display?i(e,null,this.myBody()):i("salla-modal",{width:"xs",class:"s-verify",ref:t=>this.modal=t,"modal-title":this.title},i("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:"mobile"==this.type?'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n':o}),this.myBody())}myBody(){return i("div",{class:"s-verify-body",ref:t=>this.body=t},i("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),i("slot",{name:"mobile"}),i("slot",{name:"email"}),i("input",{type:"hidden",name:"code",maxlength:"4",required:!0,ref:t=>this.code=t}),i("div",{class:{"s-verify-codes":!0,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((t=>i("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${t}`,class:{"s-verify-input":!0,"s-has-error":this.hasError},onInput:t=>this.handleInput(t),onPaste:t=>this.handlePaste(t),onKeyUp:t=>this.handleKeyUp(t),onFocus:t=>this.handleFocus(t),required:!0})))),this.hasError&&this.errorMessage?i("span",{class:"s-verify-error-message"},this.errorMessage):"",i("div",{slot:"footer",class:"s-verify-footer"},i("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:!0,onClick:()=>this.submit(),ref:t=>this.btn=t},salla.lang.get("pages.profile.verify")),i("p",{class:"s-verify-resend-message",ref:t=>this.resendMessage=t},salla.lang.get("blocks.header.resend_after"),i("b",{class:"s-verify-timer",ref:t=>this.timer=t})),i("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:t=>this.resend=t},salla.lang.get("blocks.comments.submit"))),i("slot",{name:"after-footer"}))}get host(){return s(this)}};a.style='/*!twlt*/salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}.visible{visibility:visible}.block{display:block}.inline{display:inline}.hidden{display:none}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-message{text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-verify-label{margin-bottom:1rem;display:block;text-align:center;font-size:0.875rem;line-height:1.25rem}.s-verify-codes{margin-left:-0.25rem;margin-right:-0.25rem;margin-bottom:1.25rem;display:flex;justify-content:space-between}.s-verify-codes.has-error{margin-bottom:0px}.s-verify-input{margin-left:0.25rem;margin-right:0.25rem;height:2.5rem;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;text-align:center;font-size:1.125rem;line-height:1.75rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-input:focus{border-color:var(--color-primary)}.s-verify-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-verify-footer{text-align:center}.s-verify-submit{margin-bottom:1.25rem;width:100%}.s-verify-header-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.s-verify-header-icon{margin-left:auto;margin-right:auto;margin-bottom:1rem;height:5rem;width:5rem}}.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}}.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}}.s-verify-resend-message{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-verify-error-message{margin-bottom:1.25rem;display:block;height:1.75rem;padding-top:0.75rem;text-align:center;font-size:0.75rem;line-height:1rem;--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-verify-error-message:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-verify-error-message{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-timer{margin-left:0.25rem;margin-right:0.25rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-verify-resend{text-align:center;font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-verify-back{position:absolute;left:10px;top:10px;display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-back:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-verify-back:where([dir="rtl"],[dir="rtl"] *){left:unset;right:10px}.s-verify-back svg{height:18px;width:18px}[dir=\'ltr\'] .s-verify-back{transform:scale(-1)}';export{a as salla_verify}
4
+ import{r as t,c as r,h as i,H as e,a as s}from"./p-Bf2Z6A1M.js";import{M as o}from"./p-DmgxDvXL.js";const a=class{constructor(i){t(this,i),this.verified=r(this,"verified"),this.translationLoaded=!1,this.display="modal",this.type="mobile",this.autoReload=!0,this.supportWebAuth=!0,this.resendAfter=30,this.isProfileVerify=!1,salla.lang.onLoaded((()=>{this.translationLoaded=!0,this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type),this.modal?.setTitle(this.title)})),"inline"!=this.display?(salla.event.on("profile::verification",(t=>{let r=Array.isArray(t)?t[0]:t;"delete_account"===r?.request_type||document.getElementById("salla-user-settings-delete-modal")?.hasAttribute("visible")||(this.isProfileVerify=!0,this.open(r),this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+r.type),this.modal?.setTitle(this.title))})),salla.event.on("modalClosed",(()=>{this.resendAfter=0,this.timer.innerHTML="30 : 00"}))):this.modal={open:()=>"",close:()=>"",setTitle:()=>""}}splitNumber(t){this.resetError();let r=t.data||t.target.value;r&&1!==r.length&&this.modifyNext(t.target,r)}modifyNext(t,r){t.value=r[0],r=r.substring(1),t.nextElementSibling&&r.length?this.modifyNext(t.nextElementSibling,r):t.nextElementSibling||0!==r.length?t.nextElementSibling&&0===r.length&&t.nextElementSibling.focus():t.focus()}checkAllInputs(){let t=!0;for(let r=0;r<this.otpInputs.length;r++)""===this.otpInputs[r].value&&(t=!1);return t}handleKeyUp(t){if(this.resetError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key))return;let r=t.keyCode||t.charCode;t.target.value?(t.target.nextElementSibling?.focus(),t.target.nextElementSibling?.select()):[8,46].includes(r)&&(t.target.previousElementSibling?.focus(),t.target.previousElementSibling?.select()),t.target.value.length>1&&this.splitNumber(t)}handlePaste(t){this.resetError();let r=(salla.helpers.number(t.clipboardData.getData("text"))||"").replace(/[^0-9]/g,"");r=r.substring(0,this.otpInputs.length),this.otpInputs.forEach((t=>t.value="")),this.modifyNext(this.otpInputs[0],r)}handleInput(t){this.resetError(),salla.helpers.inputDigitsOnly(t.target),this.checkAllInputs()&&setTimeout((()=>{this.toggleOTPSubmit()}),100)}resetError(){this.hasError=!1,this.errorMessage=""}handleFocus(t){t.target!==this.firstOtpInput&&(""==this.firstOtpInput?.value&&this.firstOtpInput.focus(),""==t.target.previousElementSibling.value&&t.target.previousElementSibling.focus())}async getCode(){return this.code.value}async open(t){this.data=t,this.data.type=this.data.type||this.type,this.type=this.data.type,this.resendTimer(),this.otpInputs=this.body.querySelectorAll(".s-verify-input"),this.firstOtpInput=this.body.querySelector("#otp-1"),this.reset(),this.resetError(),"modal"==this.display&&this.modal?.setTitle(this.title),this.modal.open(),this.firstOtpInput?.addEventListener("input",(t=>this.splitNumber(t))),setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let t=[];if(this.otpInputs.forEach((r=>r.value&&t.push(r.value))),this.code.value=t.join(""),4===t.length)return this.btn.disable(),void this.btn.click();this.btn.enable()}reset(){this.otpInputs.forEach((t=>t.value="")),this.code.value="",this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block",this.resend.style.display="none",this.resendAfter=30;let t=setInterval((()=>{this.resendAfter<=0?(clearInterval(t),this.resend.style.display="block",this.resendMessage.style.display="none"):(this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`,this.resendAfter--)}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((t=>t.value="")),this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4)return this.otpInputs[this.code.value.length].focus(),void salla.log("Trying to submit without 4 digits!");let t={code:this.code.value,...this.data};return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(t):salla.auth.verify(t,this.supportWebAuth))).then((t=>this.verified.emit(t))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((t=>{this.hasError=!0,this.errorMessage=t.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"),t.response?salla.logger.error(t):console.log("Unexpected error",t),this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return"inline"==this.display?i(e,null,this.myBody()):i("salla-modal",{width:"xs",class:"s-verify",ref:t=>this.modal=t,"modal-title":this.title},i("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:"mobile"==this.type?'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n':o}),this.myBody())}myBody(){return i("div",{class:"s-verify-body",ref:t=>this.body=t},i("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),i("slot",{name:"mobile"}),i("slot",{name:"email"}),i("input",{type:"hidden",name:"code",maxlength:"4",required:!0,ref:t=>this.code=t}),i("div",{class:{"s-verify-codes":!0,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((t=>i("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${t}`,class:{"s-verify-input":!0,"s-has-error":this.hasError},onInput:t=>this.handleInput(t),onPaste:t=>this.handlePaste(t),onKeyUp:t=>this.handleKeyUp(t),onFocus:t=>this.handleFocus(t),required:!0})))),this.hasError&&this.errorMessage?i("span",{class:"s-verify-error-message"},this.errorMessage):"",i("div",{slot:"footer",class:"s-verify-footer"},i("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:!0,onClick:()=>this.submit(),ref:t=>this.btn=t},salla.lang.get("pages.profile.verify")),i("p",{class:"s-verify-resend-message",ref:t=>this.resendMessage=t},salla.lang.get("blocks.header.resend_after"),i("b",{class:"s-verify-timer",ref:t=>this.timer=t})),i("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:t=>this.resend=t},salla.lang.get("blocks.comments.submit"))),i("slot",{name:"after-footer"}))}get host(){return s(this)}};a.style='/*!twlt*/salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}.visible{visibility:visible}.block{display:block}.inline{display:inline}.hidden{display:none}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-message{text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-verify-label{margin-bottom:1rem;display:block;text-align:center;font-size:0.875rem;line-height:1.25rem}.s-verify-codes{margin-left:-0.25rem;margin-right:-0.25rem;margin-bottom:1.25rem;display:flex;justify-content:space-between}.s-verify-codes.has-error{margin-bottom:0px}.s-verify-input{margin-left:0.25rem;margin-right:0.25rem;height:2.5rem;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;text-align:center;font-size:1.125rem;line-height:1.75rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-input:focus{border-color:var(--color-primary)}.s-verify-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-verify-footer{text-align:center}.s-verify-submit{margin-bottom:1.25rem;width:100%}.s-verify-header-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.s-verify-header-icon{margin-left:auto;margin-right:auto;margin-bottom:1rem;height:5rem;width:5rem}}.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}}.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}}.s-verify-resend-message{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-verify-error-message{margin-bottom:1.25rem;display:block;height:1.75rem;padding-top:0.75rem;text-align:center;font-size:0.75rem;line-height:1rem;--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-verify-error-message:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-verify-error-message{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-timer{margin-left:0.25rem;margin-right:0.25rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-verify-resend{text-align:center;font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-verify-back{position:absolute;left:10px;top:10px;display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-back:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-verify-back:where([dir="rtl"],[dir="rtl"] *){left:unset;right:10px}.s-verify-back svg{height:18px;width:18px}[dir=\'ltr\'] .s-verify-back{transform:scale(-1)}';export{a as salla_verify}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,c as t,h as d,H as r}from"./p-C0qiFNJn.js";const c=class{constructor(d){e(this,d),this.orderEditProductSelected=t(this,"orderEditProductSelected")}get productData(){if(!this.product)return{};if("object"==typeof this.product)return this.product;try{return JSON.parse(this.product)}catch(e){return{}}}handleSelectProduct(){this.orderEditProductSelected.emit({product:this.productData})}render(){const e=this.productData,t=e?.name||salla.lang.getWithDefault("common.elements.product","منتج"),c=e?.price;return d(r,{key:"7669432a4756da446e16d9a3093a067767c5dd9d"},d("button",{key:"d998dde2a1dc4eae7444fd398910c3a0699730f8",type:"button",class:"s-order-edit-product-card",onClick:()=>this.handleSelectProduct()},d("div",{key:"6a0e6eec84de332598d94be87b49564eeb2cfbc2",class:"s-order-edit-product-card-media"},e?.image?.url?d("img",{src:e.image.url,alt:e.image.alt||t,class:"s-order-edit-product-card-image"}):d("div",{class:"s-order-edit-product-card-placeholder"},d("i",{class:"sicon-shopping-bag"}))),d("div",{key:"4eeb9f7430c19f8e792b0f6856fb86a2f265eb95",class:"s-order-edit-product-card-content"},d("h3",{key:"840ae549097a53f1f297673d69e3155792a4097e",class:"s-order-edit-product-card-title"},t),null!=c&&d("p",{key:"32732854ca599fe446d0b47883b892ac17d90cae",class:"s-order-edit-product-card-price",innerHTML:salla.money(c)}))))}};c.style=":host{display:block;min-width:0}";export{c as salla_order_edit_product_card}
4
+ import{r as e,c as t,h as d,H as r}from"./p-Bf2Z6A1M.js";const c=class{constructor(d){e(this,d),this.orderEditProductSelected=t(this,"orderEditProductSelected")}get productData(){if(!this.product)return{};if("object"==typeof this.product)return this.product;try{return JSON.parse(this.product)}catch(e){return{}}}handleSelectProduct(){this.orderEditProductSelected.emit({product:this.productData})}render(){const e=this.productData,t=e?.name||salla.lang.getWithDefault("common.elements.product","منتج"),c=e?.price;return d(r,{key:"7669432a4756da446e16d9a3093a067767c5dd9d"},d("button",{key:"d998dde2a1dc4eae7444fd398910c3a0699730f8",type:"button",class:"s-order-edit-product-card",onClick:()=>this.handleSelectProduct()},d("div",{key:"6a0e6eec84de332598d94be87b49564eeb2cfbc2",class:"s-order-edit-product-card-media"},e?.image?.url?d("img",{src:e.image.url,alt:e.image.alt||t,class:"s-order-edit-product-card-image"}):d("div",{class:"s-order-edit-product-card-placeholder"},d("i",{class:"sicon-shopping-bag"}))),d("div",{key:"4eeb9f7430c19f8e792b0f6856fb86a2f265eb95",class:"s-order-edit-product-card-content"},d("h3",{key:"840ae549097a53f1f297673d69e3155792a4097e",class:"s-order-edit-product-card-title"},t),null!=c&&d("p",{key:"32732854ca599fe446d0b47883b892ac17d90cae",class:"s-order-edit-product-card-price",innerHTML:salla.money(c)}))))}};c.style=":host{display:block;min-width:0}";export{c as salla_order_edit_product_card}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as i,H as e}from"./p-C0qiFNJn.js";var r,n;!function(t){t.PERCENTAGE="percentage",t.FIXED="fixed",t.FREE_PRODUCT="free_product"}(r||(r={})),function(t){t.PRODUCT_COUNT="products_count",t.PRODUCT_PURCHASE="order_amount"}(n||(n={}));const o=class{constructor(i){t(this,i),this.offer=null,this.products={},this.isLoading=!1,this.canRender=!0}componentWillLoad(){salla.onReady().then((()=>{if(!salla.config.get("store.features")?.includes("conditional-offer")||""!==salla.storage.get("cart")&&!salla.storage.get("cart")?.summary?.count)throw new Error("feature or cart object does not existed")})).then((()=>salla.api.cart.offers())).then((({data:t})=>{if(this.offer=t.find((t=>"conditional"===t.type)),this.offer)return this.isLoading=!0,this.offer.details.discounts.unshift({value:0,min_spend:0}),this.updateInitialOfferValue();this.canRender=!1})).then((()=>{if(this.offer)return this.getProducts()})).then((()=>{this.offer&&salla.event.on("cart::updated",(t=>this.updateOfferValues(t)))})).catch((t=>{this.canRender=!1,salla.logger.warn("salla-conditional-offer:: ",t)})).finally((()=>{this.isLoading=!1}))}getProducts(){const t=this.offer.details.discounts.filter((({type:t})=>t===r.FREE_PRODUCT)).map((({value:t})=>t)).filter(Boolean);if(t.length>0)return salla.product.fetch({source:"selected",source_value:t}).then((t=>{const i=t?.data;if(i&&Array.isArray(i)){const t={...this.products};i.forEach((({id:i,url:e,image:r,name:n,price:o})=>{i&&n&&r?.url&&e&&void 0!==o&&(t[i]={url:e,image:r,name:n,price:o})})),this.products=t}}))}updateInitialOfferValue(){return salla.api.cart.details().then((({data:{cart:t}})=>this.updateOfferValues(t)))}updateOfferValues({items:t,sub_total:i}){const e=this.offer.details.based_on===n.PRODUCT_COUNT?t?.reduce(((t,{quantity:i})=>t+i),0)??0:i;return this.offer={...this.offer,details:{...this.offer?.details,current_value:e}},this.offer}renderTooltip(t){const e=t.value,r=this.products[e];return r?i("salla-tooltip",{class:"absolute left-0 -top-2",targetId:`avatar-product-${e}`,theme:"dark"},i("div",{class:"flex gap-3 text-start"},r?.image?.url&&i("img",{src:r.image.url,alt:r?.image?.alt||r.name||"",class:"w-12 h-12 object-cover rounded-lg flex-shrink-0",loading:"lazy",decoding:"async"}),i("div",{class:"flex-1"},i("div",{class:"leading-tight mb-1"},r.name),i("div",{class:"text-xs text-gray-300",innerHTML:salla.money(r.price)})))):(salla.logger.error(`salla-conditional-offer:: there is no product with id (${t.value})!`),null)}getCheckpointContent(t){if(t.type===r.PERCENTAGE)return`${t.value}%`;if(t.type===r.FIXED)return i("span",{innerHTML:salla.money(t.value)});if(t.type!==r.FREE_PRODUCT)return salla.logger.error(`salla-conditional-offer:: unexpected type (${t.type})!`),"";const e=this.products[t.value];return e?i("a",{class:"s-conditional-offer-product-link",href:e.url},i("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:e?.image?.alt||"",src:e?.image?.url})):(salla.logger.error(`salla-conditional-offer:: there is no product with id (${t.value})!`),"")}getOfferType(t){const i=this.offer.details?.based_on;if(i===n.PRODUCT_COUNT)try{return salla.lang.choice("blocks.header.products_count",t.min_spend)}catch(i){return salla.logger.warn("salla-conditional-offer:: invalid products_count interval",i),`${t.min_spend}`}return i===n.PRODUCT_PURCHASE?salla.money(t.min_spend):(salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${i}`),`${t.min_spend}`)}clamp(t,i,e){return Math.max(i,Math.min(t,e))}mapValueRanges(t,i,e,r,n){const o=(t-i)*(n-r)/(e-i)+r;return o===Number.POSITIVE_INFINITY?100:o===Number.NEGATIVE_INFINITY?0:this.clamp(o,0,100)}getCheckPointView(t,e){const n=this.offer.details.discounts.findIndex((({min_spend:i})=>i===t.min_spend)),o=this.mapValueRanges(this.offer.details.current_value,this.offer.details.discounts[n-1]?.min_spend??0,t.min_spend,0,100),a=t.min_spend<=this.offer.details.current_value;return i("div",{class:"s-conditional-offer-checkpoint-container"},e>0?[i("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},i("div",{class:"s-conditional-offer-progress-line-inactive"}),i("div",{class:"s-conditional-offer-progress-line-active",style:{width:`${o}%`}})),i("div",{key:"checkpoint",class:"s-conditional-offer-checkpoint "+(a?"s-conditional-offer-active-checkpoint":"")},i("div",{class:"s-conditional-offer-item-avatar-content "+(a?"active":""),id:t.type===r.FREE_PRODUCT?`avatar-product-${t.value}`:`avatar-${t.value??e}`},this.products&&this.getCheckpointContent(t)),this.products&&t.type===r.FREE_PRODUCT&&this.renderTooltip(t),i("div",{class:"s-conditional-offer-checkpoint-label "+(a?"active":""),innerHTML:this.getOfferType(t)}))]:i("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":!0,"first-checkpoint":0===e,active:a,hidden:0===e,"sm:block":0===e},innerHTML:this.getOfferType(t)}))}getLoadingSkeletonView(){return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-skeleton-inner-container"},i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"30%"})),i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"35%"})),i("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((()=>[i("salla-skeleton",{key:"checkpoint-line",height:"8px"}),i("div",{key:"checkpoint"},i("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))])))))}render(){return this.canRender?this.isLoading?this.getLoadingSkeletonView():this.offer?i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-title-wrapper"},i("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?i("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",i("i",{class:"sicon-information"})):null),i("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map(((t,e)=>i("div",{class:{"flex-1":e>0},key:t.min_spend},this.getCheckPointView(t,e)))))):null:null}};o.style='/*!twlt*/:host{display:block}.fixed{position:fixed}.absolute{position:absolute}.-top-2{top:-0.5rem}.left-0{left:0px}.mb-1{margin-bottom:0.25rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-12{height:3rem}.w-12{width:3rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-3{gap:0.75rem}.rounded-lg{border-radius:0.5rem}.object-cover{object-fit:cover}.text-start{text-align:start}.text-xs{font-size:0.75rem;line-height:1rem}.leading-tight{line-height:1.25}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-conditional-offer-container{position:relative;display:inline-flex;width:100%;flex-direction:column;align-items:center;justify-content:flex-start;gap:1.25rem;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-left:1.25rem;padding-right:1.25rem;padding-top:1rem;padding-bottom:4rem}@media (min-width: 768px){.s-conditional-offer-container{padding-left:2.5rem;padding-right:2.5rem;padding-top:2rem;padding-bottom:2rem}}.s-conditional-offer-title-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;align-self:stretch}.s-conditional-offer-title{text-align:center;font-size:1.25rem;line-height:1.75rem;font-weight:700;color:var(--color-primary-dark)}.s-conditional-offer-subtitle{display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;align-self:stretch;text-align:center;font-size:0.75rem;line-height:1rem;font-weight:400;--tw-text-opacity:1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.s-conditional-offer-subtitle i{position:relative}.s-conditional-offer-progress-line{height:1px;align-self:stretch;background-color:var(--color-primary)}.s-conditional-offer-checkpoint-border{display:flex;height:60px;min-width:60px;flex-direction:column;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.s-conditional-offer-checkpoint-border-colored{border-color:var(--color-primary);color:var(--color-primary-dark)}.s-conditional-offer-product-link{display:grid;aspect-ratio:1 / 1;height:58px;place-content:center;overflow:hidden;border-radius:9999px}.s-conditional-offer-checkpoint-image-content{height:58px;width:58px;object-fit:cover}.s-conditional-offer-progress-container{position:relative;margin-bottom:2rem;display:flex;height:8rem;width:100%;flex-wrap:wrap;align-items:center;justify-content:center}@media (min-width: 768px){.s-conditional-offer-progress-container{height:4rem}}.s-conditional-offer-item-avatar-content{text-align:center;font-size:0.875rem;font-weight:700;line-height:1.25rem}.s-conditional-offer-item-avatar-content.active{color:var(--color-primary-dark);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint{position:relative;display:flex;height:60px;width:60px;flex-shrink:0;flex-direction:column;align-items:center;justify-content:center;border-radius:9999px;border-width:1px}.s-conditional-offer-progress-line-container{display:grid;width:100%;overflow:hidden;grid-template-areas:\'progress-line\'}.s-conditional-offer-progress-line-inactive{height:1.5px;width:100%;--tw-bg-opacity:1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);grid-area:progress-line}.s-conditional-offer-progress-line-active{height:1.5px;width:0%;background-color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);grid-area:progress-line}.s-conditional-offer-checkpoint-label{position:absolute;top:100%;left:50%;width:max-content;--tw-translate-x:-50%;--tw-translate-y:20%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint-label.active{color:var(--color-primary-dark);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint-label.first-checkpoint{--tw-translate-y:132%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-label.first-checkpoint:where([dir="ltr"],[dir="ltr"] *){--tw-translate-x:0%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-label.first-checkpoint:where([dir="rtl"],[dir="rtl"] *){--tw-translate-x:-100%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-container{position:relative;display:flex;align-items:center}.s-conditional-offer-active-checkpoint{display:flex;justify-content:center;border-color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-skeleton-inner-container{margin-bottom:2rem;width:100%}@media (min-width: 768px){.s-conditional-offer-skeleton-inner-container{margin-bottom:0px}}.s-conditional-offer-skeleton-title{margin-bottom:1rem;display:flex;justify-content:center}.s-conditional-offer-skeleton-subtitle{margin-bottom:1.5rem;display:flex;justify-content:center}.s-conditional-offer-skeleton-checkpoints-wrapper{display:flex;align-items:center}@media (min-width: 640px){.sm\\:block{display:block}}';export{o as salla_conditional_offer}
4
+ import{r as t,h as i,H as e}from"./p-Bf2Z6A1M.js";var r,n;!function(t){t.PERCENTAGE="percentage",t.FIXED="fixed",t.FREE_PRODUCT="free_product"}(r||(r={})),function(t){t.PRODUCT_COUNT="products_count",t.PRODUCT_PURCHASE="order_amount"}(n||(n={}));const o=class{constructor(i){t(this,i),this.offer=null,this.products={},this.isLoading=!1,this.canRender=!0}componentWillLoad(){salla.onReady().then((()=>{if(!salla.config.get("store.features")?.includes("conditional-offer")||""!==salla.storage.get("cart")&&!salla.storage.get("cart")?.summary?.count)throw new Error("feature or cart object does not existed")})).then((()=>salla.api.cart.offers())).then((({data:t})=>{if(this.offer=t.find((t=>"conditional"===t.type)),this.offer)return this.isLoading=!0,this.offer.details.discounts.unshift({value:0,min_spend:0}),this.updateInitialOfferValue();this.canRender=!1})).then((()=>{if(this.offer)return this.getProducts()})).then((()=>{this.offer&&salla.event.on("cart::updated",(t=>this.updateOfferValues(t)))})).catch((t=>{this.canRender=!1,salla.logger.warn("salla-conditional-offer:: ",t)})).finally((()=>{this.isLoading=!1}))}getProducts(){const t=this.offer.details.discounts.filter((({type:t})=>t===r.FREE_PRODUCT)).map((({value:t})=>t)).filter(Boolean);if(t.length>0)return salla.product.fetch({source:"selected",source_value:t}).then((t=>{const i=t?.data;if(i&&Array.isArray(i)){const t={...this.products};i.forEach((({id:i,url:e,image:r,name:n,price:o})=>{i&&n&&r?.url&&e&&void 0!==o&&(t[i]={url:e,image:r,name:n,price:o})})),this.products=t}}))}updateInitialOfferValue(){return salla.api.cart.details().then((({data:{cart:t}})=>this.updateOfferValues(t)))}updateOfferValues({items:t,sub_total:i}){const e=this.offer.details.based_on===n.PRODUCT_COUNT?t?.reduce(((t,{quantity:i})=>t+i),0)??0:i;return this.offer={...this.offer,details:{...this.offer?.details,current_value:e}},this.offer}renderTooltip(t){const e=t.value,r=this.products[e];return r?i("salla-tooltip",{class:"absolute left-0 -top-2",targetId:`avatar-product-${e}`,theme:"dark"},i("div",{class:"flex gap-3 text-start"},r?.image?.url&&i("img",{src:r.image.url,alt:r?.image?.alt||r.name||"",class:"w-12 h-12 object-cover rounded-lg flex-shrink-0",loading:"lazy",decoding:"async"}),i("div",{class:"flex-1"},i("div",{class:"leading-tight mb-1"},r.name),i("div",{class:"text-xs text-gray-300",innerHTML:salla.money(r.price)})))):(salla.logger.error(`salla-conditional-offer:: there is no product with id (${t.value})!`),null)}getCheckpointContent(t){if(t.type===r.PERCENTAGE)return`${t.value}%`;if(t.type===r.FIXED)return i("span",{innerHTML:salla.money(t.value)});if(t.type!==r.FREE_PRODUCT)return salla.logger.error(`salla-conditional-offer:: unexpected type (${t.type})!`),"";const e=this.products[t.value];return e?i("a",{class:"s-conditional-offer-product-link",href:e.url},i("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:e?.image?.alt||"",src:e?.image?.url})):(salla.logger.error(`salla-conditional-offer:: there is no product with id (${t.value})!`),"")}getOfferType(t){const i=this.offer.details?.based_on;if(i===n.PRODUCT_COUNT)try{return salla.lang.choice("blocks.header.products_count",t.min_spend)}catch(i){return salla.logger.warn("salla-conditional-offer:: invalid products_count interval",i),`${t.min_spend}`}return i===n.PRODUCT_PURCHASE?salla.money(t.min_spend):(salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${i}`),`${t.min_spend}`)}clamp(t,i,e){return Math.max(i,Math.min(t,e))}mapValueRanges(t,i,e,r,n){const o=(t-i)*(n-r)/(e-i)+r;return o===Number.POSITIVE_INFINITY?100:o===Number.NEGATIVE_INFINITY?0:this.clamp(o,0,100)}getCheckPointView(t,e){const n=this.offer.details.discounts.findIndex((({min_spend:i})=>i===t.min_spend)),o=this.mapValueRanges(this.offer.details.current_value,this.offer.details.discounts[n-1]?.min_spend??0,t.min_spend,0,100),a=t.min_spend<=this.offer.details.current_value;return i("div",{class:"s-conditional-offer-checkpoint-container"},e>0?[i("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},i("div",{class:"s-conditional-offer-progress-line-inactive"}),i("div",{class:"s-conditional-offer-progress-line-active",style:{width:`${o}%`}})),i("div",{key:"checkpoint",class:"s-conditional-offer-checkpoint "+(a?"s-conditional-offer-active-checkpoint":"")},i("div",{class:"s-conditional-offer-item-avatar-content "+(a?"active":""),id:t.type===r.FREE_PRODUCT?`avatar-product-${t.value}`:`avatar-${t.value??e}`},this.products&&this.getCheckpointContent(t)),this.products&&t.type===r.FREE_PRODUCT&&this.renderTooltip(t),i("div",{class:"s-conditional-offer-checkpoint-label "+(a?"active":""),innerHTML:this.getOfferType(t)}))]:i("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":!0,"first-checkpoint":0===e,active:a,hidden:0===e,"sm:block":0===e},innerHTML:this.getOfferType(t)}))}getLoadingSkeletonView(){return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-skeleton-inner-container"},i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"30%"})),i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"35%"})),i("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((()=>[i("salla-skeleton",{key:"checkpoint-line",height:"8px"}),i("div",{key:"checkpoint"},i("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))])))))}render(){return this.canRender?this.isLoading?this.getLoadingSkeletonView():this.offer?i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-title-wrapper"},i("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?i("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",i("i",{class:"sicon-information"})):null),i("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map(((t,e)=>i("div",{class:{"flex-1":e>0},key:t.min_spend},this.getCheckPointView(t,e)))))):null:null}};o.style='/*!twlt*/:host{display:block}.fixed{position:fixed}.absolute{position:absolute}.-top-2{top:-0.5rem}.left-0{left:0px}.mb-1{margin-bottom:0.25rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-12{height:3rem}.w-12{width:3rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-3{gap:0.75rem}.rounded-lg{border-radius:0.5rem}.object-cover{object-fit:cover}.text-start{text-align:start}.text-xs{font-size:0.75rem;line-height:1rem}.leading-tight{line-height:1.25}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-conditional-offer-container{position:relative;display:inline-flex;width:100%;flex-direction:column;align-items:center;justify-content:flex-start;gap:1.25rem;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-left:1.25rem;padding-right:1.25rem;padding-top:1rem;padding-bottom:4rem}@media (min-width: 768px){.s-conditional-offer-container{padding-left:2.5rem;padding-right:2.5rem;padding-top:2rem;padding-bottom:2rem}}.s-conditional-offer-title-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;align-self:stretch}.s-conditional-offer-title{text-align:center;font-size:1.25rem;line-height:1.75rem;font-weight:700;color:var(--color-primary-dark)}.s-conditional-offer-subtitle{display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;align-self:stretch;text-align:center;font-size:0.75rem;line-height:1rem;font-weight:400;--tw-text-opacity:1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.s-conditional-offer-subtitle i{position:relative}.s-conditional-offer-progress-line{height:1px;align-self:stretch;background-color:var(--color-primary)}.s-conditional-offer-checkpoint-border{display:flex;height:60px;min-width:60px;flex-direction:column;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.s-conditional-offer-checkpoint-border-colored{border-color:var(--color-primary);color:var(--color-primary-dark)}.s-conditional-offer-product-link{display:grid;aspect-ratio:1 / 1;height:58px;place-content:center;overflow:hidden;border-radius:9999px}.s-conditional-offer-checkpoint-image-content{height:58px;width:58px;object-fit:cover}.s-conditional-offer-progress-container{position:relative;margin-bottom:2rem;display:flex;height:8rem;width:100%;flex-wrap:wrap;align-items:center;justify-content:center}@media (min-width: 768px){.s-conditional-offer-progress-container{height:4rem}}.s-conditional-offer-item-avatar-content{text-align:center;font-size:0.875rem;font-weight:700;line-height:1.25rem}.s-conditional-offer-item-avatar-content.active{color:var(--color-primary-dark);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint{position:relative;display:flex;height:60px;width:60px;flex-shrink:0;flex-direction:column;align-items:center;justify-content:center;border-radius:9999px;border-width:1px}.s-conditional-offer-progress-line-container{display:grid;width:100%;overflow:hidden;grid-template-areas:\'progress-line\'}.s-conditional-offer-progress-line-inactive{height:1.5px;width:100%;--tw-bg-opacity:1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);grid-area:progress-line}.s-conditional-offer-progress-line-active{height:1.5px;width:0%;background-color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);grid-area:progress-line}.s-conditional-offer-checkpoint-label{position:absolute;top:100%;left:50%;width:max-content;--tw-translate-x:-50%;--tw-translate-y:20%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint-label.active{color:var(--color-primary-dark);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint-label.first-checkpoint{--tw-translate-y:132%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-label.first-checkpoint:where([dir="ltr"],[dir="ltr"] *){--tw-translate-x:0%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-label.first-checkpoint:where([dir="rtl"],[dir="rtl"] *){--tw-translate-x:-100%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-container{position:relative;display:flex;align-items:center}.s-conditional-offer-active-checkpoint{display:flex;justify-content:center;border-color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-skeleton-inner-container{margin-bottom:2rem;width:100%}@media (min-width: 768px){.s-conditional-offer-skeleton-inner-container{margin-bottom:0px}}.s-conditional-offer-skeleton-title{margin-bottom:1rem;display:flex;justify-content:center}.s-conditional-offer-skeleton-subtitle{margin-bottom:1.5rem;display:flex;justify-content:center}.s-conditional-offer-skeleton-checkpoints-wrapper{display:flex;align-items:center}@media (min-width: 640px){.sm\\:block{display:block}}';export{o as salla_conditional_offer}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as r,F as t,H as o}from"./p-C0qiFNJn.js";const i=class{constructor(r){e(this,r)}parseOrderDetailsData(e){this.parsedOrderDetailsData=e,this.parsedOrderDetailsData="string"==typeof this.orderDetails?JSON.parse(e):e}componentWillLoad(){this.parseOrderDetailsData(this.orderDetails),console.log("Parent componentWillLoad - parsedOrderDetailsData:",this.parsedOrderDetailsData)}renderOrderDetailsContent(){return this.parsedOrderDetailsData?[this.parsedOrderDetailsData.options&&this.parsedOrderDetailsData.options.length>0&&r("salla-order-details-options",{options:this.parsedOrderDetailsData.options}),this.parsedOrderDetailsData.sub_products&&this.parsedOrderDetailsData.sub_products.length>0&&r(t,null,r("h2",{class:"s-order-details-bundle-title"},salla.lang.get("pages.orders.sub_products")),r("div",{class:"s-order-details-bundle-content"},this.parsedOrderDetailsData.sub_products.map((e=>r("salla-order-details-multiple-bundle-product",{key:e?.id,productDetails:e})))))]:(console.warn("No parsedOrderDetailsData available"),null)}render(){return r(o,{key:"ffa22cae6c347b5acbe4836378f1f3843184e8f5",class:"s-order-details-wrapper"},this.renderOrderDetailsContent())}static get watchers(){return{orderDetails:["parseOrderDetailsData"]}}};i.style='/*!twlt*/.s-order-details-multiple-bundle-product{display:flex;height:auto;width:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));outline:2px solid transparent;outline-offset:0px}.s-order-details-wrapper{display:block}.s-order-details-bundle-content{display:flex;flex-direction:column;gap:1rem;padding-top:1rem;padding-bottom:1rem}.s-order-details-bundle-title{margin-bottom:0.75rem;font-size:0.875rem;line-height:1.25rem;font-weight:700}.s-order-details-product{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.s-order-details-product-content{min-width:0px}.s-order-details-product-info{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-order-details-product-image{display:flex;height:3.5rem;width:3.5rem;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.s-order-details-product-image img{height:100%;width:100%;object-fit:cover}.s-order-details-product-details{display:flex;min-width:0px;flex-grow:1;flex-direction:column;gap:0.25rem}.s-order-details-product-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1));text-decoration-line:none}.s-order-details-product-name:hover{color:var(--color-primary)}.s-order-details-product-price{font-size:0.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-order-details-product-price-sale{--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.s-order-details-product-regular-price{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-order-details-product-quantity{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-order-details-options{margin-top:1rem}.s-order-details-option{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));padding-top:0.5rem;padding-bottom:0.5rem}.s-order-details-option:last-child{border-bottom-width:0px}.s-order-details-option-name{font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-order-details-option-value{text-align:right;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-order-details-option-value:where([dir="rtl"],[dir="rtl"] *){text-align:left}.s-order-details-options-title{margin-top:1.25rem;margin-bottom:0.875rem;font-size:0.875rem;line-height:1.25rem;font-weight:700}.s-order-details-options-container{margin-bottom:0.5rem;display:flow-root;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:1rem;padding-right:1rem}.s-order-details-options-container-borderless{margin-bottom:0.5rem;display:flow-root}.s-order-details-options-list>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));--tw-divide-opacity:1;border-color:rgb(243 244 246 / var(--tw-divide-opacity, 1))}.s-order-details-options-list{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.s-order-details-options-item{display:flex;align-items:center;justify-content:space-between;padding-top:0.625rem;padding-bottom:0.625rem}.s-order-details-options-item-name{margin-bottom:0.5rem}@media (min-width: 768px){.s-order-details-options-item-name{margin-bottom:0px}}.s-order-details-options-item-value{font-weight:500}.s-order-details-options-item-value-image{font-weight:500;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-order-details-options-item-value-text{font-size:0.75rem;line-height:1rem;font-weight:500}.s-order-details-option-image-container{display:flex}.s-order-details-option-image-container>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.625rem * var(--tw-space-x-reverse));margin-left:calc(0.625rem * calc(1 - var(--tw-space-x-reverse)))}.s-order-details-option-image-container:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-order-details-option-image{height:1.5rem;width:1.5rem;border-radius:0.375rem;object-fit:cover}.s-order-details-option-color-swatch{display:inline-block;height:1.5rem;width:1.5rem;border-radius:9999px;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-order-details-option-color-swatch:where([dir="ltr"],[dir="ltr"] *){margin-left:0.5rem}.s-order-details-option-color-swatch:where([dir="rtl"],[dir="rtl"] *){margin-right:0.5rem}.s-order-details-option-file-link{font-size:0.875rem;line-height:1.25rem;color:var(--color-primary);text-decoration-line:underline}.s-order-details-option-color-picker{display:flex;width:fit-content;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.s-order-details-option-color-picker-content{display:flex;align-items:center;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.s-order-details-option-color-picker-content:where([dir="ltr"],[dir="ltr"] *){border-right-width:1px;padding-right:0.25rem}.s-order-details-option-color-picker-content:where([dir="rtl"],[dir="rtl"] *){border-left-width:1px;padding-left:0.25rem}.s-order-details-option-color-picker-text{padding-left:0.25rem;padding-right:0.25rem;font-size:0.75rem;line-height:1rem}.s-order-details-option-color-picker-swatch{display:inline-block;height:1rem;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));padding:0.25rem;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-order-details-option-color-picker-swatch:where([dir="ltr"],[dir="ltr"] *){margin-left:0.25rem}.s-order-details-option-color-picker-swatch:where([dir="rtl"],[dir="rtl"] *){margin-right:0.25rem}.s-order-details-option-color-picker-button{padding-left:0.25rem;padding-right:0.25rem;padding-top:0.25rem}.s-order-details-option-color-picker-icon{pointer-events:none;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-order-details-option-map-button{font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-order-details-option-default-text{font-size:0.75rem;line-height:1rem}.s-order-details-option-color-copy-icon svg{height:1rem;width:1rem;fill:#6b7280}';export{i as salla_order_details}
4
+ import{r as e,h as r,F as t,H as o}from"./p-Bf2Z6A1M.js";const i=class{constructor(r){e(this,r)}parseOrderDetailsData(e){this.parsedOrderDetailsData=e,this.parsedOrderDetailsData="string"==typeof this.orderDetails?JSON.parse(e):e}componentWillLoad(){this.parseOrderDetailsData(this.orderDetails),console.log("Parent componentWillLoad - parsedOrderDetailsData:",this.parsedOrderDetailsData)}renderOrderDetailsContent(){return this.parsedOrderDetailsData?[this.parsedOrderDetailsData.options&&this.parsedOrderDetailsData.options.length>0&&r("salla-order-details-options",{options:this.parsedOrderDetailsData.options}),this.parsedOrderDetailsData.sub_products&&this.parsedOrderDetailsData.sub_products.length>0&&r(t,null,r("h2",{class:"s-order-details-bundle-title"},salla.lang.get("pages.orders.sub_products")),r("div",{class:"s-order-details-bundle-content"},this.parsedOrderDetailsData.sub_products.map((e=>r("salla-order-details-multiple-bundle-product",{key:e?.id,productDetails:e})))))]:(console.warn("No parsedOrderDetailsData available"),null)}render(){return r(o,{key:"ffa22cae6c347b5acbe4836378f1f3843184e8f5",class:"s-order-details-wrapper"},this.renderOrderDetailsContent())}static get watchers(){return{orderDetails:["parseOrderDetailsData"]}}};i.style='/*!twlt*/.s-order-details-multiple-bundle-product{display:flex;height:auto;width:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));outline:2px solid transparent;outline-offset:0px}.s-order-details-wrapper{display:block}.s-order-details-bundle-content{display:flex;flex-direction:column;gap:1rem;padding-top:1rem;padding-bottom:1rem}.s-order-details-bundle-title{margin-bottom:0.75rem;font-size:0.875rem;line-height:1.25rem;font-weight:700}.s-order-details-product{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.s-order-details-product-content{min-width:0px}.s-order-details-product-info{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-order-details-product-image{display:flex;height:3.5rem;width:3.5rem;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.s-order-details-product-image img{height:100%;width:100%;object-fit:cover}.s-order-details-product-details{display:flex;min-width:0px;flex-grow:1;flex-direction:column;gap:0.25rem}.s-order-details-product-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1));text-decoration-line:none}.s-order-details-product-name:hover{color:var(--color-primary)}.s-order-details-product-price{font-size:0.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-order-details-product-price-sale{--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.s-order-details-product-regular-price{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-order-details-product-quantity{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-order-details-options{margin-top:1rem}.s-order-details-option{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));padding-top:0.5rem;padding-bottom:0.5rem}.s-order-details-option:last-child{border-bottom-width:0px}.s-order-details-option-name{font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-order-details-option-value{text-align:right;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-order-details-option-value:where([dir="rtl"],[dir="rtl"] *){text-align:left}.s-order-details-options-title{margin-top:1.25rem;margin-bottom:0.875rem;font-size:0.875rem;line-height:1.25rem;font-weight:700}.s-order-details-options-container{margin-bottom:0.5rem;display:flow-root;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:1rem;padding-right:1rem}.s-order-details-options-container-borderless{margin-bottom:0.5rem;display:flow-root}.s-order-details-options-list>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));--tw-divide-opacity:1;border-color:rgb(243 244 246 / var(--tw-divide-opacity, 1))}.s-order-details-options-list{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.s-order-details-options-item{display:flex;align-items:center;justify-content:space-between;padding-top:0.625rem;padding-bottom:0.625rem}.s-order-details-options-item-name{margin-bottom:0.5rem}@media (min-width: 768px){.s-order-details-options-item-name{margin-bottom:0px}}.s-order-details-options-item-value{font-weight:500}.s-order-details-options-item-value-image{font-weight:500;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-order-details-options-item-value-text{font-size:0.75rem;line-height:1rem;font-weight:500}.s-order-details-option-image-container{display:flex}.s-order-details-option-image-container>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.625rem * var(--tw-space-x-reverse));margin-left:calc(0.625rem * calc(1 - var(--tw-space-x-reverse)))}.s-order-details-option-image-container:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-order-details-option-image{height:1.5rem;width:1.5rem;border-radius:0.375rem;object-fit:cover}.s-order-details-option-color-swatch{display:inline-block;height:1.5rem;width:1.5rem;border-radius:9999px;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-order-details-option-color-swatch:where([dir="ltr"],[dir="ltr"] *){margin-left:0.5rem}.s-order-details-option-color-swatch:where([dir="rtl"],[dir="rtl"] *){margin-right:0.5rem}.s-order-details-option-file-link{font-size:0.875rem;line-height:1.25rem;color:var(--color-primary);text-decoration-line:underline}.s-order-details-option-color-picker{display:flex;width:fit-content;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.s-order-details-option-color-picker-content{display:flex;align-items:center;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.s-order-details-option-color-picker-content:where([dir="ltr"],[dir="ltr"] *){border-right-width:1px;padding-right:0.25rem}.s-order-details-option-color-picker-content:where([dir="rtl"],[dir="rtl"] *){border-left-width:1px;padding-left:0.25rem}.s-order-details-option-color-picker-text{padding-left:0.25rem;padding-right:0.25rem;font-size:0.75rem;line-height:1rem}.s-order-details-option-color-picker-swatch{display:inline-block;height:1rem;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));padding:0.25rem;--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-order-details-option-color-picker-swatch:where([dir="ltr"],[dir="ltr"] *){margin-left:0.25rem}.s-order-details-option-color-picker-swatch:where([dir="rtl"],[dir="rtl"] *){margin-right:0.25rem}.s-order-details-option-color-picker-button{padding-left:0.25rem;padding-right:0.25rem;padding-top:0.25rem}.s-order-details-option-color-picker-icon{pointer-events:none;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-order-details-option-map-button{font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-order-details-option-default-text{font-size:0.75rem;line-height:1rem}.s-order-details-option-color-copy-icon svg{height:1rem;width:1rem;fill:#6b7280}';export{i as salla_order_details}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as o,a as r}from"./p-C0qiFNJn.js";const a=class{constructor(o){t(this,o),this.theme="default",this.show=!1,this.targetElement=null}handleMouseOver(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!0)}handleMouseOut(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!1)}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){const t=["default","dark"].includes(this.theme)?this.theme:"default";return o("div",{key:"84dfb23d4eb2689ff71b65c4a8b24dd36f8cb6ca",class:"s-tooltip-container"},o("div",{key:"59d3bac320e20f99de1c4bf49531a61962190efc",class:`s-tooltip-item s-tooltip-item--${t}`,style:{display:this.show?"block":"none"}},this.text?o("span",null,this.text):o("slot",null)))}get el(){return r(this)}};a.style='/*!twlt*/.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-63%) translateY(-50%);background-color:var(--color-primary);color:var(--color-primary-reverse);bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--color-primary) transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}.block{display:block}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}';export{a as salla_tooltip}
4
+ import{r as t,h as o,a as r}from"./p-Bf2Z6A1M.js";const a=class{constructor(o){t(this,o),this.theme="default",this.show=!1,this.targetElement=null}handleMouseOver(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!0)}handleMouseOut(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!1)}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){const t=["default","dark"].includes(this.theme)?this.theme:"default";return o("div",{key:"84dfb23d4eb2689ff71b65c4a8b24dd36f8cb6ca",class:"s-tooltip-container"},o("div",{key:"59d3bac320e20f99de1c4bf49531a61962190efc",class:`s-tooltip-item s-tooltip-item--${t}`,style:{display:this.show?"block":"none"}},this.text?o("span",null,this.text):o("slot",null)))}get el(){return r(this)}};a.style='/*!twlt*/.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-63%) translateY(-50%);background-color:var(--color-primary);color:var(--color-primary-reverse);bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--color-primary) transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}.block{display:block}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}';export{a as salla_tooltip}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,c as e,h as s,H as r,a as i}from"./p-C0qiFNJn.js";import{L as a}from"./p-BO5AoBAP.js";var o={light:[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]}],dark:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}]};class l{constructor(t=null,e={}){if(this.apiKey=t,this.options=e,"undefined"==typeof window)throw new Error("google-maps is supported only in browser environment")}load(){return void 0!==this.api?Promise.resolve(this.api):void 0!==this.loader?this.loader:(window[l.CALLBACK_NAME]=()=>{if(this.api=window.google,void 0===this.resolve)throw new Error("Should not happen");this.resolve(this.api)},window.gm_authFailure=()=>{if(void 0===this.reject)throw new Error("Should not happen");this.reject(new Error("google-maps: authentication error"))},this.loader=new Promise(((t,e)=>{this.resolve=t,this.reject=e;const s=document.createElement("script");s.src=this.createUrl(),s.async=!0,s.onerror=t=>e(t),document.head.appendChild(s)})))}createUrl(){const t=[`callback=${l.CALLBACK_NAME}`];this.apiKey&&t.push(`key=${this.apiKey}`);for(let e in this.options)if(this.options.hasOwnProperty(e)){let s=this.options[e];"version"===e&&(e="v"),"libraries"===e&&(s=s.join(",")),t.push(`${e}=${s}`)}return`https://maps.googleapis.com/maps/api/js?${t.join("&")}`}}l.CALLBACK_NAME="_dk_google_maps_loader_cb";const n=class{constructor(s){t(this,s),this.selected=e(this,"selected"),this.mapClicked=e(this,"mapClicked"),this.currentLocationChanged=e(this,"currentLocationChanged"),this.invalidInput=e(this,"invalidInput"),this.defaultLat=21.419421,this.defaultLng=39.82553,this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address"),this.searchInputValue=null,this.formattedAddress="",this.geolocationError=!1,this.name="location",this.required=!1,this.readonly=!1,this.searchable=!1,this.zoom=10,this.theme="light",salla.lang.onLoaded((()=>{this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address")})),salla.onReady((()=>{this.apiKey=salla.config.get("store.settings.keys.maps")}))}formatAddress(t){return t.length>25?t.substring(0,25)+"...":t}hasCoordinate(t){if(null==t)return!1;if("number"==typeof t)return Number.isFinite(t);const e=String(t).trim();return""!==e&&Number.isFinite(Number(e))}getLatLng(){const t=this.hasCoordinate(this.selectedLat)?this.selectedLat:this.lat,e=this.hasCoordinate(this.selectedLng)?this.selectedLng:this.lng;return this.hasCoordinate(t)&&this.hasCoordinate(e)?`${t}, ${e}`:""}syncMapInputValue(){this.mapInput&&(this.mapInput.value=this.getLatLng(),this.mapInput.setCustomValidity(""))}focusLocateControl(){const t=this.host.querySelector(".s-map-location-button");t?.focus?.()}componentWillLoad(){this.hasCoordinate(this.lat)&&this.hasCoordinate(this.lng)&&(this.selectedLat=this.lat,this.selectedLng=this.lng)}getPositionAddress(t,e=!1){(new google.maps.Geocoder).geocode({location:t},((t,s)=>{s===google.maps.GeocoderStatus.OK&&(this.searchable&&(this.searchInputValue=t[0].formatted_address,this.searchInput.value=t[0].formatted_address),e&&(this.formattedAddress=t[0].formatted_address))}))}initGoogleMaps(t,e){new l(this.apiKey,t).load().then((t=>{if(this.map=new t.maps.Map(e,{center:this.lat||this.lng?{lat:this.lat,lng:this.lng}:{lat:this.defaultLat,lng:this.defaultLng},zoom:this.zoom,zoomControl:!0,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,disableDefaultUI:!1}),this.map.setOptions({styles:"light"===this.theme?o.light:o.dark}),this.marker=new t.maps.Marker({position:this.map.getCenter(),map:this.map,icon:{url:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="36" height="36" rx="18" fill="#5CD5C4"/>\n<path d="M18 10C17.0104 10 16.1458 10.1771 15.4062 10.5312C14.6562 10.8854 14.026 11.3542 13.5156 11.9375C13.0156 12.5104 12.6406 13.1667 12.3906 13.9062C12.1302 14.6458 12 15.401 12 16.1719C12 16.8906 12.2604 17.7656 12.7812 18.7969C13.3021 19.8281 13.8854 20.8333 14.5312 21.8125C15.1875 22.7812 15.8073 23.6406 16.3906 24.3906C16.9844 25.1302 17.349 25.5885 17.4844 25.7656C17.5469 25.8385 17.625 25.8958 17.7188 25.9375C17.8125 25.9792 17.9062 26 18 26C18.1042 26 18.1979 25.9792 18.2812 25.9375C18.375 25.8958 18.4531 25.8385 18.5156 25.7656C18.651 25.5885 19.0156 25.1302 19.6094 24.3906C20.1927 23.6406 20.8073 22.7812 21.4531 21.8125C22.1094 20.8333 22.6979 19.8281 23.2188 18.7969C23.7396 17.7656 24 16.8906 24 16.1719C24 15.401 23.8698 14.6458 23.6094 13.9062C23.3594 13.1667 22.9792 12.5104 22.4688 11.9375C21.9688 11.3542 21.3438 10.8854 20.5938 10.5312C19.8542 10.1771 18.9896 10 18 10ZM18 24.2812C17.5833 23.75 17.1094 23.1198 16.5781 22.3906C16.0365 21.651 15.526 20.901 15.0469 20.1406C14.5677 19.3698 14.1615 18.6302 13.8281 17.9219C13.4948 17.2135 13.3281 16.6302 13.3281 16.1719C13.3281 15.5885 13.4219 15.0052 13.6094 14.4219C13.7969 13.849 14.0781 13.3333 14.4531 12.875C14.8385 12.4167 15.3281 12.0469 15.9219 11.7656C16.5052 11.474 17.1979 11.3281 18 11.3281C18.8021 11.3281 19.4948 11.474 20.0781 11.7656C20.6719 12.0469 21.1562 12.4167 21.5312 12.875C21.9167 13.3333 22.2031 13.849 22.3906 14.4219C22.5781 15.0052 22.6719 15.5885 22.6719 16.1719C22.6719 16.6302 22.5052 17.2135 22.1719 17.9219C21.8385 18.6302 21.4323 19.3698 20.9531 20.1406C20.474 20.901 19.9688 21.651 19.4375 22.3906C18.8958 23.1198 18.4167 23.75 18 24.2812ZM18 13.3281C17.2604 13.3281 16.6302 13.5885 16.1094 14.1094C15.5885 14.6302 15.3281 15.2604 15.3281 16C15.3281 16.7396 15.5885 17.3698 16.1094 17.8906C16.6302 18.4115 17.2604 18.6719 18 18.6719C18.7396 18.6719 19.3698 18.4115 19.8906 17.8906C20.4115 17.3698 20.6719 16.7396 20.6719 16C20.6719 15.2604 20.4115 14.6302 19.8906 14.1094C19.3698 13.5885 18.7396 13.3281 18 13.3281ZM18 17.3281C17.6354 17.3281 17.3229 17.1979 17.0625 16.9375C16.8021 16.6771 16.6719 16.3646 16.6719 16C16.6719 15.6354 16.8021 15.3229 17.0625 15.0625C17.3229 14.8021 17.6354 14.6719 18 14.6719C18.3646 14.6719 18.6771 14.8021 18.9375 15.0625C19.1979 15.3229 19.3281 15.6354 19.3281 16C19.3281 16.3646 19.1979 16.6771 18.9375 16.9375C18.6771 17.1979 18.3646 17.3281 18 17.3281Z" fill="white"/>\n</svg>\n'),scaledSize:new t.maps.Size(30,30)}}),this.searchable){const e=new t.maps.places.SearchBox(this.searchInput);t.maps.event.addListener(e,"places_changed",(()=>{const t=e.getPlaces();t.length>0&&this.map&&(this.map.setCenter(t[0].geometry.location),this.lat=t[0].geometry.location.lat(),this.lng=t[0].geometry.location.lng(),this.marker.setPosition(t[0].geometry.location),this.searchInputValue=t[0].formatted_address,this.formattedAddress=t[0].formatted_address)}))}t.maps.event.addListener(this.map,"click",(t=>{this.readonly||(this.marker.setPosition(t.latLng),this.lat=t.latLng.lat(),this.lng=t.latLng.lng(),this.getPositionAddress(t.latLng),this.mapClicked.emit({lat:t.latLng.lat(),lng:t.latLng.lng(),address:this.formattedAddress?this.formattedAddress:null}))})),this.lat||this.lng||(this.getCurrentLocation(),this.geolocationError&&(this.map.setCenter({lat:this.lat,lng:this.lng}),this.marker.setPosition({lat:this.lat,lng:this.lng})))}))}getCurrentLocation(){navigator.geolocation&&this.map?navigator.geolocation.getCurrentPosition((t=>{const e={center:new google.maps.LatLng(t.coords.latitude,t.coords.longitude),zoom:15};this.map.setOptions(e),this.marker.setPosition(e.center),this.getPositionAddress(e.center),this.lat=t.coords.latitude,this.lng=t.coords.longitude,this.currentLocationChanged.emit({lat:t.coords.latitude,lng:t.coords.longitude,address:this.formattedAddress?this.formattedAddress:null})}),this.handleLocationError.bind(this)):(salla.log("Geolocation is not supported by this browser."),this.geolocationError=!0)}handleLocationError(t){switch(this.geolocationError=!0,t.code){case t.PERMISSION_DENIED:salla.log("User denied the request for Geolocation.");break;case t.POSITION_UNAVAILABLE:salla.log("Location information is unavailable.");break;case t.TIMEOUT:salla.log("The request to get user location timed out.");break;case t.UNKNOWN_ERROR:salla.log("An unknown error occurred.")}}componentDidLoad(){this.syncMapInputValue(),this.hasCoordinate(this.lat)&&this.hasCoordinate(this.lng)&&fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get("user.language_code")||document.documentElement.lang||"ar"}`).then((t=>t.json())).then((t=>{"OK"===t.status&&(this.formattedAddress=t.results[0].formatted_address,this.searchInputValue=t.results[0].formatted_address,this.searchInput&&(this.searchInput.value=t.results[0].formatted_address),this.selectedLng=this.lng,this.selectedLat=this.lat,this.syncMapInputValue())})),this.mapInput.addEventListener("invalid",(t=>{t.preventDefault(),this.host.classList.add("s-has-error"),this.focusLocateControl(),this.invalidInput.emit(t)})),this.mapInput.addEventListener("input",(()=>{this.mapInput.setCustomValidity(""),this.host.classList.remove("s-has-error")}))}async reportValidity(){return this.syncMapInputValue(),!this.mapInput||!this.required||this.readonly||this.getLatLng()?(this.mapInput?.setCustomValidity(""),this.host.classList.remove("s-has-error"),!0):this.mapInput.reportValidity()}async open(){return this.map||this.initGoogleMaps({libraries:this.searchable?["places","search"]:[],language:salla.config.get("user.language_code")||document.documentElement.lang||"ar"},this.mapElement),await this.locationModal.open()}getLocationModal(){return s("div",null,s("div",{class:"s-map-modal-title"},this.modalTitle?this.modalTitle:this.modalActivityTitle),s("div",{class:"s-map-modal-body"},s("div",{class:"s-map-element",ref:t=>this.mapElement=t}),this.readonly?"":[this.searchable&&s("div",{class:"s-map-search-wrapper"},s("input",{class:"s-map-search-input",ref:t=>this.searchInput=t,placeholder:this.searchPlaceholder})),s("salla-button",{class:"s-map-my-location-button",onClick:()=>{this.getCurrentLocation()},shape:"icon",color:"primary"},s("span",{innerHTML:'\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>location-target</title>\n<path d="M16 9.333c-3.676 0-6.667 2.991-6.667 6.667s2.991 6.667 6.667 6.667 6.667-2.991 6.667-6.667-2.991-6.667-6.667-6.667zM16 20c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.795 4-4 4zM30.667 14.667h-1.401c-0.627-6.289-5.643-11.305-11.932-11.932v-1.401c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.401c-6.289 0.627-11.305 5.643-11.932 11.932h-1.401c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.401c0.628 6.289 5.643 11.305 11.932 11.932v1.401c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-1.401c6.289-0.628 11.305-5.643 11.932-11.932h1.401c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM16 26.667c-5.881 0-10.667-4.785-10.667-10.667s4.785-10.667 10.667-10.667 10.667 4.785 10.667 10.667-4.785 10.667-10.667 10.667z"></path>\n</svg>\n'})),s("salla-button",{class:"s-map-submit-button",color:"primary",width:"wide",onClick:()=>{let t={lat:this.lat,lng:this.lng,address:this.formattedAddress?this.formattedAddress:null};salla.event.emit("salla-map::selected",t),this.selected.emit(t),this.selectedLat=t.lat,this.selectedLng=t.lng,this.getPositionAddress(new google.maps.LatLng(t.lat,t.lng),!0),this.syncMapInputValue(),this.host.classList.remove("s-has-error"),this.mapInput.dispatchEvent(new window.Event("change",{bubbles:!0})),this.locationModal.close()}},this.confirmButtonTitle)]))}render(){return s(r,{key:"20ed1a1d4099e817164c3764341d473c1b735add",class:"s-map-wrapper"},s("salla-modal",{key:"77309d82d11bbae677a935aef0e02588c5f9fbfa",class:"s-map-modal-wrapper",noPadding:!0,ref:t=>{this.locationModal=t}},this.getLocationModal()),s("slot",{key:"57e6d352f42a3321a98925dd4136eaf0fdbb06b0",name:"button"},s("salla-button",{key:"a0c39395b18ca41f2ea31c5c5729b2ba20c17a16",onClick:()=>{this.open()},color:"primary",class:"s-map-location-button"},s("span",{key:"b9478a06c198812edeacab794fb63699ea72fd6b",class:"s-map-location-icon",innerHTML:this.formattedAddress?'\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>edit</title>\n<path d="M30.583 1.417c-1.828-1.829-5.019-1.829-6.847 0l-13.396 13.396c-0.161 0.161-0.279 0.361-0.341 0.581l-1.949 6.911c-0.131 0.464 0 0.964 0.341 1.305 0.253 0.252 0.593 0.389 0.943 0.389 0.121 0 0.243-0.016 0.361-0.051l6.911-1.949c0.22-0.061 0.419-0.179 0.581-0.34l10.455-10.453s0 0 0 0l2.941-2.941c1.887-1.888 1.887-4.96 0-6.848zM15.547 19.528l-4.284 1.208 1.208-4.284 9.265-9.265 3.076 3.076zM28.696 6.38l-1.999 1.999-3.076-3.076 1.999-1.999c0.849-0.848 2.227-0.848 3.076 0 0.848 0.848 0.848 2.227 0 3.076zM24 20c-0.737 0-1.333 0.597-1.333 1.333v4c0 2.205-1.795 4-4 4h-12c-2.205 0-4-1.795-4-4v-12c0-2.205 1.795-4 4-4h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-4c-3.676 0-6.667 2.991-6.667 6.667v12c0 3.676 2.991 6.667 6.667 6.667h12c3.676 0 6.667-2.991 6.667-6.667v-4c0-0.736-0.596-1.333-1.333-1.333z"></path>\n</svg>\n':a}),this.formattedAddress?s("div",null,this.locateButtonEdit," | ",this.formatAddress(this.formattedAddress)):this.locateButtonTitle)),s("input",{key:"d1619a934c72218d4d00b651e95743ad8d14a7a2",class:"s-map-value-input",name:this.name,required:this.required,value:this.getLatLng(),tabIndex:-1,"aria-hidden":"true",ref:t=>this.mapInput=t}))}get host(){return i(this)}};n.style='/*!twlt*/.s-map-wrapper{position:relative}.s-map-value-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0;opacity:0;pointer-events:none}.s-map-wrapper.s-has-error .s-map-location-button{outline:2px solid rgb(248, 113, 113);outline-offset:2px}.visible{visibility:visible}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-map-modal-title{position:relative;margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem}.s-map-location-icon{margin-right:0.5rem}.s-map-location-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem;margin-right:0px}.s-map-location-icon svg{height:1rem !important;width:1rem !important}.s-map-modal-body{position:relative;overflow:hidden}.s-map-element{height:400px;width:100%}.s-map-search-wrapper{position:absolute;top:0px;z-index:1;margin:1.25rem;width:-webkit-fill-available}.s-map-search-wrapper input{height:2.5rem;width:100%;padding:0.5rem}.s-map-search-wrapper input:where([dir="rtl"],[dir="rtl"] *){text-align:right}.s-map-search-results{margin-top:0px;display:flex;height:6rem;flex-direction:column;padding:0.5rem}.s-map-modal-body .s-loading-container{position:absolute;margin:0px;padding:5rem}.s-map-my-location-button{position:absolute;bottom:1.5rem;left:0px;margin:0.5rem}.s-map-location-button .s-button-text{display:flex;align-items:center}.s-map-submit-button button{border-top-right-radius:0px;border-top-left-radius:0px;padding-top:12px;padding-bottom:12px}';const h=class{constructor(e){t(this,e),this.height="10px";try{if(this.donation){let t="string"==typeof this.donation?JSON.parse(this.donation):this.donation;t.can_donate&&t.target_amount?(t.target_end_date="0000-00-00"==t.target_end_date?null:t.target_end_date,this.value=t.collected_amount,this.target=t.target_amount,this.header=salla.lang.get("pages.products.target"),this.message=t.target_end_date?salla.lang.get("pages.products.donation_target_date")+" "+t.target_end_date:""):this.message=t.target_amount?t.target_message:""}}catch(t){salla.log("Wrong donation json")}salla.lang.onLoaded((()=>{this.header=this.header?.replace("pages.products.target",salla.lang.get("pages.products.target")),this.message=this.message?.replace("pages.products.donation_target_date",salla.lang.get("pages.products.donation_target_date"))})),salla.onReady((()=>{this.color=this.color||salla.config.get("theme.color.primary","#ffd5c4"),this.unit||(this.unit=salla.config.currency().symbol)}))}getPercentage(){return this.value/this.target*100}render(){return this.target||this.message?s("div",{class:"s-progress-bar-container"},this.header?s("div",{class:"s-progress-bar-header"},this.header):"",this.getProgressBar(),this.message?s("span",{class:"s-progress-bar-message"},this.message):""):""}getProgressBar(){return this.target?[this.hideUnits?null:s("div",{class:"s-progress-bar-target-section"},s("span",{innerHTML:`${salla.helpers.number(this.value)} ${this.unit}`}),s("span",{innerHTML:`${salla.helpers.number(this.target)} ${this.unit}`})),s("div",{class:"s-progress-bar-wrapper",style:{height:this.height}},s("div",{class:{"s-progress-bar-progress":!0,"s-progress-bar-progress-stripped":this.stripped},style:{width:`${this.getPercentage()}%`,backgroundColor:this.color}}))]:null}};h.style="/*!twlt*/.s-progress-bar-container{margin-bottom:0.625rem}.s-progress-bar-header{margin-bottom:0.375rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-progress-bar-target-section{margin-bottom:0.625rem;display:flex;justify-content:space-between;font-size:0.875rem;line-height:1.25rem}.s-progress-bar-wrapper{margin-bottom:0.375rem;width:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-wrapper:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.s-progress-bar-progress{height:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-message{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-progress-bar-wrapper .s-progress-bar-progress-stripped{background-image:linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%,rgba(255, 255, 255, .2) 50%,rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-size:30px 30px}.s-reviews-summary-progress .s-progress-bar-wrapper{margin-bottom:0px}.s-reviews-summary-progress .s-progress-bar-container{margin-bottom:0px}";export{n as salla_map,h as salla_progress_bar}
4
+ import{r as t,c as e,h as s,H as r,a as i}from"./p-Bf2Z6A1M.js";import{L as a}from"./p-BO5AoBAP.js";var o={light:[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]}],dark:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}]};class l{constructor(t=null,e={}){if(this.apiKey=t,this.options=e,"undefined"==typeof window)throw new Error("google-maps is supported only in browser environment")}load(){return void 0!==this.api?Promise.resolve(this.api):void 0!==this.loader?this.loader:(window[l.CALLBACK_NAME]=()=>{if(this.api=window.google,void 0===this.resolve)throw new Error("Should not happen");this.resolve(this.api)},window.gm_authFailure=()=>{if(void 0===this.reject)throw new Error("Should not happen");this.reject(new Error("google-maps: authentication error"))},this.loader=new Promise(((t,e)=>{this.resolve=t,this.reject=e;const s=document.createElement("script");s.src=this.createUrl(),s.async=!0,s.onerror=t=>e(t),document.head.appendChild(s)})))}createUrl(){const t=[`callback=${l.CALLBACK_NAME}`];this.apiKey&&t.push(`key=${this.apiKey}`);for(let e in this.options)if(this.options.hasOwnProperty(e)){let s=this.options[e];"version"===e&&(e="v"),"libraries"===e&&(s=s.join(",")),t.push(`${e}=${s}`)}return`https://maps.googleapis.com/maps/api/js?${t.join("&")}`}}l.CALLBACK_NAME="_dk_google_maps_loader_cb";const n=class{constructor(s){t(this,s),this.selected=e(this,"selected"),this.mapClicked=e(this,"mapClicked"),this.currentLocationChanged=e(this,"currentLocationChanged"),this.invalidInput=e(this,"invalidInput"),this.defaultLat=21.419421,this.defaultLng=39.82553,this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address"),this.searchInputValue=null,this.formattedAddress="",this.geolocationError=!1,this.name="location",this.required=!1,this.readonly=!1,this.searchable=!1,this.zoom=10,this.theme="light",salla.lang.onLoaded((()=>{this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address")})),salla.onReady((()=>{this.apiKey=salla.config.get("store.settings.keys.maps")}))}formatAddress(t){return t.length>25?t.substring(0,25)+"...":t}hasCoordinate(t){if(null==t)return!1;if("number"==typeof t)return Number.isFinite(t);const e=String(t).trim();return""!==e&&Number.isFinite(Number(e))}getLatLng(){const t=this.hasCoordinate(this.selectedLat)?this.selectedLat:this.lat,e=this.hasCoordinate(this.selectedLng)?this.selectedLng:this.lng;return this.hasCoordinate(t)&&this.hasCoordinate(e)?`${t}, ${e}`:""}syncMapInputValue(){this.mapInput&&(this.mapInput.value=this.getLatLng(),this.mapInput.setCustomValidity(""))}focusLocateControl(){const t=this.host.querySelector(".s-map-location-button");t?.focus?.()}componentWillLoad(){this.hasCoordinate(this.lat)&&this.hasCoordinate(this.lng)&&(this.selectedLat=this.lat,this.selectedLng=this.lng)}getPositionAddress(t,e=!1){(new google.maps.Geocoder).geocode({location:t},((t,s)=>{s===google.maps.GeocoderStatus.OK&&(this.searchable&&(this.searchInputValue=t[0].formatted_address,this.searchInput.value=t[0].formatted_address),e&&(this.formattedAddress=t[0].formatted_address))}))}initGoogleMaps(t,e){new l(this.apiKey,t).load().then((t=>{if(this.map=new t.maps.Map(e,{center:this.lat||this.lng?{lat:this.lat,lng:this.lng}:{lat:this.defaultLat,lng:this.defaultLng},zoom:this.zoom,zoomControl:!0,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,disableDefaultUI:!1}),this.map.setOptions({styles:"light"===this.theme?o.light:o.dark}),this.marker=new t.maps.Marker({position:this.map.getCenter(),map:this.map,icon:{url:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="36" height="36" rx="18" fill="#5CD5C4"/>\n<path d="M18 10C17.0104 10 16.1458 10.1771 15.4062 10.5312C14.6562 10.8854 14.026 11.3542 13.5156 11.9375C13.0156 12.5104 12.6406 13.1667 12.3906 13.9062C12.1302 14.6458 12 15.401 12 16.1719C12 16.8906 12.2604 17.7656 12.7812 18.7969C13.3021 19.8281 13.8854 20.8333 14.5312 21.8125C15.1875 22.7812 15.8073 23.6406 16.3906 24.3906C16.9844 25.1302 17.349 25.5885 17.4844 25.7656C17.5469 25.8385 17.625 25.8958 17.7188 25.9375C17.8125 25.9792 17.9062 26 18 26C18.1042 26 18.1979 25.9792 18.2812 25.9375C18.375 25.8958 18.4531 25.8385 18.5156 25.7656C18.651 25.5885 19.0156 25.1302 19.6094 24.3906C20.1927 23.6406 20.8073 22.7812 21.4531 21.8125C22.1094 20.8333 22.6979 19.8281 23.2188 18.7969C23.7396 17.7656 24 16.8906 24 16.1719C24 15.401 23.8698 14.6458 23.6094 13.9062C23.3594 13.1667 22.9792 12.5104 22.4688 11.9375C21.9688 11.3542 21.3438 10.8854 20.5938 10.5312C19.8542 10.1771 18.9896 10 18 10ZM18 24.2812C17.5833 23.75 17.1094 23.1198 16.5781 22.3906C16.0365 21.651 15.526 20.901 15.0469 20.1406C14.5677 19.3698 14.1615 18.6302 13.8281 17.9219C13.4948 17.2135 13.3281 16.6302 13.3281 16.1719C13.3281 15.5885 13.4219 15.0052 13.6094 14.4219C13.7969 13.849 14.0781 13.3333 14.4531 12.875C14.8385 12.4167 15.3281 12.0469 15.9219 11.7656C16.5052 11.474 17.1979 11.3281 18 11.3281C18.8021 11.3281 19.4948 11.474 20.0781 11.7656C20.6719 12.0469 21.1562 12.4167 21.5312 12.875C21.9167 13.3333 22.2031 13.849 22.3906 14.4219C22.5781 15.0052 22.6719 15.5885 22.6719 16.1719C22.6719 16.6302 22.5052 17.2135 22.1719 17.9219C21.8385 18.6302 21.4323 19.3698 20.9531 20.1406C20.474 20.901 19.9688 21.651 19.4375 22.3906C18.8958 23.1198 18.4167 23.75 18 24.2812ZM18 13.3281C17.2604 13.3281 16.6302 13.5885 16.1094 14.1094C15.5885 14.6302 15.3281 15.2604 15.3281 16C15.3281 16.7396 15.5885 17.3698 16.1094 17.8906C16.6302 18.4115 17.2604 18.6719 18 18.6719C18.7396 18.6719 19.3698 18.4115 19.8906 17.8906C20.4115 17.3698 20.6719 16.7396 20.6719 16C20.6719 15.2604 20.4115 14.6302 19.8906 14.1094C19.3698 13.5885 18.7396 13.3281 18 13.3281ZM18 17.3281C17.6354 17.3281 17.3229 17.1979 17.0625 16.9375C16.8021 16.6771 16.6719 16.3646 16.6719 16C16.6719 15.6354 16.8021 15.3229 17.0625 15.0625C17.3229 14.8021 17.6354 14.6719 18 14.6719C18.3646 14.6719 18.6771 14.8021 18.9375 15.0625C19.1979 15.3229 19.3281 15.6354 19.3281 16C19.3281 16.3646 19.1979 16.6771 18.9375 16.9375C18.6771 17.1979 18.3646 17.3281 18 17.3281Z" fill="white"/>\n</svg>\n'),scaledSize:new t.maps.Size(30,30)}}),this.searchable){const e=new t.maps.places.SearchBox(this.searchInput);t.maps.event.addListener(e,"places_changed",(()=>{const t=e.getPlaces();t.length>0&&this.map&&(this.map.setCenter(t[0].geometry.location),this.lat=t[0].geometry.location.lat(),this.lng=t[0].geometry.location.lng(),this.marker.setPosition(t[0].geometry.location),this.searchInputValue=t[0].formatted_address,this.formattedAddress=t[0].formatted_address)}))}t.maps.event.addListener(this.map,"click",(t=>{this.readonly||(this.marker.setPosition(t.latLng),this.lat=t.latLng.lat(),this.lng=t.latLng.lng(),this.getPositionAddress(t.latLng),this.mapClicked.emit({lat:t.latLng.lat(),lng:t.latLng.lng(),address:this.formattedAddress?this.formattedAddress:null}))})),this.lat||this.lng||(this.getCurrentLocation(),this.geolocationError&&(this.map.setCenter({lat:this.lat,lng:this.lng}),this.marker.setPosition({lat:this.lat,lng:this.lng})))}))}getCurrentLocation(){navigator.geolocation&&this.map?navigator.geolocation.getCurrentPosition((t=>{const e={center:new google.maps.LatLng(t.coords.latitude,t.coords.longitude),zoom:15};this.map.setOptions(e),this.marker.setPosition(e.center),this.getPositionAddress(e.center),this.lat=t.coords.latitude,this.lng=t.coords.longitude,this.currentLocationChanged.emit({lat:t.coords.latitude,lng:t.coords.longitude,address:this.formattedAddress?this.formattedAddress:null})}),this.handleLocationError.bind(this)):(salla.log("Geolocation is not supported by this browser."),this.geolocationError=!0)}handleLocationError(t){switch(this.geolocationError=!0,t.code){case t.PERMISSION_DENIED:salla.log("User denied the request for Geolocation.");break;case t.POSITION_UNAVAILABLE:salla.log("Location information is unavailable.");break;case t.TIMEOUT:salla.log("The request to get user location timed out.");break;case t.UNKNOWN_ERROR:salla.log("An unknown error occurred.")}}componentDidLoad(){this.syncMapInputValue(),this.hasCoordinate(this.lat)&&this.hasCoordinate(this.lng)&&fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get("user.language_code")||document.documentElement.lang||"ar"}`).then((t=>t.json())).then((t=>{"OK"===t.status&&(this.formattedAddress=t.results[0].formatted_address,this.searchInputValue=t.results[0].formatted_address,this.searchInput&&(this.searchInput.value=t.results[0].formatted_address),this.selectedLng=this.lng,this.selectedLat=this.lat,this.syncMapInputValue())})),this.mapInput.addEventListener("invalid",(t=>{t.preventDefault(),this.host.classList.add("s-has-error"),this.focusLocateControl(),this.invalidInput.emit(t)})),this.mapInput.addEventListener("input",(()=>{this.mapInput.setCustomValidity(""),this.host.classList.remove("s-has-error")}))}async reportValidity(){return this.syncMapInputValue(),!this.mapInput||!this.required||this.readonly||this.getLatLng()?(this.mapInput?.setCustomValidity(""),this.host.classList.remove("s-has-error"),!0):this.mapInput.reportValidity()}async open(){return this.map||this.initGoogleMaps({libraries:this.searchable?["places","search"]:[],language:salla.config.get("user.language_code")||document.documentElement.lang||"ar"},this.mapElement),await this.locationModal.open()}getLocationModal(){return s("div",null,s("div",{class:"s-map-modal-title"},this.modalTitle?this.modalTitle:this.modalActivityTitle),s("div",{class:"s-map-modal-body"},s("div",{class:"s-map-element",ref:t=>this.mapElement=t}),this.readonly?"":[this.searchable&&s("div",{class:"s-map-search-wrapper"},s("input",{class:"s-map-search-input",ref:t=>this.searchInput=t,placeholder:this.searchPlaceholder})),s("salla-button",{class:"s-map-my-location-button",onClick:()=>{this.getCurrentLocation()},shape:"icon",color:"primary"},s("span",{innerHTML:'\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>location-target</title>\n<path d="M16 9.333c-3.676 0-6.667 2.991-6.667 6.667s2.991 6.667 6.667 6.667 6.667-2.991 6.667-6.667-2.991-6.667-6.667-6.667zM16 20c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.795 4-4 4zM30.667 14.667h-1.401c-0.627-6.289-5.643-11.305-11.932-11.932v-1.401c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.401c-6.289 0.627-11.305 5.643-11.932 11.932h-1.401c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.401c0.628 6.289 5.643 11.305 11.932 11.932v1.401c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-1.401c6.289-0.628 11.305-5.643 11.932-11.932h1.401c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM16 26.667c-5.881 0-10.667-4.785-10.667-10.667s4.785-10.667 10.667-10.667 10.667 4.785 10.667 10.667-4.785 10.667-10.667 10.667z"></path>\n</svg>\n'})),s("salla-button",{class:"s-map-submit-button",color:"primary",width:"wide",onClick:()=>{let t={lat:this.lat,lng:this.lng,address:this.formattedAddress?this.formattedAddress:null};salla.event.emit("salla-map::selected",t),this.selected.emit(t),this.selectedLat=t.lat,this.selectedLng=t.lng,this.getPositionAddress(new google.maps.LatLng(t.lat,t.lng),!0),this.syncMapInputValue(),this.host.classList.remove("s-has-error"),this.mapInput.dispatchEvent(new window.Event("change",{bubbles:!0})),this.locationModal.close()}},this.confirmButtonTitle)]))}render(){return s(r,{key:"20ed1a1d4099e817164c3764341d473c1b735add",class:"s-map-wrapper"},s("salla-modal",{key:"77309d82d11bbae677a935aef0e02588c5f9fbfa",class:"s-map-modal-wrapper",noPadding:!0,ref:t=>{this.locationModal=t}},this.getLocationModal()),s("slot",{key:"57e6d352f42a3321a98925dd4136eaf0fdbb06b0",name:"button"},s("salla-button",{key:"a0c39395b18ca41f2ea31c5c5729b2ba20c17a16",onClick:()=>{this.open()},color:"primary",class:"s-map-location-button"},s("span",{key:"b9478a06c198812edeacab794fb63699ea72fd6b",class:"s-map-location-icon",innerHTML:this.formattedAddress?'\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>edit</title>\n<path d="M30.583 1.417c-1.828-1.829-5.019-1.829-6.847 0l-13.396 13.396c-0.161 0.161-0.279 0.361-0.341 0.581l-1.949 6.911c-0.131 0.464 0 0.964 0.341 1.305 0.253 0.252 0.593 0.389 0.943 0.389 0.121 0 0.243-0.016 0.361-0.051l6.911-1.949c0.22-0.061 0.419-0.179 0.581-0.34l10.455-10.453s0 0 0 0l2.941-2.941c1.887-1.888 1.887-4.96 0-6.848zM15.547 19.528l-4.284 1.208 1.208-4.284 9.265-9.265 3.076 3.076zM28.696 6.38l-1.999 1.999-3.076-3.076 1.999-1.999c0.849-0.848 2.227-0.848 3.076 0 0.848 0.848 0.848 2.227 0 3.076zM24 20c-0.737 0-1.333 0.597-1.333 1.333v4c0 2.205-1.795 4-4 4h-12c-2.205 0-4-1.795-4-4v-12c0-2.205 1.795-4 4-4h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-4c-3.676 0-6.667 2.991-6.667 6.667v12c0 3.676 2.991 6.667 6.667 6.667h12c3.676 0 6.667-2.991 6.667-6.667v-4c0-0.736-0.596-1.333-1.333-1.333z"></path>\n</svg>\n':a}),this.formattedAddress?s("div",null,this.locateButtonEdit," | ",this.formatAddress(this.formattedAddress)):this.locateButtonTitle)),s("input",{key:"d1619a934c72218d4d00b651e95743ad8d14a7a2",class:"s-map-value-input",name:this.name,required:this.required,value:this.getLatLng(),tabIndex:-1,"aria-hidden":"true",ref:t=>this.mapInput=t}))}get host(){return i(this)}};n.style='/*!twlt*/.s-map-wrapper{position:relative}.s-map-value-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0;opacity:0;pointer-events:none}.s-map-wrapper.s-has-error .s-map-location-button{outline:2px solid rgb(248, 113, 113);outline-offset:2px}.visible{visibility:visible}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-map-modal-title{position:relative;margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem}.s-map-location-icon{margin-right:0.5rem}.s-map-location-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem;margin-right:0px}.s-map-location-icon svg{height:1rem !important;width:1rem !important}.s-map-modal-body{position:relative;overflow:hidden}.s-map-element{height:400px;width:100%}.s-map-search-wrapper{position:absolute;top:0px;z-index:1;margin:1.25rem;width:-webkit-fill-available}.s-map-search-wrapper input{height:2.5rem;width:100%;padding:0.5rem}.s-map-search-wrapper input:where([dir="rtl"],[dir="rtl"] *){text-align:right}.s-map-search-results{margin-top:0px;display:flex;height:6rem;flex-direction:column;padding:0.5rem}.s-map-modal-body .s-loading-container{position:absolute;margin:0px;padding:5rem}.s-map-my-location-button{position:absolute;bottom:1.5rem;left:0px;margin:0.5rem}.s-map-location-button .s-button-text{display:flex;align-items:center}.s-map-submit-button button{border-top-right-radius:0px;border-top-left-radius:0px;padding-top:12px;padding-bottom:12px}';const h=class{constructor(e){t(this,e),this.height="10px";try{if(this.donation){let t="string"==typeof this.donation?JSON.parse(this.donation):this.donation;t.can_donate&&t.target_amount?(t.target_end_date="0000-00-00"==t.target_end_date?null:t.target_end_date,this.value=t.collected_amount,this.target=t.target_amount,this.header=salla.lang.get("pages.products.target"),this.message=t.target_end_date?salla.lang.get("pages.products.donation_target_date")+" "+t.target_end_date:""):this.message=t.target_amount?t.target_message:""}}catch(t){salla.log("Wrong donation json")}salla.lang.onLoaded((()=>{this.header=this.header?.replace("pages.products.target",salla.lang.get("pages.products.target")),this.message=this.message?.replace("pages.products.donation_target_date",salla.lang.get("pages.products.donation_target_date"))})),salla.onReady((()=>{this.color=this.color||salla.config.get("theme.color.primary","#ffd5c4"),this.unit||(this.unit=salla.config.currency().symbol)}))}getPercentage(){return this.value/this.target*100}render(){return this.target||this.message?s("div",{class:"s-progress-bar-container"},this.header?s("div",{class:"s-progress-bar-header"},this.header):"",this.getProgressBar(),this.message?s("span",{class:"s-progress-bar-message"},this.message):""):""}getProgressBar(){return this.target?[this.hideUnits?null:s("div",{class:"s-progress-bar-target-section"},s("span",{innerHTML:`${salla.helpers.number(this.value)} ${this.unit}`}),s("span",{innerHTML:`${salla.helpers.number(this.target)} ${this.unit}`})),s("div",{class:"s-progress-bar-wrapper",style:{height:this.height}},s("div",{class:{"s-progress-bar-progress":!0,"s-progress-bar-progress-stripped":this.stripped},style:{width:`${this.getPercentage()}%`,backgroundColor:this.color}}))]:null}};h.style="/*!twlt*/.s-progress-bar-container{margin-bottom:0.625rem}.s-progress-bar-header{margin-bottom:0.375rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-progress-bar-target-section{margin-bottom:0.625rem;display:flex;justify-content:space-between;font-size:0.875rem;line-height:1.25rem}.s-progress-bar-wrapper{margin-bottom:0.375rem;width:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-wrapper:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.s-progress-bar-progress{height:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-message{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-progress-bar-wrapper .s-progress-bar-progress-stripped{background-image:linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%,rgba(255, 255, 255, .2) 50%,rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-size:30px 30px}.s-reviews-summary-progress .s-progress-bar-wrapper{margin-bottom:0px}.s-reviews-summary-progress .s-progress-bar-container{margin-bottom:0px}";export{n as salla_map,h as salla_progress_bar}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as e,F as i}from"./p-C0qiFNJn.js";const r=class{constructor(e){t(this,e),this.source="header",this.useReactLink=!1,this.menus=[],this.displayAllText=""}async componentWillLoad(){return salla.onReady((()=>{if(this.displayAllText=salla.lang.get("blocks.home.display_all"),!this.sourceValue||"json"!==this.source)return this.getMenuItems();this.menus="string"==typeof this.sourceValue?JSON.parse(this.sourceValue):this.sourceValue||[]}))}getMenuItems(){return salla.api.component.getMenus(this.source).then((async({data:t})=>{this.menus=t,await salla.hooks.call("salla-menu","afterFetchMenuItems",this)})).catch((t=>{salla.logger.error("salla-menu::Error fetching menus",t)}))}hasChildren(t){return t?.children?.length>0}hasProducts(t){return t?.products?.length>0}getDesktopClasses(t,e){return`!hidden lg:!block ${e?"root-level lg:!inline-block":"relative"} ${t.products?" mega-menu":""}\n ${this.hasChildren(t)?"has-children":""}`}getAttributes(t){return t.trim().split(" ").reduce(((t,e)=>{let[i,r]=e.split("=");return t[i]=r.replace(/"/g,""),t}),{})}getMobileMenu(t,r){const l=t.image?e("img",{src:t.image,class:"rounded-full",width:"48",height:"48",alt:t.title}):null;return e("li",{class:"lg:hidden text-sm font-bold",...this.getAttributes(t.attrs)},this.hasChildren(t)?e(i,null,e("span",{class:t.image?"!py-3":""},l,t.title),e("ul",null,e("li",{class:"text-sm font-bold"},e("a",{href:t.url,class:"text-gray-500"},r)),t.children.map((t=>this.getMobileMenu(t,r))))):e("a",{href:t.url,"aria-label":t.title||"category",class:"text-gray-500 "+(t.image?"!py-3":""),...this.getAttributes(t.link_attrs)},l,e("span",null,t.title||"")))}getDesktopMenu(t,i){return e("li",{class:this.getDesktopClasses(t,i),...this.getAttributes(t.attrs)},e("a",{href:t.url,"aria-label":t.title||"category",...this.getAttributes(t.link_attrs)},e("span",null,t.title)),this.hasChildren(t)?e("div",{class:"sub-menu shadow-default "+(this.hasProducts(t)?"w-full left-0 flex":"w-56")},e("ul",{class:this.hasProducts(t)?"w-56 shrink-0 m-8 rtl:ml-0 ltr:mr-0":""},t.children.map((t=>this.getDesktopMenu(t,!1)))),this.hasProducts(t)?e("salla-products-list",{source:"selected","shadow-on-hover":!0,"source-value":`[${t.products}]`}):null):null)}getFooterMenu(t){const i=this.topnav||this.limit?t.slice(0,this.limit||3):t;return e("div",null,e("div",{class:{"s-menu-footer-list":!this.topnav,"s-menu-topnav-list":this.topnav}},i.map((t=>e("a",{key:t.id,href:t.url,target:t.target,class:{"s-menu-footer-item":!this.topnav,"s-menu-topnav-item topnav-link-item right-side":this.topnav},...t.callback?{onClick:t.callback}:{}},t.title)))))}getHeaderMenu(t){return t.map((t=>[this.getMobileMenu(t,this.displayAllText),this.getDesktopMenu(t,!0)]))}render(){return"footer"===this.source?this.getFooterMenu(this.menus):[e("nav",{key:"main-nav",id:"mobile-menu",class:"mobile-menu"},e("ul",{class:"main-menu"},this.getHeaderMenu(this.menus)),e("button",{class:"btn--close close-mobile-menu sicon-cancel lg:hidden"})),e("button",{key:"close-btn",class:"btn--close-sm close-mobile-menu sicon-cancel hidden"})]}};r.style='/*!twlt*/:host{display:block}.relative{position:relative}.left-0{left:0px}.m-8{margin:2rem}.flex{display:flex}.\\!hidden{display:none !important}.hidden{display:none}.w-56{width:14rem}.w-full{width:100%}.shrink-0{flex-shrink:0}.rounded-full{border-radius:9999px}.\\!py-3{padding-top:0.75rem !important;padding-bottom:0.75rem !important}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.shadow-default{--tw-shadow:5px 10px 30px #2B2D340D;--tw-shadow-colored:5px 10px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-menu-item{display:none !important}@media (min-width: 1024px){.s-menu-item{display:block !important}.s-menu-root-level{display:inline-block !important}}.s-menu-non-root-level{position:relative}.s-menu-products-wrapper{flex-grow:1;padding:2rem}.s-menu-products-container{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));gap:1rem}.s-menu-submenu-unordered-list{margin:2rem;width:14rem;flex-shrink:0}.s-menu-submenu-unordered-list:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}.s-menu-submenu-unordered-list:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}.s-menu-submenu-with-product{left:0px;display:flex;width:100%}.s-menu-submenu-without-product{width:14rem}.s-menu-footer-item{margin-bottom:1.25rem;display:block;font-size:0.875rem;line-height:1.25rem;line-height:1}.s-menu-footer-item:last-child{margin-bottom:0px}.s-menu-topnav-list{display:none;align-items:center;white-space:nowrap}@media (min-width: 1024px){.s-menu-topnav-list{display:flex}}.s-menu-topnav-list:where([dir="ltr"],[dir="ltr"] *){padding-right:1rem}.s-menu-topnav-list:where([dir="rtl"],[dir="rtl"] *){padding-left:1rem}.s-menu-topnav-item{display:inline-block;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:1rem;padding-right:1rem;padding-top:1px;padding-bottom:1px;font-size:0.875rem;line-height:1.25rem;line-height:1;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-menu-topnav-item:hover{opacity:0.8}.s-menu-topnav-item:where([dir="ltr"],[dir="ltr"] *){border-right-width:1px}.s-menu-topnav-item:first-child:where([dir="ltr"],[dir="ltr"] *){padding-left:0px}.s-menu-topnav-item:last-child:where([dir="ltr"],[dir="ltr"] *){border-width:0px;padding-right:0px}.s-menu-topnav-item:where([dir="rtl"],[dir="rtl"] *){border-left-width:1px}.s-menu-topnav-item:first-child:where([dir="rtl"],[dir="rtl"] *){padding-right:0px}.s-menu-topnav-item:last-child:where([dir="rtl"],[dir="rtl"] *){border-width:0px;padding-left:0px}@media (min-width: 1024px){.lg\\:\\!block{display:block !important}.lg\\:\\!inline-block{display:inline-block !important}.lg\\:hidden{display:none}}.ltr\\:mr-0:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}.rtl\\:ml-0:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}';export{r as salla_menu}
4
+ import{r as t,h as e,F as i}from"./p-Bf2Z6A1M.js";const r=class{constructor(e){t(this,e),this.source="header",this.useReactLink=!1,this.menus=[],this.displayAllText=""}async componentWillLoad(){return salla.onReady((()=>{if(this.displayAllText=salla.lang.get("blocks.home.display_all"),!this.sourceValue||"json"!==this.source)return this.getMenuItems();this.menus="string"==typeof this.sourceValue?JSON.parse(this.sourceValue):this.sourceValue||[]}))}getMenuItems(){return salla.api.component.getMenus(this.source).then((async({data:t})=>{this.menus=t,await salla.hooks.call("salla-menu","afterFetchMenuItems",this)})).catch((t=>{salla.logger.error("salla-menu::Error fetching menus",t)}))}hasChildren(t){return t?.children?.length>0}hasProducts(t){return t?.products?.length>0}getDesktopClasses(t,e){return`!hidden lg:!block ${e?"root-level lg:!inline-block":"relative"} ${t.products?" mega-menu":""}\n ${this.hasChildren(t)?"has-children":""}`}getAttributes(t){return t.trim().split(" ").reduce(((t,e)=>{let[i,r]=e.split("=");return t[i]=r.replace(/"/g,""),t}),{})}getMobileMenu(t,r){const l=t.image?e("img",{src:t.image,class:"rounded-full",width:"48",height:"48",alt:t.title}):null;return e("li",{class:"lg:hidden text-sm font-bold",...this.getAttributes(t.attrs)},this.hasChildren(t)?e(i,null,e("span",{class:t.image?"!py-3":""},l,t.title),e("ul",null,e("li",{class:"text-sm font-bold"},e("a",{href:t.url,class:"text-gray-500"},r)),t.children.map((t=>this.getMobileMenu(t,r))))):e("a",{href:t.url,"aria-label":t.title||"category",class:"text-gray-500 "+(t.image?"!py-3":""),...this.getAttributes(t.link_attrs)},l,e("span",null,t.title||"")))}getDesktopMenu(t,i){return e("li",{class:this.getDesktopClasses(t,i),...this.getAttributes(t.attrs)},e("a",{href:t.url,"aria-label":t.title||"category",...this.getAttributes(t.link_attrs)},e("span",null,t.title)),this.hasChildren(t)?e("div",{class:"sub-menu shadow-default "+(this.hasProducts(t)?"w-full left-0 flex":"w-56")},e("ul",{class:this.hasProducts(t)?"w-56 shrink-0 m-8 rtl:ml-0 ltr:mr-0":""},t.children.map((t=>this.getDesktopMenu(t,!1)))),this.hasProducts(t)?e("salla-products-list",{source:"selected","shadow-on-hover":!0,"source-value":`[${t.products}]`}):null):null)}getFooterMenu(t){const i=this.topnav||this.limit?t.slice(0,this.limit||3):t;return e("div",null,e("div",{class:{"s-menu-footer-list":!this.topnav,"s-menu-topnav-list":this.topnav}},i.map((t=>e("a",{key:t.id,href:t.url,target:t.target,class:{"s-menu-footer-item":!this.topnav,"s-menu-topnav-item topnav-link-item right-side":this.topnav},...t.callback?{onClick:t.callback}:{}},t.title)))))}getHeaderMenu(t){return t.map((t=>[this.getMobileMenu(t,this.displayAllText),this.getDesktopMenu(t,!0)]))}render(){return"footer"===this.source?this.getFooterMenu(this.menus):[e("nav",{key:"main-nav",id:"mobile-menu",class:"mobile-menu"},e("ul",{class:"main-menu"},this.getHeaderMenu(this.menus)),e("button",{class:"btn--close close-mobile-menu sicon-cancel lg:hidden"})),e("button",{key:"close-btn",class:"btn--close-sm close-mobile-menu sicon-cancel hidden"})]}};r.style='/*!twlt*/:host{display:block}.relative{position:relative}.left-0{left:0px}.m-8{margin:2rem}.flex{display:flex}.\\!hidden{display:none !important}.hidden{display:none}.w-56{width:14rem}.w-full{width:100%}.shrink-0{flex-shrink:0}.rounded-full{border-radius:9999px}.\\!py-3{padding-top:0.75rem !important;padding-bottom:0.75rem !important}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.shadow-default{--tw-shadow:5px 10px 30px #2B2D340D;--tw-shadow-colored:5px 10px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-menu-item{display:none !important}@media (min-width: 1024px){.s-menu-item{display:block !important}.s-menu-root-level{display:inline-block !important}}.s-menu-non-root-level{position:relative}.s-menu-products-wrapper{flex-grow:1;padding:2rem}.s-menu-products-container{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));gap:1rem}.s-menu-submenu-unordered-list{margin:2rem;width:14rem;flex-shrink:0}.s-menu-submenu-unordered-list:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}.s-menu-submenu-unordered-list:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}.s-menu-submenu-with-product{left:0px;display:flex;width:100%}.s-menu-submenu-without-product{width:14rem}.s-menu-footer-item{margin-bottom:1.25rem;display:block;font-size:0.875rem;line-height:1.25rem;line-height:1}.s-menu-footer-item:last-child{margin-bottom:0px}.s-menu-topnav-list{display:none;align-items:center;white-space:nowrap}@media (min-width: 1024px){.s-menu-topnav-list{display:flex}}.s-menu-topnav-list:where([dir="ltr"],[dir="ltr"] *){padding-right:1rem}.s-menu-topnav-list:where([dir="rtl"],[dir="rtl"] *){padding-left:1rem}.s-menu-topnav-item{display:inline-block;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:1rem;padding-right:1rem;padding-top:1px;padding-bottom:1px;font-size:0.875rem;line-height:1.25rem;line-height:1;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-menu-topnav-item:hover{opacity:0.8}.s-menu-topnav-item:where([dir="ltr"],[dir="ltr"] *){border-right-width:1px}.s-menu-topnav-item:first-child:where([dir="ltr"],[dir="ltr"] *){padding-left:0px}.s-menu-topnav-item:last-child:where([dir="ltr"],[dir="ltr"] *){border-width:0px;padding-right:0px}.s-menu-topnav-item:where([dir="rtl"],[dir="rtl"] *){border-left-width:1px}.s-menu-topnav-item:first-child:where([dir="rtl"],[dir="rtl"] *){padding-right:0px}.s-menu-topnav-item:last-child:where([dir="rtl"],[dir="rtl"] *){border-width:0px;padding-left:0px}@media (min-width: 1024px){.lg\\:\\!block{display:block !important}.lg\\:\\!inline-block{display:inline-block !important}.lg\\:hidden{display:none}}.ltr\\:mr-0:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}.rtl\\:ml-0:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}';export{r as salla_menu}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as t,a as i}from"./p-C0qiFNJn.js";const a=class{constructor(t){e(this,t),this.hasError=!1,salla.event.on("size-guide::open",(e=>this.open(e))),salla.lang.onLoaded((()=>{this.placeholder_title=salla.lang.get("pages.products.size_guide_placeholder"),this.placeholder_description=salla.lang.get("pages.products.size_guide_placeholder_info"),this.modal_title=salla.lang.get("pages.products.size_guides")}))}async open(e){return this.modal.setTitle(this.modal_title),this.modal.open(),await salla.api.withoutNotifier((()=>salla.product.getSizeGuides(e))).then((e=>{this.guides=e.data})).catch((e=>{console.log(e),this.hasError=!0,this.placeholder_description=e.response?.data?.error?.message||e.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}showPlaceholder(){return t("salla-placeholder",{alignment:"center",iconSize:"xl"},t("div",{slot:"title"},this.placeholder_title),t("div",{slot:"description"},this.placeholder_description))}render(){return t("salla-modal",{key:"063a407b20a58cd485aab5545bc36ef7bcf97bda",class:"s-product-size-guide-wrapper",id:"salla-product-size-guide-modal",isLoading:!0,"has-skeleton":!0,width:"md",ref:e=>this.modal=e},t("span",{key:"f3020bc65b716269d77e46bf28a6ff610ebff117",slot:"icon",class:"s-product-size-guide-header-icon",innerHTML:'\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>pencil-ruler</title>\n<path d="M3.057 11.609c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l6.667-6.667c0.521-0.521 0.521-1.364 0-1.885l-1.285-1.285c-1.143-1.143-2.661-1.772-4.276-1.772-1.616 0-3.135 0.629-4.276 1.772-1.143 1.141-1.772 2.66-1.772 4.276 0 1.615 0.629 3.135 1.772 4.276zM3.657 3.657c1.277-1.277 3.504-1.277 4.781 0l0.343 0.343-4.781 4.781-0.343-0.343c-0.639-0.639-0.991-1.488-0.991-2.391s0.352-1.752 0.991-2.391zM29.317 20.972c-0.2-0.707-0.932-1.119-1.645-0.921-0.709 0.2-1.121 0.937-0.921 1.645l1.987 7.041-7.041-1.987c-0.707-0.195-1.444 0.213-1.645 0.921-0.2 0.708 0.212 1.445 0.921 1.645l9.333 2.633c0.119 0.032 0.24 0.049 0.361 0.049 0.349 0 0.689-0.137 0.943-0.391 0.341-0.341 0.472-0.84 0.34-1.305zM31.609 8.772l-8.381-8.381c-0.5-0.5-1.385-0.5-1.885 0l-8.171 8.171s-0.001 0-0.001 0.001 0 0.001-0.001 0.001l-4.607 4.607s0 0-0.001 0 0 0 0 0.001l-8.171 8.171c-0.251 0.249-0.391 0.588-0.391 0.943 0 0.353 0.14 0.693 0.391 0.943l8.381 8.381c0.249 0.251 0.589 0.391 0.943 0.391s0.693-0.14 0.943-0.391l20.952-20.952c0.521-0.521 0.521-1.365 0-1.885zM9.715 28.781l-6.495-6.496 1.676-1.676 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-3.008-3.008 2.724-2.724 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.52 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.365 0-1.885l-3.008-3.008 1.677-1.677 6.496 6.496z"></path>\n</svg>\n'}),t("div",{key:"588de84c8b24de3331ff825a29e8332c1c426752",slot:"loading"},t("div",{key:"be0c2882631109efd8099d96cc9c8b22ff266893",class:"s-product-size-guide-skeleton"},t("salla-skeleton",{key:"04030e4cb75e1f49d939d1c87b97eb0fe73eff0f",height:"15px",width:"25%"}),t("div",{key:"1576c0a47284315aa3ec408d75bcbb261f230b3f",class:"s-product-size-guide-skeleton-header"},t("salla-skeleton",{key:"4edba887e3a631d1fccaa4379c3f7b9ebc8e3fb9",height:"40px"}),t("salla-skeleton",{key:"da6c9bdf9eb7cb8cd6366b9dc954055ed3f79607",height:"40px"}),t("salla-skeleton",{key:"322e2e5d0f05949a6a957b695c6f557512acc689",height:"40px"}),t("salla-skeleton",{key:"4914a613bf190d2fc7029098ba7c7fd54bdace4c",height:"40px"})),t("div",{key:"209144302d7127ffc6933519db28d9cba949827f",class:"s-product-size-guide-skeleton-content"},t("salla-skeleton",{key:"cca674f6d7fe8a88c240b38df567f2980efdb9e1",height:"15px",width:"25%"}),t("salla-skeleton",{key:"9754e50822954fa6a333634a40d4414cc1785c04",height:"10px",width:"75%"}),t("salla-skeleton",{key:"b18e8d9fb7d1ddb9766fb9b24285480dbeb6d678",height:"10px",width:"50%"}),t("salla-skeleton",{key:"6904a849b03278f8a99aa5056772f58d14ecc10e",height:"10px",width:"75%"}),t("salla-skeleton",{key:"357446cfbab8c5b5062ef582dabc5a41b987a2d6",height:"10px",width:"100%"}),t("salla-skeleton",{key:"b8d2ab21d3c68f1f7c325aac46c6574b8f62878c",height:"10px",width:"25%"}),t("salla-skeleton",{key:"578de2e17060b4b8f1d8e18e77e423b8a2ca746f",height:"10px",width:"60%"}),t("salla-skeleton",{key:"442da0c1997e968f77ef7d5ea14b507387004814",height:"10px",width:"45%"}),t("salla-skeleton",{key:"0ff2e33c0f931e577b020e83f5704454169c697a",height:"10px",width:"30%"})))),t("slot",{key:"83f7baaa539d8084e6efb898a865723fab3552ff",name:"header"}),!this.hasError&&this.guides?[t("salla-tabs",null,this.guides.map((e=>t("salla-tab-header",{slot:"header",name:e.name},t("span",null,e.name)))),this.guides.map((e=>t("salla-tab-content",{slot:"content",name:e.name},t("div",{innerHTML:e.description})))))]:this.showPlaceholder(),t("slot",{key:"598c8e9603633bbb4d89f767237eda21282b4e04",name:"footer"}))}get host(){return i(this)}};a.style='/*!twlt*/.s-product-size-guide-wrapper .s-modal-title{margin-bottom:0px !important}.s-product-size-guide-wrapper .s-tabs-content{max-height:60vh;overflow:auto}@media (min-width: 768px){.s-product-size-guide-wrapper .s-tabs-content{max-height:70vh}}.s-product-size-guide-placeholder{display:flex;align-items:center;justify-content:center}.s-product-size-guide-skeleton-table{margin-top:1.25rem;width:100%;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));line-height:1.25rem}.s-product-size-guide-skeleton-table td{border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.5rem;line-height:1.25rem}.s-product-size-guide-header-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.s-product-size-guide-header-icon{margin-left:auto;margin-right:auto;margin-bottom:1rem;height:5rem;width:5rem}}.s-product-size-guide-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0.5rem}@media (min-width: 640px){.s-product-size-guide-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}}.s-product-size-guide-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem}@media (min-width: 640px){.s-product-size-guide-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}}.s-product-size-guide-header-icon svg{height:1.25rem;width:1.25rem;flex-shrink:0;fill:#9ca3af}.s-product-size-guide-skeleton-content{margin-top:1.25rem;display:flex;flex-direction:column}.s-product-size-guide-skeleton-content>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.75rem * var(--tw-space-y-reverse))}.s-product-size-guide-skeleton-header{margin-top:2rem;margin-bottom:2rem;display:flex;align-items:center;justify-content:space-between}.s-product-size-guide-skeleton-header>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-product-size-guide-skeleton-header:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-product-size-guide-skeleton-header>salla-skeleton{flex:1 1 0%}';export{a as salla_product_size_guide}
4
+ import{r as e,h as t,a as i}from"./p-Bf2Z6A1M.js";const a=class{constructor(t){e(this,t),this.hasError=!1,salla.event.on("size-guide::open",(e=>this.open(e))),salla.lang.onLoaded((()=>{this.placeholder_title=salla.lang.get("pages.products.size_guide_placeholder"),this.placeholder_description=salla.lang.get("pages.products.size_guide_placeholder_info"),this.modal_title=salla.lang.get("pages.products.size_guides")}))}async open(e){return this.modal.setTitle(this.modal_title),this.modal.open(),await salla.api.withoutNotifier((()=>salla.product.getSizeGuides(e))).then((e=>{this.guides=e.data})).catch((e=>{console.log(e),this.hasError=!0,this.placeholder_description=e.response?.data?.error?.message||e.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}showPlaceholder(){return t("salla-placeholder",{alignment:"center",iconSize:"xl"},t("div",{slot:"title"},this.placeholder_title),t("div",{slot:"description"},this.placeholder_description))}render(){return t("salla-modal",{key:"063a407b20a58cd485aab5545bc36ef7bcf97bda",class:"s-product-size-guide-wrapper",id:"salla-product-size-guide-modal",isLoading:!0,"has-skeleton":!0,width:"md",ref:e=>this.modal=e},t("span",{key:"f3020bc65b716269d77e46bf28a6ff610ebff117",slot:"icon",class:"s-product-size-guide-header-icon",innerHTML:'\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>pencil-ruler</title>\n<path d="M3.057 11.609c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l6.667-6.667c0.521-0.521 0.521-1.364 0-1.885l-1.285-1.285c-1.143-1.143-2.661-1.772-4.276-1.772-1.616 0-3.135 0.629-4.276 1.772-1.143 1.141-1.772 2.66-1.772 4.276 0 1.615 0.629 3.135 1.772 4.276zM3.657 3.657c1.277-1.277 3.504-1.277 4.781 0l0.343 0.343-4.781 4.781-0.343-0.343c-0.639-0.639-0.991-1.488-0.991-2.391s0.352-1.752 0.991-2.391zM29.317 20.972c-0.2-0.707-0.932-1.119-1.645-0.921-0.709 0.2-1.121 0.937-0.921 1.645l1.987 7.041-7.041-1.987c-0.707-0.195-1.444 0.213-1.645 0.921-0.2 0.708 0.212 1.445 0.921 1.645l9.333 2.633c0.119 0.032 0.24 0.049 0.361 0.049 0.349 0 0.689-0.137 0.943-0.391 0.341-0.341 0.472-0.84 0.34-1.305zM31.609 8.772l-8.381-8.381c-0.5-0.5-1.385-0.5-1.885 0l-8.171 8.171s-0.001 0-0.001 0.001 0 0.001-0.001 0.001l-4.607 4.607s0 0-0.001 0 0 0 0 0.001l-8.171 8.171c-0.251 0.249-0.391 0.588-0.391 0.943 0 0.353 0.14 0.693 0.391 0.943l8.381 8.381c0.249 0.251 0.589 0.391 0.943 0.391s0.693-0.14 0.943-0.391l20.952-20.952c0.521-0.521 0.521-1.365 0-1.885zM9.715 28.781l-6.495-6.496 1.676-1.676 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-3.008-3.008 2.724-2.724 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.52 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.365 0-1.885l-3.008-3.008 1.677-1.677 6.496 6.496z"></path>\n</svg>\n'}),t("div",{key:"588de84c8b24de3331ff825a29e8332c1c426752",slot:"loading"},t("div",{key:"be0c2882631109efd8099d96cc9c8b22ff266893",class:"s-product-size-guide-skeleton"},t("salla-skeleton",{key:"04030e4cb75e1f49d939d1c87b97eb0fe73eff0f",height:"15px",width:"25%"}),t("div",{key:"1576c0a47284315aa3ec408d75bcbb261f230b3f",class:"s-product-size-guide-skeleton-header"},t("salla-skeleton",{key:"4edba887e3a631d1fccaa4379c3f7b9ebc8e3fb9",height:"40px"}),t("salla-skeleton",{key:"da6c9bdf9eb7cb8cd6366b9dc954055ed3f79607",height:"40px"}),t("salla-skeleton",{key:"322e2e5d0f05949a6a957b695c6f557512acc689",height:"40px"}),t("salla-skeleton",{key:"4914a613bf190d2fc7029098ba7c7fd54bdace4c",height:"40px"})),t("div",{key:"209144302d7127ffc6933519db28d9cba949827f",class:"s-product-size-guide-skeleton-content"},t("salla-skeleton",{key:"cca674f6d7fe8a88c240b38df567f2980efdb9e1",height:"15px",width:"25%"}),t("salla-skeleton",{key:"9754e50822954fa6a333634a40d4414cc1785c04",height:"10px",width:"75%"}),t("salla-skeleton",{key:"b18e8d9fb7d1ddb9766fb9b24285480dbeb6d678",height:"10px",width:"50%"}),t("salla-skeleton",{key:"6904a849b03278f8a99aa5056772f58d14ecc10e",height:"10px",width:"75%"}),t("salla-skeleton",{key:"357446cfbab8c5b5062ef582dabc5a41b987a2d6",height:"10px",width:"100%"}),t("salla-skeleton",{key:"b8d2ab21d3c68f1f7c325aac46c6574b8f62878c",height:"10px",width:"25%"}),t("salla-skeleton",{key:"578de2e17060b4b8f1d8e18e77e423b8a2ca746f",height:"10px",width:"60%"}),t("salla-skeleton",{key:"442da0c1997e968f77ef7d5ea14b507387004814",height:"10px",width:"45%"}),t("salla-skeleton",{key:"0ff2e33c0f931e577b020e83f5704454169c697a",height:"10px",width:"30%"})))),t("slot",{key:"83f7baaa539d8084e6efb898a865723fab3552ff",name:"header"}),!this.hasError&&this.guides?[t("salla-tabs",null,this.guides.map((e=>t("salla-tab-header",{slot:"header",name:e.name},t("span",null,e.name)))),this.guides.map((e=>t("salla-tab-content",{slot:"content",name:e.name},t("div",{innerHTML:e.description})))))]:this.showPlaceholder(),t("slot",{key:"598c8e9603633bbb4d89f767237eda21282b4e04",name:"footer"}))}get host(){return i(this)}};a.style='/*!twlt*/.s-product-size-guide-wrapper .s-modal-title{margin-bottom:0px !important}.s-product-size-guide-wrapper .s-tabs-content{max-height:60vh;overflow:auto}@media (min-width: 768px){.s-product-size-guide-wrapper .s-tabs-content{max-height:70vh}}.s-product-size-guide-placeholder{display:flex;align-items:center;justify-content:center}.s-product-size-guide-skeleton-table{margin-top:1.25rem;width:100%;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));line-height:1.25rem}.s-product-size-guide-skeleton-table td{border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.5rem;line-height:1.25rem}.s-product-size-guide-header-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.s-product-size-guide-header-icon{margin-left:auto;margin-right:auto;margin-bottom:1rem;height:5rem;width:5rem}}.s-product-size-guide-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0.5rem}@media (min-width: 640px){.s-product-size-guide-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}}.s-product-size-guide-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem}@media (min-width: 640px){.s-product-size-guide-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}}.s-product-size-guide-header-icon svg{height:1.25rem;width:1.25rem;flex-shrink:0;fill:#9ca3af}.s-product-size-guide-skeleton-content{margin-top:1.25rem;display:flex;flex-direction:column}.s-product-size-guide-skeleton-content>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.75rem * var(--tw-space-y-reverse))}.s-product-size-guide-skeleton-header{margin-top:2rem;margin-bottom:2rem;display:flex;align-items:center;justify-content:space-between}.s-product-size-guide-skeleton-header>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-product-size-guide-skeleton-header:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-product-size-guide-skeleton-header>salla-skeleton{flex:1 1 0%}';export{a as salla_product_size_guide}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as c,h as l,H as t,a as s}from"./p-C0qiFNJn.js";import{f as i,t as e}from"./p-CO-PeZ27.js";const a=class{constructor(l){c(this,l),this.links=salla.config.get("store.social"),this.iconsList={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',twitter:e,facebook:i,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',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',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'},this.socialSlot=this.host.querySelector('[slot="social-item"]')?.innerHTML||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>',salla.lang.onLoaded((()=>{this.links=salla.config.get("store.social")}))}getLinksArray(){return this.links?Object.entries(this.links).filter((([c,l])=>!!l&&"whatsapp"!==c)).map((([c,l])=>({type:c,value:l}))):[]}componentWillLoad(){return new Promise((c=>salla.onReady(c)))}render(){const c=this.getLinksArray();return l(t,{key:"e7d69dbae46ef54588471875ada751103d14d393"},l("ul",{key:"ff4b15127e6664cca17fa7f6f49e4cda25829d74",class:"s-social-list"},c.map((c=>l("li",{class:"s-social-link"},l("div",{id:"social-slot",innerHTML:this.socialSlot.replace(/\{icon\}/g,this.iconsList[c.type]).replace(/\{type\}/g,c.type).replace(/\{link\}/g,c.value.toString())}))))))}componentDidRender(){this.host.querySelectorAll("#social-slot").forEach((c=>c.replaceWith(c.firstChild))),this.host.querySelector('[slot="social-item"]')?.remove()}get host(){return s(this)}};a.style="/*!twlt*/:host{display:block}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-social-list{display:flex;gap:0.625rem}.s-social-link a{display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;font-size:0.875rem;line-height:1.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-social-link a:hover{opacity:0.75}.s-social-link a svg{height:0.875rem;width:0.875rem;fill:currentColor}";export{a as salla_social}
4
+ import{r as c,h as l,H as t,a as s}from"./p-Bf2Z6A1M.js";import{f as i,t as e}from"./p-CO-PeZ27.js";const a=class{constructor(l){c(this,l),this.links=salla.config.get("store.social"),this.iconsList={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',twitter:e,facebook:i,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',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',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'},this.socialSlot=this.host.querySelector('[slot="social-item"]')?.innerHTML||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>',salla.lang.onLoaded((()=>{this.links=salla.config.get("store.social")}))}getLinksArray(){return this.links?Object.entries(this.links).filter((([c,l])=>!!l&&"whatsapp"!==c)).map((([c,l])=>({type:c,value:l}))):[]}componentWillLoad(){return new Promise((c=>salla.onReady(c)))}render(){const c=this.getLinksArray();return l(t,{key:"e7d69dbae46ef54588471875ada751103d14d393"},l("ul",{key:"ff4b15127e6664cca17fa7f6f49e4cda25829d74",class:"s-social-list"},c.map((c=>l("li",{class:"s-social-link"},l("div",{id:"social-slot",innerHTML:this.socialSlot.replace(/\{icon\}/g,this.iconsList[c.type]).replace(/\{type\}/g,c.type).replace(/\{link\}/g,c.value.toString())}))))))}componentDidRender(){this.host.querySelectorAll("#social-slot").forEach((c=>c.replaceWith(c.firstChild))),this.host.querySelector('[slot="social-item"]')?.remove()}get host(){return s(this)}};a.style="/*!twlt*/:host{display:block}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-social-list{display:flex;gap:0.625rem}.s-social-link a{display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;font-size:0.875rem;line-height:1.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-social-link a:hover{opacity:0.75}.s-social-link a svg{height:0.875rem;width:0.875rem;fill:currentColor}";export{a as salla_social}