@salla.sa/twilight-components 2.14.589 → 2.14.590

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 (332) hide show
  1. package/dist/cjs/{filepond-BbRL5Spe.js → filepond-Dt4Nihdd.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DVUBjaQx.js → filepond-plugin-file-poster-DwwSoJTP.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BR7SoIq0.js → filepond-plugin-file-validate-size-DsVYh3H7.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CEkMfiUA.js → filepond-plugin-file-validate-type-D5SqBZyw.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-p-XQj23Q.js → filepond-plugin-image-edit-CTTRxQHm.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-DeRO_gvX.js → filepond-plugin-image-exif-orientation-CN52oBp4.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-Bfm8Swyp.js → filepond-plugin-image-preview-DgSWBJVB.js} +1 -1
  8. package/dist/cjs/{index-CfGnMoB7.js → index-CgZ8Pldm.js} +2 -2
  9. package/dist/cjs/{intlTelInput-Pqo18emd.js → intlTelInput-DBBilzGk.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gift-card-redeem.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 +1 -1
  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_3.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 +1 -1
  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.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 +1 -1
  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-card.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-products-list.cjs.entry.js +35 -6
  84. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
  107. package/dist/cjs/twilight.cjs.js +1 -1
  108. package/dist/cjs/{vanilla-picker-DWuMUfiW.js → vanilla-picker-DMOjok7F.js} +1 -1
  109. package/dist/collection/components/salla-products-list/salla-products-list.js +35 -6
  110. package/dist/components/index.js +2 -2
  111. package/dist/components/salla-products-list2.js +34 -5
  112. package/dist/docs.json +2 -2
  113. package/dist/esm/{filepond-plugin-file-poster-CPydcEjJ.js → filepond-plugin-file-poster-DInGlcq6.js} +1 -1
  114. package/dist/esm/{filepond-plugin-file-validate-size-Yy4pNy1Q.js → filepond-plugin-file-validate-size-BaLOl1L7.js} +1 -1
  115. package/dist/esm/{filepond-plugin-file-validate-type-Ck1P2E4e.js → filepond-plugin-file-validate-type-D_DVE5xS.js} +1 -1
  116. package/dist/esm/{filepond-plugin-image-edit-DEUmnuGf.js → filepond-plugin-image-edit-B9vWgHyi.js} +1 -1
  117. package/dist/esm/{filepond-plugin-image-exif-orientation-BPgJye8E.js → filepond-plugin-image-exif-orientation-lJrZF6xG.js} +1 -1
  118. package/dist/esm/{filepond-plugin-image-preview-CqUSx6BO.js → filepond-plugin-image-preview-Bbk7m1Yt.js} +1 -1
  119. package/dist/esm/{filepond-CJqzOtq7.js → filepond-wzh5HaPr.js} +1 -1
  120. package/dist/esm/{index-BnDYuqv2.js → index-klFskvc_.js} +2 -2
  121. package/dist/esm/{intlTelInput-Z8OsAFtr.js → intlTelInput-pS6pc-iA.js} +1 -1
  122. package/dist/esm/loader.js +2 -2
  123. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  124. package/dist/esm/salla-accordion_6.entry.js +1 -1
  125. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  126. package/dist/esm/salla-advertisement.entry.js +1 -1
  127. package/dist/esm/salla-alert_2.entry.js +1 -1
  128. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  129. package/dist/esm/salla-applied-filters.entry.js +1 -1
  130. package/dist/esm/salla-apps-icons.entry.js +1 -1
  131. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  132. package/dist/esm/salla-badge.entry.js +1 -1
  133. package/dist/esm/salla-basket-gap.entry.js +1 -1
  134. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  135. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  136. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  137. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  138. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  139. package/dist/esm/salla-comment-factors.entry.js +1 -1
  140. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  141. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  142. package/dist/esm/salla-contacts.entry.js +1 -1
  143. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  144. package/dist/esm/salla-count-down.entry.js +1 -1
  145. package/dist/esm/salla-custom-fields.entry.js +1 -1
  146. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  147. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  148. package/dist/esm/salla-filters-widget.entry.js +1 -1
  149. package/dist/esm/salla-filters.entry.js +1 -1
  150. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  151. package/dist/esm/salla-gift-card-redeem.entry.js +1 -1
  152. package/dist/esm/salla-gifting.entry.js +1 -1
  153. package/dist/esm/salla-hook.entry.js +1 -1
  154. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  155. package/dist/esm/salla-installment.entry.js +1 -1
  156. package/dist/esm/salla-list-tile.entry.js +1 -1
  157. package/dist/esm/salla-localization-modal.entry.js +1 -1
  158. package/dist/esm/salla-login-modal.entry.js +1 -1
  159. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  160. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  161. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  162. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  163. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  164. package/dist/esm/salla-loyalty.entry.js +1 -1
  165. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  166. package/dist/esm/salla-map_3.entry.js +1 -1
  167. package/dist/esm/salla-menu.entry.js +1 -1
  168. package/dist/esm/salla-metadata.entry.js +1 -1
  169. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  170. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  171. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  172. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  173. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  174. package/dist/esm/salla-offer-modal.entry.js +1 -1
  175. package/dist/esm/salla-offer.entry.js +1 -1
  176. package/dist/esm/salla-order-branch.entry.js +1 -1
  177. package/dist/esm/salla-order-cancel.entry.js +1 -1
  178. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  179. package/dist/esm/salla-order-details-options.entry.js +1 -1
  180. package/dist/esm/salla-order-details.entry.js +1 -1
  181. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  182. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  183. package/dist/esm/salla-order-edit.entry.js +1 -1
  184. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  185. package/dist/esm/salla-order-shipments.entry.js +1 -1
  186. package/dist/esm/salla-order-summary.entry.js +1 -1
  187. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  188. package/dist/esm/salla-orders.entry.js +1 -1
  189. package/dist/esm/salla-payments.entry.js +1 -1
  190. package/dist/esm/salla-placeholder.entry.js +1 -1
  191. package/dist/esm/salla-price-range.entry.js +1 -1
  192. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  193. package/dist/esm/salla-product-card.entry.js +1 -1
  194. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  195. package/dist/esm/salla-products-list.entry.js +35 -6
  196. package/dist/esm/salla-products-slider.entry.js +1 -1
  197. package/dist/esm/salla-quick-order.entry.js +1 -1
  198. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  199. package/dist/esm/salla-rating-modal.entry.js +1 -1
  200. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  201. package/dist/esm/salla-review-order-item.entry.js +1 -1
  202. package/dist/esm/salla-scopes.entry.js +1 -1
  203. package/dist/esm/salla-search-product-card.entry.js +1 -1
  204. package/dist/esm/salla-search.entry.js +1 -1
  205. package/dist/esm/salla-skeleton.entry.js +1 -1
  206. package/dist/esm/salla-social-share.entry.js +1 -1
  207. package/dist/esm/salla-social.entry.js +1 -1
  208. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  209. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  210. package/dist/esm/salla-tooltip.entry.js +1 -1
  211. package/dist/esm/salla-trust-badges.entry.js +1 -1
  212. package/dist/esm/salla-user-menu.entry.js +1 -1
  213. package/dist/esm/salla-user-profile.entry.js +1 -1
  214. package/dist/esm/salla-user-settings.entry.js +1 -1
  215. package/dist/esm/salla-verify.entry.js +1 -1
  216. package/dist/esm/salla-wallet.entry.js +1 -1
  217. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  218. package/dist/esm/salla-wishlist-summary.entry.js +1 -1
  219. package/dist/esm/twilight.js +2 -2
  220. package/dist/esm/{vanilla-picker-DnAUrfGC.js → vanilla-picker-BhmFKXIB.js} +1 -1
  221. package/dist/twilight/{p-e1a8f943.entry.js → p-009048d0.entry.js} +1 -1
  222. package/dist/twilight/{p-85f0dcd7.entry.js → p-0156dfe8.entry.js} +1 -1
  223. package/dist/twilight/{p-47d94d77.entry.js → p-027b5233.entry.js} +1 -1
  224. package/dist/twilight/{p-700f2c8b.entry.js → p-0446f8e3.entry.js} +1 -1
  225. package/dist/twilight/{p-1c812d90.entry.js → p-0746fded.entry.js} +1 -1
  226. package/dist/twilight/{p-6f26c1cd.entry.js → p-089f0d34.entry.js} +1 -1
  227. package/dist/twilight/{p-eb0c5e39.entry.js → p-09300a8d.entry.js} +1 -1
  228. package/dist/twilight/{p-ed7c4f53.entry.js → p-0b10b315.entry.js} +1 -1
  229. package/dist/twilight/{p-f5ccd5d1.entry.js → p-0ccf7bde.entry.js} +1 -1
  230. package/dist/twilight/{p-56f0cfcb.entry.js → p-0de54240.entry.js} +1 -1
  231. package/dist/twilight/{p-afc3d17b.entry.js → p-0e206ed7.entry.js} +1 -1
  232. package/dist/twilight/{p-6ca5c1b6.entry.js → p-0f951af1.entry.js} +1 -1
  233. package/dist/twilight/{p-67e24689.entry.js → p-0fca7ee0.entry.js} +1 -1
  234. package/dist/twilight/{p-3d08b459.entry.js → p-1988457b.entry.js} +1 -1
  235. package/dist/twilight/{p-9fd926a2.entry.js → p-1a1f04ac.entry.js} +1 -1
  236. package/dist/twilight/{p-ea8379b8.entry.js → p-1a875a94.entry.js} +1 -1
  237. package/dist/twilight/{p-9932f7a0.entry.js → p-1d8c6adc.entry.js} +1 -1
  238. package/dist/twilight/{p-152cac66.entry.js → p-21f2167e.entry.js} +1 -1
  239. package/dist/twilight/{p-ba5f879e.entry.js → p-23ccf145.entry.js} +1 -1
  240. package/dist/twilight/{p-7eeb788a.entry.js → p-23e45bd7.entry.js} +1 -1
  241. package/dist/twilight/{p-661755d7.entry.js → p-2667efd6.entry.js} +1 -1
  242. package/dist/twilight/{p-0ecf936e.entry.js → p-294f6c8e.entry.js} +1 -1
  243. package/dist/twilight/{p-171e4a2f.entry.js → p-317048c4.entry.js} +1 -1
  244. package/dist/twilight/{p-8cf71ac9.entry.js → p-31b7fbdc.entry.js} +1 -1
  245. package/dist/twilight/{p-1d1315d7.entry.js → p-32ea6fff.entry.js} +1 -1
  246. package/dist/twilight/{p-4262b4d7.entry.js → p-34b91d42.entry.js} +1 -1
  247. package/dist/twilight/{p-ae8b1d8b.entry.js → p-36f4e851.entry.js} +1 -1
  248. package/dist/twilight/{p-612fb2e8.entry.js → p-39325cfc.entry.js} +1 -1
  249. package/dist/twilight/{p-df933610.entry.js → p-3acbfe00.entry.js} +1 -1
  250. package/dist/twilight/{p-827fa966.entry.js → p-3ba09a8e.entry.js} +1 -1
  251. package/dist/twilight/{p-cbeff415.entry.js → p-3de1d01b.entry.js} +1 -1
  252. package/dist/twilight/{p-3b14f3d4.entry.js → p-45a13d19.entry.js} +1 -1
  253. package/dist/twilight/{p-f70bf6b0.entry.js → p-45cc68ce.entry.js} +1 -1
  254. package/dist/twilight/{p-8ef3ef7d.entry.js → p-482fee31.entry.js} +1 -1
  255. package/dist/twilight/{p-c2858bed.entry.js → p-48f26c20.entry.js} +1 -1
  256. package/dist/twilight/{p-G2sLbl_C.js → p-4asjbsmx.js} +1 -1
  257. package/dist/twilight/{p-11b351be.entry.js → p-52d1d467.entry.js} +1 -1
  258. package/dist/twilight/{p-ef5a0e71.entry.js → p-53f8972b.entry.js} +1 -1
  259. package/dist/twilight/p-55f765dc.entry.js +4 -0
  260. package/dist/twilight/{p-aac26dda.entry.js → p-56ce31f2.entry.js} +1 -1
  261. package/dist/twilight/{p-dcaaa19e.entry.js → p-5b65fffc.entry.js} +1 -1
  262. package/dist/twilight/{p-7c9e88d3.entry.js → p-62b8c2cc.entry.js} +1 -1
  263. package/dist/twilight/{p-0b53b377.entry.js → p-6536466c.entry.js} +1 -1
  264. package/dist/twilight/{p-d38ae081.entry.js → p-655c7f90.entry.js} +1 -1
  265. package/dist/twilight/{p-dfdd4c78.entry.js → p-6b767b19.entry.js} +1 -1
  266. package/dist/twilight/{p-4e50bc09.entry.js → p-6e45ec66.entry.js} +1 -1
  267. package/dist/twilight/{p-cff5dd0b.entry.js → p-6ea4f06c.entry.js} +1 -1
  268. package/dist/twilight/{p-ad7814d7.entry.js → p-6ea8b4a8.entry.js} +1 -1
  269. package/dist/twilight/{p-bd559920.entry.js → p-6fcf17d4.entry.js} +1 -1
  270. package/dist/twilight/{p-00bc0e76.entry.js → p-7495249f.entry.js} +1 -1
  271. package/dist/twilight/{p-179c76df.entry.js → p-74ba0473.entry.js} +1 -1
  272. package/dist/twilight/{p-3319b19b.entry.js → p-7836ad45.entry.js} +1 -1
  273. package/dist/twilight/{p-11a1c557.entry.js → p-788ffe88.entry.js} +1 -1
  274. package/dist/twilight/{p-5537738b.entry.js → p-78ff082d.entry.js} +1 -1
  275. package/dist/twilight/{p-08a8a1ff.entry.js → p-799a0589.entry.js} +1 -1
  276. package/dist/twilight/{p-9bc5c3d5.entry.js → p-7ddae4df.entry.js} +1 -1
  277. package/dist/twilight/{p-CR5J1D0q.js → p-7foc7ca2.js} +1 -1
  278. package/dist/twilight/{p-bf7e7835.entry.js → p-85f185cc.entry.js} +1 -1
  279. package/dist/twilight/{p-cfe6fbe3.entry.js → p-864959d8.entry.js} +1 -1
  280. package/dist/twilight/{p-8e679d21.entry.js → p-8bc3a449.entry.js} +1 -1
  281. package/dist/twilight/{p-444e6c0b.entry.js → p-8c7614fb.entry.js} +1 -1
  282. package/dist/twilight/{p-bdf47e97.entry.js → p-8f5929a9.entry.js} +1 -1
  283. package/dist/twilight/{p-0efb20f7.entry.js → p-8fbf8044.entry.js} +1 -1
  284. package/dist/twilight/{p-e0b0e90f.entry.js → p-917ce4f9.entry.js} +1 -1
  285. package/dist/twilight/{p-760d1b6c.entry.js → p-945eec73.entry.js} +1 -1
  286. package/dist/twilight/{p-3771c21e.entry.js → p-94eddc5c.entry.js} +1 -1
  287. package/dist/twilight/{p-45b9c237.entry.js → p-9897606c.entry.js} +1 -1
  288. package/dist/twilight/{p-1a598e9b.entry.js → p-9950bd4f.entry.js} +1 -1
  289. package/dist/twilight/{p-8Y4Ctfsa.js → p-BHXx247M.js} +1 -1
  290. package/dist/twilight/p-Ba21M-o3.js +9 -0
  291. package/dist/twilight/{p-BXv9XzTR.js → p-BcMiEHs_.js} +1 -1
  292. package/dist/twilight/{p-DV1rxosP.js → p-ClbVN5Nv.js} +1 -1
  293. package/dist/twilight/{p-3jS5Dm-u.js → p-HZVqfCuE.js} +1 -1
  294. package/dist/twilight/{p-DTfPuMCT.js → p-PcxCrM8A.js} +1 -1
  295. package/dist/twilight/{p-c895701a.entry.js → p-a0869ee6.entry.js} +1 -1
  296. package/dist/twilight/{p-018629e9.entry.js → p-a0f0a176.entry.js} +1 -1
  297. package/dist/twilight/{p-4d0df0fe.entry.js → p-a0f2b1b7.entry.js} +1 -1
  298. package/dist/twilight/{p-df3feae1.entry.js → p-a1d43865.entry.js} +1 -1
  299. package/dist/twilight/{p-0f5846fe.entry.js → p-a4b9f482.entry.js} +1 -1
  300. package/dist/twilight/{p-1bafeac8.entry.js → p-a64f2fff.entry.js} +1 -1
  301. package/dist/twilight/{p-d38e101f.entry.js → p-a7a64c45.entry.js} +1 -1
  302. package/dist/twilight/{p-7ccdd251.entry.js → p-a97a0636.entry.js} +1 -1
  303. package/dist/twilight/{p-81cdd5c5.entry.js → p-b98b2cda.entry.js} +1 -1
  304. package/dist/twilight/{p-c5948d07.entry.js → p-bd1dbd4b.entry.js} +1 -1
  305. package/dist/twilight/{p-80228706.entry.js → p-c273ff37.entry.js} +1 -1
  306. package/dist/twilight/{p-0e1f8e61.entry.js → p-c33ed919.entry.js} +1 -1
  307. package/dist/twilight/{p-ff5362e3.entry.js → p-c62b3757.entry.js} +1 -1
  308. package/dist/twilight/{p-085aac95.entry.js → p-cb47fc80.entry.js} +1 -1
  309. package/dist/twilight/{p-66ae8f3b.entry.js → p-ce0a4802.entry.js} +1 -1
  310. package/dist/twilight/{p-343a9ec3.entry.js → p-d21e8092.entry.js} +1 -1
  311. package/dist/twilight/{p-331fe074.entry.js → p-d266e9ad.entry.js} +1 -1
  312. package/dist/twilight/{p-35dabed0.entry.js → p-d35c3f7d.entry.js} +1 -1
  313. package/dist/twilight/{p-2cdcd70d.entry.js → p-d4f3905f.entry.js} +1 -1
  314. package/dist/twilight/{p-71c70e04.entry.js → p-d524d26e.entry.js} +1 -1
  315. package/dist/twilight/{p-cdad2ba2.entry.js → p-d566b402.entry.js} +1 -1
  316. package/dist/twilight/{p-80ead7f0.entry.js → p-da05ae96.entry.js} +1 -1
  317. package/dist/twilight/{p-ba61073e.entry.js → p-dd775629.entry.js} +1 -1
  318. package/dist/twilight/{p-fdb16a84.entry.js → p-ddb65e87.entry.js} +1 -1
  319. package/dist/twilight/{p-c0304211.entry.js → p-e28f4afc.entry.js} +1 -1
  320. package/dist/twilight/{p-483551e7.entry.js → p-e47f5ec9.entry.js} +1 -1
  321. package/dist/twilight/{p-721b6019.entry.js → p-efeae895.entry.js} +1 -1
  322. package/dist/twilight/{p-53dc0615.entry.js → p-f407afee.entry.js} +1 -1
  323. package/dist/twilight/{p-e49ce881.entry.js → p-f6bae25a.entry.js} +1 -1
  324. package/dist/twilight/{p-652ab33d.entry.js → p-f757ba41.entry.js} +1 -1
  325. package/dist/twilight/{p-BnDYuqv2.js → p-klFskvc_.js} +1 -1
  326. package/dist/twilight/{p-B7eX2j-t.js → p-rKbQj-u0.js} +1 -1
  327. package/dist/twilight/twilight.esm.js +1 -1
  328. package/dist/types/components/salla-products-list/salla-products-list.d.ts +4 -0
  329. package/dist/types/components.d.ts +2 -2
  330. package/package.json +5 -5
  331. package/dist/twilight/p-648a4d8d.entry.js +0 -4
  332. package/dist/twilight/p-DpkirgB4.js +0 -9
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
7
7
  import { H as Helper } from './Helper-BQ-wOE14.js';
@@ -232,7 +232,7 @@ const SallaProductsList = class {
232
232
  this.nextPage += `&per_page=${this.limit > 32 ? 32 : this.limit}`;
233
233
  }
234
234
  if (this.sortBy) {
235
- this.nextPage += `&sort=${this.sortBy}`;
235
+ this.nextPage += `&sort=${encodeURIComponent(this.sortBy)}`;
236
236
  }
237
237
  if (salla.config.get('theme.mode') === 'preview') {
238
238
  this.nextPage += `&use_username_url=1`;
@@ -574,9 +574,12 @@ const SallaProductsList = class {
574
574
  * which would make two different search terms under the same category filter collide.
575
575
  */
576
576
  getCategoryIdentity(pageSlug) {
577
- return pageSlug === 'search'
578
- ? `search:${Helper.getProductsSourceValue(this.source, this.sourceValue)}`
579
- : pageSlug;
577
+ if (pageSlug !== 'search') {
578
+ return pageSlug;
579
+ }
580
+ const identity = `search:${Helper.getProductsSourceValue(this.source, this.sourceValue)}`;
581
+ // Do not restore an old best-seller snapshot into the default relevance listing.
582
+ return this.isSearchPageList() ? `${identity}:sort:${this.sortBy || 'relevance'}` : identity;
580
583
  }
581
584
  removeScrollRestorationSession() {
582
585
  if (!this.isFilterable()) {
@@ -912,6 +915,8 @@ const SallaProductsList = class {
912
915
  source: Helper.getApiSource(this.getSource()),
913
916
  source_value: this.getSourceValue(),
914
917
  limit: this.limit,
918
+ // A discarded search snapshot must refetch using the shopper's selected sort.
919
+ ...(this.isSearchPageList() && this.sortBy ? { sort: this.sortBy } : {}),
915
920
  })
916
921
  .catch(error => {
917
922
  const response = error?.response;
@@ -1006,6 +1011,26 @@ const SallaProductsList = class {
1006
1011
  }
1007
1012
  this.emitSelection();
1008
1013
  }
1014
+ isSearchPageList() {
1015
+ return this.getSource() === 'search' && this.currentPage?.slug === 'product.index.search' && this.filtersResults === true;
1016
+ }
1017
+ syncSearchSortControl() {
1018
+ if (!this.isSearchPageList() || this.sortBy) {
1019
+ return;
1020
+ }
1021
+ // product-filter is the standard theme selector (Raed and third-party catalog templates).
1022
+ const select = document.querySelector('#product-filter');
1023
+ if (!select || select.tagName !== 'SELECT') {
1024
+ return;
1025
+ }
1026
+ if (!select.querySelector('option[value=""]')) {
1027
+ const option = document.createElement('option');
1028
+ option.setAttribute('value', '');
1029
+ option.textContent = salla.lang.getWithDefault('common.elements.search_results', salla.lang.get('pages.categories.sorting'));
1030
+ select.insertBefore(option, select.firstChild);
1031
+ }
1032
+ select.value = '';
1033
+ }
1009
1034
  componentWillLoad() {
1010
1035
  return salla.onReady().then(async () => {
1011
1036
  this.hasCustomComponent = !!customElements.get(this.productCardComponent);
@@ -1013,7 +1038,10 @@ const SallaProductsList = class {
1013
1038
  this.hasInfiniteScroll = !this.isAuxiliaryProductsListSource() && !this.limit;
1014
1039
  let searchParams = new URLSearchParams(window.location.search);
1015
1040
  try {
1016
- this.sortBy = this.sortBy || searchParams.get('sort') || searchParams.get('by');
1041
+ const requestedSort = searchParams.get('sort') || searchParams.get('by');
1042
+ // A theme's catalog default must not replace the relevance order used by the search popup.
1043
+ // A shopper's explicit sort, and subsequent sortBy updates followed by reload(), still apply.
1044
+ this.sortBy = this.isSearchPageList() ? requestedSort || undefined : this.sortBy || requestedSort;
1017
1045
  this.parsedFilters = Helper.extractFiltersFromUrl(searchParams);
1018
1046
  if (this.parsedFilters && this.parsedFilters.category_id) {
1019
1047
  this.currentCategoryIdFilter = this.toCategoryIdFilter(this.parsedFilters.category_id);
@@ -1056,6 +1084,7 @@ const SallaProductsList = class {
1056
1084
  });
1057
1085
  }
1058
1086
  async componentDidLoad() {
1087
+ this.syncSearchSortControl();
1059
1088
  this.hasInfiniteScroll && this.init();
1060
1089
  await Salla.hooks.registerComponent('salla-products-list', this);
1061
1090
  if (this.loadStoredScrollState()) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { H as Helper } from './Helper-BQ-wOE14.js';
6
6
  import './anime.es-CgtvEd63.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { I as IphoneXIcon } from './iphone-x-Z7udRKSZ.js';
6
6
  import { M as MailIcon } from './mail-DmgxDvXL.js';
7
7
  import { C as Cancel } from './cancel-BsLF_HK7.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, f as forceUpdate, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, f as forceUpdate, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { S as ShippingFast, a as Star } from './star-cq6TcfoH.js';
6
6
  import { C as CheckCircle2 } from './check-circle2-BV4kqbdL.js';
7
7
  import { H as Helper } from './Helper-BQ-wOE14.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { C as CheckCircle2 } from './check-circle2-BV4kqbdL.js';
7
7
  import { I as ImageIcon } from './image-C-tzSDxw.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
  import { S as Star } from './star2-D4oPi1Ov.js';
6
6
  import { f as fetchOrder, r as resolveReviewFactors } from './helpers-DqXpn47Z.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
  import { f as fetchOrder, g as getProductRatings } from './helpers-DqXpn47Z.js';
6
6
 
7
7
  const SallaReviewOrderItem = class {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
  import { S as Search } from './search-BscTeWDc.js';
6
6
 
7
7
  var StoreAlt = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { S as Star } from './star2-D4oPi1Ov.js';
6
6
  import { C as Cart } from './cart-gFG8By9O.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-klFskvc_.js';
5
5
  import { S as Search } from './search-BscTeWDc.js';
6
6
  import { C as Cancel } from './cancel-BsLF_HK7.js';
7
7
  import { A as ArrowLeftIcon, a as ArrowRightIcon } from './keyboard_arrow_right-Vqpj4CWE.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
 
6
6
  const sallaSkeletonCss = "/*!twlt*/:host{display:block}.s-loyalty-skeleton .s-loyalty-prize-item .s-skeleton-wrapper{margin-left:auto;margin-right:auto}.s-skeleton-wrapper{display:block}@keyframes pulse{50%{opacity:.5}}.s-skeleton-wrapper{animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite}.s-skeleton-item{height:100%;width:100%;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-skeleton-item:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.s-skeleton-item-circular{border-radius:9999px}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-klFskvc_.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
7
7
  import { M as MailIcon } from './mail-DmgxDvXL.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
6
6
 
7
7
  var instagram = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, c as createEvent, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, c as createEvent, a as getElement } from './index-klFskvc_.js';
5
5
 
6
6
  const sallaTabContentCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
 
6
6
  var DiscountType;
7
7
  (function (DiscountType) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-klFskvc_.js';
5
5
 
6
6
  const sallaTooltipCss = "/*!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)}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
 
6
6
  const sallaTrustBadgesCss = "/*!twlt*/.s-trust-badges-wrapper{display:flex;align-items:center}.s-trust-badges-wrapper>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-trust-badges-wrapper:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-trust-badges-label{margin-bottom:0.25rem;font-size:0.875rem;line-height:1.25rem}.s-trust-badges-number{font-size:0.875rem;line-height:1.25rem}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { A as ArrowDown } from './keyboard_arrow_down-DCZbpt2a.js';
6
6
  import { B as BellRing } from './bell-ring-D3mWkc-3.js';
7
7
  import { C as Cart } from './cart-gFG8By9O.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h } from './index-klFskvc_.js';
5
5
  import { G as Genders } from './interfaces-OF8QcbMM.js';
6
6
 
7
7
  const sallaUserProfileCss = "/*!twlt*/:host{display:block}.form-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));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:300ms}.form-input:focus{border-color:var(--color-primary);--tw-ring-color:transparent}.form-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))}.form-input:focus:is(.dark *){border-color:var(--color-primary)}@media (min-width: 640px){.form-input{font-size:0.875rem;line-height:1.25rem}}.s-user-profile-wrapper{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:1.5rem}@media (min-width: 640px){.s-user-profile-wrapper{grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem}}.s-user-profile-field-label{margin-bottom:0.5rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-user-profile-field-error{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-user-profile-submit{margin-top:1.5rem;width:100%}.s-user-profile-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-user-profile-filepond-placeholder-icon{margin-bottom:0.25rem}.s-user-profile-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-user-profile-skeleton-wrapper{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));grid-template-rows:repeat(3, minmax(0, 1fr));gap:3rem}";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
 
6
6
  var Bullhorn = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
  import { M as MailIcon } from './mail-DmgxDvXL.js';
6
6
 
7
7
  var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
 
6
6
  const sallaWalletCss = "/*!twlt*/@charset \"UTF-8\";.s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}.s-wallet-summary{display:flex;align-items:stretch;gap:16px;margin-bottom:28px}.s-wallet-balance-card{flex:0 0 34%;max-width:240px;background:#fff;border-radius:12px;padding:20px;box-sizing:border-box}.s-wallet-balance-mark{width:48px;height:48px;border-radius:9999px;background:var(--color-primary-reverse, #eaf7f0);color:var(--color-primary, #2e8b57);display:inline-flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:12px}.s-wallet-balance-figure{font-size:18px;font-weight:700;color:#1c1c1c}.s-wallet-balance-label{margin-top:2px;font-size:12px;color:#9aa0a6}.s-wallet-amount{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}.s-wallet-amount-credit{color:#00af6c}.s-wallet-amount-debit{color:#f55157}.s-wallet-transaction-type{display:flex;align-items:center;color:#4b5563}@media screen and (min-width: 768px){.s-wallet-balance-card{display:flex;flex-direction:column;justify-content:center}}@media screen and (max-width: 767px){.s-wallet-summary{gap:12px;margin-bottom:20px}.s-wallet-balance-card{flex:0 0 38%;padding:16px;text-align:center}.s-wallet-balance-mark{margin-bottom:8px}}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.hidden{display:none}.items-center{align-items:center}.p-3{padding:0.75rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.625rem * var(--tw-space-y-reverse))}@media (min-width: 768px){.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}}.s-wallet-mobile-title{display:inline-block;width:8rem;font-weight:400;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-wallet-mobile-title{display:none}}.s-wallet-reference-id{display:none}@media (min-width: 768px){.s-wallet-reference-id{display:inline-block}}.s-wallet-buy-as-gift-icon{margin-left:0.25rem;margin-right:0.25rem;display:inline-block;color:var(--color-primary)}.s-wallet-copy-to-clipboard-button{display:flex;align-items:center}@media (min-width: 768px){.s-wallet-copy-to-clipboard-button{display:none}}.s-wallet-copy-to-clipboard-button salla-button{position:relative}.s-wallet-copy-to-clipboard-button-icon{pointer-events:none;font-size:0.75rem;line-height:1rem}.s-wallet-copy-to-clipboard-button-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:0.25rem}.s-wallet-copy-to-clipboard-button-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0.25rem}@media (min-width: 768px){.s-wallet-status-container{margin-left:0px;margin-right:0px}}.s-wallet-status-container:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:auto}.s-wallet-status-container:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:auto}.s-wallet-status-container i{margin-top:0.25rem}.s-wallet-status-container i:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.25rem}.s-wallet-status-container i:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.25rem}.s-wallet-rated-text{--tw-text-opacity:1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.s-wallet-unrated-text{--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-wallet-no-content{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding-top:2.5rem;padding-bottom:5rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-wallet-no-content p{margin-bottom:1rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-wallet-table{min-width:100%;border-collapse:separate}@media (min-width: 768px){.s-wallet-table{margin-bottom:-0.75rem;--tw-border-spacing-y:1.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}}.s-wallet-table-head{margin-bottom:1.25rem;display:none;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 768px){.s-wallet-table-head{display:table-header-group}}.s-wallet-table-head-tr-th{padding-left:1.5rem;padding-right:1.5rem;text-align:start;font-size:0.875rem;line-height:1.25rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.s-wallet-table-head-tr-th:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:left}.s-wallet-table-head-tr-th:last-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:right}.s-wallet-table-head-tr-th:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-wallet-table-head-tr-th:last-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:left}.s-wallet-table-tbody-tr{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-radius:var(--s-radius, 0.25rem);border-bottom-width:8px;border-top-width:8px;--tw-border-opacity:1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}@media (min-width: 768px){.s-wallet-table-tbody-tr{display:table-row;flex-direction:row;flex-wrap:nowrap;padding:0px}}.s-wallet-table-tbody-tr-td{width:100%;white-space:nowrap;font-size:0.875rem;line-height:1.25rem}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}@media (min-width: 768px){.s-wallet-table-tbody-tr-td{height:5rem;width:auto}.s-wallet-table-tbody-tr-td:last-child{text-align:end}.s-wallet-table-tbody-tr-td:first-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem}.s-wallet-table-tbody-tr-td:first-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem}}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}.s-wallet-table-tbody-tr-td-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem}@media (min-width: 768px){.s-wallet-table-tbody-tr-td-content{padding-left:1.5rem;padding-right:1.5rem;padding-top:1.5rem;padding-bottom:1.5rem}}.s-wallet-table-tbody-tr-td-content:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-right:0.5rem}.s-wallet-table-tbody-tr-td-content:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:0.5rem}.s-wallet-table-tbody-tr a{position:absolute;top:0px;bottom:0px;display:block;width:100%}.s-wallet-table-tbody-tr a:where([dir=\"ltr\"],[dir=\"ltr\"] *){left:0px}.s-wallet-table-tbody-tr a:where([dir=\"rtl\"],[dir=\"rtl\"] *){right:0px}@media (min-width: 768px){.md\\:mx-0{margin-left:0px;margin-right:0px}.md\\:inline-block{display:inline-block}.md\\:hidden{display:none}}.ltr\\:ml-auto:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:auto}.ltr\\:mr-4:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:1rem}.rtl\\:ml-4:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:1rem}.rtl\\:mr-auto:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:auto}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-klFskvc_.js';
5
5
 
6
6
  const sallaWishlistActionsCss = "/*!twlt*/:host{display:block}.s-wishlist-actions-menu{min-width:200px;inset-inline-end:0;inset-inline-start:auto;list-style:none;margin:0;padding:4px 0;box-shadow:0 4px 16px rgba(0, 0, 0, 0.12)}.s-wishlist-actions-menu-item{display:block;width:100%;padding:10px 16px;text-align:start;font-size:0.875rem;color:#374151;background:transparent;cursor:pointer;white-space:nowrap}.s-wishlist-actions-menu-item:hover{background-color:#f3f4f6;color:var(--color-primary)}.s-wishlist-actions-panel{box-shadow:0 1px 3px rgba(0, 0, 0, 0.08)}.s-wishlist-actions-panel-select-all{user-select:none}.s-wishlist-actions-select-all:indeterminate,.s-wishlist-actions-select-all:indeterminate:hover,.s-wishlist-actions-select-all:indeterminate:focus{background-color:var(--color-primary);border-color:var(--color-primary)}.s-wishlist-actions-select-all:indeterminate::after{content:\"\";position:absolute;top:50%;left:50%;width:10px;height:2px;background:#fff;border:none;transform:translate(-50%, -50%)}.s-wishlist-actions-social-anchor{display:none}h1.s-wishlist-actions-page-title{text-align:start !important}.static{position:static}.absolute{position:absolute}.relative{position:relative}.z-20{z-index:20}.mb-3{margin-bottom:0.75rem}.mt-1{margin-top:0.25rem}.mt-3{margin-top:0.75rem}.flex{display:flex}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:0.5rem}.gap-3{gap:0.75rem}.gap-4{gap:1rem}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:0.5rem}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-4{padding:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.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)}.outline{outline-style:solid}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BnDYuqv2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-klFskvc_.js';
5
5
  import { H as Heart } from './heart-00vBRoH3.js';
6
6
  import { H as Helper } from './Helper-BQ-wOE14.js';
7
7
  import './anime.es-CgtvEd63.js';
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-BnDYuqv2.js';
5
- export { s as setNonce } from './index-BnDYuqv2.js';
4
+ import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-klFskvc_.js';
5
+ export { s as setNonce } from './index-klFskvc_.js';
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Browser v4.35.1 | MIT Licensed | https://stenciljs.com
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BnDYuqv2.js';
4
+ import { d as getDefaultExportFromCjs } from './index-klFskvc_.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as e,H as s,a as l,F as i}from"./p-BnDYuqv2.js";const n=class{constructor(e){t(this,e),this.sections=[],this.itemNumber=""}deleteItem(t,e){const s=this.host.closest("form");if(s){const l=s.getAttribute("id");if(l&&"string"==typeof l){const s=l.match(/item-(\d+)/)?.[1];this.itemNumber=s||"";const i=this.host.querySelector(`#accordion-${e.id}`);salla.cart.deleteItem(`${this.itemNumber}?product_id=${e.id}&section_id=${t}`).then((()=>i?.remove()))}}}renderRemoveButton(t,s,l=!1){return e("salla-button",{type:"button",shape:l?"btn":"icon",fill:l?"outline":"solid",size:"small",color:"danger","aria-label":"Remove from the cart",onClick:()=>this.deleteItem(t,s)},l?salla.lang.get("common.elements.delete"):e("i",{class:"sicon-cancel"}))}renderAccordionHeader(t,s){const l=s?.options&&s?.options?.length>0;return e("div",{slot:"html",class:"s-multiple-bundle-product-cart-header-wrapper"},e("div",{class:"s-multiple-bundle-product-cart-header "+(l?"":"s-multiple-bundle-product-cart-header-no-options")},e("div",{class:"s-multiple-bundle-product-cart-header-content"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-image-wrapper"},e("img",{src:s?.image?.url,alt:s?.image?.alt||s?.name,class:"s-multiple-bundle-product-cart-header-image"})),e("div",{class:"s-multiple-bundle-product-cart-header-content-details"},e("h2",{class:"s-multiple-bundle-product-cart-header-content-details-title"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-content-details-title-link"},s?.name)),e("div",{class:"s-multiple-bundle-product-cart-header-content-details-price"},e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-regular"},e("span",{innerHTML:s?.price?salla.money(s?.price):""})),s?.sale_price>0&&e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-sale"},e("span",{innerHTML:salla.money(s?.sale_price)}))),s?.quantity_in_group>0&&0!==s?.quantity&&e("p",{class:"s-multiple-bundle-product-cart-header-content-details-quantity"},e("span",null,salla.lang.get("pages.products.number_of_pieces")),e("span",null,s?.quantity_in_group)))),!l&&e("div",{class:"s-multiple-bundle-product-cart-header-remove-button"},this.renderRemoveButton(t,s,!1))))}render(){return e(s,{key:"f4a66dc2916ad42108b551790e1a1a581a55d6b1",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"fa96a2da58ee5be80c79c1a6fff66fbcf49cd87e",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>t.products.map((l=>{const i={sectionId:t.id,sectionIndex:s,productId:l.id};return e("salla-accordion",{key:l.id,collapsed:!1,bordered:!0,collapsible:!!(l.options&&l.options.length>0),size:"sm",id:`accordion-${l.id}`},e("salla-accordion-head",null,this.renderAccordionHeader(String(t.id),l)),l.options&&l.options.length>0&&e("salla-accordion-body",null,e("salla-product-options",{options:JSON.stringify(l.options),key:`${l.id}-persistent`,"product-id":l.id,"bundle-context":JSON.stringify(i)}),e("div",{class:"s-multiple-bundle-product-cart-body-remove-button"},this.renderRemoveButton(String(t.id),l,!0))))}))))))}get host(){return l(this)}};n.style="";const c=class{constructor(e){t(this,e),this.sections=[],this.selectedProducts={},this.productSelectedHandler=null,this.onSelectProduct=(t,e)=>{const s=e.id,l=this.selectedProducts[t]?.has(s)??!1,i=this.sections.find((e=>e.id==t));if(!(l&&i&&this.isProductSelectionLocked(i))){if(!l){if(!i)return;if(1!==this.getEffectiveMax(i)&&this.isAtSelectionLimit(i))return}this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])},l?(this.selectedProducts[t].delete(s),this.clearProductFormData(s,t),this.clearProductModalOptions(s,t)):1===this.getEffectiveMax(i)?this.syncSectionSelection(t,s):this.selectedProducts[t].add(s),this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options,wasSelected:l,isSelected:!l})}},this.ensureProductSelected=(t,e)=>{this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])};const s=e.id;if(this.selectedProducts[t].has(s))return;const l=this.sections.find((e=>e.id==t));if(!l)return;const i=this.getEffectiveMax(l);if(1===i)this.syncSectionSelection(t,s);else{if(i>1&&this.isAtSelectionLimit(l))return;this.selectedProducts[t].add(s)}this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options})},this.onSelectProductOptions=(t,e)=>{const s=this.sections.find((t=>t.id==e));if(!s||!this.canSelectProductInSection(s,t.id))return;const l=this.sections.findIndex((t=>t.id==e)),i=s.products?.findIndex((e=>e.id==t.id))??0,n=this.selectedProducts[e]?.has(t.id)??!1;salla.event.dispatch("multiple-bundle-product-modal::open",{product:t,sectionId:e,sectionIndex:l,productIndex:i,isProductAlreadySelected:n})},this.handleBundleSliderProductSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProduct(s,e)},this.handleBundleSliderProductOptionsSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProductOptions(e,s)}}isSingleProductSection(t){return 1===(t.products?.length??0)}getObligatoryMin(t){const e=t.obligatory_products;if(null==e)return 0;const s=Number(e);return Number.isNaN(s)?0:s}isProductSelectionLocked(t){return this.isSingleProductSection(t)&&1===this.getObligatoryMin(t)}getEffectiveMax(t){const e=t.products?.length??0,s=t.max_obligatory_products;return null!=s&&s>0?Math.min(s,e):e}getSelectedCount(t){return this.selectedProducts[t]?.size??0}isAtSelectionLimit(t){return this.getSelectedCount(t.id)>=this.getEffectiveMax(t)}canSelectProductInSection(t,e){return!!this.selectedProducts[t.id]?.has(e)||1===this.getEffectiveMax(t)||!this.isAtSelectionLimit(t)}async canSelectBundleProduct(t,e){const s=this.sections.find((e=>e.id==t));return!!s&&this.canSelectProductInSection(s,e)}queryProductCheckbox(t,e){const s=`input.s-multiple-bundle-product-checkbox[name="bundle[${t}][${e}][id]"]`,l=this.host.closest("form"),i=l?.querySelector(s);if(i)return i;for(const t of this.host.querySelectorAll("salla-multiple-bundle-product-slider")){const e=(t.shadowRoot??t).querySelector(s);if(e)return e}return null}dispatchBubblingChange(t){requestAnimationFrame((()=>{t.dispatchEvent(new window.Event("change",{bubbles:!0}))}))}clearSectionProductSlot(t,e,s){const l=this.queryProductCheckbox(t,s);l&&(l.checked=!1);const i=this.host.closest("form");if(i){const e=`bundle[${t}][${s}]`;Array.from(i.querySelectorAll("input")).forEach((t=>{t.name?.startsWith(e)&&("checkbox"===t.type&&t.name?.endsWith("][id]")?t.checked=!1:t.remove())}))}this.clearProductModalOptions(e,t)}syncSectionSelection(t,e){const s=this.sections.find((e=>e.id==t));s?.products?.forEach(((s,l)=>{s.id!=e&&this.clearSectionProductSlot(t,s.id,l)})),this.selectedProducts[t]=new Set([e]);const l=s?.products?.findIndex((t=>t.id==e))??-1,i=l>=0?this.queryProductCheckbox(t,l):null;i&&(i.checked=!0,this.dispatchBubblingChange(i))}autoSelectSingleProductSections(){if(!this.sections?.length)return;const t={...this.selectedProducts};let e=!1;const s=[];for(const l of this.sections){if(!this.isProductSelectionLocked(l))continue;const i=l.products?.[0];if(!i||!i.unlimited_quantity&&(i.quantity??0)<=0)continue;const n=l.id,c=new Set(t[n]||[]);c.has(i.id)||(c.add(i.id),t[n]=c,e=!0,s.push({product:i}))}e&&(this.selectedProducts=t,s.forEach((({product:t})=>{salla.event.dispatch("on-bundle-product-selected",{id:t.id,name:t.name,options:t.options})})))}clearProductFormData(t,e){if(null!=e){const s=this.sections.find((t=>t.id==e)),l=s?.products?.findIndex((e=>e.id==t))??-1;if(l>=0)return void this.clearSectionProductSlot(e,t,l)}const s=this.host.closest("form");s&&s.querySelectorAll(`[data-product-id="${t}"]`).forEach((t=>t.remove()))}clearProductModalOptions(t,e){let s=null,l=null;if(null!=e&&(s=this.sections.findIndex((t=>t.id==e)),s>-1)){const e=this.sections[s];if(e){const s=e.products?.findIndex((e=>e.id==t));l="number"==typeof s&&s>-1?s:null}}salla.event.dispatch("multiple-bundle-product-modal::clear-options",{productId:t,sectionId:e,sectionIndex:s,productIndex:l})}getProgressStatus(t){const e=this.getSelectedCount(t.id),s=this.getEffectiveMax(t);return s>0?`${e}/${s}`:"0"}getSectionSelectionNote(t){const e=this.getObligatoryMin(t),s=Number(t.max_obligatory_products)||0,l=e>0,i=s>0;return l||i?l&&i?e===s?salla.lang.getWithDefault("pages.products.bundle_select_exact",`اختر ${e} منتجات`,{count:e}):salla.lang.getWithDefault("pages.products.bundle_select_range",`اختر من ${e} إلى ${s} منتجات`,{min:e,max:s}):l?salla.lang.getWithDefault("pages.products.bundle_select_min",`اختر على الأقل ${e} منتجات`,{min:e}):salla.lang.getWithDefault("pages.products.bundle_select_max",`اختر حتى ${s} منتجات`,{max:s}):null}handleSectionsChange(){this.autoSelectSingleProductSections()}componentWillLoad(){this.autoSelectSingleProductSections()}renderAccordionHeader(t){const s=this.getSectionSelectionNote(t);return e(i,null,e("h2",{slot:"title"},t?.name),s?e("span",{slot:"note"},s):null,e("span",{slot:"progress"},this.getProgressStatus(t)))}componentDidLoad(){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&(this.productSelectedHandler=t=>{const{productId:e,sectionId:s,product:l,fromModal:i}=t.detail;i?this.ensureProductSelected(s,l||{id:e}):this.onSelectProduct(s,l||{id:e})},t.addEventListener("productSelected",this.productSelectedHandler))}disconnectedCallback(){if(this.productSelectedHandler){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&t.removeEventListener("productSelected",this.productSelectedHandler),this.productSelectedHandler=null}}render(){return e(s,{key:"379725e546f6eeb670a23166de2a2d829e48da96",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"5939dfacd285738495dda3481d4974775152dc76",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>e("salla-accordion",{key:t.id,collapsed:0!==s},e("salla-accordion-head",null,this.renderAccordionHeader(t)),e("salla-accordion-body",null,e("salla-multiple-bundle-product-slider",{section:t,sectionIndex:s,selectedProducts:this.selectedProducts,selectionLimit:this.getEffectiveMax(t),isSelectionLocked:this.isProductSelectionLocked(t),onProductSelected:this.handleBundleSliderProductSelected,onProductOptionsSelected:this.handleBundleSliderProductOptionsSelected})))))),e("salla-multiple-bundle-product-options-modal",{key:"2270a07c784a748e7ffaf48164e5cc8b09116878"}))}get host(){return l(this)}static get watchers(){return{sections:["handleSectionsChange"]}}};c.style="";export{n as salla_multiple_bundle_product_cart,c as salla_multiple_bundle_product_details}
4
+ import{r as t,h as e,H as s,a as l,F as i}from"./p-klFskvc_.js";const n=class{constructor(e){t(this,e),this.sections=[],this.itemNumber=""}deleteItem(t,e){const s=this.host.closest("form");if(s){const l=s.getAttribute("id");if(l&&"string"==typeof l){const s=l.match(/item-(\d+)/)?.[1];this.itemNumber=s||"";const i=this.host.querySelector(`#accordion-${e.id}`);salla.cart.deleteItem(`${this.itemNumber}?product_id=${e.id}&section_id=${t}`).then((()=>i?.remove()))}}}renderRemoveButton(t,s,l=!1){return e("salla-button",{type:"button",shape:l?"btn":"icon",fill:l?"outline":"solid",size:"small",color:"danger","aria-label":"Remove from the cart",onClick:()=>this.deleteItem(t,s)},l?salla.lang.get("common.elements.delete"):e("i",{class:"sicon-cancel"}))}renderAccordionHeader(t,s){const l=s?.options&&s?.options?.length>0;return e("div",{slot:"html",class:"s-multiple-bundle-product-cart-header-wrapper"},e("div",{class:"s-multiple-bundle-product-cart-header "+(l?"":"s-multiple-bundle-product-cart-header-no-options")},e("div",{class:"s-multiple-bundle-product-cart-header-content"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-image-wrapper"},e("img",{src:s?.image?.url,alt:s?.image?.alt||s?.name,class:"s-multiple-bundle-product-cart-header-image"})),e("div",{class:"s-multiple-bundle-product-cart-header-content-details"},e("h2",{class:"s-multiple-bundle-product-cart-header-content-details-title"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-content-details-title-link"},s?.name)),e("div",{class:"s-multiple-bundle-product-cart-header-content-details-price"},e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-regular"},e("span",{innerHTML:s?.price?salla.money(s?.price):""})),s?.sale_price>0&&e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-sale"},e("span",{innerHTML:salla.money(s?.sale_price)}))),s?.quantity_in_group>0&&0!==s?.quantity&&e("p",{class:"s-multiple-bundle-product-cart-header-content-details-quantity"},e("span",null,salla.lang.get("pages.products.number_of_pieces")),e("span",null,s?.quantity_in_group)))),!l&&e("div",{class:"s-multiple-bundle-product-cart-header-remove-button"},this.renderRemoveButton(t,s,!1))))}render(){return e(s,{key:"f4a66dc2916ad42108b551790e1a1a581a55d6b1",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"fa96a2da58ee5be80c79c1a6fff66fbcf49cd87e",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>t.products.map((l=>{const i={sectionId:t.id,sectionIndex:s,productId:l.id};return e("salla-accordion",{key:l.id,collapsed:!1,bordered:!0,collapsible:!!(l.options&&l.options.length>0),size:"sm",id:`accordion-${l.id}`},e("salla-accordion-head",null,this.renderAccordionHeader(String(t.id),l)),l.options&&l.options.length>0&&e("salla-accordion-body",null,e("salla-product-options",{options:JSON.stringify(l.options),key:`${l.id}-persistent`,"product-id":l.id,"bundle-context":JSON.stringify(i)}),e("div",{class:"s-multiple-bundle-product-cart-body-remove-button"},this.renderRemoveButton(String(t.id),l,!0))))}))))))}get host(){return l(this)}};n.style="";const c=class{constructor(e){t(this,e),this.sections=[],this.selectedProducts={},this.productSelectedHandler=null,this.onSelectProduct=(t,e)=>{const s=e.id,l=this.selectedProducts[t]?.has(s)??!1,i=this.sections.find((e=>e.id==t));if(!(l&&i&&this.isProductSelectionLocked(i))){if(!l){if(!i)return;if(1!==this.getEffectiveMax(i)&&this.isAtSelectionLimit(i))return}this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])},l?(this.selectedProducts[t].delete(s),this.clearProductFormData(s,t),this.clearProductModalOptions(s,t)):1===this.getEffectiveMax(i)?this.syncSectionSelection(t,s):this.selectedProducts[t].add(s),this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options,wasSelected:l,isSelected:!l})}},this.ensureProductSelected=(t,e)=>{this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])};const s=e.id;if(this.selectedProducts[t].has(s))return;const l=this.sections.find((e=>e.id==t));if(!l)return;const i=this.getEffectiveMax(l);if(1===i)this.syncSectionSelection(t,s);else{if(i>1&&this.isAtSelectionLimit(l))return;this.selectedProducts[t].add(s)}this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options})},this.onSelectProductOptions=(t,e)=>{const s=this.sections.find((t=>t.id==e));if(!s||!this.canSelectProductInSection(s,t.id))return;const l=this.sections.findIndex((t=>t.id==e)),i=s.products?.findIndex((e=>e.id==t.id))??0,n=this.selectedProducts[e]?.has(t.id)??!1;salla.event.dispatch("multiple-bundle-product-modal::open",{product:t,sectionId:e,sectionIndex:l,productIndex:i,isProductAlreadySelected:n})},this.handleBundleSliderProductSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProduct(s,e)},this.handleBundleSliderProductOptionsSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProductOptions(e,s)}}isSingleProductSection(t){return 1===(t.products?.length??0)}getObligatoryMin(t){const e=t.obligatory_products;if(null==e)return 0;const s=Number(e);return Number.isNaN(s)?0:s}isProductSelectionLocked(t){return this.isSingleProductSection(t)&&1===this.getObligatoryMin(t)}getEffectiveMax(t){const e=t.products?.length??0,s=t.max_obligatory_products;return null!=s&&s>0?Math.min(s,e):e}getSelectedCount(t){return this.selectedProducts[t]?.size??0}isAtSelectionLimit(t){return this.getSelectedCount(t.id)>=this.getEffectiveMax(t)}canSelectProductInSection(t,e){return!!this.selectedProducts[t.id]?.has(e)||1===this.getEffectiveMax(t)||!this.isAtSelectionLimit(t)}async canSelectBundleProduct(t,e){const s=this.sections.find((e=>e.id==t));return!!s&&this.canSelectProductInSection(s,e)}queryProductCheckbox(t,e){const s=`input.s-multiple-bundle-product-checkbox[name="bundle[${t}][${e}][id]"]`,l=this.host.closest("form"),i=l?.querySelector(s);if(i)return i;for(const t of this.host.querySelectorAll("salla-multiple-bundle-product-slider")){const e=(t.shadowRoot??t).querySelector(s);if(e)return e}return null}dispatchBubblingChange(t){requestAnimationFrame((()=>{t.dispatchEvent(new window.Event("change",{bubbles:!0}))}))}clearSectionProductSlot(t,e,s){const l=this.queryProductCheckbox(t,s);l&&(l.checked=!1);const i=this.host.closest("form");if(i){const e=`bundle[${t}][${s}]`;Array.from(i.querySelectorAll("input")).forEach((t=>{t.name?.startsWith(e)&&("checkbox"===t.type&&t.name?.endsWith("][id]")?t.checked=!1:t.remove())}))}this.clearProductModalOptions(e,t)}syncSectionSelection(t,e){const s=this.sections.find((e=>e.id==t));s?.products?.forEach(((s,l)=>{s.id!=e&&this.clearSectionProductSlot(t,s.id,l)})),this.selectedProducts[t]=new Set([e]);const l=s?.products?.findIndex((t=>t.id==e))??-1,i=l>=0?this.queryProductCheckbox(t,l):null;i&&(i.checked=!0,this.dispatchBubblingChange(i))}autoSelectSingleProductSections(){if(!this.sections?.length)return;const t={...this.selectedProducts};let e=!1;const s=[];for(const l of this.sections){if(!this.isProductSelectionLocked(l))continue;const i=l.products?.[0];if(!i||!i.unlimited_quantity&&(i.quantity??0)<=0)continue;const n=l.id,c=new Set(t[n]||[]);c.has(i.id)||(c.add(i.id),t[n]=c,e=!0,s.push({product:i}))}e&&(this.selectedProducts=t,s.forEach((({product:t})=>{salla.event.dispatch("on-bundle-product-selected",{id:t.id,name:t.name,options:t.options})})))}clearProductFormData(t,e){if(null!=e){const s=this.sections.find((t=>t.id==e)),l=s?.products?.findIndex((e=>e.id==t))??-1;if(l>=0)return void this.clearSectionProductSlot(e,t,l)}const s=this.host.closest("form");s&&s.querySelectorAll(`[data-product-id="${t}"]`).forEach((t=>t.remove()))}clearProductModalOptions(t,e){let s=null,l=null;if(null!=e&&(s=this.sections.findIndex((t=>t.id==e)),s>-1)){const e=this.sections[s];if(e){const s=e.products?.findIndex((e=>e.id==t));l="number"==typeof s&&s>-1?s:null}}salla.event.dispatch("multiple-bundle-product-modal::clear-options",{productId:t,sectionId:e,sectionIndex:s,productIndex:l})}getProgressStatus(t){const e=this.getSelectedCount(t.id),s=this.getEffectiveMax(t);return s>0?`${e}/${s}`:"0"}getSectionSelectionNote(t){const e=this.getObligatoryMin(t),s=Number(t.max_obligatory_products)||0,l=e>0,i=s>0;return l||i?l&&i?e===s?salla.lang.getWithDefault("pages.products.bundle_select_exact",`اختر ${e} منتجات`,{count:e}):salla.lang.getWithDefault("pages.products.bundle_select_range",`اختر من ${e} إلى ${s} منتجات`,{min:e,max:s}):l?salla.lang.getWithDefault("pages.products.bundle_select_min",`اختر على الأقل ${e} منتجات`,{min:e}):salla.lang.getWithDefault("pages.products.bundle_select_max",`اختر حتى ${s} منتجات`,{max:s}):null}handleSectionsChange(){this.autoSelectSingleProductSections()}componentWillLoad(){this.autoSelectSingleProductSections()}renderAccordionHeader(t){const s=this.getSectionSelectionNote(t);return e(i,null,e("h2",{slot:"title"},t?.name),s?e("span",{slot:"note"},s):null,e("span",{slot:"progress"},this.getProgressStatus(t)))}componentDidLoad(){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&(this.productSelectedHandler=t=>{const{productId:e,sectionId:s,product:l,fromModal:i}=t.detail;i?this.ensureProductSelected(s,l||{id:e}):this.onSelectProduct(s,l||{id:e})},t.addEventListener("productSelected",this.productSelectedHandler))}disconnectedCallback(){if(this.productSelectedHandler){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&t.removeEventListener("productSelected",this.productSelectedHandler),this.productSelectedHandler=null}}render(){return e(s,{key:"379725e546f6eeb670a23166de2a2d829e48da96",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"5939dfacd285738495dda3481d4974775152dc76",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>e("salla-accordion",{key:t.id,collapsed:0!==s},e("salla-accordion-head",null,this.renderAccordionHeader(t)),e("salla-accordion-body",null,e("salla-multiple-bundle-product-slider",{section:t,sectionIndex:s,selectedProducts:this.selectedProducts,selectionLimit:this.getEffectiveMax(t),isSelectionLocked:this.isProductSelectionLocked(t),onProductSelected:this.handleBundleSliderProductSelected,onProductOptionsSelected:this.handleBundleSliderProductOptionsSelected})))))),e("salla-multiple-bundle-product-options-modal",{key:"2270a07c784a748e7ffaf48164e5cc8b09116878"}))}get host(){return l(this)}static get watchers(){return{sections:["handleSectionsChange"]}}};c.style="";export{n as salla_multiple_bundle_product_cart,c as salla_multiple_bundle_product_details}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as r,H as a,a as e}from"./p-BnDYuqv2.js";import{S as o}from"./p-D4oPi1Ov.js";import{C as c}from"./p-gFG8By9O.js";const i=class{constructor(r){t(this,r),this.hideAddBtn=!1,this.showDonationAmount=!1,this.remained="",this.outOfStock="",this.donationAmount="",this.startingPrice="",this.addToCart="",this.placeholder="",this.COMPACT_TITLE_MAX_LENGTH=90}parseProductData(t){if(t)try{return"object"==typeof t?t:JSON.parse(t)}catch(t){return void salla.log("Bad json passed via product prop")}}handleProductChange(t){this.productData=this.parseProductData(t)}async componentWillLoad(){this.productData=this.parseProductData(this.product),await Promise.all([salla.onReady(),salla.lang.onLoaded()]),this.placeholder=salla.url.asset(salla.config.get("theme.settings.placeholder")),this.remained=salla.lang.get("pages.products.remained"),this.donationAmount=salla.lang.get("pages.products.donation_amount"),this.startingPrice=salla.lang.get("pages.products.starting_price"),this.addToCart=salla.lang.get("pages.cart.add_to_cart"),this.outOfStock=salla.lang.get("pages.products.out_of_stock")}getDisplayTitle(){const t=this.productData?.name||"";return t.length<=this.COMPACT_TITLE_MAX_LENGTH?t:t.slice(0,this.COMPACT_TITLE_MAX_LENGTH).trimEnd()+"…"}getProductBadge(){return!this.productData?.is_available&&this.productData?.quantity?r("div",{class:"s-search-product-card-quantity"},this.remained," ",salla.helpers.number(this.productData?.quantity)):this.productData.promotion_title?r("div",{class:"s-search-product-card-promotion-title"},this.productData.promotion_title):null}renderAddToCartLabel(){return r("slot",{name:"add-to-cart-label"},r("span",{class:"s-search-product-card-add-to-cart-icon",innerHTML:c}))}getPriceFormat(t){return t&&0!=t?salla.money(t):salla.config.get("store.settings.product.show_price_as_dash")?"-":""}getProductPrice(){return this.productData.is_on_sale?r("div",{class:"s-search-product-card-sale-price"},r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData.sale_price)}),r("span",{innerHTML:this.getPriceFormat(this.productData?.regular_price)})):this.productData.starting_price?r("div",{class:"s-search-product-card-starting-price"},r("p",null,this.startingPrice),r("h4",{innerHTML:this.getPriceFormat(this.productData?.starting_price)})):r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData?.price)})}render(){const t={"s-search-product-card-entry":!0,"s-search-product-card-horizontal":!0,"s-search-product-card-compact":!0,"s-search-product-card-donation":this.productData?.donation},e=this.productData?.url?{href:this.productData.url}:{};return r(a,{key:"96d5601bdfaf30f7455567d1b749882a1bacca89",id:`search-product-${this.productData?.id}`,class:t},this.productData?.url?r("a",{class:"s-search-product-card-overlay-link","aria-label":this.productData?.name,...e}):null,r("div",{key:"3fe75c253a2658366445b9e8f49f8d1fefbbb203",class:"s-search-product-card-image"},r("img",{key:"916d235df1545379d39c5645dd552dd9280d36ba",class:`s-search-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)?"contain":"cover"} lazy`,src:this.placeholder,alt:this.productData?.image?.alt||this.productData?.name,"data-src":this.productData?.image?.url||this.productData?.thumbnail}),this.getProductBadge()),r("div",{key:"e473015b3d9f5efe0aeffb304811e29c5c9cd4e6",class:"s-search-product-card-content"},r("div",{key:"f0c30273f378ba36d5e7a9c407b44112c7bcc132",class:"s-search-product-card-content-main"},r("h3",{key:"747a97b3c73bee3cd301d4bd1e6904f3aef6f5fb",class:"s-search-product-card-content-title"},this.getDisplayTitle()),this.productData?.subtitle?r("p",{class:"s-search-product-card-content-subtitle"},this.productData?.subtitle):null),this.showDonationAmount&&this.productData?.donation?[r("salla-progress-bar",{donation:this.productData?.donation}),r("div",{class:"s-search-product-card-donation-input"},this.productData?.donation?.can_donate?[r("label",{htmlFor:"donation-amount"},this.donationAmount," ",r("span",null,"*")),r("input",{type:"text",onInput:t=>{salla.helpers.inputDigitsOnly(t.target),this.addBtn&&(this.addBtn.donatingAmount=t.target.value)},id:"donation-amount",name:"donating_amount",class:"s-form-control",placeholder:this.donationAmount})]:null)]:null,r("div",{key:"87970771b9c073248e115e55d9d0848d7e319ec2",class:"s-search-product-card-content-sub"},this.getProductPrice(),this.productData?.is_out_of_stock?r("span",{class:"s-search-product-card-out-of-stock-label"},this.outOfStock):null),this.productData?.rating?.stars?r("div",{class:"s-search-product-card-rating"},r("span",{innerHTML:o}),r("span",null,this.productData.rating.stars)):null),this.hideAddBtn?null:r("div",{class:"s-search-product-card-content-footer"},r("salla-add-product-button",{ref:t=>this.addBtn=t,"product-id":this.productData.id,"product-status":this.productData.status,"product-type":this.productData.type,class:"s-add-product-button-compact"},this.renderAddToCartLabel())))}componentDidLoad(){document.lazyLoadInstance?.update(this.host?.querySelectorAll(".lazy"))}get host(){return e(this)}static get watchers(){return{product:["handleProductChange"]}}};i.style='/*!twlt*/.s-search-product-card-image::before{font-family:"sallaicons";content:"\\ec1f" !important}.grid{display:grid}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-search-product-card-entry{position:relative;display:flex;height:100%;justify-content:space-between;border-radius:var(--s-radius, 0.25rem);transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product-card-out-of-stock img.loaded{--tw-grayscale:grayscale(100%);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-search-product-card-quantity{position:absolute;bottom:0.25rem;left:50%;z-index:1;max-width:calc(100% - 60px);--tw-translate-x:-50%;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));border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-quantity{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title{position:absolute;top:1rem;left:0px;z-index:1;max-width:calc(100% - 60px);border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-promotion-title{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title:where([dir="rtl"],[dir="rtl"] *){right:0px;left:unset;border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem);border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-product-card-image{position:relative;height:100%;width:100%;flex-shrink:0;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-card-image::before{position:absolute;top:50%;left:50%;display:inline-block;--tw-translate-x:-50%;--tw-translate-y:-50%;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));font-size:1.875rem;line-height:2.25rem;content:var(--tw-content);--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-search-product-card-image:hover{opacity:0.9}.s-search-product-card-image img{height:100%;width:100%;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-search-product-card-image img.lazy{opacity:0}.s-search-product-card-image img.loaded{position:relative;opacity:1}.s-search-product-card-content{position:relative;display:flex;flex-direction:column;padding:0.75rem}@media (min-width: 640px){.s-search-product-card-content{padding:1.25rem}}.s-search-product-card-content-title{margin-bottom:0.625rem;display:block;max-width:100%;text-align:start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-content-title:hover{color:var(--color-primary)}.s-search-product-card-content-subtitle{margin-bottom:0.625rem;font-size:0.875rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-card-donation-input{position:relative;z-index:2;flex:1 1 0%}.s-search-product-card-donation-input label{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem}.s-search-product-card-donation-input label span{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-overlay-link{position:absolute;inset:0px;z-index:1}.s-search-product-card-content-sub{margin-bottom:1.25rem;display:flex;width:100%;align-items:center;justify-content:space-between}.s-search-product-card-out-of-stock-label{font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-rating{margin-top:0.5rem;display:flex;align-items:center}.s-search-product-card-rating>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-rating{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product-card-rating:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-rating span svg{margin-bottom:3px;height:1rem;width:1rem;fill:#fbbf24}.s-search-product-card-content-footer{margin-top:auto;display:flex;align-items:center}.s-search-product-card-sale-price>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-sale-price:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-sale-price span{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-card-starting-price{display:flex;align-items:center;justify-content:space-between}.s-search-product-card-starting-price h4{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-search-product-card-price-value{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-image-cover{object-fit:cover}.s-search-product-card-image-contain{object-fit:contain}.s-search-product-card-add-to-cart-icon svg{height:1rem;width:1rem;fill:currentColor}.s-search-product-card-horizontal .s-search-product-card-image{height:auto;width:8rem}@media (min-width: 640px){.s-search-product-card-horizontal .s-search-product-card-image{width:14rem}}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-quantity{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.s-search-product-card-horizontal .s-search-product-card-promotion-title{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content{margin-bottom:0.625rem;width:100%}.s-search-product-card-compact{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:0.75rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:0px;padding-right:0px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-search-product-card-content-footer{position:relative;z-index:2;margin-top:0px;flex-shrink:0;gap:0.5rem}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn{height:2rem;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);background-color:transparent;padding-left:0.75rem;padding-right:0.75rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn:hover{border-color:var(--color-primary);background-color:var(--color-primary);--tw-bg-opacity:0.1;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content{min-width:0px;flex:1 1 0%;padding:0px;text-align:right}.s-search-product-card-compact .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.25;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-subtitle{margin-top:0.25rem;display:none;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub{margin-bottom:0px;display:flex;align-items:center;justify-content:flex-start;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-search-product-card-compact .s-search-product-card-content-sub h4{margin:0px}.s-search-product-card-compact .s-search-product-card-starting-price h4{font-weight:700}.s-search-product-card-compact .s-search-product-card-starting-price{justify-content:flex-start;gap:0.25rem}.s-search-product-card-compact .s-search-product-card-image{height:5rem;width:5rem;flex-shrink:0;border-radius:0.375rem}.s-search-product-card-compact .s-search-product-card-image img{height:100%;width:100%;border-radius:0.375rem;object-fit:cover}.s-search-product-card-compact .s-search-product-card-promotion-title{display:none}';export{i as salla_search_product_card}
4
+ import{r as t,h as r,H as a,a as e}from"./p-klFskvc_.js";import{S as o}from"./p-D4oPi1Ov.js";import{C as c}from"./p-gFG8By9O.js";const i=class{constructor(r){t(this,r),this.hideAddBtn=!1,this.showDonationAmount=!1,this.remained="",this.outOfStock="",this.donationAmount="",this.startingPrice="",this.addToCart="",this.placeholder="",this.COMPACT_TITLE_MAX_LENGTH=90}parseProductData(t){if(t)try{return"object"==typeof t?t:JSON.parse(t)}catch(t){return void salla.log("Bad json passed via product prop")}}handleProductChange(t){this.productData=this.parseProductData(t)}async componentWillLoad(){this.productData=this.parseProductData(this.product),await Promise.all([salla.onReady(),salla.lang.onLoaded()]),this.placeholder=salla.url.asset(salla.config.get("theme.settings.placeholder")),this.remained=salla.lang.get("pages.products.remained"),this.donationAmount=salla.lang.get("pages.products.donation_amount"),this.startingPrice=salla.lang.get("pages.products.starting_price"),this.addToCart=salla.lang.get("pages.cart.add_to_cart"),this.outOfStock=salla.lang.get("pages.products.out_of_stock")}getDisplayTitle(){const t=this.productData?.name||"";return t.length<=this.COMPACT_TITLE_MAX_LENGTH?t:t.slice(0,this.COMPACT_TITLE_MAX_LENGTH).trimEnd()+"…"}getProductBadge(){return!this.productData?.is_available&&this.productData?.quantity?r("div",{class:"s-search-product-card-quantity"},this.remained," ",salla.helpers.number(this.productData?.quantity)):this.productData.promotion_title?r("div",{class:"s-search-product-card-promotion-title"},this.productData.promotion_title):null}renderAddToCartLabel(){return r("slot",{name:"add-to-cart-label"},r("span",{class:"s-search-product-card-add-to-cart-icon",innerHTML:c}))}getPriceFormat(t){return t&&0!=t?salla.money(t):salla.config.get("store.settings.product.show_price_as_dash")?"-":""}getProductPrice(){return this.productData.is_on_sale?r("div",{class:"s-search-product-card-sale-price"},r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData.sale_price)}),r("span",{innerHTML:this.getPriceFormat(this.productData?.regular_price)})):this.productData.starting_price?r("div",{class:"s-search-product-card-starting-price"},r("p",null,this.startingPrice),r("h4",{innerHTML:this.getPriceFormat(this.productData?.starting_price)})):r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData?.price)})}render(){const t={"s-search-product-card-entry":!0,"s-search-product-card-horizontal":!0,"s-search-product-card-compact":!0,"s-search-product-card-donation":this.productData?.donation},e=this.productData?.url?{href:this.productData.url}:{};return r(a,{key:"96d5601bdfaf30f7455567d1b749882a1bacca89",id:`search-product-${this.productData?.id}`,class:t},this.productData?.url?r("a",{class:"s-search-product-card-overlay-link","aria-label":this.productData?.name,...e}):null,r("div",{key:"3fe75c253a2658366445b9e8f49f8d1fefbbb203",class:"s-search-product-card-image"},r("img",{key:"916d235df1545379d39c5645dd552dd9280d36ba",class:`s-search-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)?"contain":"cover"} lazy`,src:this.placeholder,alt:this.productData?.image?.alt||this.productData?.name,"data-src":this.productData?.image?.url||this.productData?.thumbnail}),this.getProductBadge()),r("div",{key:"e473015b3d9f5efe0aeffb304811e29c5c9cd4e6",class:"s-search-product-card-content"},r("div",{key:"f0c30273f378ba36d5e7a9c407b44112c7bcc132",class:"s-search-product-card-content-main"},r("h3",{key:"747a97b3c73bee3cd301d4bd1e6904f3aef6f5fb",class:"s-search-product-card-content-title"},this.getDisplayTitle()),this.productData?.subtitle?r("p",{class:"s-search-product-card-content-subtitle"},this.productData?.subtitle):null),this.showDonationAmount&&this.productData?.donation?[r("salla-progress-bar",{donation:this.productData?.donation}),r("div",{class:"s-search-product-card-donation-input"},this.productData?.donation?.can_donate?[r("label",{htmlFor:"donation-amount"},this.donationAmount," ",r("span",null,"*")),r("input",{type:"text",onInput:t=>{salla.helpers.inputDigitsOnly(t.target),this.addBtn&&(this.addBtn.donatingAmount=t.target.value)},id:"donation-amount",name:"donating_amount",class:"s-form-control",placeholder:this.donationAmount})]:null)]:null,r("div",{key:"87970771b9c073248e115e55d9d0848d7e319ec2",class:"s-search-product-card-content-sub"},this.getProductPrice(),this.productData?.is_out_of_stock?r("span",{class:"s-search-product-card-out-of-stock-label"},this.outOfStock):null),this.productData?.rating?.stars?r("div",{class:"s-search-product-card-rating"},r("span",{innerHTML:o}),r("span",null,this.productData.rating.stars)):null),this.hideAddBtn?null:r("div",{class:"s-search-product-card-content-footer"},r("salla-add-product-button",{ref:t=>this.addBtn=t,"product-id":this.productData.id,"product-status":this.productData.status,"product-type":this.productData.type,class:"s-add-product-button-compact"},this.renderAddToCartLabel())))}componentDidLoad(){document.lazyLoadInstance?.update(this.host?.querySelectorAll(".lazy"))}get host(){return e(this)}static get watchers(){return{product:["handleProductChange"]}}};i.style='/*!twlt*/.s-search-product-card-image::before{font-family:"sallaicons";content:"\\ec1f" !important}.grid{display:grid}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-search-product-card-entry{position:relative;display:flex;height:100%;justify-content:space-between;border-radius:var(--s-radius, 0.25rem);transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product-card-out-of-stock img.loaded{--tw-grayscale:grayscale(100%);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-search-product-card-quantity{position:absolute;bottom:0.25rem;left:50%;z-index:1;max-width:calc(100% - 60px);--tw-translate-x:-50%;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));border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-quantity{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title{position:absolute;top:1rem;left:0px;z-index:1;max-width:calc(100% - 60px);border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-promotion-title{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title:where([dir="rtl"],[dir="rtl"] *){right:0px;left:unset;border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem);border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-product-card-image{position:relative;height:100%;width:100%;flex-shrink:0;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-card-image::before{position:absolute;top:50%;left:50%;display:inline-block;--tw-translate-x:-50%;--tw-translate-y:-50%;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));font-size:1.875rem;line-height:2.25rem;content:var(--tw-content);--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-search-product-card-image:hover{opacity:0.9}.s-search-product-card-image img{height:100%;width:100%;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-search-product-card-image img.lazy{opacity:0}.s-search-product-card-image img.loaded{position:relative;opacity:1}.s-search-product-card-content{position:relative;display:flex;flex-direction:column;padding:0.75rem}@media (min-width: 640px){.s-search-product-card-content{padding:1.25rem}}.s-search-product-card-content-title{margin-bottom:0.625rem;display:block;max-width:100%;text-align:start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-content-title:hover{color:var(--color-primary)}.s-search-product-card-content-subtitle{margin-bottom:0.625rem;font-size:0.875rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-card-donation-input{position:relative;z-index:2;flex:1 1 0%}.s-search-product-card-donation-input label{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem}.s-search-product-card-donation-input label span{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-overlay-link{position:absolute;inset:0px;z-index:1}.s-search-product-card-content-sub{margin-bottom:1.25rem;display:flex;width:100%;align-items:center;justify-content:space-between}.s-search-product-card-out-of-stock-label{font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-rating{margin-top:0.5rem;display:flex;align-items:center}.s-search-product-card-rating>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-rating{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product-card-rating:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-rating span svg{margin-bottom:3px;height:1rem;width:1rem;fill:#fbbf24}.s-search-product-card-content-footer{margin-top:auto;display:flex;align-items:center}.s-search-product-card-sale-price>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-sale-price:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-sale-price span{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-card-starting-price{display:flex;align-items:center;justify-content:space-between}.s-search-product-card-starting-price h4{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-search-product-card-price-value{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-image-cover{object-fit:cover}.s-search-product-card-image-contain{object-fit:contain}.s-search-product-card-add-to-cart-icon svg{height:1rem;width:1rem;fill:currentColor}.s-search-product-card-horizontal .s-search-product-card-image{height:auto;width:8rem}@media (min-width: 640px){.s-search-product-card-horizontal .s-search-product-card-image{width:14rem}}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-quantity{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.s-search-product-card-horizontal .s-search-product-card-promotion-title{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content{margin-bottom:0.625rem;width:100%}.s-search-product-card-compact{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:0.75rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:0px;padding-right:0px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-search-product-card-content-footer{position:relative;z-index:2;margin-top:0px;flex-shrink:0;gap:0.5rem}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn{height:2rem;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);background-color:transparent;padding-left:0.75rem;padding-right:0.75rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn:hover{border-color:var(--color-primary);background-color:var(--color-primary);--tw-bg-opacity:0.1;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content{min-width:0px;flex:1 1 0%;padding:0px;text-align:right}.s-search-product-card-compact .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.25;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-subtitle{margin-top:0.25rem;display:none;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub{margin-bottom:0px;display:flex;align-items:center;justify-content:flex-start;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-search-product-card-compact .s-search-product-card-content-sub h4{margin:0px}.s-search-product-card-compact .s-search-product-card-starting-price h4{font-weight:700}.s-search-product-card-compact .s-search-product-card-starting-price{justify-content:flex-start;gap:0.25rem}.s-search-product-card-compact .s-search-product-card-image{height:5rem;width:5rem;flex-shrink:0;border-radius:0.375rem}.s-search-product-card-compact .s-search-product-card-image img{height:100%;width:100%;border-radius:0.375rem;object-fit:cover}.s-search-product-card-compact .s-search-product-card-promotion-title{display:none}';export{i as salla_search_product_card}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as r,H as e,a as o}from"./p-BnDYuqv2.js";import{H as i}from"./p-Brgf4SAC.js";import"./p-CgtvEd63.js";const n=class{constructor(r){t(this,r),this.nextPage="",this.autoload=!1,this.container="salla-infinite-scroll",this.item="salla-infinite-scroll > *",this.status=document.createElement("div"),this.status.className="s-infinite-scroll-wrapper",this.status.innerHTML=`<div class="s-infinite-scroll-status" style="display:none">\n <p class="s-infinite-scroll-last infinite-scroll-last"></p>\n <p class="s-infinite-scroll-error infinite-scroll-error"></p>\n </div>\n <a href="${this.nextPage}" class="s-infinite-scroll-btn s-button-btn s-button-primary">\n <span class="s-button-text s-infinite-scroll-btn-text">${this.loadMoreText?this.loadMoreText:salla.lang.get("common.elements.load_more")}</span>\n <span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>\n </a>`,this.btnLoader=this.status.querySelector(".s-button-loader"),salla.lang.onLoaded((()=>{this.status.querySelector(".s-button-text").innerHTML=this.loadMoreText?this.loadMoreText:salla.lang.get("common.elements.load_more"),this.status.querySelector(".s-infinite-scroll-last").innerHTML=salla.lang.get("common.elements.end_of_content"),this.status.querySelector(".s-infinite-scroll-error").innerHTML=salla.lang.get("common.elements.failed_to_load_more")}))}loading(t=!0){let r=this.status.querySelector(".s-button-text");i.toggleElementClassIf(r,"s-button-hide","s-button-show",(()=>t)),this.btnLoader.style.display=t?"inherit":"none"}render(){return this.nextPage.length>1?r(e,{class:"s-infinite-scroll-container"},r("slot",null)):""}componentDidLoad(){if(0===this.nextPage.length)return;this.host.insertAdjacentElement("afterend",this.status);let t=this,r=salla.infiniteScroll.initiate(this.container,{history:!!this.autoload&&"push",scrollThreshold:!!this.autoload&&400,nextPage:this.nextPage,checkLastPage:'salla-infinite-scroll[next-page*=":"],salla-infinite-scroll[next-page*="."]',status:".s-infinite-scroll-status",button:this.status.querySelector(".s-button-btn"),append:this.item,path:function(){return t.nextPage.replace(/page\=(\d)/g,"page="+(this.loadCount+2))}}).on("request",(()=>this.loading())).on("load",(()=>{this.loading(!1),2==r.pageIndex&&r.option({loadOnScroll:!1}),3==r.pageIndex&&r.option({loadOnScroll:!0})})).on("error",(()=>this.loading(!1)))}get host(){return o(this)}};n.style="/*!twlt*/.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;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}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-text{pointer-events:none;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-loader{margin-left:0.5rem;margin-right:0.5rem;display:flex;align-items:center;justify-content:center;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-button-loader::before{display:inline-block;height:1rem;content:var(--tw-content);width:1rem}@keyframes spin{to{content:var(--tw-content);transform:rotate(360deg)}}.s-button-loader::before{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;border-style:solid;border-top-color:var(--color-primary);border-left-color:var(--color-primary);border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-border-opacity:1;border-right-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;margin:0px !important;--tw-translate-y:-50%;--tw-translate-x:-50%;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-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-infinite-scroll-wrapper{margin-top:1rem;text-align:center}.s-infinite-scroll-last{margin:0px;text-align:center}.s-infinite-scroll-error{margin:0px;text-align:center}";export{n as salla_infinite_scroll}
4
+ import{r as t,h as r,H as e,a as o}from"./p-klFskvc_.js";import{H as i}from"./p-Brgf4SAC.js";import"./p-CgtvEd63.js";const n=class{constructor(r){t(this,r),this.nextPage="",this.autoload=!1,this.container="salla-infinite-scroll",this.item="salla-infinite-scroll > *",this.status=document.createElement("div"),this.status.className="s-infinite-scroll-wrapper",this.status.innerHTML=`<div class="s-infinite-scroll-status" style="display:none">\n <p class="s-infinite-scroll-last infinite-scroll-last"></p>\n <p class="s-infinite-scroll-error infinite-scroll-error"></p>\n </div>\n <a href="${this.nextPage}" class="s-infinite-scroll-btn s-button-btn s-button-primary">\n <span class="s-button-text s-infinite-scroll-btn-text">${this.loadMoreText?this.loadMoreText:salla.lang.get("common.elements.load_more")}</span>\n <span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>\n </a>`,this.btnLoader=this.status.querySelector(".s-button-loader"),salla.lang.onLoaded((()=>{this.status.querySelector(".s-button-text").innerHTML=this.loadMoreText?this.loadMoreText:salla.lang.get("common.elements.load_more"),this.status.querySelector(".s-infinite-scroll-last").innerHTML=salla.lang.get("common.elements.end_of_content"),this.status.querySelector(".s-infinite-scroll-error").innerHTML=salla.lang.get("common.elements.failed_to_load_more")}))}loading(t=!0){let r=this.status.querySelector(".s-button-text");i.toggleElementClassIf(r,"s-button-hide","s-button-show",(()=>t)),this.btnLoader.style.display=t?"inherit":"none"}render(){return this.nextPage.length>1?r(e,{class:"s-infinite-scroll-container"},r("slot",null)):""}componentDidLoad(){if(0===this.nextPage.length)return;this.host.insertAdjacentElement("afterend",this.status);let t=this,r=salla.infiniteScroll.initiate(this.container,{history:!!this.autoload&&"push",scrollThreshold:!!this.autoload&&400,nextPage:this.nextPage,checkLastPage:'salla-infinite-scroll[next-page*=":"],salla-infinite-scroll[next-page*="."]',status:".s-infinite-scroll-status",button:this.status.querySelector(".s-button-btn"),append:this.item,path:function(){return t.nextPage.replace(/page\=(\d)/g,"page="+(this.loadCount+2))}}).on("request",(()=>this.loading())).on("load",(()=>{this.loading(!1),2==r.pageIndex&&r.option({loadOnScroll:!1}),3==r.pageIndex&&r.option({loadOnScroll:!0})})).on("error",(()=>this.loading(!1)))}get host(){return o(this)}};n.style="/*!twlt*/.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;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}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-text{pointer-events:none;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-loader{margin-left:0.5rem;margin-right:0.5rem;display:flex;align-items:center;justify-content:center;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-button-loader::before{display:inline-block;height:1rem;content:var(--tw-content);width:1rem}@keyframes spin{to{content:var(--tw-content);transform:rotate(360deg)}}.s-button-loader::before{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;border-style:solid;border-top-color:var(--color-primary);border-left-color:var(--color-primary);border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-border-opacity:1;border-right-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;margin:0px !important;--tw-translate-y:-50%;--tw-translate-x:-50%;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-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-infinite-scroll-wrapper{margin-top:1rem;text-align:center}.s-infinite-scroll-last{margin:0px;text-align:center}.s-infinite-scroll-error{margin:0px;text-align:center}";export{n as salla_infinite_scroll}