@salla.sa/twilight-components 2.14.376 → 2.14.378

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 (244) hide show
  1. package/dist/cjs/{filepond-Dd3I4rgw.js → filepond-QBbfa1kb.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-5djSowYt.js → filepond-plugin-file-poster-D73Ejtx6.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-Cu2EHcXR.js → filepond-plugin-file-validate-size-B9s06RWW.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DcLyIuh_.js → filepond-plugin-file-validate-type-D0RhYoZP.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-Dqqtvcxc.js → filepond-plugin-image-edit-VMHg4Uws.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-C3GbyQ0e.js → filepond-plugin-image-exif-orientation-BRPczdYm.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DvR00gFp.js → filepond-plugin-image-preview-CE0l5H-P.js} +1 -1
  8. package/dist/cjs/{index-DyIre-QC.js → index-BSeuTimA.js} +1 -1
  9. package/dist/cjs/{index-D3izAH5D.js → index-CfjtAMJT.js} +2 -2
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/salla-accordion-body_3.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_4.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-apps-icons.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  19. package/dist/cjs/salla-bullet-delivery.cjs.entry.js +35 -38
  20. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  79. package/dist/cjs/twilight.cjs.js +1 -1
  80. package/dist/cjs/{vanilla-picker-RmaN5uNR.js → vanilla-picker-eNn0ke6P.js} +1 -1
  81. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +34 -37
  82. package/dist/components/index.js +2 -2
  83. package/dist/components/salla-bullet-delivery.js +34 -37
  84. package/dist/esm/{filepond-DR04w4Gj.js → filepond-buH_syGL.js} +1 -1
  85. package/dist/esm/{filepond-plugin-file-poster-B2IuQmji.js → filepond-plugin-file-poster-CrCmJw6m.js} +1 -1
  86. package/dist/esm/{filepond-plugin-file-validate-size-AvcAnLs8.js → filepond-plugin-file-validate-size-ZEbffSET.js} +1 -1
  87. package/dist/esm/{filepond-plugin-file-validate-type-Dw8J2cdC.js → filepond-plugin-file-validate-type-B8tKWOv8.js} +1 -1
  88. package/dist/esm/{filepond-plugin-image-edit-r16XZ3To.js → filepond-plugin-image-edit-DQ1j_1Hs.js} +1 -1
  89. package/dist/esm/{filepond-plugin-image-exif-orientation-Bf0AAHG5.js → filepond-plugin-image-exif-orientation-S36ZMTTn.js} +1 -1
  90. package/dist/esm/{filepond-plugin-image-preview-r-_bB1wt.js → filepond-plugin-image-preview-Ck3h57QG.js} +1 -1
  91. package/dist/esm/{index-tPV-H3dI.js → index-CLfrQ6bI.js} +2 -2
  92. package/dist/esm/{index-DCcWXApI.js → index-DoMCP0As.js} +1 -1
  93. package/dist/esm/loader.js +2 -2
  94. package/dist/esm/salla-accordion-body_3.entry.js +1 -1
  95. package/dist/esm/salla-accordion_6.entry.js +1 -1
  96. package/dist/esm/salla-add-product-button_4.entry.js +1 -1
  97. package/dist/esm/salla-advertisement.entry.js +1 -1
  98. package/dist/esm/salla-alert_2.entry.js +1 -1
  99. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  100. package/dist/esm/salla-apps-icons.entry.js +1 -1
  101. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  102. package/dist/esm/salla-bullet-delivery.entry.js +35 -38
  103. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  104. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  105. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  106. package/dist/esm/salla-contacts.entry.js +1 -1
  107. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  108. package/dist/esm/salla-count-down_2.entry.js +1 -1
  109. package/dist/esm/salla-custom-fields.entry.js +1 -1
  110. package/dist/esm/salla-filters-widget.entry.js +1 -1
  111. package/dist/esm/salla-filters.entry.js +1 -1
  112. package/dist/esm/salla-gifting.entry.js +1 -1
  113. package/dist/esm/salla-hook.entry.js +1 -1
  114. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  115. package/dist/esm/salla-installment.entry.js +1 -1
  116. package/dist/esm/salla-list-tile.entry.js +1 -1
  117. package/dist/esm/salla-localization-modal.entry.js +1 -1
  118. package/dist/esm/salla-login-modal.entry.js +1 -1
  119. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  120. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  121. package/dist/esm/salla-loyalty.entry.js +1 -1
  122. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  123. package/dist/esm/salla-menu.entry.js +1 -1
  124. package/dist/esm/salla-metadata.entry.js +1 -1
  125. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  126. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  127. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  128. package/dist/esm/salla-notification-item.entry.js +1 -1
  129. package/dist/esm/salla-notifications.entry.js +1 -1
  130. package/dist/esm/salla-offer-modal.entry.js +1 -1
  131. package/dist/esm/salla-offer.entry.js +1 -1
  132. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  133. package/dist/esm/salla-order-details-options.entry.js +1 -1
  134. package/dist/esm/salla-order-details.entry.js +1 -1
  135. package/dist/esm/salla-order-summary.entry.js +1 -1
  136. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  137. package/dist/esm/salla-orders.entry.js +1 -1
  138. package/dist/esm/salla-payments.entry.js +1 -1
  139. package/dist/esm/salla-placeholder.entry.js +1 -1
  140. package/dist/esm/salla-price-range.entry.js +1 -1
  141. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  142. package/dist/esm/salla-products-list.entry.js +1 -1
  143. package/dist/esm/salla-products-slider.entry.js +1 -1
  144. package/dist/esm/salla-progress-bar.entry.js +1 -1
  145. package/dist/esm/salla-quick-order.entry.js +1 -1
  146. package/dist/esm/salla-rating-modal.entry.js +1 -1
  147. package/dist/esm/salla-scopes.entry.js +1 -1
  148. package/dist/esm/salla-search.entry.js +1 -1
  149. package/dist/esm/salla-skeleton.entry.js +1 -1
  150. package/dist/esm/salla-slider.entry.js +1 -1
  151. package/dist/esm/salla-social-share.entry.js +1 -1
  152. package/dist/esm/salla-social.entry.js +1 -1
  153. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  154. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  155. package/dist/esm/salla-tooltip.entry.js +1 -1
  156. package/dist/esm/salla-trust-badges.entry.js +1 -1
  157. package/dist/esm/salla-user-menu.entry.js +1 -1
  158. package/dist/esm/salla-user-profile.entry.js +1 -1
  159. package/dist/esm/salla-user-settings.entry.js +1 -1
  160. package/dist/esm/salla-verify.entry.js +1 -1
  161. package/dist/esm/salla-wallet.entry.js +1 -1
  162. package/dist/esm/twilight.js +2 -2
  163. package/dist/esm/{vanilla-picker-r-Gkwefa.js → vanilla-picker-C-jd9K2P.js} +1 -1
  164. package/dist/twilight/{p-2be9a0eb.entry.js → p-0197571f.entry.js} +1 -1
  165. package/dist/twilight/{p-869a1401.entry.js → p-0260619d.entry.js} +1 -1
  166. package/dist/twilight/{p-c2d8dc32.entry.js → p-03f8ad9e.entry.js} +1 -1
  167. package/dist/twilight/{p-54455d78.entry.js → p-051e3dda.entry.js} +1 -1
  168. package/dist/twilight/{p-66f6c1b8.entry.js → p-053b71e6.entry.js} +1 -1
  169. package/dist/twilight/{p-b3201ba3.entry.js → p-08073b13.entry.js} +1 -1
  170. package/dist/twilight/{p-61e496a2.entry.js → p-0c94a0ba.entry.js} +1 -1
  171. package/dist/twilight/{p-5a18cf72.entry.js → p-0d89d8e1.entry.js} +1 -1
  172. package/dist/twilight/{p-77e92155.entry.js → p-14b1e2d0.entry.js} +1 -1
  173. package/dist/twilight/{p-4ee14ebc.entry.js → p-20e9c331.entry.js} +1 -1
  174. package/dist/twilight/{p-c11c511c.entry.js → p-26032f24.entry.js} +1 -1
  175. package/dist/twilight/{p-3ccb51d4.entry.js → p-30a0ad26.entry.js} +1 -1
  176. package/dist/twilight/{p-dc76fb54.entry.js → p-36bbf0f4.entry.js} +1 -1
  177. package/dist/twilight/{p-d5b58a28.entry.js → p-36e8eb7c.entry.js} +1 -1
  178. package/dist/twilight/{p-830b2283.entry.js → p-377e1c79.entry.js} +1 -1
  179. package/dist/twilight/{p-3302cd20.entry.js → p-38191a0e.entry.js} +1 -1
  180. package/dist/twilight/{p-36f1db49.entry.js → p-3b80943f.entry.js} +1 -1
  181. package/dist/twilight/{p-b984cb48.entry.js → p-3d4a1b1b.entry.js} +1 -1
  182. package/dist/twilight/{p-f8938945.entry.js → p-4440a6ff.entry.js} +1 -1
  183. package/dist/twilight/{p-fdadc257.entry.js → p-4886e880.entry.js} +1 -1
  184. package/dist/twilight/{p-533fa9c6.entry.js → p-48e70cb0.entry.js} +1 -1
  185. package/dist/twilight/{p-7e8959cf.entry.js → p-4a09504d.entry.js} +1 -1
  186. package/dist/twilight/{p-9829cf1f.entry.js → p-4c99593f.entry.js} +1 -1
  187. package/dist/twilight/{p-4c8241d3.entry.js → p-4e06ddfa.entry.js} +1 -1
  188. package/dist/twilight/{p-5e5e095f.entry.js → p-4e42d162.entry.js} +1 -1
  189. package/dist/twilight/{p-569595a3.entry.js → p-4f076de1.entry.js} +1 -1
  190. package/dist/twilight/{p-b722032c.entry.js → p-5840e752.entry.js} +1 -1
  191. package/dist/twilight/{p-3714d18d.entry.js → p-6907c710.entry.js} +1 -1
  192. package/dist/twilight/{p-d591f0ca.entry.js → p-6af3c1f6.entry.js} +1 -1
  193. package/dist/twilight/{p-929c7727.entry.js → p-6b471877.entry.js} +1 -1
  194. package/dist/twilight/{p-b072eac3.entry.js → p-6de27f49.entry.js} +1 -1
  195. package/dist/twilight/{p-937aeda4.entry.js → p-74855829.entry.js} +1 -1
  196. package/dist/twilight/{p-e2a36803.entry.js → p-76c9b4a4.entry.js} +1 -1
  197. package/dist/twilight/{p-5472995e.entry.js → p-76f2f01b.entry.js} +1 -1
  198. package/dist/twilight/{p-52c45fad.entry.js → p-79f8ca6d.entry.js} +1 -1
  199. package/dist/twilight/{p-3253720a.entry.js → p-7ad96323.entry.js} +1 -1
  200. package/dist/twilight/{p-3d5b254f.entry.js → p-7e4be0c4.entry.js} +1 -1
  201. package/dist/twilight/{p-50472812.entry.js → p-8717ee61.entry.js} +1 -1
  202. package/dist/twilight/{p-0769d555.entry.js → p-95ee89d0.entry.js} +1 -1
  203. package/dist/twilight/{p-H_UM2yHj.js → p-BFDfgy7S.js} +1 -1
  204. package/dist/twilight/{p-DDEnR3gK.js → p-CENly0Ds.js} +1 -1
  205. package/dist/twilight/{p-tPV-H3dI.js → p-CLfrQ6bI.js} +1 -1
  206. package/dist/twilight/{p-BDVIVE46.js → p-CfPcIuUK.js} +1 -1
  207. package/dist/twilight/{p-BppJ4FQ3.js → p-DX7cHKQU.js} +1 -1
  208. package/dist/twilight/{p-dpTfUdyk.js → p-DcXc0Zp9.js} +1 -1
  209. package/dist/twilight/{p-u-3-Hs-0.js → p-Dh0de9Ra.js} +1 -1
  210. package/dist/twilight/{p-CUyHDQ4B.js → p-Dmq3escH.js} +1 -1
  211. package/dist/twilight/{p-B0EU8pwr.js → p-EHepWG4x.js} +2 -2
  212. package/dist/twilight/{p-B6ISKHWd.js → p-SC958swN.js} +1 -1
  213. package/dist/twilight/{p-e63aa139.entry.js → p-a01445f4.entry.js} +1 -1
  214. package/dist/twilight/{p-b325dc37.entry.js → p-a034c54c.entry.js} +1 -1
  215. package/dist/twilight/{p-4fc3ca9d.entry.js → p-a19b6177.entry.js} +1 -1
  216. package/dist/twilight/{p-36b5c441.entry.js → p-a3d6030f.entry.js} +1 -1
  217. package/dist/twilight/{p-511056d9.entry.js → p-a7754ee7.entry.js} +1 -1
  218. package/dist/twilight/{p-0579e2e1.entry.js → p-ae633d64.entry.js} +1 -1
  219. package/dist/twilight/{p-d3e38f65.entry.js → p-b5366d24.entry.js} +1 -1
  220. package/dist/twilight/{p-470418bf.entry.js → p-bb910a1c.entry.js} +1 -1
  221. package/dist/twilight/{p-6b104508.entry.js → p-bf34a39d.entry.js} +1 -1
  222. package/dist/twilight/{p-3916a321.entry.js → p-bffdfc94.entry.js} +1 -1
  223. package/dist/twilight/{p-6105ab3d.entry.js → p-ca30c6ee.entry.js} +1 -1
  224. package/dist/twilight/{p-e36d3b80.entry.js → p-cc3fbf6a.entry.js} +1 -1
  225. package/dist/twilight/{p-27daf422.entry.js → p-d294fb4e.entry.js} +1 -1
  226. package/dist/twilight/{p-37f63c73.entry.js → p-d8a664c6.entry.js} +1 -1
  227. package/dist/twilight/{p-448c10ba.entry.js → p-d9cf9ee1.entry.js} +1 -1
  228. package/dist/twilight/{p-0f29b15e.entry.js → p-dcb89afa.entry.js} +1 -1
  229. package/dist/twilight/{p-d7f95270.entry.js → p-dcddba20.entry.js} +1 -1
  230. package/dist/twilight/{p-15492069.entry.js → p-e0bcc8d3.entry.js} +1 -1
  231. package/dist/twilight/{p-95d2137a.entry.js → p-e15cc4e1.entry.js} +1 -1
  232. package/dist/twilight/{p-81b354ff.entry.js → p-e3b54aea.entry.js} +1 -1
  233. package/dist/twilight/{p-80fc55b0.entry.js → p-ec02e14c.entry.js} +1 -1
  234. package/dist/twilight/{p-bf4b33e8.entry.js → p-f14a6a4a.entry.js} +1 -1
  235. package/dist/twilight/{p-829773bc.entry.js → p-f350c729.entry.js} +1 -1
  236. package/dist/twilight/{p-203f7b3e.entry.js → p-f618bcba.entry.js} +1 -1
  237. package/dist/twilight/{p-12aedefe.entry.js → p-f9978b96.entry.js} +1 -1
  238. package/dist/twilight/{p-ae065b2e.entry.js → p-fc72ec63.entry.js} +1 -1
  239. package/dist/twilight/{p-9f14e44b.entry.js → p-fd97048c.entry.js} +1 -1
  240. package/dist/twilight/{p-bc7861ff.entry.js → p-fdbe9004.entry.js} +1 -1
  241. package/dist/twilight/{p-a5f7cd65.entry.js → p-fe8869f5.entry.js} +1 -1
  242. package/dist/twilight/twilight.esm.js +1 -1
  243. package/dist/types/components/salla-bullet-delivery/helpers.d.ts +4 -4
  244. package/package.json +5 -5
@@ -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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CLfrQ6bI.js';
5
5
  import { H as Helper } from './Helper-DFMXF2_h.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, h, H as Host, a as getElement } from './index-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CLfrQ6bI.js';
5
5
 
6
6
  const sallaPaymentsCss = ":host{display:block}";
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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CLfrQ6bI.js';
5
5
 
6
6
  var Inbox = `<!-- 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 } from './index-tPV-H3dI.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-CLfrQ6bI.js';
5
5
  import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
6
6
 
7
7
  var arrowRight = `<!-- Generated by IcoMoon.io -->
@@ -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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CLfrQ6bI.js';
5
5
 
6
6
  var PencilRuler = `<!-- 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-tPV-H3dI.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CLfrQ6bI.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-DFMXF2_h.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CLfrQ6bI.js';
5
5
  import { H as Helper } from './Helper-DFMXF2_h.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, h } from './index-tPV-H3dI.js';
4
+ import { r as registerInstance, h } from './index-CLfrQ6bI.js';
5
5
 
6
6
  const sallaProgressBarCss = "";
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-tPV-H3dI.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CLfrQ6bI.js';
5
5
  import { M as MailIcon } from './mail-DmgxDvXL.js';
6
6
  import { C as Cancel } from './cancel-BsLF_HK7.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, a as getElement } from './index-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CLfrQ6bI.js';
5
5
  import { W as WishListIcon } from './star-ZT7ehBBk.js';
6
6
  import { C as CheckCircle2 } from './check-circle2-BV4kqbdL.js';
7
7
  import { H as Helper } from './Helper-DFMXF2_h.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CLfrQ6bI.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, a as getElement } from './index-tPV-H3dI.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CLfrQ6bI.js';
5
5
  import { S as Search } from './search-BscTeWDc.js';
6
6
  import { H as Helper } from './Helper-DFMXF2_h.js';
7
7
  import './anime.es-CgtvEd63.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CLfrQ6bI.js';
5
5
 
6
6
  const sallaSkeletonCss = ":host{display:block}";
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-tPV-H3dI.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CLfrQ6bI.js';
5
5
  import { a as ArrowRightIcon, A as ArrowLeftIcon } from './keyboard_arrow_right-Vqpj4CWE.js';
6
6
 
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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CLfrQ6bI.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CLfrQ6bI.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, c as createEvent, a as getElement } from './index-CLfrQ6bI.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CLfrQ6bI.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CLfrQ6bI.js';
5
5
 
6
6
  const sallaTooltipCss = ".s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){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}";
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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CLfrQ6bI.js';
5
5
 
6
6
  const sallaTrustBadgesCss = "";
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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CLfrQ6bI.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 { P as PendingOrdersIcon } from './cart-DY4LZmNP.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-tPV-H3dI.js';
4
+ import { r as registerInstance, h } from './index-CLfrQ6bI.js';
5
5
  import { G as Genders } from './interfaces-OF8QcbMM.js';
6
6
 
7
7
  const sallaUserProfileCss = ":host{display:block}";
@@ -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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CLfrQ6bI.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-tPV-H3dI.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CLfrQ6bI.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-tPV-H3dI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CLfrQ6bI.js';
5
5
 
6
6
  const sallaWalletCss = ".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}";
7
7
 
@@ -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-tPV-H3dI.js';
5
- export { s as setNonce } from './index-tPV-H3dI.js';
4
+ import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-CLfrQ6bI.js';
5
+ export { s as setNonce } from './index-CLfrQ6bI.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-tPV-H3dI.js';
4
+ import { d as getDefaultExportFromCjs } from './index-CLfrQ6bI.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 e,h as s,a as t}from"./p-tPV-H3dI.js";import{S as a}from"./p-Ctkfc4K-.js";const l=class{constructor(s){e(this,s),this.offer=null,this.hasError=!1,this.translationLoaded=!1,this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),salla.event.on("offer-modal::open",(e=>this.open(e))),salla.lang.onLoaded((()=>{this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),this.translationLoaded=!0})),this.categorySlot=this.host.querySelector('[slot="category"]')?.innerHTML||'<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>',salla.event.on("offer-modal::open",(e=>this.open(e))),salla.product.event.onOfferExisted((e=>{salla.storage.get("remember-offer-"+e.id)?salla.log("User selected to don't show this offer again."):this.open(e.product_id)}))}emitPromotionViewed(e){e&&salla.event.emit("promotion::viewed",[{id:e.id?.toString(),creative:e.message,name:e.name,position:`${this.offer_type}_offer_modal`}])}emitPromotionClicked(e){e&&salla.event.emit("promotion::clicked",[{id:e.id?.toString(),creative:e.message,name:e.name,position:`${this.offer_type}_offer_modal`}])}async open(e){return this.productID=e,this.hasError=!1,this.modal.loading(),await salla.api.withoutNotifier((()=>salla.product.offers(e))).then((e=>{e.data&&e.data.length&&(this.modal.open(),this.showOffer(e.data[0]))})).catch((e=>{this.hasError=!0,this.errorMessage=e.response?.data?.error?.message||e.response?.data,this.modal.open()})).finally((()=>{this.modal.visible&&setTimeout((()=>this.modal.stopLoading()),1e3)}))}async showOffer(e){this.offer=e,this.offer_name=e.name,this.offer_message=e.message,this.offer.get.discounts_table?this.offer_type="discounts-table":this.offer.get.products?.length?this.offer_type="products":this.offer.get.categories?.length&&(this.offer_type="categories"),this.modal.setTitle(this.offer_name),this.emitPromotionViewed(this.offer)}rememberMe(e){salla.storage.set("remember-offer-"+this.offer.id,e.target.checked)}addToCart(e){this.emitPromotionClicked(this.offer),salla.api.withoutNotifier((()=>salla.cart.quickAdd(this.productID,e,this.offer_type))).then((()=>this.modal.close()))}getOfferContent(){if(this.offer.get.discounts_table)return s("div",{class:"s-offer-modal-discount-table"},s("table",null,s("tbody",null,this.offer.get.discounts_table?.map((e=>s("tr",null,s("td",null,e.text),s("td",{class:"s-offer-modal-discount-table-cell"},s("salla-button",{fill:"outline",shape:"btn",color:"primary",size:"medium",width:"normal",onClick:()=>this.addToCart(e.quantity)},this.addToCartLabel))))))));if(this.offer.get.products?.length){const e=this.offer.get.products?.length||0,t={slidesPerView:"auto",spaceBetween:16,breakpoints:{768:{slidesPerView:Math.min(2,e),spaceBetween:16},1024:{slidesPerView:Math.min(3,e),spaceBetween:16}}};return s("salla-products-slider",{key:(this.offer.get.products?.map((e=>e.id))||[]).join(","),source:"selected","source-value":`[${(this.offer.get.products?.map((e=>e.id))||[]).join(",")}]`,"slider-config":JSON.stringify(t)})}return this.offer.get.categories?.length?s("salla-slider",{type:"carousel",class:{"s-offer-modal-slider-centered":this.offer.get.categories?.length<=2,"s-offer-modal-slider":!0},id:"offer-modal-slider","controls-outer":!0,"show-controls":this.offer.get.categories?.length<=2?"false":"true"},s("div",{slot:"items"},this.offer.get.categories.map((e=>s("a",{href:e.urls.customer,class:"s-offer-modal-badge s-offer-modal-slider-item s-offer-modal-cat-item",innerHTML:this.categorySlot.replace(/\{tagIcon\}/g,'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tag</title>\n<path d="M28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>\n</svg>\n').replace(/\{name\}/g,e.name).replace(/\{url\}/g,e.urls.customer)}))))):void 0}render(){return s("salla-modal",{key:"bf6b6ebffa1fff9faf744913029ae4eb6f5ce499","has-skeleton":!0,"sub-title":this.offer_message,ref:e=>this.modal=e,isLoading:!0,class:`s-offer-modal-type-${this.offer_type?this.offer_type:""}`},s("div",{key:"4198a24f336464f9d17170385e4f2e07c66821de",slot:"loading"},s("div",{key:"7d59e8a5f9ee1bd4467d2b463c5901b1f01a11c2",class:"s-offer-modal-skeleton"},s("div",{key:"8139ef78f0d1f5dfe3ca4e00018f27ec7918944b",class:"s-offer-modal-skeleton-header"},s("salla-skeleton",{key:"173e58027399d3b3f73dadc2d7a0e7373de62e75",type:"circle",height:"80px",width:"80px"}),s("salla-skeleton",{key:"77b033d9834f5e9a35f94bd050a5fcb2147419a1",height:"15px",width:"50%"}),s("salla-skeleton",{key:"cdce462a5437dfc804582b115a1464ebfc6026dc",height:"10px",width:"30%"})),s("div",{key:"d9add56d0af01e12636f3bbf048a9b143c2874d0",class:"s-offer-modal-skeleton-items"},[...Array(3)].map((()=>s("div",{class:"s-offer-modal-skeleton-item"},s("salla-skeleton",{height:"9rem"}),s("div",{class:"s-offer-modal-skeleton-item-title"},s("salla-skeleton",{height:"15px",width:"100%"})),s("div",{class:"s-offer-modal-skeleton-item-subtitle"},s("salla-skeleton",{height:"9px",width:"50%"}),s("div",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>cart2</title>\n<path d="M6.845 5.333l-1.905-5.333h-3.607c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333v0h1.727l5.72 16.012c0.569 1.56 2.039 2.654 3.765 2.655h12.133c0.001 0 0.002 0 0.003 0 1.825 0 3.364-1.222 3.845-2.892l0.007-0.028 3.161-13.080zM25.96 17.716c-0.167 0.554-0.672 0.951-1.27 0.951-0.002 0-0.005 0-0.007-0h-12.133c-0.575-0-1.065-0.364-1.252-0.875l-0.003-0.009-3.497-9.783h20.508zM13.333 24c-2.209 0-4 1.791-4 4s1.791 4 4 4c2.209 0 4-1.791 4-4v0c0-2.209-1.791-4-4-4v0zM13.333 29.333c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333c0.736 0 1.333 0.597 1.333 1.333v0c0 0.736-0.597 1.333-1.333 1.333v0zM24 24c-2.209 0-4 1.791-4 4s1.791 4 4 4c2.209 0 4-1.791 4-4v0c0-2.209-1.791-4-4-4v0zM24 29.333c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333c0.736 0 1.333 0.597 1.333 1.333v0c0 0.736-0.597 1.333-1.333 1.333v0z"></path>\n</svg>\n'})))))),s("div",{key:"d146a40cd8eedf5243fc40f713f19247fa7c7bbc",class:"s-offer-modal-skeleton-footer"},s("salla-skeleton",{key:"bcfd8d24a7a920f1a47751b1520f717fcbc954c4",height:"15px",width:"50%"}),s("salla-skeleton",{key:"04abbbe40c1c0fcafe3d3a287d556ea9258cfbd4",height:"15px",width:"30%"})))),this.hasError||null===this.offer?s("salla-placeholder",{class:"s-loyalty-placeholder",alignment:"center"},this.errorMessage?s("span",{slot:"description"},this.errorMessage):""):[s("span",{slot:"icon",class:"s-offer-modal-header-icon",innerHTML:a}),this.getOfferContent(),s("div",{class:"s-offer-modal-footer",slot:"footer"},this.offer.formatted_date?s("p",{class:"s-offer-modal-expiry"},salla.lang.get("pages.products.offer_expires_in")," ",this.offer.formatted_date):"",s("label",{class:"s-offer-modal-remember-label"},s("input",{type:"checkbox",onChange:e=>this.rememberMe(e),class:"s-offer-modal-remember-input"}),"  ",salla.lang.get("common.elements.remember_my_choice")))])}get host(){return t(this)}};l.style=".s-offer-modal-type-products .s-modal-body{min-height:690px;position:relative}";export{l as salla_offer_modal}
4
+ import{r as e,h as s,a as t}from"./p-CLfrQ6bI.js";import{S as a}from"./p-Ctkfc4K-.js";const l=class{constructor(s){e(this,s),this.offer=null,this.hasError=!1,this.translationLoaded=!1,this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),salla.event.on("offer-modal::open",(e=>this.open(e))),salla.lang.onLoaded((()=>{this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),this.translationLoaded=!0})),this.categorySlot=this.host.querySelector('[slot="category"]')?.innerHTML||'<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>',salla.event.on("offer-modal::open",(e=>this.open(e))),salla.product.event.onOfferExisted((e=>{salla.storage.get("remember-offer-"+e.id)?salla.log("User selected to don't show this offer again."):this.open(e.product_id)}))}emitPromotionViewed(e){e&&salla.event.emit("promotion::viewed",[{id:e.id?.toString(),creative:e.message,name:e.name,position:`${this.offer_type}_offer_modal`}])}emitPromotionClicked(e){e&&salla.event.emit("promotion::clicked",[{id:e.id?.toString(),creative:e.message,name:e.name,position:`${this.offer_type}_offer_modal`}])}async open(e){return this.productID=e,this.hasError=!1,this.modal.loading(),await salla.api.withoutNotifier((()=>salla.product.offers(e))).then((e=>{e.data&&e.data.length&&(this.modal.open(),this.showOffer(e.data[0]))})).catch((e=>{this.hasError=!0,this.errorMessage=e.response?.data?.error?.message||e.response?.data,this.modal.open()})).finally((()=>{this.modal.visible&&setTimeout((()=>this.modal.stopLoading()),1e3)}))}async showOffer(e){this.offer=e,this.offer_name=e.name,this.offer_message=e.message,this.offer.get.discounts_table?this.offer_type="discounts-table":this.offer.get.products?.length?this.offer_type="products":this.offer.get.categories?.length&&(this.offer_type="categories"),this.modal.setTitle(this.offer_name),this.emitPromotionViewed(this.offer)}rememberMe(e){salla.storage.set("remember-offer-"+this.offer.id,e.target.checked)}addToCart(e){this.emitPromotionClicked(this.offer),salla.api.withoutNotifier((()=>salla.cart.quickAdd(this.productID,e,this.offer_type))).then((()=>this.modal.close()))}getOfferContent(){if(this.offer.get.discounts_table)return s("div",{class:"s-offer-modal-discount-table"},s("table",null,s("tbody",null,this.offer.get.discounts_table?.map((e=>s("tr",null,s("td",null,e.text),s("td",{class:"s-offer-modal-discount-table-cell"},s("salla-button",{fill:"outline",shape:"btn",color:"primary",size:"medium",width:"normal",onClick:()=>this.addToCart(e.quantity)},this.addToCartLabel))))))));if(this.offer.get.products?.length){const e=this.offer.get.products?.length||0,t={slidesPerView:"auto",spaceBetween:16,breakpoints:{768:{slidesPerView:Math.min(2,e),spaceBetween:16},1024:{slidesPerView:Math.min(3,e),spaceBetween:16}}};return s("salla-products-slider",{key:(this.offer.get.products?.map((e=>e.id))||[]).join(","),source:"selected","source-value":`[${(this.offer.get.products?.map((e=>e.id))||[]).join(",")}]`,"slider-config":JSON.stringify(t)})}return this.offer.get.categories?.length?s("salla-slider",{type:"carousel",class:{"s-offer-modal-slider-centered":this.offer.get.categories?.length<=2,"s-offer-modal-slider":!0},id:"offer-modal-slider","controls-outer":!0,"show-controls":this.offer.get.categories?.length<=2?"false":"true"},s("div",{slot:"items"},this.offer.get.categories.map((e=>s("a",{href:e.urls.customer,class:"s-offer-modal-badge s-offer-modal-slider-item s-offer-modal-cat-item",innerHTML:this.categorySlot.replace(/\{tagIcon\}/g,'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tag</title>\n<path d="M28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>\n</svg>\n').replace(/\{name\}/g,e.name).replace(/\{url\}/g,e.urls.customer)}))))):void 0}render(){return s("salla-modal",{key:"bf6b6ebffa1fff9faf744913029ae4eb6f5ce499","has-skeleton":!0,"sub-title":this.offer_message,ref:e=>this.modal=e,isLoading:!0,class:`s-offer-modal-type-${this.offer_type?this.offer_type:""}`},s("div",{key:"4198a24f336464f9d17170385e4f2e07c66821de",slot:"loading"},s("div",{key:"7d59e8a5f9ee1bd4467d2b463c5901b1f01a11c2",class:"s-offer-modal-skeleton"},s("div",{key:"8139ef78f0d1f5dfe3ca4e00018f27ec7918944b",class:"s-offer-modal-skeleton-header"},s("salla-skeleton",{key:"173e58027399d3b3f73dadc2d7a0e7373de62e75",type:"circle",height:"80px",width:"80px"}),s("salla-skeleton",{key:"77b033d9834f5e9a35f94bd050a5fcb2147419a1",height:"15px",width:"50%"}),s("salla-skeleton",{key:"cdce462a5437dfc804582b115a1464ebfc6026dc",height:"10px",width:"30%"})),s("div",{key:"d9add56d0af01e12636f3bbf048a9b143c2874d0",class:"s-offer-modal-skeleton-items"},[...Array(3)].map((()=>s("div",{class:"s-offer-modal-skeleton-item"},s("salla-skeleton",{height:"9rem"}),s("div",{class:"s-offer-modal-skeleton-item-title"},s("salla-skeleton",{height:"15px",width:"100%"})),s("div",{class:"s-offer-modal-skeleton-item-subtitle"},s("salla-skeleton",{height:"9px",width:"50%"}),s("div",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>cart2</title>\n<path d="M6.845 5.333l-1.905-5.333h-3.607c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333v0h1.727l5.72 16.012c0.569 1.56 2.039 2.654 3.765 2.655h12.133c0.001 0 0.002 0 0.003 0 1.825 0 3.364-1.222 3.845-2.892l0.007-0.028 3.161-13.080zM25.96 17.716c-0.167 0.554-0.672 0.951-1.27 0.951-0.002 0-0.005 0-0.007-0h-12.133c-0.575-0-1.065-0.364-1.252-0.875l-0.003-0.009-3.497-9.783h20.508zM13.333 24c-2.209 0-4 1.791-4 4s1.791 4 4 4c2.209 0 4-1.791 4-4v0c0-2.209-1.791-4-4-4v0zM13.333 29.333c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333c0.736 0 1.333 0.597 1.333 1.333v0c0 0.736-0.597 1.333-1.333 1.333v0zM24 24c-2.209 0-4 1.791-4 4s1.791 4 4 4c2.209 0 4-1.791 4-4v0c0-2.209-1.791-4-4-4v0zM24 29.333c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333c0.736 0 1.333 0.597 1.333 1.333v0c0 0.736-0.597 1.333-1.333 1.333v0z"></path>\n</svg>\n'})))))),s("div",{key:"d146a40cd8eedf5243fc40f713f19247fa7c7bbc",class:"s-offer-modal-skeleton-footer"},s("salla-skeleton",{key:"bcfd8d24a7a920f1a47751b1520f717fcbc954c4",height:"15px",width:"50%"}),s("salla-skeleton",{key:"04abbbe40c1c0fcafe3d3a287d556ea9258cfbd4",height:"15px",width:"30%"})))),this.hasError||null===this.offer?s("salla-placeholder",{class:"s-loyalty-placeholder",alignment:"center"},this.errorMessage?s("span",{slot:"description"},this.errorMessage):""):[s("span",{slot:"icon",class:"s-offer-modal-header-icon",innerHTML:a}),this.getOfferContent(),s("div",{class:"s-offer-modal-footer",slot:"footer"},this.offer.formatted_date?s("p",{class:"s-offer-modal-expiry"},salla.lang.get("pages.products.offer_expires_in")," ",this.offer.formatted_date):"",s("label",{class:"s-offer-modal-remember-label"},s("input",{type:"checkbox",onChange:e=>this.rememberMe(e),class:"s-offer-modal-remember-input"}),"  ",salla.lang.get("common.elements.remember_my_choice")))])}get host(){return t(this)}};l.style=".s-offer-modal-type-products .s-modal-body{min-height:690px;position:relative}";export{l as salla_offer_modal}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as a,H as s}from"./p-tPV-H3dI.js";const c=class{constructor(a){e(this,a),this.translationLoaded=!1,this.icon='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>inbox</title>\n<path d="M31.984 19.797l-2.667-17.333c-0.1-0.651-0.659-1.131-1.317-1.131h-24c-0.659 0-1.217 0.48-1.317 1.131l-2.667 17.333c-0.011 0.067-0.016 0.135-0.016 0.203v6.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-6.667c0-0.068-0.005-0.136-0.016-0.203zM5.144 4h21.712l2.256 14.667h-9.112c-0.736 0-1.333 0.596-1.333 1.333 0 1.471-1.196 2.667-2.667 2.667s-2.667-1.196-2.667-2.667c0-0.737-0.597-1.333-1.333-1.333h-9.112zM29.333 26.667c0 0.736-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.597-1.333-1.333v-5.333h8.168c0.593 2.299 2.684 4 5.165 4s4.571-1.701 5.165-4h8.168z"></path>\n</svg>\n',this.alignment="left",this.iconSize="md",salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}alignmentClass(){return{"s-placeholder-wrapper":!0,"s-placeholder-align-left":"left"==this.alignment,"s-placeholder-align-center":"center"==this.alignment,"s-placeholder-align-right":"right"==this.alignment}}render(){return a(s,{key:"3961c11ea66eacabf9384474b7c8e6d9c01a3e13",class:this.alignmentClass()},a("div",{key:"e48435017dccaa4c980c90d2941a591c398139ad",class:`s-placeholder-icon s-placeholder-icon-${this.iconSize}`,innerHTML:this.icon}),a("div",{key:"4843fd497ff960ea219f6f15c361d25593958610",class:"s-placeholder-title"},a("slot",{key:"68329602b3b574c56841503032207f15a59f7df4",name:"title"},a("span",{key:"bca17b5772cc6dd677df7a504a4638f784b463da"},salla.lang.get("common.elements.no_options")))),a("div",{key:"9f07301ac5162d5fdc1a2ea04bd59e71fdaa4cde",class:"s-placeholder-description"},a("slot",{key:"1a27b5b3d1700313673b62edf99240a558187046",name:"description"},a("span",{key:"173ae7e49edc1b1aa225274afff129daa86f718f"},salla.lang.get("common.errors.empty_results")))))}};c.style="";export{c as salla_placeholder}
4
+ import{r as e,h as a,H as s}from"./p-CLfrQ6bI.js";const c=class{constructor(a){e(this,a),this.translationLoaded=!1,this.icon='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>inbox</title>\n<path d="M31.984 19.797l-2.667-17.333c-0.1-0.651-0.659-1.131-1.317-1.131h-24c-0.659 0-1.217 0.48-1.317 1.131l-2.667 17.333c-0.011 0.067-0.016 0.135-0.016 0.203v6.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-6.667c0-0.068-0.005-0.136-0.016-0.203zM5.144 4h21.712l2.256 14.667h-9.112c-0.736 0-1.333 0.596-1.333 1.333 0 1.471-1.196 2.667-2.667 2.667s-2.667-1.196-2.667-2.667c0-0.737-0.597-1.333-1.333-1.333h-9.112zM29.333 26.667c0 0.736-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.597-1.333-1.333v-5.333h8.168c0.593 2.299 2.684 4 5.165 4s4.571-1.701 5.165-4h8.168z"></path>\n</svg>\n',this.alignment="left",this.iconSize="md",salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}alignmentClass(){return{"s-placeholder-wrapper":!0,"s-placeholder-align-left":"left"==this.alignment,"s-placeholder-align-center":"center"==this.alignment,"s-placeholder-align-right":"right"==this.alignment}}render(){return a(s,{key:"3961c11ea66eacabf9384474b7c8e6d9c01a3e13",class:this.alignmentClass()},a("div",{key:"e48435017dccaa4c980c90d2941a591c398139ad",class:`s-placeholder-icon s-placeholder-icon-${this.iconSize}`,innerHTML:this.icon}),a("div",{key:"4843fd497ff960ea219f6f15c361d25593958610",class:"s-placeholder-title"},a("slot",{key:"68329602b3b574c56841503032207f15a59f7df4",name:"title"},a("span",{key:"bca17b5772cc6dd677df7a504a4638f784b463da"},salla.lang.get("common.elements.no_options")))),a("div",{key:"9f07301ac5162d5fdc1a2ea04bd59e71fdaa4cde",class:"s-placeholder-description"},a("slot",{key:"1a27b5b3d1700313673b62edf99240a558187046",name:"description"},a("span",{key:"173ae7e49edc1b1aa225274afff129daa86f718f"},salla.lang.get("common.errors.empty_results")))))}};c.style="";export{c as salla_placeholder}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t,H as o}from"./p-tPV-H3dI.js";const e=class{constructor(t){s(this,t),this.bordered=!0,this.placeholderImage="images/placeholder.png",this.optionsData=[]}componentWillLoad(){this.parseOptionsData()}componentWillUpdate(){this.parseOptionsData()}parseOptionsData(){if(this.options)if("string"==typeof this.options)try{this.optionsData=JSON.parse(this.options)}catch(s){this.optionsData=[]}else this.optionsData=Array.isArray(this.options)?this.options:[];else this.optionsData=[]}renderOptionValue(s){return s.is_image?t("div",{class:"s-order-details-option-image-container"},t("a",{href:s.value,target:"_blank"},t("img",{class:"s-order-details-option-image",src:s.value||this.placeholderImage,alt:s.name}))):s.color?t("span",{title:s.value,class:"s-order-details-option-color-swatch",style:{backgroundColor:s.color}}):s.is_file?t("a",{href:s.value,target:"_blank",class:"s-order-details-option-file-link"},salla.lang.get("common.elements.attachments")):s.is_color_picker?t("div",{class:"s-order-details-option-color-picker"},t("div",{class:"s-order-details-option-color-picker-content"},t("span",{class:"s-order-details-option-color-picker-text"},s.value),t("span",{class:"s-order-details-option-color-picker-swatch",style:{backgroundColor:s.value,width:"1rem"}})),t("salla-button",{onClick:t=>this.copyToClipboard(t,s.value),shape:"link",class:"s-order-details-option-color-picker-button"},t("span",{class:"s-order-details-option-color-copy-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>swap-fill</title>\n<path d="M28 10.667h-2.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h2.667c0.735 0 1.333 0.597 1.333 1.333v13.333c0 0.736-0.599 1.333-1.333 1.333h-13.333c-0.735 0-1.333-0.597-1.333-1.333v-2.667c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v2.667c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM21.333 17.333v-13.333c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4zM2.667 17.333v-13.333c0-0.736 0.599-1.333 1.333-1.333h13.333c0.735 0 1.333 0.597 1.333 1.333v13.333c0 0.736-0.599 1.333-1.333 1.333h-13.333c-0.735 0-1.333-0.597-1.333-1.333z"></path>\n</svg>\n'}))):s.is_map&&s.latitude&&s.longitude?t("salla-map",{id:`location_map_${s.id}`,class:`map_${s.id}`,zoom:15,readonly:!0,lat:s.latitude,lng:s.longitude},t("div",{slot:"button"},t("button",{type:"button",class:"s-order-details-option-map-button",onClick:()=>this.openMap(s.id)},salla.lang.get("common.elements.show_location")))):t("span",{class:"s-order-details-option-default-text"},s.display_value||s.value)}copyToClipboard(s,t){s.preventDefault(),navigator.clipboard&&navigator.clipboard.writeText(t)}openMap(s){const t=document.querySelector(`salla-map.map_${s}`);t&&t.open&&t.open()}render(){if(!this.optionsData.length)return null;const s=this.bordered?"s-order-details-options-container":"s-order-details-options-container-borderless";return t(o,{class:"s-order-details-options-wrapper"},t("h2",{class:"s-order-details-options-title"},salla.lang.get("pages.cart.item_options")),t("div",{class:s},t("dl",{class:"s-order-details-options-list"},this.optionsData.map((s=>t("div",{key:s.id,class:"s-order-details-options-item"},t("dt",{class:"s-order-details-options-item-name"},s.name,":"),t("dd",{class:s.is_image?"s-order-details-options-item-value-image":"s-order-details-options-item-value-text"},this.renderOptionValue(s))))))))}};e.style="";export{e as salla_order_details_options}
4
+ import{r as s,h as t,H as o}from"./p-CLfrQ6bI.js";const e=class{constructor(t){s(this,t),this.bordered=!0,this.placeholderImage="images/placeholder.png",this.optionsData=[]}componentWillLoad(){this.parseOptionsData()}componentWillUpdate(){this.parseOptionsData()}parseOptionsData(){if(this.options)if("string"==typeof this.options)try{this.optionsData=JSON.parse(this.options)}catch(s){this.optionsData=[]}else this.optionsData=Array.isArray(this.options)?this.options:[];else this.optionsData=[]}renderOptionValue(s){return s.is_image?t("div",{class:"s-order-details-option-image-container"},t("a",{href:s.value,target:"_blank"},t("img",{class:"s-order-details-option-image",src:s.value||this.placeholderImage,alt:s.name}))):s.color?t("span",{title:s.value,class:"s-order-details-option-color-swatch",style:{backgroundColor:s.color}}):s.is_file?t("a",{href:s.value,target:"_blank",class:"s-order-details-option-file-link"},salla.lang.get("common.elements.attachments")):s.is_color_picker?t("div",{class:"s-order-details-option-color-picker"},t("div",{class:"s-order-details-option-color-picker-content"},t("span",{class:"s-order-details-option-color-picker-text"},s.value),t("span",{class:"s-order-details-option-color-picker-swatch",style:{backgroundColor:s.value,width:"1rem"}})),t("salla-button",{onClick:t=>this.copyToClipboard(t,s.value),shape:"link",class:"s-order-details-option-color-picker-button"},t("span",{class:"s-order-details-option-color-copy-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>swap-fill</title>\n<path d="M28 10.667h-2.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h2.667c0.735 0 1.333 0.597 1.333 1.333v13.333c0 0.736-0.599 1.333-1.333 1.333h-13.333c-0.735 0-1.333-0.597-1.333-1.333v-2.667c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v2.667c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM21.333 17.333v-13.333c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4zM2.667 17.333v-13.333c0-0.736 0.599-1.333 1.333-1.333h13.333c0.735 0 1.333 0.597 1.333 1.333v13.333c0 0.736-0.599 1.333-1.333 1.333h-13.333c-0.735 0-1.333-0.597-1.333-1.333z"></path>\n</svg>\n'}))):s.is_map&&s.latitude&&s.longitude?t("salla-map",{id:`location_map_${s.id}`,class:`map_${s.id}`,zoom:15,readonly:!0,lat:s.latitude,lng:s.longitude},t("div",{slot:"button"},t("button",{type:"button",class:"s-order-details-option-map-button",onClick:()=>this.openMap(s.id)},salla.lang.get("common.elements.show_location")))):t("span",{class:"s-order-details-option-default-text"},s.display_value||s.value)}copyToClipboard(s,t){s.preventDefault(),navigator.clipboard&&navigator.clipboard.writeText(t)}openMap(s){const t=document.querySelector(`salla-map.map_${s}`);t&&t.open&&t.open()}render(){if(!this.optionsData.length)return null;const s=this.bordered?"s-order-details-options-container":"s-order-details-options-container-borderless";return t(o,{class:"s-order-details-options-wrapper"},t("h2",{class:"s-order-details-options-title"},salla.lang.get("pages.cart.item_options")),t("div",{class:s},t("dl",{class:"s-order-details-options-list"},this.optionsData.map((s=>t("div",{key:s.id,class:"s-order-details-options-item"},t("dt",{class:"s-order-details-options-item-name"},s.name,":"),t("dd",{class:s.is_image?"s-order-details-options-item-value-image":"s-order-details-options-item-value-text"},this.renderOptionValue(s))))))))}};e.style="";export{e as salla_order_details_options}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as a,H as s,a as l}from"./p-tPV-H3dI.js";const i=class{constructor(a){t(this,a),this.alertDelay=null,this.data=salla.config.get("store.app_install_prompt"),this.open=!1,this.closing=!1}connectedCallback(){salla.onReady((()=>{if(this.data=salla.config.get("store.app_install_prompt"),this.isMobileOrTabletDevice()){if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app"),this.alertDelay=setTimeout((()=>this.open=!0),3e3)}}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(t=1024){if("undefined"==typeof window||"undefined"==typeof navigator||"undefined"==typeof document)return!1;const a=window.matchMedia(`(max-width: ${t}px)`).matches,s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent),l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&a&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",!0),this.closing=!0,this.host.addEventListener("animationend",(()=>{this.closing=!1,this.open=!1}),{once:!0})}render(){return this.data?a(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},a("div",null,a("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),a("div",{class:"s-app-install-alert-content"},a("h2",{class:"s-app-install-alert-title"},this.data.title),a("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",a("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),a("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},a("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};i.style=":host{display:block}";export{i as salla_app_install_alert}
4
+ import{r as t,h as a,H as s,a as l}from"./p-CLfrQ6bI.js";const i=class{constructor(a){t(this,a),this.alertDelay=null,this.data=salla.config.get("store.app_install_prompt"),this.open=!1,this.closing=!1}connectedCallback(){salla.onReady((()=>{if(this.data=salla.config.get("store.app_install_prompt"),this.isMobileOrTabletDevice()){if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app"),this.alertDelay=setTimeout((()=>this.open=!0),3e3)}}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(t=1024){if("undefined"==typeof window||"undefined"==typeof navigator||"undefined"==typeof document)return!1;const a=window.matchMedia(`(max-width: ${t}px)`).matches,s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent),l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&a&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",!0),this.closing=!0,this.host.addEventListener("animationend",(()=>{this.closing=!1,this.open=!1}),{once:!0})}render(){return this.data?a(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},a("div",null,a("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),a("div",{class:"s-app-install-alert-content"},a("h2",{class:"s-app-install-alert-title"},this.data.title),a("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",a("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),a("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},a("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};i.style=":host{display:block}";export{i as salla_app_install_alert}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as a,a as s}from"./p-tPV-H3dI.js";const l=class{constructor(a){e(this,a),this.hasError=!1,salla.event.on("size-guide::open",(e=>this.open(e))),salla.lang.onLoaded((()=>{this.placeholder_title=salla.lang.get("pages.products.size_guide_placeholder"),this.placeholder_description=salla.lang.get("pages.products.size_guide_placeholder_info"),this.modal_title=salla.lang.get("pages.products.size_guides")}))}async open(e){return this.modal.setTitle(this.modal_title),this.modal.open(),await salla.api.withoutNotifier((()=>salla.product.getSizeGuides(e))).then((e=>{this.guides=e.data})).catch((e=>{console.log(e),this.hasError=!0,this.placeholder_description=e.response?.data?.error?.message||e.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}showPlaceholder(){return a("salla-placeholder",{alignment:"center",iconSize:"xl"},a("div",{slot:"title"},this.placeholder_title),a("div",{slot:"description"},this.placeholder_description))}render(){return a("salla-modal",{key:"ee92769c8a6ef18fa3817c39dbf26a6a4bff23a8",class:"s-product-size-guide-wrapper",id:"salla-product-size-guide-modal",isLoading:!0,"has-skeleton":!0,width:"md",ref:e=>this.modal=e},a("span",{key:"3d969a0a2c77b8f873dcb934ed2421537cb964e4",slot:"icon",class:"s-product-size-guide-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>pencil-ruler</title>\n<path d="M3.057 11.609c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l6.667-6.667c0.521-0.521 0.521-1.364 0-1.885l-1.285-1.285c-1.143-1.143-2.661-1.772-4.276-1.772-1.616 0-3.135 0.629-4.276 1.772-1.143 1.141-1.772 2.66-1.772 4.276 0 1.615 0.629 3.135 1.772 4.276zM3.657 3.657c1.277-1.277 3.504-1.277 4.781 0l0.343 0.343-4.781 4.781-0.343-0.343c-0.639-0.639-0.991-1.488-0.991-2.391s0.352-1.752 0.991-2.391zM29.317 20.972c-0.2-0.707-0.932-1.119-1.645-0.921-0.709 0.2-1.121 0.937-0.921 1.645l1.987 7.041-7.041-1.987c-0.707-0.195-1.444 0.213-1.645 0.921-0.2 0.708 0.212 1.445 0.921 1.645l9.333 2.633c0.119 0.032 0.24 0.049 0.361 0.049 0.349 0 0.689-0.137 0.943-0.391 0.341-0.341 0.472-0.84 0.34-1.305zM31.609 8.772l-8.381-8.381c-0.5-0.5-1.385-0.5-1.885 0l-8.171 8.171s-0.001 0-0.001 0.001 0 0.001-0.001 0.001l-4.607 4.607s0 0-0.001 0 0 0 0 0.001l-8.171 8.171c-0.251 0.249-0.391 0.588-0.391 0.943 0 0.353 0.14 0.693 0.391 0.943l8.381 8.381c0.249 0.251 0.589 0.391 0.943 0.391s0.693-0.14 0.943-0.391l20.952-20.952c0.521-0.521 0.521-1.365 0-1.885zM9.715 28.781l-6.495-6.496 1.676-1.676 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-3.008-3.008 2.724-2.724 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.52 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.365 0-1.885l-3.008-3.008 1.677-1.677 6.496 6.496z"></path>\n</svg>\n'}),a("div",{key:"e018072d407a6c44f8481c08efc59a991a0eb3fd",slot:"loading"},a("div",{key:"0667c648322893ad770faf98cebe245917ff63f4",class:"s-product-size-guide-skeleton"},a("salla-skeleton",{key:"758a611fa61eda549a6decc541c11da1115a2f2f",height:"15px",width:"25%"}),a("div",{key:"8ab9e86a59b4cbb9a03458599a7fef9bd8243573",class:"s-product-size-guide-skeleton-header"},a("salla-skeleton",{key:"01c47a9a1776c53ce84034bb0c0decf8485fcd6a",height:"40px"}),a("salla-skeleton",{key:"65aee0267fc69e08993fe57df2722dd5b90900ae",height:"40px"}),a("salla-skeleton",{key:"250836e73e41353588a08c15ae619730617a96d3",height:"40px"}),a("salla-skeleton",{key:"f69fe0eac766ecb7441ea41b43e679921211e8c1",height:"40px"})),a("div",{key:"5e9d83171dba98fb4beb8ab149ae7f075f528c26",class:"s-product-size-guide-skeleton-content"},a("salla-skeleton",{key:"259f2f0fe3e0e4ed568119ca3967541785b4875d",height:"15px",width:"25%"}),a("salla-skeleton",{key:"0f66a4bc8e1a426f19787775e39fdc526e5635ab",height:"10px",width:"75%"}),a("salla-skeleton",{key:"ae62c34708c5f4b6ece5eb3caf13b867b2c1e17c",height:"10px",width:"50%"}),a("salla-skeleton",{key:"c3a03c44c2452d4dd37eaf6d3927e2ae8ef885fd",height:"10px",width:"75%"}),a("salla-skeleton",{key:"fb42a6a8dd803f8cef6e5990a5f2e17e6e87bbfc",height:"10px",width:"100%"}),a("salla-skeleton",{key:"b972cba0a06ae46f09fa4c8a352a780e9b620445",height:"10px",width:"25%"}),a("salla-skeleton",{key:"ac3d5c03485c0d64dc3d868c8f1588565167b60e",height:"10px",width:"60%"}),a("salla-skeleton",{key:"ec3a83f4eb22bc42d6df5f37bb04b9da54edf309",height:"10px",width:"45%"}),a("salla-skeleton",{key:"62e8d10fae559f7abe3ed3088c03e4fa5e2230b4",height:"10px",width:"30%"})))),a("slot",{key:"59ab1d26dde5103727840c81c4e855638403bf13",name:"header"}),!this.hasError&&this.guides?[a("salla-tabs",null,this.guides.map((e=>a("salla-tab-header",{slot:"header",name:e.name},a("span",null,e.name)))),this.guides.map((e=>a("salla-tab-content",{slot:"content",name:e.name},a("div",{innerHTML:e.description})))))]:this.showPlaceholder(),a("slot",{key:"efd65db973af6678c45c97b5021702dc0585f621",name:"footer"}))}get host(){return s(this)}};l.style="";export{l as salla_product_size_guide}
4
+ import{r as e,h as a,a as s}from"./p-CLfrQ6bI.js";const l=class{constructor(a){e(this,a),this.hasError=!1,salla.event.on("size-guide::open",(e=>this.open(e))),salla.lang.onLoaded((()=>{this.placeholder_title=salla.lang.get("pages.products.size_guide_placeholder"),this.placeholder_description=salla.lang.get("pages.products.size_guide_placeholder_info"),this.modal_title=salla.lang.get("pages.products.size_guides")}))}async open(e){return this.modal.setTitle(this.modal_title),this.modal.open(),await salla.api.withoutNotifier((()=>salla.product.getSizeGuides(e))).then((e=>{this.guides=e.data})).catch((e=>{console.log(e),this.hasError=!0,this.placeholder_description=e.response?.data?.error?.message||e.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}showPlaceholder(){return a("salla-placeholder",{alignment:"center",iconSize:"xl"},a("div",{slot:"title"},this.placeholder_title),a("div",{slot:"description"},this.placeholder_description))}render(){return a("salla-modal",{key:"ee92769c8a6ef18fa3817c39dbf26a6a4bff23a8",class:"s-product-size-guide-wrapper",id:"salla-product-size-guide-modal",isLoading:!0,"has-skeleton":!0,width:"md",ref:e=>this.modal=e},a("span",{key:"3d969a0a2c77b8f873dcb934ed2421537cb964e4",slot:"icon",class:"s-product-size-guide-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>pencil-ruler</title>\n<path d="M3.057 11.609c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l6.667-6.667c0.521-0.521 0.521-1.364 0-1.885l-1.285-1.285c-1.143-1.143-2.661-1.772-4.276-1.772-1.616 0-3.135 0.629-4.276 1.772-1.143 1.141-1.772 2.66-1.772 4.276 0 1.615 0.629 3.135 1.772 4.276zM3.657 3.657c1.277-1.277 3.504-1.277 4.781 0l0.343 0.343-4.781 4.781-0.343-0.343c-0.639-0.639-0.991-1.488-0.991-2.391s0.352-1.752 0.991-2.391zM29.317 20.972c-0.2-0.707-0.932-1.119-1.645-0.921-0.709 0.2-1.121 0.937-0.921 1.645l1.987 7.041-7.041-1.987c-0.707-0.195-1.444 0.213-1.645 0.921-0.2 0.708 0.212 1.445 0.921 1.645l9.333 2.633c0.119 0.032 0.24 0.049 0.361 0.049 0.349 0 0.689-0.137 0.943-0.391 0.341-0.341 0.472-0.84 0.34-1.305zM31.609 8.772l-8.381-8.381c-0.5-0.5-1.385-0.5-1.885 0l-8.171 8.171s-0.001 0-0.001 0.001 0 0.001-0.001 0.001l-4.607 4.607s0 0-0.001 0 0 0 0 0.001l-8.171 8.171c-0.251 0.249-0.391 0.588-0.391 0.943 0 0.353 0.14 0.693 0.391 0.943l8.381 8.381c0.249 0.251 0.589 0.391 0.943 0.391s0.693-0.14 0.943-0.391l20.952-20.952c0.521-0.521 0.521-1.365 0-1.885zM9.715 28.781l-6.495-6.496 1.676-1.676 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-3.008-3.008 2.724-2.724 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.52 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.365 0-1.885l-3.008-3.008 1.677-1.677 6.496 6.496z"></path>\n</svg>\n'}),a("div",{key:"e018072d407a6c44f8481c08efc59a991a0eb3fd",slot:"loading"},a("div",{key:"0667c648322893ad770faf98cebe245917ff63f4",class:"s-product-size-guide-skeleton"},a("salla-skeleton",{key:"758a611fa61eda549a6decc541c11da1115a2f2f",height:"15px",width:"25%"}),a("div",{key:"8ab9e86a59b4cbb9a03458599a7fef9bd8243573",class:"s-product-size-guide-skeleton-header"},a("salla-skeleton",{key:"01c47a9a1776c53ce84034bb0c0decf8485fcd6a",height:"40px"}),a("salla-skeleton",{key:"65aee0267fc69e08993fe57df2722dd5b90900ae",height:"40px"}),a("salla-skeleton",{key:"250836e73e41353588a08c15ae619730617a96d3",height:"40px"}),a("salla-skeleton",{key:"f69fe0eac766ecb7441ea41b43e679921211e8c1",height:"40px"})),a("div",{key:"5e9d83171dba98fb4beb8ab149ae7f075f528c26",class:"s-product-size-guide-skeleton-content"},a("salla-skeleton",{key:"259f2f0fe3e0e4ed568119ca3967541785b4875d",height:"15px",width:"25%"}),a("salla-skeleton",{key:"0f66a4bc8e1a426f19787775e39fdc526e5635ab",height:"10px",width:"75%"}),a("salla-skeleton",{key:"ae62c34708c5f4b6ece5eb3caf13b867b2c1e17c",height:"10px",width:"50%"}),a("salla-skeleton",{key:"c3a03c44c2452d4dd37eaf6d3927e2ae8ef885fd",height:"10px",width:"75%"}),a("salla-skeleton",{key:"fb42a6a8dd803f8cef6e5990a5f2e17e6e87bbfc",height:"10px",width:"100%"}),a("salla-skeleton",{key:"b972cba0a06ae46f09fa4c8a352a780e9b620445",height:"10px",width:"25%"}),a("salla-skeleton",{key:"ac3d5c03485c0d64dc3d868c8f1588565167b60e",height:"10px",width:"60%"}),a("salla-skeleton",{key:"ec3a83f4eb22bc42d6df5f37bb04b9da54edf309",height:"10px",width:"45%"}),a("salla-skeleton",{key:"62e8d10fae559f7abe3ed3088c03e4fa5e2230b4",height:"10px",width:"30%"})))),a("slot",{key:"59ab1d26dde5103727840c81c4e855638403bf13",name:"header"}),!this.hasError&&this.guides?[a("salla-tabs",null,this.guides.map((e=>a("salla-tab-header",{slot:"header",name:e.name},a("span",null,e.name)))),this.guides.map((e=>a("salla-tab-content",{slot:"content",name:e.name},a("div",{innerHTML:e.description})))))]:this.showPlaceholder(),a("slot",{key:"efd65db973af6678c45c97b5021702dc0585f621",name:"footer"}))}get host(){return s(this)}};l.style="";export{l as salla_product_size_guide}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t,H as e}from"./p-tPV-H3dI.js";import{S as l}from"./p-BscTeWDc.js";var a;!function(s){s.DEFAULT="default",s.AVAILABILITY="availability"}(a||(a={}));const i=class{constructor(t){s(this,t),this.loadedScopes={[a.DEFAULT]:null,[a.AVAILABILITY]:null},this.translationLoaded=!1,this.mode=a.DEFAULT,this.scopes=[],this.originalScopesList=[],this.isOpenedBefore=salla.storage.get("branch-choosed-before"),this.hasError=!1,this.loading=!1,this.selection="optional",this.searchDisplayLimit=6,this.getFormTitle=()=>{if(this.originalScopesList?.length<2)return"";const s=salla.config.get("store.features")?.includes("multi-countries");return this.mode===a.DEFAULT?salla.lang.get(s?"blocks.scope.shopping_from_another_market":"blocks.scope.shopping_from_another_branch"):salla.lang.get("blocks.scope.search_for_availability_in_other_branches")},salla.event.on("scopes::open",(({mode:s=null,product_id:t=null})=>{this.open(s,t)})),salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}async close(){return await(this.modal?.close())}async open(s=a.DEFAULT,t=null){return this.hasError=!1,this.mode=[a.AVAILABILITY,a.DEFAULT].includes(s)?s:a.DEFAULT,this.loading=!this.loadedScopes[this.mode],this.setScopeValues([]),salla.log("SallaScope:: opened"),this.modal.open(),this.loading?await salla.api.withoutNotifier((()=>s==a.AVAILABILITY?salla.scope.getProductAvailability(t):salla.scope.get())).then((t=>{if(s==a.AVAILABILITY)return this.setScopeValues(this.loadedScopes[a.AVAILABILITY]=t.data);this.setScopeValues(this.loadedScopes[this.mode]=t.data.scopes)})).catch((s=>{console.log(s),this.hasError=!0})).finally((()=>{this.modal.stopLoading(),this.loading=!1})):(this.setScopeValues(this.loadedScopes[this.mode]),this.modal.stopLoading())}async handleSubmit(){let s={id:this.current_scope.id};return this.changeBtn.load(),await salla.scope.change(s).then((()=>{salla.storage.set("branch-choosed-before",!0),salla.storage.set("scope",{type:this.current_scope.type,id:this.current_scope.id}),salla.cart.reset(),window.location.replace(salla.helpers.addParamToUrl("scope",this.current_scope.id))})).catch((s=>console.log(s))).finally((()=>{this.changeBtn.stop()}))}setScopeValues(s){this.scopes=s,this.originalScopesList=s,1==s?.length?(this.current_scope=s[0],this.selected_scope=s[0],this.scopes=[s[0]]):(this.current_scope=s?.find((s=>s.selected)),this.selected_scope=s?.find((s=>s.selected)))}handleSearchFieldTyping(s){let t=s.target.value.toLocaleLowerCase();this.scopes=t?this.originalScopesList.filter((s=>s.name.toLowerCase().includes(t))):this.originalScopesList}handleScopeSelection(s){this.current_scope=this.scopes?.find((t=>t.id==s.target.value))}placeholderContent(){return t("salla-placeholder",{alignment:"center",class:"s-scopes-placeholder"},t("span",{slot:"title"},salla.lang.get("blocks.scope.branch_looking_for_not_found")),t("span",{slot:"description"},salla.lang.get("blocks.scope.our_services_not_available_in_this_branch")))}defaultContent(){return[t("div",{class:"s-scopes-container s-scrollbar"},this.scopes?.map((s=>t("div",{class:"s-scopes-input-wrap","data-selection":this.selection},t("input",{id:`${this.selection} + '_scope_' + ${s.id}`,name:"lang",type:"radio",value:s.id,onChange:s=>this.handleScopeSelection(s),class:"s-scopes-input",checked:!!this.current_scope&&this.current_scope.id==s.id}),t("label",{htmlFor:`${this.selection} + '_scope_' + ${s.id}`,class:"s-scopes-label s-scopes-clickable"},t("span",null,s.name)))))),this.footerContent()]}availabilityContent(){return t("div",{class:"s-scopes-container"},this.scopes?.map((s=>t("div",{class:"s-scopes-input-wrap","data-selection":this.selection},t("h2",{class:{"s-scopes-label":!0,"s-scopes-clickable":this.mode===a.DEFAULT}},t("span",null,s.name)),t("h2",{style:{color:s?.availability?.color},class:`s-scopes-${s?.availability?.key}`},s?.availability?.label)))))}footerContent(){return t("div",{class:"s-scopes-footer"},t("slot",{name:"footer"},t("salla-button",{ref:s=>this.changeBtn=s,disabled:!this.current_scope,onClick:()=>this.handleSubmit(),class:"s-scopes-submit","loader-position":"center",width:"wide"},salla.lang.get("common.elements.confirm"))))}componentWillLoad(){return salla.onReady()}render(){return t(e,{key:"9cdcafaa7427ae1ddcd88190025c76b15b3f4b54"},t("salla-modal",{key:"737cb6a5c73d8af6c3b724b19952ac6a881ee617",ref:s=>this.modal=s,isClosable:!(!this.isOpenedBefore&&"optional"!=this.selection),class:"s-scopes-modal",isLoading:this.loading,"has-skeleton":!0},this.loading?t("div",{slot:"loading"},t("div",{class:"s-scopes-skeleton"},t("salla-list-tile",{class:"s-scopes-header"},t("div",{slot:"icon",class:"s-scopes-header-icon"},t("salla-skeleton",{type:"circle"})),t("div",{slot:"title",class:"s-scopes-header-title mb-5"},t("salla-skeleton",{height:"15px",width:"50%"})),t("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},t("salla-skeleton",{height:"10px"}),t("salla-skeleton",{height:"10px",width:"75%"}))),t("div",{class:"s-scopes-skeleton-search"},t("salla-skeleton",{height:"10px",width:"50%"}),t("salla-skeleton",{height:"30px",width:"100%"})),t("div",{class:"s-scopes-skeleton-scopes"},t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"})),t("div",{class:"s-scopes-skeleton-btn"},t("salla-skeleton",{height:"40px",width:"100%"})))):[t("salla-list-tile",{class:this.originalScopesList?.length?"s-scopes-header block":"s-hidden"},t("div",{slot:"icon",class:"s-scopes-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>store-alt</title>\n<path d="M6.667 24h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.86 10.071l-4-8c-0.227-0.452-0.688-0.737-1.193-0.737h-21.333c-0.505 0-0.967 0.285-1.193 0.737l-4 8c-0.092 0.184-0.14 0.389-0.14 0.596v18.667c0 0.737 0.597 1.333 1.333 1.333h29.333c0.736 0 1.333-0.596 1.333-1.333v-18.667c0-0.207-0.048-0.412-0.14-0.596zM6.157 4h19.685l3.333 6.667h-26.352zM24 28h-5.333v-9.333h5.333zM29.333 28h-2.667v-10.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333v10.667h-13.333v-14.667h26.667zM6.667 18.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n'}),t("div",{slot:"title",class:"s-scopes-header-title"},salla.lang.get("blocks.scope.you_are_browse_store_from")),t("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},this.selected_scope?this.selected_scope.name:"")),t("div",{class:"s-scopes-wrap"},!!this.originalScopesList?.length&&t("h4",{class:"s-scopes-title"},this.getFormTitle()),this.originalScopesList?.length>this.searchDisplayLimit?t("div",{class:"s-scopes-search-wrapper"},t("div",{class:"s-scopes-search-icon",innerHTML:l}),t("input",{type:"text",class:"s-scopes-search-input",onInput:s=>this.handleSearchFieldTyping(s),enterkeyhint:"search",placeholder:salla.lang.get("blocks.scope.searching_for_a_branch")})):"",this.hasError||!this.originalScopesList?.length&&this.mode!==a.AVAILABILITY?this.placeholderContent():this.mode===a.DEFAULT?this.defaultContent():this.availabilityContent())]))}async componentDidLoad(){await Salla.hooks.registerComponent("salla-scopes",this),this.isOpenedBefore||"mandatory"!=this.selection||this.open()}};i.style=".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";export{i as salla_scopes}
4
+ import{r as s,h as t,H as e}from"./p-CLfrQ6bI.js";import{S as l}from"./p-BscTeWDc.js";var a;!function(s){s.DEFAULT="default",s.AVAILABILITY="availability"}(a||(a={}));const i=class{constructor(t){s(this,t),this.loadedScopes={[a.DEFAULT]:null,[a.AVAILABILITY]:null},this.translationLoaded=!1,this.mode=a.DEFAULT,this.scopes=[],this.originalScopesList=[],this.isOpenedBefore=salla.storage.get("branch-choosed-before"),this.hasError=!1,this.loading=!1,this.selection="optional",this.searchDisplayLimit=6,this.getFormTitle=()=>{if(this.originalScopesList?.length<2)return"";const s=salla.config.get("store.features")?.includes("multi-countries");return this.mode===a.DEFAULT?salla.lang.get(s?"blocks.scope.shopping_from_another_market":"blocks.scope.shopping_from_another_branch"):salla.lang.get("blocks.scope.search_for_availability_in_other_branches")},salla.event.on("scopes::open",(({mode:s=null,product_id:t=null})=>{this.open(s,t)})),salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}async close(){return await(this.modal?.close())}async open(s=a.DEFAULT,t=null){return this.hasError=!1,this.mode=[a.AVAILABILITY,a.DEFAULT].includes(s)?s:a.DEFAULT,this.loading=!this.loadedScopes[this.mode],this.setScopeValues([]),salla.log("SallaScope:: opened"),this.modal.open(),this.loading?await salla.api.withoutNotifier((()=>s==a.AVAILABILITY?salla.scope.getProductAvailability(t):salla.scope.get())).then((t=>{if(s==a.AVAILABILITY)return this.setScopeValues(this.loadedScopes[a.AVAILABILITY]=t.data);this.setScopeValues(this.loadedScopes[this.mode]=t.data.scopes)})).catch((s=>{console.log(s),this.hasError=!0})).finally((()=>{this.modal.stopLoading(),this.loading=!1})):(this.setScopeValues(this.loadedScopes[this.mode]),this.modal.stopLoading())}async handleSubmit(){let s={id:this.current_scope.id};return this.changeBtn.load(),await salla.scope.change(s).then((()=>{salla.storage.set("branch-choosed-before",!0),salla.storage.set("scope",{type:this.current_scope.type,id:this.current_scope.id}),salla.cart.reset(),window.location.replace(salla.helpers.addParamToUrl("scope",this.current_scope.id))})).catch((s=>console.log(s))).finally((()=>{this.changeBtn.stop()}))}setScopeValues(s){this.scopes=s,this.originalScopesList=s,1==s?.length?(this.current_scope=s[0],this.selected_scope=s[0],this.scopes=[s[0]]):(this.current_scope=s?.find((s=>s.selected)),this.selected_scope=s?.find((s=>s.selected)))}handleSearchFieldTyping(s){let t=s.target.value.toLocaleLowerCase();this.scopes=t?this.originalScopesList.filter((s=>s.name.toLowerCase().includes(t))):this.originalScopesList}handleScopeSelection(s){this.current_scope=this.scopes?.find((t=>t.id==s.target.value))}placeholderContent(){return t("salla-placeholder",{alignment:"center",class:"s-scopes-placeholder"},t("span",{slot:"title"},salla.lang.get("blocks.scope.branch_looking_for_not_found")),t("span",{slot:"description"},salla.lang.get("blocks.scope.our_services_not_available_in_this_branch")))}defaultContent(){return[t("div",{class:"s-scopes-container s-scrollbar"},this.scopes?.map((s=>t("div",{class:"s-scopes-input-wrap","data-selection":this.selection},t("input",{id:`${this.selection} + '_scope_' + ${s.id}`,name:"lang",type:"radio",value:s.id,onChange:s=>this.handleScopeSelection(s),class:"s-scopes-input",checked:!!this.current_scope&&this.current_scope.id==s.id}),t("label",{htmlFor:`${this.selection} + '_scope_' + ${s.id}`,class:"s-scopes-label s-scopes-clickable"},t("span",null,s.name)))))),this.footerContent()]}availabilityContent(){return t("div",{class:"s-scopes-container"},this.scopes?.map((s=>t("div",{class:"s-scopes-input-wrap","data-selection":this.selection},t("h2",{class:{"s-scopes-label":!0,"s-scopes-clickable":this.mode===a.DEFAULT}},t("span",null,s.name)),t("h2",{style:{color:s?.availability?.color},class:`s-scopes-${s?.availability?.key}`},s?.availability?.label)))))}footerContent(){return t("div",{class:"s-scopes-footer"},t("slot",{name:"footer"},t("salla-button",{ref:s=>this.changeBtn=s,disabled:!this.current_scope,onClick:()=>this.handleSubmit(),class:"s-scopes-submit","loader-position":"center",width:"wide"},salla.lang.get("common.elements.confirm"))))}componentWillLoad(){return salla.onReady()}render(){return t(e,{key:"9cdcafaa7427ae1ddcd88190025c76b15b3f4b54"},t("salla-modal",{key:"737cb6a5c73d8af6c3b724b19952ac6a881ee617",ref:s=>this.modal=s,isClosable:!(!this.isOpenedBefore&&"optional"!=this.selection),class:"s-scopes-modal",isLoading:this.loading,"has-skeleton":!0},this.loading?t("div",{slot:"loading"},t("div",{class:"s-scopes-skeleton"},t("salla-list-tile",{class:"s-scopes-header"},t("div",{slot:"icon",class:"s-scopes-header-icon"},t("salla-skeleton",{type:"circle"})),t("div",{slot:"title",class:"s-scopes-header-title mb-5"},t("salla-skeleton",{height:"15px",width:"50%"})),t("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},t("salla-skeleton",{height:"10px"}),t("salla-skeleton",{height:"10px",width:"75%"}))),t("div",{class:"s-scopes-skeleton-search"},t("salla-skeleton",{height:"10px",width:"50%"}),t("salla-skeleton",{height:"30px",width:"100%"})),t("div",{class:"s-scopes-skeleton-scopes"},t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"})),t("div",{class:"s-scopes-skeleton-btn"},t("salla-skeleton",{height:"40px",width:"100%"})))):[t("salla-list-tile",{class:this.originalScopesList?.length?"s-scopes-header block":"s-hidden"},t("div",{slot:"icon",class:"s-scopes-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>store-alt</title>\n<path d="M6.667 24h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.86 10.071l-4-8c-0.227-0.452-0.688-0.737-1.193-0.737h-21.333c-0.505 0-0.967 0.285-1.193 0.737l-4 8c-0.092 0.184-0.14 0.389-0.14 0.596v18.667c0 0.737 0.597 1.333 1.333 1.333h29.333c0.736 0 1.333-0.596 1.333-1.333v-18.667c0-0.207-0.048-0.412-0.14-0.596zM6.157 4h19.685l3.333 6.667h-26.352zM24 28h-5.333v-9.333h5.333zM29.333 28h-2.667v-10.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333v10.667h-13.333v-14.667h26.667zM6.667 18.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n'}),t("div",{slot:"title",class:"s-scopes-header-title"},salla.lang.get("blocks.scope.you_are_browse_store_from")),t("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},this.selected_scope?this.selected_scope.name:"")),t("div",{class:"s-scopes-wrap"},!!this.originalScopesList?.length&&t("h4",{class:"s-scopes-title"},this.getFormTitle()),this.originalScopesList?.length>this.searchDisplayLimit?t("div",{class:"s-scopes-search-wrapper"},t("div",{class:"s-scopes-search-icon",innerHTML:l}),t("input",{type:"text",class:"s-scopes-search-input",onInput:s=>this.handleSearchFieldTyping(s),enterkeyhint:"search",placeholder:salla.lang.get("blocks.scope.searching_for_a_branch")})):"",this.hasError||!this.originalScopesList?.length&&this.mode!==a.AVAILABILITY?this.placeholderContent():this.mode===a.DEFAULT?this.defaultContent():this.availabilityContent())]))}async componentDidLoad(){await Salla.hooks.registerComponent("salla-scopes",this),this.isOpenedBefore||"mandatory"!=this.selection||this.open()}};i.style=".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";export{i as salla_scopes}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as a,h as t,H as s,a as e}from"./p-tPV-H3dI.js";const i=class{constructor(t){if(a(this,t),this.entity="product",this.specs=[],this.download=salla.lang.get("pages.thank_you.download"),this.entityId)try{return void(this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId))}catch(a){salla.log("Bad json passed via entityId prop")}}getValue(a){if("file"===a.type)return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`;if("url"===a.type)return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`;if("date"===a.type){const t=new Date(a.value);return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}return a.value}async componentWillLoad(){if(await salla.onReady(),!salla.config.get("store.features")?.includes("custom-fields"))return salla.logger.error("feature custom-fields is not activated");if(this.entityId||!salla.url.is_page("product.single")&&!salla.url.is_page("product.showNewUrls")||(this.entityId=salla.config.get("page.id")),!this.entityId)return salla.logger.error("can't render salla-metadata without enity-id prop!");await salla.lang.onLoaded(),this.download=salla.lang.get("pages.thank_you.download");const a=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=a.data[0]?.sections}render(){if(this.specs.length)return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return e(this)}};i.style="";export{i as salla_metadata}
4
+ import{r as a,h as t,H as s,a as e}from"./p-CLfrQ6bI.js";const i=class{constructor(t){if(a(this,t),this.entity="product",this.specs=[],this.download=salla.lang.get("pages.thank_you.download"),this.entityId)try{return void(this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId))}catch(a){salla.log("Bad json passed via entityId prop")}}getValue(a){if("file"===a.type)return`<a href="${a.value}" class="text-primary" target="_blank"><span class="sicon-download"></span> ${this.download}</a>`;if("url"===a.type)return`<a href="${a.value}" class="text-blue-700 underline" target="_blank">${a.value}</a>`;if("date"===a.type){const t=new Date(a.value);return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}return a.value}async componentWillLoad(){if(await salla.onReady(),!salla.config.get("store.features")?.includes("custom-fields"))return salla.logger.error("feature custom-fields is not activated");if(this.entityId||!salla.url.is_page("product.single")&&!salla.url.is_page("product.showNewUrls")||(this.entityId=salla.config.get("page.id")),!this.entityId)return salla.logger.error("can't render salla-metadata without enity-id prop!");await salla.lang.onLoaded(),this.download=salla.lang.get("pages.thank_you.download");const a=await Salla.api.metadata.fetchValues(this.entity,this.entityId);this.specs=a.data[0]?.sections}render(){if(this.specs.length)return t(s,{class:"s-metadata-wrapper"},this.specs.map((a=>t("div",{class:"s-metadata-box"},t("div",{class:"s-metadata-box-header"},t("i",{class:"sicon-list"}),a.name),a.fields.map((a=>t("div",{class:"s-metadata-row"},t("p",{class:"s-metadata-row-name"},a.name),t("p",{class:"s-metadata-row-value",innerHTML:this.getValue(a)}))))))))}get host(){return e(this)}};i.style="";export{i as salla_metadata}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as i,h as e}from"./p-tPV-H3dI.js";const c=class{constructor(e){i(this,e)}render(){return e("a",{key:"63f74fac3cc9933dd0f4808ba55852dfd7bddb62",href:this.notification.url,class:{"s-notifications-item":!0,"s-notifications-item-shadow":!0,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"29c5ed5f2c13e17ad27e534806e59f8c316f4543",class:"s-notifications-item-icon"},e("i",{key:"2d3da9b6b8f06d0f9af0841bcf9fe3a6ad4ebca1",class:{"s-notifications-item-icon sicon-bell-ring":!0,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"ccb51c53e1584e72eb69120b7e68322f1e1abdb3",class:"s-notifications-item-content"},e("div",{key:"2ea640668fbd6616f7968e5585a3ae5b0d6fb17e",class:"s-notifications-item-content-leading"},e("h4",{key:"00d91ee1b4d9aa6b3a51cb7a6dcada8c601017c5"},this.notification.title),e("p",{key:"8ff6803d1df5128cf9d815e5645d739fcf11d975"},this.notification.sub_title)),e("span",{key:"3f4e6b5b0bdc3e669307dc1ec6bba315e86e3fea",class:"s-notifications-item-content-trailing"},e("i",{key:"e2777150fad76083f8673457e4f2b90b23885974",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"80fb3b5c1d28c4cfbd84d2354c10776ccc209883"},this.notification.date))))}};c.style="";export{c as salla_notification_item}
4
+ import{r as i,h as e}from"./p-CLfrQ6bI.js";const c=class{constructor(e){i(this,e)}render(){return e("a",{key:"63f74fac3cc9933dd0f4808ba55852dfd7bddb62",href:this.notification.url,class:{"s-notifications-item":!0,"s-notifications-item-shadow":!0,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"29c5ed5f2c13e17ad27e534806e59f8c316f4543",class:"s-notifications-item-icon"},e("i",{key:"2d3da9b6b8f06d0f9af0841bcf9fe3a6ad4ebca1",class:{"s-notifications-item-icon sicon-bell-ring":!0,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"ccb51c53e1584e72eb69120b7e68322f1e1abdb3",class:"s-notifications-item-content"},e("div",{key:"2ea640668fbd6616f7968e5585a3ae5b0d6fb17e",class:"s-notifications-item-content-leading"},e("h4",{key:"00d91ee1b4d9aa6b3a51cb7a6dcada8c601017c5"},this.notification.title),e("p",{key:"8ff6803d1df5128cf9d815e5645d739fcf11d975"},this.notification.sub_title)),e("span",{key:"3f4e6b5b0bdc3e669307dc1ec6bba315e86e3fea",class:"s-notifications-item-content-trailing"},e("i",{key:"e2777150fad76083f8673457e4f2b90b23885974",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"80fb3b5c1d28c4cfbd84d2354c10776ccc209883"},this.notification.date))))}};c.style="";export{c as salla_notification_item}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t,H as e,a as l}from"./p-tPV-H3dI.js";import{A as i}from"./p-DCZbpt2a.js";import{B as a}from"./p-D3mWkc-3.js";import{P as o}from"./p-DY4LZmNP.js";import{W as n}from"./p-ZT7ehBBk.js";import{C as r}from"./p-BsLF_HK7.js";import{S as h}from"./p-D4oPi1Ov.js";import{l as c}from"./p-BChI23pG.js";var m='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>user-circle</title>\n<path d="M16 22.964c-4.525 0-8.447 1.713-9.993 4.365-0.371 0.636-0.156 1.452 0.48 1.823s1.453 0.156 1.823-0.48c0.855-1.465 3.624-3.041 7.689-3.041s6.835 1.576 7.689 3.041c0.249 0.424 0.696 0.661 1.155 0.661 0.228 0 0.459-0.059 0.669-0.181 0.637-0.371 0.852-1.187 0.48-1.823-1.545-2.652-5.467-4.365-9.992-4.365zM22.667 13.631c0-3.676-2.991-6.667-6.667-6.667s-6.667 2.991-6.667 6.667 2.991 6.667 6.667 6.667 6.667-2.992 6.667-6.667zM12 13.631c0-2.205 1.795-4 4-4s4 1.795 4 4-1.795 4-4 4-4-1.795-4-4zM16 0.297c-8.823 0-16 7.177-16 16 0 2.941 0.821 5.831 2.373 8.357 0.252 0.411 0.689 0.636 1.137 0.636 0.239 0 0.479-0.064 0.696-0.197 0.628-0.385 0.824-1.207 0.439-1.833-1.295-2.108-1.979-4.516-1.979-6.963 0-7.352 5.981-13.333 13.333-13.333s13.333 5.981 13.333 13.333c0 2.448-0.684 4.856-1.979 6.961-0.385 0.628-0.189 1.448 0.437 1.835 0.627 0.384 1.448 0.189 1.835-0.437 1.553-2.527 2.373-5.416 2.373-8.359 0-8.823-7.177-16-16-16z"></path>\n</svg>\n';const u=class{constructor(t){s(this,t),this.accountLoading=!1,this.opened=!1,this.notifications=salla.lang.get("common.titles.notifications"),this.orders=salla.lang.get("common.titles.orders"),this.pending_orders=salla.lang.get("common.titles.pending_orders"),this.wishlist=salla.lang.get("common.titles.wishlist"),this.profile=salla.lang.get("common.titles.profile"),this.rating=salla.lang.get("common.titles.rating"),this.wallet=salla.lang.get("common.titles.wallet"),this.settings=salla.lang.get("common.titles.settings"),this.loyalty_program=salla.lang.get("pages.loyalty_program.loyalty_points"),this.logout=salla.lang.get("blocks.header.logout"),this.hello=salla.lang.get("pages.checkout.hello"),this.first_name=salla.storage.get("user.first_name")||"",this.last_name=salla.storage.get("user.last_name")||"",this.avatar=salla.storage.get("user.avatar")||salla.url.cdn("images/avatar.png",40,40),this.badges={notifications:salla.helpers.number(salla.storage.get("user.notifications")||0),pending_orders:salla.helpers.number(salla.storage.get("user.pending_orders")||0)},this.sallaAccountEnabled=!1,this.hasBadges=Number(salla.storage.get("user.pending_orders"))>0||Number(salla.storage.get("user.notifications"))>0,this.inline=!1,this.avatarOnly=!1,this.showHeader=!1,this.relativeDropdown=!1,this.autoMount=!1,this.onClickOutside=()=>{this.opened=!1},this.OrderUpdate=0,this.items={notifications:a,orders:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>box-bankers</title>\n<path d="M28 1.333h-24c-2.205 0-4 1.795-4 4v5.333c0 0.736 0.597 1.333 1.333 1.333v14.667c0 2.205 1.795 4 4 4h21.333c2.205 0 4-1.795 4-4v-14.667c0.736 0 1.333-0.597 1.333-1.333v-5.333c0-2.205-1.795-4-4-4zM28 26.667c0 0.735-0.599 1.333-1.333 1.333h-21.333c-0.735 0-1.333-0.599-1.333-1.333v-14.667h5.333v2.667c0 1.471 1.196 2.667 2.667 2.667h8c1.471 0 2.667-1.196 2.667-2.667v-2.667h5.333zM12 14.667v-2.667h8v2.667zM29.333 9.333h-26.667v-4c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',pending_orders:o,wishlist:n,wallet:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>wallet</title>\n<path d="M28 6.667h-24c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333h24c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-24c-2.204 0-3.999 1.793-4 3.997v18.669c0 3.676 2.991 6.667 6.667 6.667h21.333c2.205 0 4-1.795 4-4v-16c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.736-0.597 1.333-1.333 1.333h-21.333c-2.205 0-4-1.795-4-4v-14.895c0.416 0.147 0.865 0.228 1.333 0.228h24c0.736 0 1.333 0.597 1.333 1.333zM22.667 14.667c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 20c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.597 1.333-1.333 1.333z"></path>\n</svg>\n',loyalty_program:c,profile:m}}async componentWillLoad(){await salla.onReady(),await salla.lang.onLoaded(),this.loadTranslations(),this.initiate(),Salla.event.on("api::token.injected",(s=>this.profileUrl=this.buildProfileUrl(s))),this.sallaAccountEnabled=Salla.config.get("store.features")?.includes("salla-account"),this.items=this.sallaAccountEnabled?{...this.items,settings:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>settings</title>\n<path d="M29.717 19.037l-1.817-1.499c0.067-0.512 0.1-1.028 0.1-1.539s-0.033-1.027-0.1-1.54l1.817-1.499c1.177-0.969 1.479-2.633 0.716-3.956l-1.159-2.009c-0.761-1.324-2.349-1.895-3.784-1.359l-2.212 0.829c-0.817-0.627-1.704-1.139-2.649-1.535l-0.388-2.332c-0.251-1.507-1.54-2.6-3.067-2.6h-2.319c-1.525 0-2.815 1.093-3.065 2.6l-0.388 2.332c-0.945 0.396-1.833 0.909-2.649 1.535l-2.212-0.829c-1.428-0.533-3.021 0.036-3.783 1.359l-1.16 2.011c-0.763 1.323-0.46 2.985 0.716 3.955l1.817 1.499c-0.067 0.513-0.1 1.029-0.1 1.54s0.033 1.027 0.1 1.539l-1.819 1.5c-1.176 0.971-1.476 2.635-0.715 3.955l1.159 2.011c0.763 1.324 2.356 1.899 3.784 1.36l2.212-0.831c0.816 0.625 1.703 1.139 2.649 1.535l0.388 2.332c0.251 1.507 1.54 2.6 3.067 2.6h2.319c1.527 0 2.816-1.093 3.065-2.6l0.389-2.332c0.947-0.396 1.833-0.909 2.649-1.535l2.212 0.831c1.432 0.539 3.023-0.035 3.783-1.36l1.16-2.011c0.76-1.32 0.459-2.984-0.717-3.956zM28.123 21.663l-1.16 2.011c-0.108 0.188-0.336 0.267-0.536 0.193l-2.931-1.1c-0.459-0.173-0.979-0.079-1.349 0.248-0.923 0.811-1.979 1.423-3.139 1.819-0.464 0.157-0.804 0.559-0.885 1.043l-0.515 3.087c-0.033 0.215-0.216 0.371-0.433 0.371h-2.319c-0.217 0-0.4-0.156-0.436-0.371l-0.513-3.087c-0.080-0.484-0.42-0.884-0.885-1.043-1.16-0.396-2.216-1.008-3.139-1.819-0.248-0.217-0.561-0.332-0.88-0.332-0.157 0-0.316 0.028-0.469 0.084l-2.931 1.1c-0.199 0.079-0.428-0.004-0.537-0.193l-1.159-2.011c-0.109-0.191-0.067-0.428 0.101-0.568l2.409-1.985c0.379-0.312 0.555-0.807 0.46-1.288-0.119-0.605-0.179-1.219-0.179-1.821 0-0.604 0.060-1.217 0.181-1.823 0.095-0.481-0.081-0.976-0.46-1.288l-2.409-1.985c-0.168-0.139-0.211-0.376-0.101-0.567l1.16-2.011c0.107-0.188 0.332-0.268 0.536-0.193l2.931 1.1c0.459 0.172 0.979 0.079 1.348-0.247 0.924-0.812 1.98-1.424 3.139-1.817 0.465-0.159 0.805-0.559 0.885-1.044l0.513-3.088c0.036-0.215 0.219-0.371 0.436-0.371h2.319c0.217 0 0.4 0.156 0.436 0.371l0.515 3.088c0.081 0.484 0.42 0.885 0.885 1.044 1.157 0.393 2.213 1.005 3.139 1.817 0.371 0.325 0.889 0.42 1.349 0.247l2.929-1.099c0.203-0.076 0.428 0.005 0.537 0.193l1.159 2.009c0.109 0.191 0.067 0.428-0.101 0.567l-2.409 1.985c-0.379 0.312-0.555 0.807-0.46 1.288 0.119 0.605 0.179 1.219 0.179 1.823 0 0.603-0.060 1.216-0.181 1.821-0.095 0.48 0.081 0.975 0.46 1.288l2.408 1.984c0.169 0.141 0.212 0.379 0.103 0.569zM16.016 10.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM16.016 18.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>\n</svg>\n'}:this.items,this.host.hasAttribute("with-rating")&&(this.items.rating=h),this.items.logout='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>send-out</title>\n<path d="M16 26.667h-9.333c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.736 0.597-1.333 1.333-1.333h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-9.333c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM29.231 15.491c-0.068-0.164-0.167-0.312-0.289-0.436l-5.332-5.332c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l3.057 3.059h-12.781c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h12.781l-3.057 3.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l5.332-5.332c0.124-0.123 0.221-0.271 0.289-0.435 0.135-0.325 0.135-0.693 0-1.019z"></path>\n</svg>\n';let s=Salla.storage.get("token");s||(s=""),this.profileUrl=this.buildProfileUrl(s);const t=this.host.querySelector('[slot="trigger"]');this.triggerSlot='<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>',t&&(this.triggerSlot=t.innerHTML,t.innerHTML=this.replaceParams(t.innerHTML))}loadTranslations(){this.notifications=Salla.lang.get("common.titles.notifications"),this.orders=Salla.lang.get("common.titles.orders"),this.pending_orders=Salla.lang.get("common.titles.pending_orders"),this.wishlist=Salla.lang.get("common.titles.wishlist"),this.profile=Salla.lang.get("common.titles.profile"),this.hello=Salla.lang.get("pages.checkout.hello"),this.rating=Salla.lang.get("common.titles.rating"),this.wallet=Salla.lang.get("common.titles.wallet"),this.settings=Salla.lang.get("common.titles.settings"),this.loyalty_program=Salla.lang.get("pages.loyalty_program.loyalty_points"),this.logout=Salla.lang.get("blocks.header.logout")}initiate(){return Salla.config.isGuest()?this.autoMountLoginModal():(this.is_loggedIn=!0,!this.inline&&(salla.url.is_page("customer.notifications")||salla.url.is_page("customer.orders.index.pending")||salla.url.is_page("customer.profile")||(Date.now()-(salla.storage.get("user.fetched_at")||0))/1e3/60>30)?this.fetchFreshProfile():void salla.event.on("profile::info.fetched",(s=>{this.updateProfileState(s)})))}autoMountLoginModal(){this.autoMount&&(document.querySelector("salla-login-modal")||Salla.hooks.mount("body:end",document.createElement("salla-login-modal")))}fetchFreshProfile(){salla.api.token?salla.profile.api.info().then((s=>{this.updateProfileState(s)})):salla.log("trying to fetchFreshProfile before injected the token!!")}updateProfileState(s){this.badges={notifications:salla.helpers.number(s.data.notifications||0),pending_orders:salla.helpers.number(s.data.pending_orders||0)},this.hasBadges=Number(s.data.pending_orders)>0||Number(s.data.notifications)>0,this.first_name=s.data.first_name,this.last_name=s.data.last_name,this.avatar=s.data.avatar||salla.url.cdn("images/avatar.png",40,40)}async open(s){this.opened=!this.opened,s.stopPropagation(),this.opened&&window.addEventListener("click",this.onClickOutside)}menuItemClicked(s,t){"logout"===t&&(s.preventDefault(),salla.auth.logout("sall-user-menu"))}replaceParams(s){return s.replace(/\{hello\}/g,this.hello).replace(/\{first_name\}/g,this.first_name).replace(/\{last_name\}/g,this.last_name).replace(/\{avatar\}/g,this.avatar).replace(/\{icon\}/g,i)}getTheHeader(){return t("div",{class:{"s-user-menu-trigger-slot":!0,"s-user-menu-red-dot":this.hasBadges,"s-user-menu-trigger-avatar-only":this.avatarOnly},id:"trigger-slot",onClick:s=>this.open(s),onKeyUp:s=>this.open(s),innerHTML:this.replaceParams(this.triggerSlot)})}getItemAnchorLinkAttrs(s){return"profile"===s&&this.profileUrl&&this.sallaAccountEnabled?{href:this.profileUrl,target:"_blank",rel:"noopener noreferrer"}:{href:Salla.url.get("loyalty_program"===s?"loyalty":s)}}getMenuItem([s,e],l){if(("wallet"!==s||window.can_access_wallet)&&("loyalty_program"!==s||Salla.config.get("store.features").includes("loyalty-system")))return t("li",{class:{"s-user-menu-dropdown-item":!0,"s-user-menu-dropdown-item-logout":l+1===Object.entries(this.items).length}},t("a",{...this.getItemAnchorLinkAttrs(s),class:"s-user-menu-dropdown-item-link",onClick:t=>this.menuItemClicked(t,s)},t("i",{class:"s-user-menu-dropdown-item-prefix",innerHTML:e}),t("span",{class:"s-user-menu-dropdown-item-title"},this[s]),["٠","0",void 0].includes(this.badges[s])?"":t("span",{class:"s-user-menu-dropdown-item-badge"},this.badges[s])))}componentShouldUpdate(){this.opened||window.removeEventListener("click",this.onClickOutside)}render(){return t(e,null,this.is_loggedIn?this.inline?t("ul",{class:"s-user-menu-inline"},Object.entries(this.items).map(((s,t)=>this.getMenuItem(s,t)))):t("div",{class:{"s-user-menu-wrapper":!0,"s-user-menu-relative-dropdown":this.relativeDropdown}},this.getTheHeader(),t("div",{class:{"s-user-menu-toggler":!0,opened:this.opened}},t("div",{class:"s-user-menu-dropdown",onClick:s=>s.stopPropagation(),onKeyUp:s=>s.stopPropagation()},this.showHeader?t("div",{class:"s-user-menu-dropdown-header"},t("img",{src:this.avatar,alt:`${this.first_name} ${this.last_name}`}),t("div",{class:"s-user-menu-dropdown-header-content"},t("span",null,this.hello),t("p",null,this.first_name," ",this.last_name)),t("button",{type:"button",class:"s-user-menu-dropdown-header-close",innerHTML:r,onClick:()=>{this.opened=!1}})):"",t("ul",{class:"s-user-menu-dropdown-list"},Object.entries(this.items).map(((s,t)=>this.getMenuItem(s,t))))))):t("slot",{name:"login-btn"},t("button",{type:"button",class:"s-user-menu-login-btn",onClick:()=>salla.event.dispatch("login::open"),innerHTML:m})))}componentDidLoad(){document.lazyLoadInstance?.update(this.host.querySelectorAll(".lazy"))}buildProfileUrl(s){return`${Salla.config.get("account.url","https://accounts.salla.com")}/${salla.config.get("user.language_code")}/user?store=${Salla.config.get("store.id")}&info=${encodeURIComponent(s)}`}get host(){return l(this)}};u.style="";export{u as salla_user_menu}
4
+ import{r as s,h as t,H as e,a as l}from"./p-CLfrQ6bI.js";import{A as i}from"./p-DCZbpt2a.js";import{B as a}from"./p-D3mWkc-3.js";import{P as o}from"./p-DY4LZmNP.js";import{W as n}from"./p-ZT7ehBBk.js";import{C as r}from"./p-BsLF_HK7.js";import{S as h}from"./p-D4oPi1Ov.js";import{l as c}from"./p-BChI23pG.js";var m='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>user-circle</title>\n<path d="M16 22.964c-4.525 0-8.447 1.713-9.993 4.365-0.371 0.636-0.156 1.452 0.48 1.823s1.453 0.156 1.823-0.48c0.855-1.465 3.624-3.041 7.689-3.041s6.835 1.576 7.689 3.041c0.249 0.424 0.696 0.661 1.155 0.661 0.228 0 0.459-0.059 0.669-0.181 0.637-0.371 0.852-1.187 0.48-1.823-1.545-2.652-5.467-4.365-9.992-4.365zM22.667 13.631c0-3.676-2.991-6.667-6.667-6.667s-6.667 2.991-6.667 6.667 2.991 6.667 6.667 6.667 6.667-2.992 6.667-6.667zM12 13.631c0-2.205 1.795-4 4-4s4 1.795 4 4-1.795 4-4 4-4-1.795-4-4zM16 0.297c-8.823 0-16 7.177-16 16 0 2.941 0.821 5.831 2.373 8.357 0.252 0.411 0.689 0.636 1.137 0.636 0.239 0 0.479-0.064 0.696-0.197 0.628-0.385 0.824-1.207 0.439-1.833-1.295-2.108-1.979-4.516-1.979-6.963 0-7.352 5.981-13.333 13.333-13.333s13.333 5.981 13.333 13.333c0 2.448-0.684 4.856-1.979 6.961-0.385 0.628-0.189 1.448 0.437 1.835 0.627 0.384 1.448 0.189 1.835-0.437 1.553-2.527 2.373-5.416 2.373-8.359 0-8.823-7.177-16-16-16z"></path>\n</svg>\n';const u=class{constructor(t){s(this,t),this.accountLoading=!1,this.opened=!1,this.notifications=salla.lang.get("common.titles.notifications"),this.orders=salla.lang.get("common.titles.orders"),this.pending_orders=salla.lang.get("common.titles.pending_orders"),this.wishlist=salla.lang.get("common.titles.wishlist"),this.profile=salla.lang.get("common.titles.profile"),this.rating=salla.lang.get("common.titles.rating"),this.wallet=salla.lang.get("common.titles.wallet"),this.settings=salla.lang.get("common.titles.settings"),this.loyalty_program=salla.lang.get("pages.loyalty_program.loyalty_points"),this.logout=salla.lang.get("blocks.header.logout"),this.hello=salla.lang.get("pages.checkout.hello"),this.first_name=salla.storage.get("user.first_name")||"",this.last_name=salla.storage.get("user.last_name")||"",this.avatar=salla.storage.get("user.avatar")||salla.url.cdn("images/avatar.png",40,40),this.badges={notifications:salla.helpers.number(salla.storage.get("user.notifications")||0),pending_orders:salla.helpers.number(salla.storage.get("user.pending_orders")||0)},this.sallaAccountEnabled=!1,this.hasBadges=Number(salla.storage.get("user.pending_orders"))>0||Number(salla.storage.get("user.notifications"))>0,this.inline=!1,this.avatarOnly=!1,this.showHeader=!1,this.relativeDropdown=!1,this.autoMount=!1,this.onClickOutside=()=>{this.opened=!1},this.OrderUpdate=0,this.items={notifications:a,orders:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>box-bankers</title>\n<path d="M28 1.333h-24c-2.205 0-4 1.795-4 4v5.333c0 0.736 0.597 1.333 1.333 1.333v14.667c0 2.205 1.795 4 4 4h21.333c2.205 0 4-1.795 4-4v-14.667c0.736 0 1.333-0.597 1.333-1.333v-5.333c0-2.205-1.795-4-4-4zM28 26.667c0 0.735-0.599 1.333-1.333 1.333h-21.333c-0.735 0-1.333-0.599-1.333-1.333v-14.667h5.333v2.667c0 1.471 1.196 2.667 2.667 2.667h8c1.471 0 2.667-1.196 2.667-2.667v-2.667h5.333zM12 14.667v-2.667h8v2.667zM29.333 9.333h-26.667v-4c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',pending_orders:o,wishlist:n,wallet:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>wallet</title>\n<path d="M28 6.667h-24c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333h24c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-24c-2.204 0-3.999 1.793-4 3.997v18.669c0 3.676 2.991 6.667 6.667 6.667h21.333c2.205 0 4-1.795 4-4v-16c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.736-0.597 1.333-1.333 1.333h-21.333c-2.205 0-4-1.795-4-4v-14.895c0.416 0.147 0.865 0.228 1.333 0.228h24c0.736 0 1.333 0.597 1.333 1.333zM22.667 14.667c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 20c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.597 1.333-1.333 1.333z"></path>\n</svg>\n',loyalty_program:c,profile:m}}async componentWillLoad(){await salla.onReady(),await salla.lang.onLoaded(),this.loadTranslations(),this.initiate(),Salla.event.on("api::token.injected",(s=>this.profileUrl=this.buildProfileUrl(s))),this.sallaAccountEnabled=Salla.config.get("store.features")?.includes("salla-account"),this.items=this.sallaAccountEnabled?{...this.items,settings:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>settings</title>\n<path d="M29.717 19.037l-1.817-1.499c0.067-0.512 0.1-1.028 0.1-1.539s-0.033-1.027-0.1-1.54l1.817-1.499c1.177-0.969 1.479-2.633 0.716-3.956l-1.159-2.009c-0.761-1.324-2.349-1.895-3.784-1.359l-2.212 0.829c-0.817-0.627-1.704-1.139-2.649-1.535l-0.388-2.332c-0.251-1.507-1.54-2.6-3.067-2.6h-2.319c-1.525 0-2.815 1.093-3.065 2.6l-0.388 2.332c-0.945 0.396-1.833 0.909-2.649 1.535l-2.212-0.829c-1.428-0.533-3.021 0.036-3.783 1.359l-1.16 2.011c-0.763 1.323-0.46 2.985 0.716 3.955l1.817 1.499c-0.067 0.513-0.1 1.029-0.1 1.54s0.033 1.027 0.1 1.539l-1.819 1.5c-1.176 0.971-1.476 2.635-0.715 3.955l1.159 2.011c0.763 1.324 2.356 1.899 3.784 1.36l2.212-0.831c0.816 0.625 1.703 1.139 2.649 1.535l0.388 2.332c0.251 1.507 1.54 2.6 3.067 2.6h2.319c1.527 0 2.816-1.093 3.065-2.6l0.389-2.332c0.947-0.396 1.833-0.909 2.649-1.535l2.212 0.831c1.432 0.539 3.023-0.035 3.783-1.36l1.16-2.011c0.76-1.32 0.459-2.984-0.717-3.956zM28.123 21.663l-1.16 2.011c-0.108 0.188-0.336 0.267-0.536 0.193l-2.931-1.1c-0.459-0.173-0.979-0.079-1.349 0.248-0.923 0.811-1.979 1.423-3.139 1.819-0.464 0.157-0.804 0.559-0.885 1.043l-0.515 3.087c-0.033 0.215-0.216 0.371-0.433 0.371h-2.319c-0.217 0-0.4-0.156-0.436-0.371l-0.513-3.087c-0.080-0.484-0.42-0.884-0.885-1.043-1.16-0.396-2.216-1.008-3.139-1.819-0.248-0.217-0.561-0.332-0.88-0.332-0.157 0-0.316 0.028-0.469 0.084l-2.931 1.1c-0.199 0.079-0.428-0.004-0.537-0.193l-1.159-2.011c-0.109-0.191-0.067-0.428 0.101-0.568l2.409-1.985c0.379-0.312 0.555-0.807 0.46-1.288-0.119-0.605-0.179-1.219-0.179-1.821 0-0.604 0.060-1.217 0.181-1.823 0.095-0.481-0.081-0.976-0.46-1.288l-2.409-1.985c-0.168-0.139-0.211-0.376-0.101-0.567l1.16-2.011c0.107-0.188 0.332-0.268 0.536-0.193l2.931 1.1c0.459 0.172 0.979 0.079 1.348-0.247 0.924-0.812 1.98-1.424 3.139-1.817 0.465-0.159 0.805-0.559 0.885-1.044l0.513-3.088c0.036-0.215 0.219-0.371 0.436-0.371h2.319c0.217 0 0.4 0.156 0.436 0.371l0.515 3.088c0.081 0.484 0.42 0.885 0.885 1.044 1.157 0.393 2.213 1.005 3.139 1.817 0.371 0.325 0.889 0.42 1.349 0.247l2.929-1.099c0.203-0.076 0.428 0.005 0.537 0.193l1.159 2.009c0.109 0.191 0.067 0.428-0.101 0.567l-2.409 1.985c-0.379 0.312-0.555 0.807-0.46 1.288 0.119 0.605 0.179 1.219 0.179 1.823 0 0.603-0.060 1.216-0.181 1.821-0.095 0.48 0.081 0.975 0.46 1.288l2.408 1.984c0.169 0.141 0.212 0.379 0.103 0.569zM16.016 10.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM16.016 18.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>\n</svg>\n'}:this.items,this.host.hasAttribute("with-rating")&&(this.items.rating=h),this.items.logout='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>send-out</title>\n<path d="M16 26.667h-9.333c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.736 0.597-1.333 1.333-1.333h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-9.333c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM29.231 15.491c-0.068-0.164-0.167-0.312-0.289-0.436l-5.332-5.332c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l3.057 3.059h-12.781c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h12.781l-3.057 3.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l5.332-5.332c0.124-0.123 0.221-0.271 0.289-0.435 0.135-0.325 0.135-0.693 0-1.019z"></path>\n</svg>\n';let s=Salla.storage.get("token");s||(s=""),this.profileUrl=this.buildProfileUrl(s);const t=this.host.querySelector('[slot="trigger"]');this.triggerSlot='<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>',t&&(this.triggerSlot=t.innerHTML,t.innerHTML=this.replaceParams(t.innerHTML))}loadTranslations(){this.notifications=Salla.lang.get("common.titles.notifications"),this.orders=Salla.lang.get("common.titles.orders"),this.pending_orders=Salla.lang.get("common.titles.pending_orders"),this.wishlist=Salla.lang.get("common.titles.wishlist"),this.profile=Salla.lang.get("common.titles.profile"),this.hello=Salla.lang.get("pages.checkout.hello"),this.rating=Salla.lang.get("common.titles.rating"),this.wallet=Salla.lang.get("common.titles.wallet"),this.settings=Salla.lang.get("common.titles.settings"),this.loyalty_program=Salla.lang.get("pages.loyalty_program.loyalty_points"),this.logout=Salla.lang.get("blocks.header.logout")}initiate(){return Salla.config.isGuest()?this.autoMountLoginModal():(this.is_loggedIn=!0,!this.inline&&(salla.url.is_page("customer.notifications")||salla.url.is_page("customer.orders.index.pending")||salla.url.is_page("customer.profile")||(Date.now()-(salla.storage.get("user.fetched_at")||0))/1e3/60>30)?this.fetchFreshProfile():void salla.event.on("profile::info.fetched",(s=>{this.updateProfileState(s)})))}autoMountLoginModal(){this.autoMount&&(document.querySelector("salla-login-modal")||Salla.hooks.mount("body:end",document.createElement("salla-login-modal")))}fetchFreshProfile(){salla.api.token?salla.profile.api.info().then((s=>{this.updateProfileState(s)})):salla.log("trying to fetchFreshProfile before injected the token!!")}updateProfileState(s){this.badges={notifications:salla.helpers.number(s.data.notifications||0),pending_orders:salla.helpers.number(s.data.pending_orders||0)},this.hasBadges=Number(s.data.pending_orders)>0||Number(s.data.notifications)>0,this.first_name=s.data.first_name,this.last_name=s.data.last_name,this.avatar=s.data.avatar||salla.url.cdn("images/avatar.png",40,40)}async open(s){this.opened=!this.opened,s.stopPropagation(),this.opened&&window.addEventListener("click",this.onClickOutside)}menuItemClicked(s,t){"logout"===t&&(s.preventDefault(),salla.auth.logout("sall-user-menu"))}replaceParams(s){return s.replace(/\{hello\}/g,this.hello).replace(/\{first_name\}/g,this.first_name).replace(/\{last_name\}/g,this.last_name).replace(/\{avatar\}/g,this.avatar).replace(/\{icon\}/g,i)}getTheHeader(){return t("div",{class:{"s-user-menu-trigger-slot":!0,"s-user-menu-red-dot":this.hasBadges,"s-user-menu-trigger-avatar-only":this.avatarOnly},id:"trigger-slot",onClick:s=>this.open(s),onKeyUp:s=>this.open(s),innerHTML:this.replaceParams(this.triggerSlot)})}getItemAnchorLinkAttrs(s){return"profile"===s&&this.profileUrl&&this.sallaAccountEnabled?{href:this.profileUrl,target:"_blank",rel:"noopener noreferrer"}:{href:Salla.url.get("loyalty_program"===s?"loyalty":s)}}getMenuItem([s,e],l){if(("wallet"!==s||window.can_access_wallet)&&("loyalty_program"!==s||Salla.config.get("store.features").includes("loyalty-system")))return t("li",{class:{"s-user-menu-dropdown-item":!0,"s-user-menu-dropdown-item-logout":l+1===Object.entries(this.items).length}},t("a",{...this.getItemAnchorLinkAttrs(s),class:"s-user-menu-dropdown-item-link",onClick:t=>this.menuItemClicked(t,s)},t("i",{class:"s-user-menu-dropdown-item-prefix",innerHTML:e}),t("span",{class:"s-user-menu-dropdown-item-title"},this[s]),["٠","0",void 0].includes(this.badges[s])?"":t("span",{class:"s-user-menu-dropdown-item-badge"},this.badges[s])))}componentShouldUpdate(){this.opened||window.removeEventListener("click",this.onClickOutside)}render(){return t(e,null,this.is_loggedIn?this.inline?t("ul",{class:"s-user-menu-inline"},Object.entries(this.items).map(((s,t)=>this.getMenuItem(s,t)))):t("div",{class:{"s-user-menu-wrapper":!0,"s-user-menu-relative-dropdown":this.relativeDropdown}},this.getTheHeader(),t("div",{class:{"s-user-menu-toggler":!0,opened:this.opened}},t("div",{class:"s-user-menu-dropdown",onClick:s=>s.stopPropagation(),onKeyUp:s=>s.stopPropagation()},this.showHeader?t("div",{class:"s-user-menu-dropdown-header"},t("img",{src:this.avatar,alt:`${this.first_name} ${this.last_name}`}),t("div",{class:"s-user-menu-dropdown-header-content"},t("span",null,this.hello),t("p",null,this.first_name," ",this.last_name)),t("button",{type:"button",class:"s-user-menu-dropdown-header-close",innerHTML:r,onClick:()=>{this.opened=!1}})):"",t("ul",{class:"s-user-menu-dropdown-list"},Object.entries(this.items).map(((s,t)=>this.getMenuItem(s,t))))))):t("slot",{name:"login-btn"},t("button",{type:"button",class:"s-user-menu-login-btn",onClick:()=>salla.event.dispatch("login::open"),innerHTML:m})))}componentDidLoad(){document.lazyLoadInstance?.update(this.host.querySelectorAll(".lazy"))}buildProfileUrl(s){return`${Salla.config.get("account.url","https://accounts.salla.com")}/${salla.config.get("user.language_code")}/user?store=${Salla.config.get("store.id")}&info=${encodeURIComponent(s)}`}get host(){return l(this)}};u.style="";export{u as salla_user_menu}