@salla.sa/twilight-components 2.14.393 → 2.14.395

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 (557) hide show
  1. package/dist/cjs/{filepond-D7RVR_w_.js → filepond-DhDK6X-K.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DTuZK2ot.js → filepond-plugin-file-poster-By0OGSbr.js} +2 -2
  3. package/dist/cjs/{filepond-plugin-file-validate-size-DHc6pF_j.js → filepond-plugin-file-validate-size-C5OjLfMZ.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DnkcvJVc.js → filepond-plugin-file-validate-type-DAtZkzcc.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-vrZ1s7kw.js → filepond-plugin-image-edit-BSqtSAWo.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-Bn5JSzQK.js → filepond-plugin-image-exif-orientation-BLuNiU8R.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-8qWUFe9n.js → filepond-plugin-image-preview-DE9EBkNn.js} +1 -1
  8. package/dist/cjs/{index-C5VeFDQ0.js → index-BGJUbcXt.js} +547 -780
  9. package/dist/cjs/{index-CwD81m7i.js → index-BMeldHxT.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +3 -4
  11. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +5 -5
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +15 -19
  13. package/dist/cjs/salla-add-product-button_4.cjs.entry.js +10 -12
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +3 -3
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +5 -5
  16. package/dist/cjs/salla-app-install-alert.cjs.entry.js +3 -3
  17. package/dist/cjs/salla-apps-icons.cjs.entry.js +3 -3
  18. package/dist/cjs/salla-booking-field_7.cjs.entry.js +23 -25
  19. package/dist/cjs/salla-bullet-delivery.cjs.entry.js +3 -3
  20. package/dist/cjs/salla-cart-coupons.cjs.entry.js +3 -3
  21. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +5 -5
  22. package/dist/cjs/salla-comment-form_8.cjs.entry.js +17 -17
  23. package/dist/cjs/salla-conditional-offer.cjs.entry.js +3 -3
  24. package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
  25. package/dist/cjs/salla-cookies-bar.cjs.entry.js +3 -3
  26. package/dist/cjs/salla-count-down.cjs.entry.js +3 -3
  27. package/dist/cjs/salla-custom-fields.cjs.entry.js +3 -3
  28. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-filters-widget.cjs.entry.js +3 -3
  30. package/dist/cjs/salla-filters.cjs.entry.js +3 -3
  31. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-gifting.cjs.entry.js +17 -14
  33. package/dist/cjs/salla-hook.cjs.entry.js +2 -5
  34. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +3 -3
  35. package/dist/cjs/salla-installment.cjs.entry.js +3 -3
  36. package/dist/cjs/salla-list-tile.cjs.entry.js +3 -3
  37. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-login-modal.cjs.entry.js +3 -3
  39. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +3 -3
  40. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  41. package/dist/cjs/salla-loyalty.cjs.entry.js +3 -3
  42. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +3 -3
  43. package/dist/cjs/salla-map.cjs.entry.js +3 -3
  44. package/dist/cjs/salla-menu.cjs.entry.js +3 -3
  45. package/dist/cjs/salla-metadata.cjs.entry.js +3 -3
  46. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +5 -5
  47. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -8
  48. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +4 -6
  49. package/dist/cjs/salla-notification-item.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-notifications.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-offer-modal.cjs.entry.js +3 -3
  52. package/dist/cjs/salla-offer.cjs.entry.js +3 -3
  53. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +3 -3
  54. package/dist/cjs/salla-order-details-options.cjs.entry.js +3 -3
  55. package/dist/cjs/salla-order-details.cjs.entry.js +4 -6
  56. package/dist/cjs/salla-order-edit-item.cjs.entry.js +3 -3
  57. package/dist/cjs/salla-order-edit.cjs.entry.js +3 -3
  58. package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
  59. package/dist/cjs/salla-order-totals-card.cjs.entry.js +4 -6
  60. package/dist/cjs/salla-orders.cjs.entry.js +3 -3
  61. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  62. package/dist/cjs/salla-placeholder.cjs.entry.js +3 -3
  63. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  64. package/dist/cjs/salla-product-card.cjs.entry.js +3 -3
  65. package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
  66. package/dist/cjs/salla-products-list.cjs.entry.js +3 -3
  67. package/dist/cjs/salla-products-slider.cjs.entry.js +3 -3
  68. package/dist/cjs/salla-progress-bar.cjs.entry.js +3 -3
  69. package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
  70. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
  71. package/dist/cjs/salla-scopes.cjs.entry.js +3 -3
  72. package/dist/cjs/salla-search.cjs.entry.js +4 -6
  73. package/dist/cjs/salla-skeleton.cjs.entry.js +3 -3
  74. package/dist/cjs/salla-slider.cjs.entry.js +3 -3
  75. package/dist/cjs/salla-social-share.cjs.entry.js +3 -3
  76. package/dist/cjs/salla-social.cjs.entry.js +3 -3
  77. package/dist/cjs/salla-tab-content_3.cjs.entry.js +7 -7
  78. package/dist/cjs/salla-tiered-offer.cjs.entry.js +3 -3
  79. package/dist/cjs/salla-tooltip.cjs.entry.js +3 -3
  80. package/dist/cjs/salla-trust-badges.cjs.entry.js +3 -3
  81. package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
  82. package/dist/cjs/salla-user-profile.cjs.entry.js +3 -3
  83. package/dist/cjs/salla-user-settings.cjs.entry.js +3 -3
  84. package/dist/cjs/salla-verify.cjs.entry.js +3 -3
  85. package/dist/cjs/salla-wallet.cjs.entry.js +3 -3
  86. package/dist/cjs/twilight.cjs.js +4 -5
  87. package/dist/cjs/{vanilla-picker-yKERbLpx.js → vanilla-picker-BJmFb-7a.js} +1 -1
  88. package/dist/collection/collection-manifest.json +2 -3
  89. package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
  90. package/dist/collection/components/salla-accordion/salla-accordion.js +4 -4
  91. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +19 -19
  92. package/dist/collection/components/salla-alert/salla-alert.js +5 -5
  93. package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -6
  94. package/dist/collection/components/salla-booking-field/salla-booking-field.js +4 -4
  95. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +9 -9
  96. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +3 -6
  97. package/dist/collection/components/salla-button/salla-button.js +11 -11
  98. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +1 -2
  99. package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +8 -8
  100. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
  101. package/dist/collection/components/salla-color-picker/salla-color-picker.js +14 -20
  102. package/dist/collection/components/salla-comment-form/salla-comment-form.js +6 -6
  103. package/dist/collection/components/salla-comments/salla-comment-item.js +3 -2
  104. package/dist/collection/components/salla-comments/salla-comments.js +17 -18
  105. package/dist/collection/components/salla-contacts/salla-contacts.js +10 -10
  106. package/dist/collection/components/salla-count-down/salla-count-down.js +34 -34
  107. package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +7 -9
  108. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +65 -69
  109. package/dist/collection/components/salla-drawer/salla-drawer.js +11 -11
  110. package/dist/collection/components/salla-file-upload/salla-file-upload.js +84 -85
  111. package/dist/collection/components/salla-filters/salla-filters.js +2 -2
  112. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +5 -4
  113. package/dist/collection/components/salla-gifting/salla-gifting.js +45 -23
  114. package/dist/collection/components/salla-hook/salla-hook.js +2 -2
  115. package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -6
  116. package/dist/collection/components/salla-installment/salla-installment.js +5 -5
  117. package/dist/collection/components/salla-list-tile/salla-list-tile.js +2 -2
  118. package/dist/collection/components/salla-loading/salla-loading.js +4 -4
  119. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +5 -5
  120. package/dist/collection/components/salla-login-modal/salla-login-modal.js +14 -14
  121. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +3 -4
  122. package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -13
  123. package/dist/collection/components/salla-map/salla-map.js +14 -14
  124. package/dist/collection/components/salla-menu/salla-menu.js +9 -10
  125. package/dist/collection/components/salla-metadata/salla-metadata.js +3 -3
  126. package/dist/collection/components/salla-modal/salla-modal.js +11 -11
  127. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +2 -2
  128. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
  129. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +2 -4
  130. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +7 -8
  131. package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +2 -2
  132. package/dist/collection/components/salla-notifications/salla-notification-item.js +2 -2
  133. package/dist/collection/components/salla-notifications/salla-notifications.js +3 -3
  134. package/dist/collection/components/salla-offer/salla-offer.js +1 -1
  135. package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +5 -5
  136. package/dist/collection/components/salla-order-details/salla-order-details-options.js +5 -6
  137. package/dist/collection/components/salla-order-details/salla-order-details.js +3 -4
  138. package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +4 -4
  139. package/dist/collection/components/salla-order-edit/salla-order-edit.js +4 -4
  140. package/dist/collection/components/salla-order-summary/salla-order-summary.js +2 -2
  141. package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +3 -4
  142. package/dist/collection/components/salla-orders/salla-orders.js +4 -4
  143. package/dist/collection/components/salla-payments/salla-payments.js +1 -0
  144. package/dist/collection/components/salla-placeholder/salla-placeholder.js +3 -3
  145. package/dist/collection/components/salla-price-range/salla-price-range.js +8 -8
  146. package/dist/collection/components/salla-product-availability/salla-product-availability.js +6 -6
  147. package/dist/collection/components/salla-product-card/salla-product-card.js +18 -18
  148. package/dist/collection/components/salla-product-options/salla-product-options.js +13 -15
  149. package/dist/collection/components/salla-products-list/salla-products-list.js +21 -20
  150. package/dist/collection/components/salla-products-slider/salla-products-slider.js +23 -22
  151. package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +20 -21
  152. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +2 -2
  153. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +17 -16
  154. package/dist/collection/components/salla-quick-order/salla-quick-order.js +11 -11
  155. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +2 -2
  156. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +8 -8
  157. package/dist/collection/components/salla-review-card/salla-review-card.js +3 -3
  158. package/dist/collection/components/salla-reviews/salla-reviews.js +13 -16
  159. package/dist/collection/components/salla-reviews-summary/salla-reviews-summary.js +2 -2
  160. package/dist/collection/components/salla-scopes/salla-scopes.js +2 -2
  161. package/dist/collection/components/salla-search/salla-search.js +6 -6
  162. package/dist/collection/components/salla-skeleton/salla-skeleton.js +3 -3
  163. package/dist/collection/components/salla-slider/salla-slider.js +25 -25
  164. package/dist/collection/components/salla-social-share/salla-social-share.js +3 -3
  165. package/dist/collection/components/salla-tabs/salla-tab-content.js +2 -2
  166. package/dist/collection/components/salla-tabs/salla-tab-header.js +5 -5
  167. package/dist/collection/components/salla-tabs/salla-tabs.js +2 -2
  168. package/dist/collection/components/salla-tel-input/salla-tel-input.js +8 -9
  169. package/dist/collection/components/salla-tooltip/salla-tooltip.js +5 -5
  170. package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +1 -1
  171. package/dist/collection/components/salla-user-menu/salla-user-menu.js +5 -5
  172. package/dist/collection/components/salla-user-profile/salla-user-profile.js +1 -1
  173. package/dist/collection/components/salla-verify/salla-verify.js +4 -4
  174. package/dist/components/Helper.js +432 -1
  175. package/dist/components/_commonjsHelpers.js +7 -1
  176. package/dist/components/anime.es.js +1310 -1
  177. package/dist/components/arrow-left.js +8 -1
  178. package/dist/components/axios.js +4240 -2
  179. package/dist/components/bell-ring.js +8 -1
  180. package/dist/components/camera.js +8 -1
  181. package/dist/components/cancel.js +8 -1
  182. package/dist/components/cart.js +8 -1
  183. package/dist/components/check-circle2.js +15 -1
  184. package/dist/components/check.js +8 -1
  185. package/dist/components/facebook.js +10 -1
  186. package/dist/components/filepond-plugin-file-poster.js +662 -2
  187. package/dist/components/filepond-plugin-file-validate-size.js +204 -2
  188. package/dist/components/filepond-plugin-file-validate-type.js +262 -2
  189. package/dist/components/filepond-plugin-image-edit.js +487 -2
  190. package/dist/components/filepond-plugin-image-exif-orientation.js +214 -2
  191. package/dist/components/filepond-plugin-image-preview.js +2237 -2
  192. package/dist/components/filepond.js +11286 -2
  193. package/dist/components/gift.js +8 -1
  194. package/dist/components/image.js +8 -1
  195. package/dist/components/index.d.ts +0 -2
  196. package/dist/components/index.js +8220 -1
  197. package/dist/components/index2.js +1709 -1
  198. package/dist/components/index3.js +2550 -1
  199. package/dist/components/interfaces.js +12 -1
  200. package/dist/components/isObject.js +292 -1
  201. package/dist/components/keyboard_arrow_down.js +8 -1
  202. package/dist/components/keyboard_arrow_right.js +15 -1
  203. package/dist/components/location.js +11 -1
  204. package/dist/components/mail.js +8 -1
  205. package/dist/components/minus.js +15 -1
  206. package/dist/components/salla-accordion-body.js +6 -1
  207. package/dist/components/salla-accordion-body2.js +30 -1
  208. package/dist/components/salla-accordion-head.js +6 -1
  209. package/dist/components/salla-accordion-head2.js +63 -1
  210. package/dist/components/salla-accordion.js +6 -1
  211. package/dist/components/salla-accordion2.js +68 -1
  212. package/dist/components/salla-add-product-button.js +6 -1
  213. package/dist/components/salla-add-product-button2.js +306 -1
  214. package/dist/components/salla-advertisement.js +155 -1
  215. package/dist/components/salla-alert.js +59 -1
  216. package/dist/components/salla-app-install-alert.js +91 -1
  217. package/dist/components/salla-apps-icons.js +63 -1
  218. package/dist/components/salla-booking-field.js +6 -1
  219. package/dist/components/salla-booking-field2.js +221 -1
  220. package/dist/components/salla-bottom-alert.js +214 -1
  221. package/dist/components/salla-breadcrumb.js +226 -1
  222. package/dist/components/salla-bullet-delivery.js +2114 -1
  223. package/dist/components/salla-button.js +6 -1
  224. package/dist/components/salla-button2.js +174 -1
  225. package/dist/components/salla-cart-coupons.js +284 -1
  226. package/dist/components/salla-cart-item-offers.js +143 -1
  227. package/dist/components/salla-cart-summary.js +136 -1
  228. package/dist/components/salla-color-picker.js +6 -1
  229. package/dist/components/salla-color-picker2.js +260 -1
  230. package/dist/components/salla-comment-form.js +6 -1
  231. package/dist/components/salla-comment-form2.js +64 -1
  232. package/dist/components/salla-comment-item.js +6 -1
  233. package/dist/components/salla-comment-item2.js +217 -1
  234. package/dist/components/salla-comments.js +395 -1
  235. package/dist/components/salla-conditional-fields.js +6 -1
  236. package/dist/components/salla-conditional-fields2.js +137 -1
  237. package/dist/components/salla-conditional-offer.js +194 -1
  238. package/dist/components/salla-contacts.js +125 -1
  239. package/dist/components/salla-cookies-bar.js +107 -1
  240. package/dist/components/salla-count-down.js +6 -1
  241. package/dist/components/salla-count-down2.js +271 -1
  242. package/dist/components/salla-custom-fields.js +175 -1
  243. package/dist/components/salla-datetime-picker.js +6 -1
  244. package/dist/components/salla-datetime-picker2.js +342 -1
  245. package/dist/components/salla-delivery-promise.js +263 -1
  246. package/dist/components/salla-drawer.js +6 -1
  247. package/dist/components/salla-drawer2.js +214 -1
  248. package/dist/components/salla-file-upload.js +6 -1
  249. package/dist/components/salla-file-upload2.js +583 -1
  250. package/dist/components/salla-filters-widget.js +6 -1
  251. package/dist/components/salla-filters-widget2.js +245 -1
  252. package/dist/components/salla-filters.js +253 -1
  253. package/dist/components/salla-fulfillment-methods.js +61 -1
  254. package/dist/components/salla-gifting.js +736 -1
  255. package/dist/components/salla-hook.js +47 -1
  256. package/dist/components/salla-infinite-scroll.js +112 -1
  257. package/dist/components/salla-installment.js +306 -1
  258. package/dist/components/salla-list-tile.js +6 -1
  259. package/dist/components/salla-list-tile2.js +47 -1
  260. package/dist/components/salla-loading.js +6 -1
  261. package/dist/components/salla-loading2.js +51 -1
  262. package/dist/components/salla-localization-modal.js +296 -1
  263. package/dist/components/salla-login-modal.js +6 -1
  264. package/dist/components/salla-login-modal2.js +359 -1
  265. package/dist/components/salla-loyalty-prize-item.js +39 -1
  266. package/dist/components/salla-loyalty-program.js +115 -1
  267. package/dist/components/salla-loyalty.js +304 -1
  268. package/dist/components/salla-maintenance-alert.js +57 -1
  269. package/dist/components/salla-map.js +6 -1
  270. package/dist/components/salla-map2.js +766 -1
  271. package/dist/components/salla-menu.js +165 -1
  272. package/dist/components/salla-metadata.js +97 -1
  273. package/dist/components/salla-modal.js +6 -1
  274. package/dist/components/salla-modal2.js +215 -1
  275. package/dist/components/salla-multiple-bundle-product-cart.js +6 -1
  276. package/dist/components/salla-multiple-bundle-product-cart2.js +151 -1
  277. package/dist/components/salla-multiple-bundle-product-details.js +6 -1
  278. package/dist/components/salla-multiple-bundle-product-details2.js +296 -1
  279. package/dist/components/salla-multiple-bundle-product-options-modal.js +6 -1
  280. package/dist/components/salla-multiple-bundle-product-options-modal2.js +598 -1
  281. package/dist/components/salla-multiple-bundle-product-slider.js +6 -1
  282. package/dist/components/salla-multiple-bundle-product-slider2.js +136 -1
  283. package/dist/components/salla-multiple-bundle-product.js +207 -1
  284. package/dist/components/salla-notification-item.js +6 -1
  285. package/dist/components/salla-notification-item2.js +32 -1
  286. package/dist/components/salla-notifications.js +190 -1
  287. package/dist/components/salla-offer-modal.js +328 -1
  288. package/dist/components/salla-offer.js +478 -1
  289. package/dist/components/salla-order-details-multiple-bundle-product.js +6 -1
  290. package/dist/components/salla-order-details-multiple-bundle-product2.js +122 -1
  291. package/dist/components/salla-order-details-options.js +6 -1
  292. package/dist/components/salla-order-details-options2.js +140 -1
  293. package/dist/components/salla-order-details.js +122 -1
  294. package/dist/components/salla-order-edit-item.js +6 -1
  295. package/dist/components/salla-order-edit-item2.js +181 -1
  296. package/dist/components/salla-order-edit.js +288 -1
  297. package/dist/components/salla-order-summary.js +132 -1
  298. package/dist/components/salla-order-totals-card.js +87 -1
  299. package/dist/components/salla-orders.js +271 -1
  300. package/dist/components/salla-payments.js +76 -1
  301. package/dist/components/salla-placeholder.js +6 -1
  302. package/dist/components/salla-placeholder2.js +66 -1
  303. package/dist/components/salla-price-range.js +6 -1
  304. package/dist/components/salla-price-range2.js +204 -1
  305. package/dist/components/salla-product-availability.js +6 -1
  306. package/dist/components/salla-product-availability2.js +206 -1
  307. package/dist/components/salla-product-card.js +6 -1
  308. package/dist/components/salla-product-card2.js +241 -1
  309. package/dist/components/salla-product-options.js +6 -1
  310. package/dist/components/salla-product-options2.js +962 -1
  311. package/dist/components/salla-product-size-guide.js +130 -1
  312. package/dist/components/salla-products-list.js +6 -1
  313. package/dist/components/salla-products-list2.js +812 -1
  314. package/dist/components/salla-products-slider.js +6 -1
  315. package/dist/components/salla-products-slider2.js +215 -1
  316. package/dist/components/salla-progress-bar.js +6 -1
  317. package/dist/components/salla-progress-bar2.js +94 -1
  318. package/dist/components/salla-quantity-input.js +6 -1
  319. package/dist/components/salla-quantity-input2.js +127 -1
  320. package/dist/components/salla-quick-buy.js +6 -1
  321. package/dist/components/salla-quick-buy2.js +1181 -1
  322. package/dist/components/salla-quick-order.js +299 -1
  323. package/dist/components/salla-rating-modal.js +530 -1
  324. package/dist/components/salla-rating-stars.js +6 -1
  325. package/dist/components/salla-rating-stars2.js +162 -1
  326. package/dist/components/salla-review-card.js +6 -1
  327. package/dist/components/salla-review-card2.js +198 -1
  328. package/dist/components/salla-reviews-page.js +726 -1
  329. package/dist/components/salla-reviews-summary.js +6 -1
  330. package/dist/components/salla-reviews-summary2.js +132 -1
  331. package/dist/components/salla-reviews.js +143 -1
  332. package/dist/components/salla-scopes.js +249 -1
  333. package/dist/components/salla-search.js +213 -1
  334. package/dist/components/salla-skeleton.js +6 -1
  335. package/dist/components/salla-skeleton2.js +50 -1
  336. package/dist/components/salla-slider.js +6 -1
  337. package/dist/components/salla-slider2.js +10489 -1
  338. package/dist/components/salla-social-share.js +194 -1
  339. package/dist/components/salla-social.js +89 -1
  340. package/dist/components/salla-tab-content.js +6 -1
  341. package/dist/components/salla-tab-content2.js +55 -1
  342. package/dist/components/salla-tab-header.js +6 -1
  343. package/dist/components/salla-tab-header2.js +85 -1
  344. package/dist/components/salla-tabs.js +6 -1
  345. package/dist/components/salla-tabs2.js +75 -1
  346. package/dist/components/salla-tel-input.js +6 -1
  347. package/dist/components/salla-tel-input2.js +168 -1
  348. package/dist/components/salla-tiered-offer.js +366 -1
  349. package/dist/components/salla-tooltip.js +6 -1
  350. package/dist/components/salla-tooltip2.js +57 -1
  351. package/dist/components/salla-trust-badges.js +90 -1
  352. package/dist/components/salla-user-menu.js +344 -1
  353. package/dist/components/salla-user-profile.js +203 -1
  354. package/dist/components/salla-user-settings.js +139 -1
  355. package/dist/components/salla-verify.js +303 -1
  356. package/dist/components/salla-wallet.js +114 -1
  357. package/dist/components/search.js +8 -1
  358. package/dist/components/shopping-bag.js +8 -1
  359. package/dist/components/special-discount.js +8 -1
  360. package/dist/components/star.js +8 -1
  361. package/dist/components/star2.js +8 -1
  362. package/dist/components/vanilla-picker.js +1034 -2
  363. package/dist/components/whatsapp2.js +8 -1
  364. package/dist/esm/{filepond-DlGaLh8N.js → filepond-B5O4Ep7g.js} +1 -1
  365. package/dist/esm/{filepond-plugin-file-poster-BTVFYcQx.js → filepond-plugin-file-poster-CXl-thGg.js} +2 -2
  366. package/dist/esm/{filepond-plugin-file-validate-size-DGryLmWv.js → filepond-plugin-file-validate-size-9IDBrVOZ.js} +1 -1
  367. package/dist/esm/{filepond-plugin-file-validate-type-DxKfCD0V.js → filepond-plugin-file-validate-type-DcoiRIvo.js} +1 -1
  368. package/dist/esm/{filepond-plugin-image-edit-2W7pu9hn.js → filepond-plugin-image-edit-DDAVgEhK.js} +1 -1
  369. package/dist/esm/{filepond-plugin-image-exif-orientation-OQu-IvPH.js → filepond-plugin-image-exif-orientation-BEr9NdP5.js} +1 -1
  370. package/dist/esm/{filepond-plugin-image-preview-DEW_tSNR.js → filepond-plugin-image-preview-AxYFTZHo.js} +1 -1
  371. package/dist/esm/{index-DYB20YqN.js → index-B08XlOeq.js} +547 -780
  372. package/dist/esm/{index-BDqMkCqE.js → index-CT1GcrKO.js} +1 -1
  373. package/dist/esm/loader.js +3 -4
  374. package/dist/esm/salla-accordion-body_2.entry.js +5 -5
  375. package/dist/esm/salla-accordion_6.entry.js +15 -19
  376. package/dist/esm/salla-add-product-button_4.entry.js +10 -12
  377. package/dist/esm/salla-advertisement.entry.js +3 -3
  378. package/dist/esm/salla-alert_2.entry.js +5 -5
  379. package/dist/esm/salla-app-install-alert.entry.js +3 -3
  380. package/dist/esm/salla-apps-icons.entry.js +3 -3
  381. package/dist/esm/salla-booking-field_7.entry.js +23 -25
  382. package/dist/esm/salla-bullet-delivery.entry.js +3 -3
  383. package/dist/esm/salla-cart-coupons.entry.js +3 -3
  384. package/dist/esm/salla-cart-item-offers_2.entry.js +5 -5
  385. package/dist/esm/salla-comment-form_8.entry.js +17 -17
  386. package/dist/esm/salla-conditional-offer.entry.js +3 -3
  387. package/dist/esm/salla-contacts.entry.js +3 -3
  388. package/dist/esm/salla-cookies-bar.entry.js +3 -3
  389. package/dist/esm/salla-count-down.entry.js +3 -3
  390. package/dist/esm/salla-custom-fields.entry.js +3 -3
  391. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  392. package/dist/esm/salla-filters-widget.entry.js +3 -3
  393. package/dist/esm/salla-filters.entry.js +3 -3
  394. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  395. package/dist/esm/salla-gifting.entry.js +17 -14
  396. package/dist/esm/salla-hook.entry.js +2 -5
  397. package/dist/esm/salla-infinite-scroll.entry.js +3 -3
  398. package/dist/esm/salla-installment.entry.js +3 -3
  399. package/dist/esm/salla-list-tile.entry.js +3 -3
  400. package/dist/esm/salla-localization-modal.entry.js +1 -1
  401. package/dist/esm/salla-login-modal.entry.js +3 -3
  402. package/dist/esm/salla-loyalty-prize-item.entry.js +3 -3
  403. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  404. package/dist/esm/salla-loyalty.entry.js +3 -3
  405. package/dist/esm/salla-maintenance-alert.entry.js +3 -3
  406. package/dist/esm/salla-map.entry.js +3 -3
  407. package/dist/esm/salla-menu.entry.js +3 -3
  408. package/dist/esm/salla-metadata.entry.js +3 -3
  409. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +5 -5
  410. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -8
  411. package/dist/esm/salla-multiple-bundle-product.entry.js +4 -6
  412. package/dist/esm/salla-notification-item.entry.js +3 -3
  413. package/dist/esm/salla-notifications.entry.js +3 -3
  414. package/dist/esm/salla-offer-modal.entry.js +3 -3
  415. package/dist/esm/salla-offer.entry.js +3 -3
  416. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +3 -3
  417. package/dist/esm/salla-order-details-options.entry.js +3 -3
  418. package/dist/esm/salla-order-details.entry.js +4 -6
  419. package/dist/esm/salla-order-edit-item.entry.js +3 -3
  420. package/dist/esm/salla-order-edit.entry.js +3 -3
  421. package/dist/esm/salla-order-summary.entry.js +3 -3
  422. package/dist/esm/salla-order-totals-card.entry.js +4 -6
  423. package/dist/esm/salla-orders.entry.js +3 -3
  424. package/dist/esm/salla-payments.entry.js +3 -3
  425. package/dist/esm/salla-placeholder.entry.js +3 -3
  426. package/dist/esm/salla-price-range.entry.js +3 -3
  427. package/dist/esm/salla-product-card.entry.js +3 -3
  428. package/dist/esm/salla-product-size-guide.entry.js +3 -3
  429. package/dist/esm/salla-products-list.entry.js +3 -3
  430. package/dist/esm/salla-products-slider.entry.js +3 -3
  431. package/dist/esm/salla-progress-bar.entry.js +3 -3
  432. package/dist/esm/salla-quick-order.entry.js +3 -3
  433. package/dist/esm/salla-rating-modal.entry.js +3 -3
  434. package/dist/esm/salla-scopes.entry.js +3 -3
  435. package/dist/esm/salla-search.entry.js +4 -6
  436. package/dist/esm/salla-skeleton.entry.js +3 -3
  437. package/dist/esm/salla-slider.entry.js +3 -3
  438. package/dist/esm/salla-social-share.entry.js +3 -3
  439. package/dist/esm/salla-social.entry.js +3 -3
  440. package/dist/esm/salla-tab-content_3.entry.js +7 -7
  441. package/dist/esm/salla-tiered-offer.entry.js +3 -3
  442. package/dist/esm/salla-tooltip.entry.js +3 -3
  443. package/dist/esm/salla-trust-badges.entry.js +3 -3
  444. package/dist/esm/salla-user-menu.entry.js +3 -3
  445. package/dist/esm/salla-user-profile.entry.js +3 -3
  446. package/dist/esm/salla-user-settings.entry.js +3 -3
  447. package/dist/esm/salla-verify.entry.js +3 -3
  448. package/dist/esm/salla-wallet.entry.js +3 -3
  449. package/dist/esm/twilight.js +4 -5
  450. package/dist/esm/{vanilla-picker-Dt9vZPZF.js → vanilla-picker-BHoeSGTe.js} +1 -1
  451. package/dist/twilight/{p-1875537e.entry.js → p-00ff16e1.entry.js} +1 -1
  452. package/dist/twilight/{p-af3c74f4.entry.js → p-014fb8d0.entry.js} +1 -1
  453. package/dist/twilight/{p-b64f3155.entry.js → p-0253cf3c.entry.js} +1 -1
  454. package/dist/twilight/p-053408d8.entry.js +4 -0
  455. package/dist/twilight/{p-e3b8e0e1.entry.js → p-09d16254.entry.js} +1 -1
  456. package/dist/twilight/{p-c87951a2.entry.js → p-0c90006b.entry.js} +1 -1
  457. package/dist/twilight/{p-296d2dd0.entry.js → p-0d8ec747.entry.js} +1 -1
  458. package/dist/twilight/{p-ad07f67a.entry.js → p-1150cf28.entry.js} +1 -1
  459. package/dist/twilight/p-1303d9d7.entry.js +4 -0
  460. package/dist/twilight/{p-aaa0c743.entry.js → p-14068508.entry.js} +1 -1
  461. package/dist/twilight/{p-ad041ab5.entry.js → p-1cc45c37.entry.js} +1 -1
  462. package/dist/twilight/{p-06fa7327.entry.js → p-1dd74467.entry.js} +1 -1
  463. package/dist/twilight/{p-eac718cd.entry.js → p-1df75ff6.entry.js} +1 -1
  464. package/dist/twilight/p-1dfe9e7e.entry.js +4 -0
  465. package/dist/twilight/{p-09d39785.entry.js → p-211a0d89.entry.js} +1 -1
  466. package/dist/twilight/{p-44fa7521.entry.js → p-2c192362.entry.js} +1 -1
  467. package/dist/twilight/{p-c3ffb88a.entry.js → p-33d101c0.entry.js} +1 -1
  468. package/dist/twilight/{p-b598c0f7.entry.js → p-431a16ce.entry.js} +1 -1
  469. package/dist/twilight/{p-e94f217b.entry.js → p-464bc8d5.entry.js} +1 -1
  470. package/dist/twilight/p-52ac8f65.entry.js +4 -0
  471. package/dist/twilight/{p-33779828.entry.js → p-55fc519c.entry.js} +1 -1
  472. package/dist/twilight/{p-2abaa633.entry.js → p-5ceae537.entry.js} +1 -1
  473. package/dist/twilight/{p-7093a427.entry.js → p-5f23edd8.entry.js} +1 -1
  474. package/dist/twilight/{p-96d03a28.entry.js → p-5f35500e.entry.js} +1 -1
  475. package/dist/twilight/p-61211f13.entry.js +4 -0
  476. package/dist/twilight/{p-1ef2602d.entry.js → p-6456c5b0.entry.js} +1 -1
  477. package/dist/twilight/{p-aa7c5de0.entry.js → p-66240512.entry.js} +1 -1
  478. package/dist/twilight/{p-bff4c7b3.entry.js → p-6f510269.entry.js} +1 -1
  479. package/dist/twilight/{p-748df7e6.entry.js → p-706205de.entry.js} +1 -1
  480. package/dist/twilight/{p-34b670fc.entry.js → p-71752a0e.entry.js} +1 -1
  481. package/dist/twilight/{p-c091e2dc.entry.js → p-736dd3ae.entry.js} +1 -1
  482. package/dist/twilight/p-75c9c0d9.entry.js +4 -0
  483. package/dist/twilight/{p-7abddca8.entry.js → p-77854672.entry.js} +1 -1
  484. package/dist/twilight/{p-d337c399.entry.js → p-7dceb44c.entry.js} +1 -1
  485. package/dist/twilight/{p-96e78428.entry.js → p-822f2337.entry.js} +1 -1
  486. package/dist/twilight/{p-4fa4547a.entry.js → p-82373ce1.entry.js} +1 -1
  487. package/dist/twilight/{p-87c0ca91.entry.js → p-85c67570.entry.js} +1 -1
  488. package/dist/twilight/{p-94dbc1e9.entry.js → p-89a0e4a2.entry.js} +1 -1
  489. package/dist/twilight/{p-105b1dab.entry.js → p-8d3692dd.entry.js} +1 -1
  490. package/dist/twilight/p-8dad41ec.entry.js +4 -0
  491. package/dist/twilight/{p-a01f1992.entry.js → p-8f6fd451.entry.js} +1 -1
  492. package/dist/twilight/{p-f7999a6d.entry.js → p-9131dcc3.entry.js} +1 -1
  493. package/dist/twilight/{p-4932857d.entry.js → p-94846672.entry.js} +1 -1
  494. package/dist/twilight/{p-e28c0773.entry.js → p-95058bbc.entry.js} +1 -1
  495. package/dist/twilight/p-99b45fc0.entry.js +4 -0
  496. package/dist/twilight/{p-ccfe5308.entry.js → p-9b17680f.entry.js} +1 -1
  497. package/dist/twilight/{p-59ae82bd.entry.js → p-9f159167.entry.js} +1 -1
  498. package/dist/twilight/{p-d9f5a8cd.entry.js → p-9f29e169.entry.js} +1 -1
  499. package/dist/twilight/p-B08XlOeq.js +5 -0
  500. package/dist/twilight/{p-Ck4zxCil.js → p-B4GW5rQA.js} +1 -1
  501. package/dist/twilight/p-BJ1KNlpk.js +9 -0
  502. package/dist/twilight/{p-BZnoSB1s.js → p-BaawQYdd.js} +1 -1
  503. package/dist/twilight/{p-BkClxrC4.js → p-CqsSEVeE.js} +1 -1
  504. package/dist/twilight/{p-bNzv71Xl.js → p-D5tTqDmK.js} +1 -1
  505. package/dist/twilight/{p-bScl0xMh.js → p-DH6oNmKl.js} +1 -1
  506. package/dist/twilight/{p-8r0S6BcZ.js → p-DaNAdDbS.js} +1 -1
  507. package/dist/twilight/{p-293c6cf3.entry.js → p-a45b7450.entry.js} +1 -1
  508. package/dist/twilight/{p-f176d41d.entry.js → p-ace93243.entry.js} +1 -1
  509. package/dist/twilight/{p-f5d15e71.entry.js → p-af1efb90.entry.js} +1 -1
  510. package/dist/twilight/{p-b17d055d.entry.js → p-af26e966.entry.js} +1 -1
  511. package/dist/twilight/{p-6f36541a.entry.js → p-b14b4ab3.entry.js} +1 -1
  512. package/dist/twilight/{p-d4a242f8.entry.js → p-b392c814.entry.js} +1 -1
  513. package/dist/twilight/{p-e6bbf50d.entry.js → p-b3a120ea.entry.js} +1 -1
  514. package/dist/twilight/p-b5ccdde0.entry.js +4 -0
  515. package/dist/twilight/{p-96a20515.entry.js → p-b604eb49.entry.js} +1 -1
  516. package/dist/twilight/{p-d371d450.entry.js → p-b7abf14c.entry.js} +1 -1
  517. package/dist/twilight/{p-Cw3UBzjl.js → p-bLx9-3Hz.js} +1 -1
  518. package/dist/twilight/{p-2fe01e44.entry.js → p-bca6dd48.entry.js} +1 -1
  519. package/dist/twilight/{p-817b8ba5.entry.js → p-c2d42f04.entry.js} +1 -1
  520. package/dist/twilight/{p-647b6d76.entry.js → p-c325358a.entry.js} +1 -1
  521. package/dist/twilight/{p-3ccc532d.entry.js → p-ca8718f8.entry.js} +1 -1
  522. package/dist/twilight/{p-542d3277.entry.js → p-cb414a45.entry.js} +1 -1
  523. package/dist/twilight/p-cfe885f4.entry.js +4 -0
  524. package/dist/twilight/{p-df6853b5.entry.js → p-d2c4946f.entry.js} +1 -1
  525. package/dist/twilight/p-d4c3dabd.entry.js +4 -0
  526. package/dist/twilight/{p-ede67a08.entry.js → p-d698ba2c.entry.js} +1 -1
  527. package/dist/twilight/p-d8b1d590.entry.js +4 -0
  528. package/dist/twilight/{p-c1fd45b1.entry.js → p-daa42168.entry.js} +1 -1
  529. package/dist/twilight/{p-41c733c2.entry.js → p-e1a37066.entry.js} +1 -1
  530. package/dist/twilight/{p-18bb0181.entry.js → p-e51efb7b.entry.js} +1 -1
  531. package/dist/twilight/{p-108d8c8b.entry.js → p-e857e666.entry.js} +1 -1
  532. package/dist/twilight/{p-0add06f9.entry.js → p-ea6aa784.entry.js} +1 -1
  533. package/dist/twilight/{p-57ff1f25.entry.js → p-f1401804.entry.js} +1 -1
  534. package/dist/twilight/{p-2881bb33.entry.js → p-f7e41ac3.entry.js} +1 -1
  535. package/dist/twilight/{p-X6Yi3bYP.js → p-m8Xtdgy2.js} +1 -1
  536. package/dist/twilight/twilight.esm.js +1 -1
  537. package/dist/types/components/salla-gifting/salla-gifting.d.ts +6 -1
  538. package/dist/types/components.d.ts +187 -765
  539. package/dist/types/stencil-public-runtime.d.ts +11 -169
  540. package/package.json +5 -5
  541. package/dist/cjs/app-globals-oehrC7QI.js +0 -39
  542. package/dist/esm/app-globals-BFryt7-C.js +0 -37
  543. package/dist/twilight/p-1daeed6e.entry.js +0 -4
  544. package/dist/twilight/p-2ddb3fce.entry.js +0 -4
  545. package/dist/twilight/p-34968e31.entry.js +0 -4
  546. package/dist/twilight/p-665189b4.entry.js +0 -4
  547. package/dist/twilight/p-776c9d33.entry.js +0 -4
  548. package/dist/twilight/p-7b8313ef.entry.js +0 -4
  549. package/dist/twilight/p-7bd0ede5.entry.js +0 -4
  550. package/dist/twilight/p-8e8d9d7d.entry.js +0 -4
  551. package/dist/twilight/p-D1vqXXNX.js +0 -9
  552. package/dist/twilight/p-DYB20YqN.js +0 -5
  553. package/dist/twilight/p-Vl6qpttb.js +0 -4
  554. package/dist/twilight/p-af60e72a.entry.js +0 -4
  555. package/dist/twilight/p-dd2bd5dc.entry.js +0 -4
  556. package/dist/twilight/p-e679884a.entry.js +0 -4
  557. package/dist/twilight/p-efab88c5.entry.js +0 -4
@@ -1,4 +1,739 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{transformTag as s,proxyCustomElement as t,HTMLElement as e,h as i}from"@stencil/core/internal/client";import{a}from"./anime.es.js";import{I as l}from"./arrow-left.js";import{C as o}from"./cancel.js";import{d as r}from"./salla-button2.js";import{d as c}from"./salla-datetime-picker2.js";import{d as n}from"./salla-file-upload2.js";import{d as h}from"./salla-list-tile2.js";import{d}from"./salla-loading2.js";import{d as g}from"./salla-modal2.js";import{d as f}from"./salla-placeholder2.js";import{d as m}from"./salla-skeleton2.js";import{d as u}from"./salla-slider2.js";import{d as p}from"./salla-tel-input2.js";var b='\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>gift-sharing</title>\n<path d="M5 32h-4c-0.552 0-1-0.448-1-1v0-14c0-0.552 0.448-1 1-1v0h4c0.552 0 1 0.448 1 1v0 14c0 0.552-0.448 1-1 1v0zM2 30h2v-12h-2zM19.32 30h-14.32v-2h14.32c0.693-0.005 1.329-0.242 1.837-0.637l-0.007 0.005 8.45-6.568c0.216-0.16 0.365-0.402 0.399-0.679l0-0.005c0.005-0.036 0.007-0.077 0.007-0.119 0-0.226-0.078-0.434-0.209-0.599l0.002 0.002c-0.16-0.216-0.401-0.364-0.677-0.399l-0.005-0.001c-0.034-0.004-0.073-0.007-0.113-0.007-0.227 0-0.436 0.078-0.601 0.208l0.002-0.002-7.126 5.526c-1.003 0.793-2.285 1.273-3.68 1.274h-6.6v-2h6.6c0.926-0.001 1.777-0.32 2.45-0.852l-0.008 0.006 7.126-5.526c0.492-0.39 1.122-0.625 1.807-0.625 0.135 0 0.268 0.009 0.398 0.027l-0.015-0.002c0.824 0.102 1.534 0.524 2.011 1.137l0.005 0.007c0.39 0.494 0.625 1.127 0.625 1.814 0 0.136-0.009 0.27-0.027 0.402l0.002-0.015c-0.106 0.819-0.529 1.523-1.141 1.995l-0.007 0.005-8.458 6.578c-0.834 0.649-1.894 1.043-3.047 1.050h-0.002zM11 26c-0.552 0-1-0.448-1-1s0.448-1 1-1v0c2.406-0.004 4.415-1.703 4.894-3.967l0.006-0.033h-10.9c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h12c0.552 0 1 0.448 1 1v0c0 3.866-3.134 7-7 7v0zM24 12h-16c-1.105 0-2-0.895-2-2v0-2c0-1.105 0.895-2 2-2v0h16c1.105 0 2 0.895 2 2v0 2c0 1.105-0.895 2-2 2v0zM24 10v0zM8 8v2h16v-2zM23 18c-0.552 0-1-0.448-1-1v0-6c0-0.552 0.448-1 1-1s1 0.448 1 1v0 6c0 0.552-0.448 1-1 1v0zM9 16c-0.552 0-1-0.448-1-1v0-4c0-0.552 0.448-1 1-1s1 0.448 1 1v0 4c0 0.552-0.448 1-1 1v0zM16 16c-0.552 0-1-0.448-1-1v0-8c0-0.552 0.448-1 1-1s1 0.448 1 1v0 8c0 0.552-0.448 1-1 1v0zM16 8c-0.552-0-1-0.448-1-1 0-0.077 0.009-0.151 0.025-0.223l-0.001 0.007c0.314-1.849 0.963-3.5 1.887-4.961l-0.033 0.055c0.539-0.521 1.274-0.842 2.084-0.842 1.657 0 3 1.343 3 3 0 0.81-0.321 1.545-0.843 2.085l0.001-0.001c-1.405 0.891-3.056 1.541-4.824 1.845l-0.080 0.011c-0.065 0.015-0.139 0.024-0.216 0.024h-0zM19 3c-0.001 0-0.001 0-0.002 0-0.276 0-0.525 0.112-0.706 0.292l0-0c-0.391 0.669-0.703 1.444-0.897 2.264l-0.011 0.058c0.878-0.205 1.653-0.517 2.363-0.93l-0.041 0.022c0.18-0.181 0.292-0.43 0.292-0.706 0-0.551-0.446-0.999-0.998-1h-0zM16 8c-0.077-0-0.151-0.009-0.223-0.025l0.007 0.001c-1.848-0.315-3.499-0.965-4.959-1.888l0.055 0.032c-0.521-0.539-0.842-1.274-0.842-2.084 0-1.657 1.343-3 3-3 0.81 0 1.545 0.321 2.085 0.843l-0.001-0.001c0.891 1.405 1.541 3.056 1.845 4.824l0.011 0.080c0.015 0.066 0.024 0.141 0.024 0.218 0 0.552-0.448 1-1 1-0.001 0-0.001 0-0.002 0h0zM13 3c-0.001 0-0.001 0-0.002 0-0.552 0-1 0.448-1 1 0 0.277 0.112 0.527 0.294 0.708l0 0c0.669 0.391 1.444 0.703 2.264 0.897l0.058 0.011c-0.205-0.878-0.517-1.653-0.93-2.363l0.022 0.041c-0.181-0.181-0.43-0.293-0.706-0.294h-0z"></path>\n</svg>\n';const v=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.defaultEvent="gifting:open",this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.currentStep=1,this.showCalendar=!1,this.showGiftText=!1,this.currentLang="",this.parentClass="is-current-step-1",this.errors={},this.gift=void 0,this.selectedGiftTextOption=void 0,this.selectedCountryId=void 0,this.selectedCountryCode=void 0,this.loadingCities=!1,this.loadingRegions=!1,this.regions=[],this.selectedRegionId=void 0,this.isKSA=!1,this.step2Animated=!1,this.showTextArea=!1,this.selectedImage=void 0,this.uploadedImage=void 0,this.selectedText=void 0,this.hasError=!1,this.timeZone=null,this.receiverCountryCode=salla.config.get("store.scope.countries")?.[0]||salla.config.get("store.store_country")||"SA",this.hostId="salla-gifting-"+Math.random().toString(36).slice(2,10),this.formSelector="form.product-form, form.form--product-options",salla.lang.onLoaded((()=>{this.selectImageOrUpload=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_for_your_gift"),this.sectionTitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love"),this.sectionSubtitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love_message"),this.sectionBtnText=salla.lang.get("blocks.buy_as_gift.send_as_a_gift"),this.giftDetails=salla.lang.get("blocks.buy_as_gift.gift_details"),this.selectGiftMessage=salla.lang.get("blocks.buy_as_gift.select_gift_message"),this.giftCustomText=salla.lang.get("blocks.buy_as_gift.gift_custom_text"),this.textId=salla.lang.get("blocks.buy_as_gift.text_id"),this.incorrectGiftText=salla.lang.get("blocks.buy_as_gift.incorrect_gift_text"),this.nextStep=salla.lang.get("blocks.buy_as_gift.next_step"),this.senderNameLabel=salla.lang.get("blocks.buy_as_gift.sender_name"),this.receiverNameFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_name"),this.receiverMobileFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_mobile"),this.receiverCountryFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_country"),this.ksa=salla.lang.get("pages.checkout.ksa"),this.selectCity=salla.lang.get("pages.checkout.select_city"),this.selectCountry=salla.lang.get("pages.checkout.select_country"),this.selectCityInfo=salla.lang.get("blocks.buy_as_gift.city_info"),this.receiverCityFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_city"),this.receiverRegionFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_region")||salla.lang.get("pages.checkout.region"),this.selectRegion=salla.lang.get("pages.checkout.select_region"),this.receiverEmailFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_email"),this.emailPlaceholder=salla.lang.get("common.elements.email_placeholder"),this.sendLater=salla.lang.get("blocks.buy_as_gift.send_later"),this.selectSendDateAndTime=salla.lang.get("blocks.buy_as_gift.select_send_date_and_time"),this.canNotEditOrderAfterSelectDate=salla.lang.get("blocks.buy_as_gift.can_not_edit_order_after_select_date"),this.sendGift=salla.lang.get("blocks.buy_as_gift.send_gift"),this.donationRequired=salla.lang.get("pages.products.donation_amount_required"),this.currentLang=salla.lang.locale})),salla.event.on(this.defaultEvent,(()=>{this.open()}))}componentDidLoad(){salla.event.product.onPriceUpdated((()=>{const s=document.querySelector(".s-quantity-input-input");this.quantity=s?.value}))}getFormDataFromForm(){if(!this.formSelector)return null;const s=document.querySelector(this.formSelector);return s?new FormData(s):null}mergeObjectToFormData(s,t,e){for(let i in s){if(!s.hasOwnProperty(i)||null==s[i])continue;const a=e?`${e}[${i}]`:i;"object"!=typeof s[i]||null===s[i]||s[i]instanceof File?t.set(a,s[i]):this.mergeObjectToFormData(s[i],t,a)}return t}async open(){if(salla.config.isGuest())return salla.api.auth.setAfterLoginEvent(this.defaultEvent),void salla.event.dispatch("login::open",{withoutReload:!0});await this.modal.open();const s=this.productId?()=>salla.product.getGiftProductDetails(this.productId):()=>salla.cart.getGiftCartDetails();return await salla.api.withoutNotifier(s).then((s=>{this.gift=s.data,this.senderName=this.gift.sender_name})).catch((s=>{this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||s.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}async setWrapperHeight(s=1,t=250,e=0,i=0){let a=document.querySelector(`#${this.hostId} .gift-step-${s}`);const l=()=>{this.stepsWrapper.style.height=i?i+"px":a.offsetHeight+e+"px"};this.step2Animated&&2===s?requestAnimationFrame(l):setTimeout(l,t)}toggleCalendar(){this.showCalendar=!this.showCalendar,this.setWrapperHeight(2,150,0)}toggleGiftText(s){this.textSelect?.classList.remove("s-form-has-error");let t=s.target.children[s.target.selectedIndex].getAttribute("data-id"),e="custom"==t;this.showGiftText=e,t?(this.selectedGiftTextOption=t,this.selectedText=e?void 0:s.target.value,this.setWrapperHeight(1,150,5)):(this.textArea.value="",this.selectedText=void 0,this.selectedGiftTextOption=void 0,this.setWrapperHeight(1,150,-15))}async goToStep2(){return this.selectedGiftTextOption?"custom"!=this.selectedGiftTextOption||this.selectedText?(this.textSelect.classList.remove("s-form-has-error"),this.customTextArea.classList.remove("s-form-has-error"),this.setWrapperHeight(2,600,0),(new a.timeline).add({targets:this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[1,0],translateX:[0,50],delay:a.stagger(70),duration:1200}).add({targets:".gift-step-2",translateX:["-110%",0],opacity:[0,1]},"-=1800").add({targets:this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[0,1],translateX:[-50,0],delay:a.stagger(70),duration:1200,complete:()=>{this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach((s=>{s.classList.remove("opacity-0"),s.removeAttribute("style")})),this.step2Animated=!0}},"-=1200"),this.currentStep=2,void(this.parentClass="is-current-step-"+this.currentStep)):(this.textSelect.classList.remove("s-form-has-error"),void this.customTextArea.classList.add("s-form-has-error")):(this.textSelect.classList.add("s-form-has-error"),void this.customTextArea.classList.remove("s-form-has-error"))}goToStep1(s){s.preventDefault();let t=new a.timeline({autoplay:!1});t.add({targets:this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[1,0],translateX:[0,-50],delay:a.stagger(70),duration:1200}).add({targets:".gift-step-1",translateX:["110%",0],opacity:[0,1]},"-=1800").add({targets:this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[0,1],translateX:[50,0],delay:a.stagger(70),duration:1200,complete:()=>{this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach((s=>{s.classList.remove("opacity-0"),s.removeAttribute("style")}))}},"-=1200"),t.play(),this.step2Animated=!1,this.setWrapperHeight(1,600,0),this.currentStep=1,this.parentClass="is-current-step-"+this.currentStep}getFilepondPlaceholder(){return`<div class="s-gifting-filepond-placeholder"><span class="s-gifting-filepond-placeholder-icon"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>images</title>\n<path d="M22.667 29.333h-13.333c-3.676 0-6.667-2.991-6.667-6.667v-13.333c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v13.333c0 5.145 4.187 9.333 9.333 9.333h13.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333zM22.667 5.333c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 10.667c-0.735 0-1.333-0.597-1.333-1.333s0.599-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.599 1.333-1.333 1.333zM25.333 0h-13.333c-3.676 0-6.667 2.991-6.667 6.667v13.333c0 1.055 0.268 2.040 0.707 2.927 0.039 0.099 0.088 0.188 0.151 0.277 1.137 2.053 3.301 3.463 5.809 3.463h13.333c3.676 0 6.667-2.991 6.667-6.667v-13.333c0-3.676-2.991-6.667-6.667-6.667zM12 24c-1.244 0-2.344-0.583-3.077-1.476l5.721-7.047 6.629 8.523zM29.333 20c0 2.205-1.795 4-4 4h-0.68l-8.933-11.485c-0.251-0.32-0.633-0.511-1.039-0.515h-0.015c-0.401 0-0.781 0.181-1.035 0.492l-5.632 6.935v-12.76c0-2.205 1.795-4 4-4h13.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n</span><p class="s-gifting-filepond-placeholder-text">${this.selectImageOrUpload?this.selectImageOrUpload:""}</p></div>`}setPreview(s){this.uploader?.classList.add("has-bg");var t=document.querySelector(`#${this.hostId}.filepond-bg`)?document.querySelector(`#${this.hostId} .filepond-bg`):document.createElement("div");t.classList.add("filepond-bg"),t.classList.remove("s-hidden"),t.style.backgroundImage="url('"+s.url+"')",this.uploader?.querySelector(".filepond--root")?.appendChild(t),this.uploadedImage=s.url,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}removePreview(){this.uploader.classList.remove("has-bg");let s=document.querySelector(`#${this.hostId} .filepond-bg`);s.removeAttribute("style"),s.classList.add("s-hidden"),this.handleRemoveImage()}handleTextAreaChange(s){this.selectedText=s.target.value,this.customTextArea.classList.remove("s-form-has-error")}clearError(s){if(this.errors?.[s]){const{[s]:t,...e}=this.errors;this.errors=e}}handleSenderName(s){this.senderName=s.target.value,this.clearError("sender_name")}handleReceiverName(s){this.receiverName=s.target.value,this.clearError("receiver.name")}handleReceiverCity(s){this.receiverCity=s.target.value,this.clearError("receiver.city_id")}async handleCountryChange(s){const t=Number(s.target.value);this.selectedCountryId=t,this.clearError("receiver.country");const e=this.gift?.countries?.find((s=>s.id==t));if(this.selectedCountryCode=e?.country_code,this.isKSA="SA"===e?.country_code,this.regions=[],this.selectedRegionId=void 0,this.gift={...this.gift,cities:[]},this.receiverCity=void 0,!t||0===this.gift?.countries?.length)return this.selectedCountryCode=void 0,this.isKSA=!1,void this.setWrapperHeight(2,0,0);if(this.isKSA){this.loadingRegions=!0,this.setWrapperHeight(2,0,0);try{const s=await salla.api.request(`shipping/countries/${t}/regions`);s&&s.data&&(this.regions=s.data)}catch(s){console.error("Error fetching regions:",s)}finally{this.loadingRegions=!1,this.setWrapperHeight(2,0,0)}}else{this.loadingCities=!0,this.setWrapperHeight(2,0,0);try{const s=await salla.api.request("shipping/cities?for_branch=0&country_id="+t);s&&s.data&&(this.gift={...this.gift,cities:s.data})}catch(s){console.error("Error fetching cities:",s)}finally{this.loadingCities=!1}}}async handleRegionChange(s){const t=Number(s.target.value);if(this.selectedRegionId=t,this.clearError("receiver.region"),this.gift={...this.gift,cities:[]},this.receiverCity=void 0,t){this.loadingCities=!0;try{const s=await salla.api.request(`shipping/cities?for_branch=0&country_id=${this.selectedCountryId}&region_id=${t}`);s&&s.data&&(this.gift={...this.gift,cities:s.data})}catch(s){console.error("Error fetching cities:",s)}finally{this.loadingCities=!1,this.setWrapperHeight(2,0,0)}}}handleUploadImage(s){this.uploadedImage=s,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}handleRemoveImage(){this.uploadedImage="",this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}handlePhoneInputChange(s){let t=s.detail;this.receiverMobile=t.number,this.receiverCountryCode=t.country_code,this.clearError("receiver.mobile")}handleDateTimePicker(s){this.deliveryDate=s.detail}getCalendarClasses(){return{"s-form-group":!0,"anime-item":!0,"s-gifting-calendar":!0,shown:this.showCalendar,hide:!this.showCalendar,"s-form-has-error":!!this.errors&&this.errors.deliver_at}}async submitForm(){const s=document.querySelector("#donating-amount")?.value;if(this.calendarFormGroup.classList.remove("s-form-has-error"),this.errors&&(this.errors={},this.setWrapperHeight(2,150,0)),this.showCalendar&&!this.deliveryDate)return void this.calendarFormGroup.classList.add("s-form-has-error");const t=[{key:"sender_name",value:this.senderName,label:this.senderNameLabel},{key:"receiver.name",value:this.receiverName,label:this.receiverNameFieldLabel},{key:"receiver.mobile",value:this.receiverMobile,label:this.receiverMobileFieldLabel},...this.physicalProducts?[{key:"receiver.country",value:this.selectedCountryId,label:this.receiverCountryFieldLabel},...this.isKSA?[{key:"receiver.region",value:this.selectedRegionId,label:this.receiverRegionFieldLabel}]:[],{key:"receiver.city_id",value:this.receiverCity,label:this.receiverCityFieldLabel}]:[]],e={};if(t.forEach((({key:s,value:t,label:i})=>{t||(e[s]=salla.lang.get("common.errors.field_required",{attribute:i}))})),Object.keys(e).length)return this.errors=e,void this.setWrapperHeight(2,150,0);const i={text:this.selectedText,sender_name:this.senderName,quantity:this.quantity,deliver_at:this.showCalendar?this.deliveryDate:null,image_url:this.uploadedImage??this.selectedImage,donation_amount:s||null,receiver:{name:this.receiverName,mobile_country_code:this.receiverCountryCode,mobile:this.receiverMobile,...this.physicalProducts&&this.selectedCountryCode?{country_code:this.selectedCountryCode}:{},...this.physicalProducts&&this.selectedRegionId?{region_id:this.selectedRegionId}:{},...this.receiverCity&&this.physicalProducts?{city_id:this.receiverCity}:{}},has_apple_pay:salla.helpers.hasApplePay()};let a;this.productId&&this.formSelector&&(a=this.getFormDataFromForm()||new FormData,a=this.mergeObjectToFormData(i,a));const l=this.productId?()=>salla.product.addProductGiftToCart(this.productId,a,!0):()=>salla.cart.addCartGiftToCart(i,!0);return await l().then((()=>this.modal.close())).catch((s=>{s.response&&422==s.response.status?this.errors=s.response.data.error.fields:console.log(s),this.setWrapperHeight(2,150,0)}))}step2ItemClass(s=""){const t="anime-item"+(this.step2Animated?"":" opacity-0");return s?`${s} ${t}`:t}generateClass(){return{"s-gifting-widget":!0,"s-gifting-widget-vertical":!!this.vertical,"s-gifting-widget-horizontal":!this.vertical}}async handleGiftButtonClick(){if(this.productId&&this.formSelector){const s=document.querySelector(this.formSelector);if(!s)return void console.error("SallaGifting:: Form not found in the document!");if(!(s instanceof HTMLFormElement))return void console.error("SallaGifting:: The specified selector does not correspond to a form tag!");if(!s.reportValidity())return console.error("SallaGifting:: Form is not valid!"),void salla.error(salla.lang.get("common.messages.required_fields"))}const s=document.querySelector(`salla-product-options[product-id="${this.productId}"]`);!s||await s.reportValidity()?this.open():salla.error(salla.lang.get("common.messages.required_fields"))}render(){return[i("div",{key:"5d0eec8210f77d166c144704ec78bffcaf1f4ce0"},i("salla-list-tile",{key:"19cc20b4f70bbb8a7d267f60052db77589901962",class:this.generateClass()},i("div",{key:"1c3c52b5ac48e71a6ac26c60494657ac28d16457",slot:"title"},this.vertical?i("span",{innerHTML:b}):"",i("h3",{key:"e3379fb3ed39d1bc63500346058b26b883c3be13"},this.widgetTitle?this.widgetTitle:this.sectionTitle)),i("div",{key:"f6c2a522727546aa27cef725faa8be082da063da",slot:"subtitle"},i("div",{key:"7b58ad967f39fa2cc660369b72e73f8dc49f90dc"},this.widgetSubtitle?this.widgetSubtitle:this.sectionSubtitle)),i("div",{key:"848396dcd6ce6009ebc4cf1a209a055ad1adbf15",slot:"action"},i("salla-button",{key:"2ba69b670f1c958784c6f1dca6b2dd0b93f20859",color:"primary",fill:"outline",width:"wide",class:"s-gifting-widget-action",onClick:()=>this.handleGiftButtonClick()},i("slot",{key:"6ac9ac339e321fc9433465cfd75f299307ee7152",name:"widget-btn-content"},i("div",{key:"c61dd36375886c1ecf87f115e5248dca1af7efc9",class:"s-gifting-widget-action-content"},i("span",{key:"0c8a3630ba6b15889fc4bf3d55a1279cdf713400",innerHTML:b}),"  ",i("span",{key:"c9299ec752e5393f30a78e1e01d367be9e97ca50"},this.sectionBtnText)))))),i("salla-modal",{key:"9ee17e79f97eee59d25d9627d5b1cd4ada7cadb3",id:this.hostId,isLoading:!0,class:"s-gifting-modal",width:"sm",ref:s=>this.modal=s},i("div",{key:"aba3b6a4d3e903934c9b5e629119c3a3b5bc90ab",slot:"loading"},i("div",{key:"e03613cc85bf4024f63d2e256a2744ec78f7eabf",class:"s-gifting-skeleton"},i("div",{key:"01156691d540ce5ef5723902610a1da27fba3ddb",class:"s-gifting-modal-header"},i("salla-skeleton",{key:"e45b4868e4fa5633aeb22f758f75f5412290b179",type:"circle",height:"5rem",width:"5rem"}),i("h2",{key:"2b427d38dd6e0569e16de84ef46eb2052d23b739",class:"s-gifting-modal-title"},i("div",{key:"c4f9cb6f513e3ebd2e6ad209648a1f70bcafbcb5",class:"s-gifting-modal-badge-wrapper"},i("salla-skeleton",{key:"e684b682a4cca89262128cca13604b7aa9a83cd7",height:"15px",width:"150px"})))),i("div",{key:"2941865d68cd216b4dd82bb8279f6bcbaa062bf3",class:"s-gifting-skeleton-content"},i("salla-skeleton",{key:"7c4f4235a666930ceef3dc0b38809aea5ee5ce5c",height:"10px",width:"150px"}),i("salla-skeleton",{key:"0257f401762a11b0bf3da7db603b4e5f57bd1aae",height:"230px"}),i("salla-skeleton",{key:"cced26b189549fcee4eff3a3fbd943a5735b4c6c",height:"10px",width:"150px"}),i("salla-skeleton",{key:"f5893e5c631564c91bfe42c4102190d43f913947",height:"30px"}),i("salla-skeleton",{key:"64d3738017cf6732b429848c1de4ca16db1adc06",height:"40px"})))),i("slot",{key:"77d5bda8147f7f09d73b97fd7456121626b465a7",name:"header"}),this.hasError?i("salla-placeholder",{alignment:"center"},i("span",{slot:"title"},this.errorMessage||salla.lang.get("common.errors.empty_results")),i("span",{slot:"description"}," ")):[i("div",{class:"s-gifting-modal-header"},i("span",{class:"s-gifting-modal-icon"},i("span",{innerHTML:b})),i("h2",{class:"s-gifting-modal-title"},i("div",{class:"s-gifting-modal-badge-wrapper"},i("div",{class:"s-gifting-modal-badge"},i("span",null,i("span",null,this.currentStep),"/2")),i("span",null,this.giftDetails)))),i("div",{class:"s-gifting-steps-wrapper "+this.parentClass,ref:s=>this.stepsWrapper=s},i("div",{class:"s-gifting-step-one gift-step-1",ref:s=>this.step1Elems=s},i("div",{class:"s-gifting-modal-uploader-title anime-item"},this.selectImageForYourGift),i("div",{class:"s-gifting-modal-uploader anime-item",ref:s=>this.uploader=s},i("span",{class:"s-gifting-remove-preview",onClick:()=>this.removePreview(),innerHTML:o}),this.selectImageOrUpload&&i("salla-file-upload",{"instant-upload":!0,name:"image_url",url:salla.url.api(salla.product.api.getUrl("giftImage")),onUploaded:s=>this.handleUploadImage(s.detail),labelIdle:this.getFilepondPlaceholder(),onRemoved:()=>this.handleRemoveImage()})),i("div",{class:"anime-item"},!this.uploadedImage&&this.gift&&this.gift.gift_images&&this.gift.gift_images.length>0?i("salla-slider",{id:"gifting-slider",loop:!1,"controls-outer":!0,class:"s-gifting-slider",type:"carousel"},i("div",{slot:"items"},this.gift&&this.gift.gift_images?this.gift?.gift_images.map((s=>i("a",{class:"s-gifting-clickable s-gifting-image",onClick:()=>this.setPreview(s)},i("img",{style:{width:"120px"},src:s.url,alt:""+s.id})))):"")):""),i("div",{class:"anime-item"},i("div",{class:"s-form-group s-gifting-selectText",ref:s=>this.textSelect=s},i("select",{id:"gift-text-selection",name:"gift-text-selection",class:"s-form-control s-gifting-select",onChange:s=>this.toggleGiftText(s)},i("option",{"data-id":null,selected:!0},this.selectGiftMessage),this.gift&&this.gift.gift_texts?this.gift?.gift_texts.map((s=>i("option",{"data-id":s.id,value:s.text,key:s.id},s.text))):"",i("option",{"data-id":"custom"},this.giftCustomText))),i("div",{class:this.showGiftText?"s-form-group s-gifting-textarea shown":"s-form-group s-gifting-textarea hide",ref:s=>this.customTextArea=s},i("label",{htmlFor:"gift-custom-text",class:"s-form-label"},this.giftCustomText),i("div",{class:"mt-1"},i("textarea",{onInput:s=>this.handleTextAreaChange(s),rows:4,ref:s=>this.textArea=s,name:"gift-custom-text",id:"gift-custom-text",class:"s-form-control"})))),i("div",{class:"anime-item"},i("salla-button",{color:"primary",width:"wide",onClick:()=>this.goToStep2()},i("span",null,this.nextStep)))),i("div",{class:"s-gifting-step-two gift-step-2",ref:s=>this.step2Elems=s},i("div",{class:this.step2ItemClass(this.errors?.sender_name?"s-form-group s-form-has-error":"s-form-group")},i("label",{htmlFor:"sender_name",class:"s-form-label"},this.senderNameLabel),i("input",{type:"text",class:"s-form-control",name:"sender_name",id:"sender_name",value:this.senderName,onInput:s=>this.handleSenderName(s),placeholder:""}),this.errors&&this.errors.sender_name?i("span",{class:"s-gifting-error"},this.errors.sender_name):""),i("div",{class:this.step2ItemClass(this.errors?.["receiver.name"]?"s-form-group s-form-has-error":"s-form-group")},i("label",{htmlFor:"receiver_name",class:"s-form-label"},this.receiverNameFieldLabel),i("input",{type:"text",class:"s-form-control",name:"receiver_name",id:"receiver_name",value:"",onInput:s=>this.handleReceiverName(s),placeholder:""}),this.errors&&this.errors["receiver.name"]?i("span",{class:"s-gifting-error"},this.errors["receiver.name"]):""),i("div",{class:this.step2ItemClass(this.errors?.["receiver.mobile"]?"s-form-group s-form-has-error":"s-form-group")},i("label",{class:"s-form-label"},this.receiverMobileFieldLabel),i("salla-tel-input",{class:"s-gifting-tel-input",phone:this.receiverMobile,countryCode:this.receiverCountryCode,onPhoneEntered:s=>this.handlePhoneInputChange(s)}),this.errors&&this.errors["receiver.mobile"]?i("span",{class:"s-gifting-error"},this.errors["receiver.mobile"]):""),this.physicalProducts&&i("div",{class:this.step2ItemClass(this.errors?.["receiver.country"]?"s-form-group s-form-has-error":"s-form-group")},i("label",{class:"s-form-label"},this.receiverCountryFieldLabel),i("select",{name:"country",class:"s-form-control",onChange:s=>this.handleCountryChange(s),required:!0},i("option",{value:""},this.selectCountry),this.gift?.countries?.map((s=>i("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.country"]?i("span",{class:"s-gifting-error"},this.errors["receiver.country"]):""),this.physicalProducts&&this.isKSA&&i("div",{class:this.step2ItemClass(this.errors?.["receiver.region"]?"s-form-group s-form-has-error":"s-form-group")},i("label",{class:"s-form-label"},this.receiverRegionFieldLabel),i("select",{name:"region",class:"s-form-control",onChange:s=>this.handleRegionChange(s),disabled:this.loadingRegions},i("option",{value:"",selected:!0},this.loadingRegions?salla.lang.get("common.elements.loading"):this.selectRegion),this.regions?.map((s=>i("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.region"]?i("span",{class:"s-gifting-error"},this.errors["receiver.region"]):""),this.physicalProducts&&i("div",{class:this.step2ItemClass(this.errors?.["receiver.city_id"]?"s-form-group s-form-has-error":"s-form-group")},i("label",{class:"s-form-label"},this.receiverCityFieldLabel),i("select",{name:"city","aria-label":salla.lang.get("blocks.buy_as_gift.select_city"),class:"s-form-control",onChange:s=>this.handleReceiverCity(s),disabled:this.loadingCities||this.isKSA&&!this.selectedRegionId},i("option",{value:"",selected:!0},this.loadingCities?salla.lang.get("common.elements.loading"):this.selectCity),this.gift?.cities?.map((s=>i("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.city_id"]?i("span",{class:"s-gifting-error"},this.errors["receiver.city_id"]):""),this.physicalProducts&&i("div",{class:this.step2ItemClass("s-gifting-info")},i("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>alert</title>\n<path d="M16 13.333c-0.736 0-1.333 0.597-1.333 1.333v8c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-8c0-0.736-0.597-1.333-1.333-1.333zM16 9.327c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM27.313 4.687c-6.237-6.237-16.389-6.239-22.628 0-6.237 6.239-6.237 16.389 0 22.628 3.119 3.119 7.216 4.679 11.313 4.679s8.195-1.559 11.313-4.679c6.24-6.239 6.24-16.391 0.001-22.628zM25.428 25.428c-5.199 5.197-13.657 5.197-18.857 0-5.197-5.199-5.197-13.659 0-18.857 5.199-5.197 13.659-5.197 18.857 0 5.199 5.2 5.199 13.659 0 18.857z"></path>\n</svg>\n'}),i("span",null,this.selectCityInfo)),!this.physicalProducts&&i("div",{class:this.step2ItemClass()},i("label",{class:"s-gifting-schedule s-gifting-clickable",htmlFor:"schedule-"+this.hostId},i("input",{type:"checkbox",name:"schedule",id:"schedule-"+this.hostId,onChange:()=>this.toggleCalendar(),class:"s-checkbox"}),i("span",{class:"s-form-label"}," ",this.sendLater," "))),i("div",{class:this.getCalendarClasses(),ref:s=>this.calendarFormGroup=s},i("label",{class:"s-form-label"},this.selectSendDateAndTime),i("salla-datetime-picker",{value:this.deliveryDate,placeholder:this.selectSendDateAndTime,"enable-time":!0,"date-format":"Y-m-d h:i K",onPicked:s=>this.handleDateTimePicker(s)}),i("span",{class:"s-gifting-calendar-hint"},this.canNotEditOrderAfterSelectDate)),i("div",{class:this.step2ItemClass("s-gifting-step-two-footer")},i("a",{href:"#!",innerHTML:l,onClick:s=>this.goToStep1(s)}),i("salla-button",{onClick:()=>this.submitForm(),color:"primary",width:"wide"},i("span",null,this.sendGift)))))],i("slot",{key:"46da7ff69a3c10b75886a23936f2f9ad8ad0e7bf",name:"footer"})))]}static get style(){return".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}"}},[260,"salla-gifting",{productId:[2,"product-id"],widgetTitle:[1,"widget-title"],widgetSubtitle:[1,"widget-subtitle"],physicalProducts:[4,"physical-products"],vertical:[4],formSelector:[1025,"form-selector"],sectionTitle:[32],sectionSubtitle:[32],sectionBtnText:[32],giftDetails:[32],selectImageForYourGift:[32],selectImageOrUpload:[32],selectGiftMessage:[32],giftCustomText:[32],textId:[32],incorrectGiftText:[32],nextStep:[32],senderNameLabel:[32],receiverNameFieldLabel:[32],receiverMobileFieldLabel:[32],receiverCountryFieldLabel:[32],ksa:[32],selectCountry:[32],selectCity:[32],selectCityInfo:[32],receiverCityFieldLabel:[32],receiverRegionFieldLabel:[32],selectRegion:[32],receiverEmailFieldLabel:[32],emailPlaceholder:[32],sendLater:[32],selectSendDateAndTime:[32],canNotEditOrderAfterSelectDate:[32],sendGift:[32],donationRequired:[32],currentStep:[32],showCalendar:[32],showGiftText:[32],currentLang:[32],parentClass:[32],errors:[32],gift:[32],selectedGiftTextOption:[32],selectedCountryId:[32],selectedCountryCode:[32],loadingCities:[32],loadingRegions:[32],regions:[32],selectedRegionId:[32],isKSA:[32],parsedFormData:[32],showTextArea:[32],selectedImage:[32],uploadedImage:[32],selectedText:[32],senderName:[32],errorMessage:[32],hasError:[32],quantity:[32],deliveryDate:[32],timeZone:[32],receiverName:[32],receiverMobile:[32],receiverCountryCode:[32],receiverEmail:[32],hostId:[32],receiverCity:[32],open:[64],close:[64],goToStep2:[64]}]);function y(){"undefined"!=typeof customElements&&["salla-gifting","salla-button","salla-datetime-picker","salla-file-upload","salla-list-tile","salla-loading","salla-modal","salla-placeholder","salla-skeleton","salla-slider","salla-tel-input"].forEach((t=>{switch(t){case"salla-gifting":customElements.get(s(t))||customElements.define(s(t),v);break;case"salla-button":customElements.get(s(t))||r();break;case"salla-datetime-picker":customElements.get(s(t))||c();break;case"salla-file-upload":customElements.get(s(t))||n();break;case"salla-list-tile":customElements.get(s(t))||h();break;case"salla-loading":customElements.get(s(t))||d();break;case"salla-modal":customElements.get(s(t))||g();break;case"salla-placeholder":customElements.get(s(t))||f();break;case"salla-skeleton":customElements.get(s(t))||m();break;case"salla-slider":customElements.get(s(t))||u();break;case"salla-tel-input":customElements.get(s(t))||p()}}))}y();const _=v,k=y;export{_ as SallaGifting,k as defineCustomElement}
4
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
5
+ import { a as anime } from './anime.es.js';
6
+ import { I as IconArrowLeft } from './arrow-left.js';
7
+ import { C as Cancel } from './cancel.js';
8
+ import { d as defineCustomElement$b } from './salla-button2.js';
9
+ import { d as defineCustomElement$a } from './salla-datetime-picker2.js';
10
+ import { d as defineCustomElement$9 } from './salla-file-upload2.js';
11
+ import { d as defineCustomElement$8 } from './salla-list-tile2.js';
12
+ import { d as defineCustomElement$7 } from './salla-loading2.js';
13
+ import { d as defineCustomElement$6 } from './salla-modal2.js';
14
+ import { d as defineCustomElement$5 } from './salla-placeholder2.js';
15
+ import { d as defineCustomElement$4 } from './salla-skeleton2.js';
16
+ import { d as defineCustomElement$3 } from './salla-slider2.js';
17
+ import { d as defineCustomElement$2 } from './salla-tel-input2.js';
18
+
19
+ var Images = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
20
+ <title>images</title>
21
+ <path d="M22.667 29.333h-13.333c-3.676 0-6.667-2.991-6.667-6.667v-13.333c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v13.333c0 5.145 4.187 9.333 9.333 9.333h13.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333zM22.667 5.333c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 10.667c-0.735 0-1.333-0.597-1.333-1.333s0.599-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.599 1.333-1.333 1.333zM25.333 0h-13.333c-3.676 0-6.667 2.991-6.667 6.667v13.333c0 1.055 0.268 2.040 0.707 2.927 0.039 0.099 0.088 0.188 0.151 0.277 1.137 2.053 3.301 3.463 5.809 3.463h13.333c3.676 0 6.667-2.991 6.667-6.667v-13.333c0-3.676-2.991-6.667-6.667-6.667zM12 24c-1.244 0-2.344-0.583-3.077-1.476l5.721-7.047 6.629 8.523zM29.333 20c0 2.205-1.795 4-4 4h-0.68l-8.933-11.485c-0.251-0.32-0.633-0.511-1.039-0.515h-0.015c-0.401 0-0.781 0.181-1.035 0.492l-5.632 6.935v-12.76c0-2.205 1.795-4 4-4h13.333c2.205 0 4 1.795 4 4z"></path>
22
+ </svg>
23
+ `;
24
+
25
+ var GiftSharing = `<!-- Generated by IcoMoon.io -->
26
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
27
+ <title>gift-sharing</title>
28
+ <path d="M5 32h-4c-0.552 0-1-0.448-1-1v0-14c0-0.552 0.448-1 1-1v0h4c0.552 0 1 0.448 1 1v0 14c0 0.552-0.448 1-1 1v0zM2 30h2v-12h-2zM19.32 30h-14.32v-2h14.32c0.693-0.005 1.329-0.242 1.837-0.637l-0.007 0.005 8.45-6.568c0.216-0.16 0.365-0.402 0.399-0.679l0-0.005c0.005-0.036 0.007-0.077 0.007-0.119 0-0.226-0.078-0.434-0.209-0.599l0.002 0.002c-0.16-0.216-0.401-0.364-0.677-0.399l-0.005-0.001c-0.034-0.004-0.073-0.007-0.113-0.007-0.227 0-0.436 0.078-0.601 0.208l0.002-0.002-7.126 5.526c-1.003 0.793-2.285 1.273-3.68 1.274h-6.6v-2h6.6c0.926-0.001 1.777-0.32 2.45-0.852l-0.008 0.006 7.126-5.526c0.492-0.39 1.122-0.625 1.807-0.625 0.135 0 0.268 0.009 0.398 0.027l-0.015-0.002c0.824 0.102 1.534 0.524 2.011 1.137l0.005 0.007c0.39 0.494 0.625 1.127 0.625 1.814 0 0.136-0.009 0.27-0.027 0.402l0.002-0.015c-0.106 0.819-0.529 1.523-1.141 1.995l-0.007 0.005-8.458 6.578c-0.834 0.649-1.894 1.043-3.047 1.050h-0.002zM11 26c-0.552 0-1-0.448-1-1s0.448-1 1-1v0c2.406-0.004 4.415-1.703 4.894-3.967l0.006-0.033h-10.9c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h12c0.552 0 1 0.448 1 1v0c0 3.866-3.134 7-7 7v0zM24 12h-16c-1.105 0-2-0.895-2-2v0-2c0-1.105 0.895-2 2-2v0h16c1.105 0 2 0.895 2 2v0 2c0 1.105-0.895 2-2 2v0zM24 10v0zM8 8v2h16v-2zM23 18c-0.552 0-1-0.448-1-1v0-6c0-0.552 0.448-1 1-1s1 0.448 1 1v0 6c0 0.552-0.448 1-1 1v0zM9 16c-0.552 0-1-0.448-1-1v0-4c0-0.552 0.448-1 1-1s1 0.448 1 1v0 4c0 0.552-0.448 1-1 1v0zM16 16c-0.552 0-1-0.448-1-1v0-8c0-0.552 0.448-1 1-1s1 0.448 1 1v0 8c0 0.552-0.448 1-1 1v0zM16 8c-0.552-0-1-0.448-1-1 0-0.077 0.009-0.151 0.025-0.223l-0.001 0.007c0.314-1.849 0.963-3.5 1.887-4.961l-0.033 0.055c0.539-0.521 1.274-0.842 2.084-0.842 1.657 0 3 1.343 3 3 0 0.81-0.321 1.545-0.843 2.085l0.001-0.001c-1.405 0.891-3.056 1.541-4.824 1.845l-0.080 0.011c-0.065 0.015-0.139 0.024-0.216 0.024h-0zM19 3c-0.001 0-0.001 0-0.002 0-0.276 0-0.525 0.112-0.706 0.292l0-0c-0.391 0.669-0.703 1.444-0.897 2.264l-0.011 0.058c0.878-0.205 1.653-0.517 2.363-0.93l-0.041 0.022c0.18-0.181 0.292-0.43 0.292-0.706 0-0.551-0.446-0.999-0.998-1h-0zM16 8c-0.077-0-0.151-0.009-0.223-0.025l0.007 0.001c-1.848-0.315-3.499-0.965-4.959-1.888l0.055 0.032c-0.521-0.539-0.842-1.274-0.842-2.084 0-1.657 1.343-3 3-3 0.81 0 1.545 0.321 2.085 0.843l-0.001-0.001c0.891 1.405 1.541 3.056 1.845 4.824l0.011 0.080c0.015 0.066 0.024 0.141 0.024 0.218 0 0.552-0.448 1-1 1-0.001 0-0.001 0-0.002 0h0zM13 3c-0.001 0-0.001 0-0.002 0-0.552 0-1 0.448-1 1 0 0.277 0.112 0.527 0.294 0.708l0 0c0.669 0.391 1.444 0.703 2.264 0.897l0.058 0.011c-0.205-0.878-0.517-1.653-0.93-2.363l0.022 0.041c-0.181-0.181-0.43-0.293-0.706-0.294h-0z"></path>
29
+ </svg>
30
+ `;
31
+
32
+ var Alert = `<!-- Generated by IcoMoon.io -->
33
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
34
+ <title>alert</title>
35
+ <path d="M16 13.333c-0.736 0-1.333 0.597-1.333 1.333v8c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-8c0-0.736-0.597-1.333-1.333-1.333zM16 9.327c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM27.313 4.687c-6.237-6.237-16.389-6.239-22.628 0-6.237 6.239-6.237 16.389 0 22.628 3.119 3.119 7.216 4.679 11.313 4.679s8.195-1.559 11.313-4.679c6.24-6.239 6.24-16.391 0.001-22.628zM25.428 25.428c-5.199 5.197-13.657 5.197-18.857 0-5.197-5.199-5.197-13.659 0-18.857 5.199-5.197 13.659-5.197 18.857 0 5.199 5.2 5.199 13.659 0 18.857z"></path>
36
+ </svg>
37
+ `;
38
+
39
+ const sallaGiftingCss = ".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}";
40
+
41
+ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting extends HTMLElement {
42
+ constructor() {
43
+ super();
44
+ this.__registerHost();
45
+ this.defaultEvent = "gifting:open";
46
+ this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_or_upload');
47
+ this.currentStep = 1;
48
+ this.showCalendar = false;
49
+ this.showGiftText = false;
50
+ this.currentLang = '';
51
+ this.parentClass = "is-current-step-1";
52
+ this.errors = {};
53
+ this.gift = undefined;
54
+ this.selectedGiftTextOption = undefined;
55
+ this.selectedCountryId = undefined;
56
+ this.selectedCountryCode = undefined;
57
+ this.loadingCities = false;
58
+ this.loadingRegions = false;
59
+ this.regions = [];
60
+ this.selectedRegionId = undefined;
61
+ this.isKSA = false;
62
+ this.step2Animated = false;
63
+ this.showTextArea = false;
64
+ /// Gift Form Data
65
+ this.selectedImage = undefined;
66
+ this.uploadedImage = undefined;
67
+ this.selectedText = undefined;
68
+ this.hasError = false;
69
+ this.timeZone = null;
70
+ this.receiverCountryCode = salla.config.get('store.scope.countries')?.[0] || salla.config.get('store.store_country') || 'SA';
71
+ this.hostId = `salla-gifting-${Math.random().toString(36).slice(2, 10)}`;
72
+ /**
73
+ * The form selector to be used to get the form data
74
+ */
75
+ this.formSelector = 'form.product-form, form.form--product-options';
76
+ salla.lang.onLoaded(() => {
77
+ this.selectImageOrUpload = salla.lang.get('blocks.buy_as_gift.select_image_or_upload');
78
+ this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');
79
+ this.sectionTitle = salla.lang.get('blocks.buy_as_gift.gift_the_one_you_love');
80
+ this.sectionSubtitle = salla.lang.get('blocks.buy_as_gift.gift_the_one_you_love_message');
81
+ this.sectionBtnText = salla.lang.get('blocks.buy_as_gift.send_as_a_gift');
82
+ this.giftDetails = salla.lang.get('blocks.buy_as_gift.gift_details');
83
+ this.selectGiftMessage = salla.lang.get('blocks.buy_as_gift.select_gift_message');
84
+ this.giftCustomText = salla.lang.get('blocks.buy_as_gift.gift_custom_text');
85
+ this.textId = salla.lang.get('blocks.buy_as_gift.text_id');
86
+ this.incorrectGiftText = salla.lang.get('blocks.buy_as_gift.incorrect_gift_text');
87
+ this.nextStep = salla.lang.get('blocks.buy_as_gift.next_step');
88
+ this.senderNameLabel = salla.lang.get('blocks.buy_as_gift.sender_name');
89
+ this.receiverNameFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_name');
90
+ this.receiverMobileFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_mobile');
91
+ this.receiverCountryFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_country');
92
+ this.ksa = salla.lang.get('pages.checkout.ksa');
93
+ this.selectCity = salla.lang.get('pages.checkout.select_city');
94
+ this.selectCountry = salla.lang.get('pages.checkout.select_country');
95
+ this.selectCityInfo = salla.lang.get('blocks.buy_as_gift.city_info');
96
+ this.receiverCityFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_city');
97
+ this.receiverRegionFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_region') || salla.lang.get('pages.checkout.region');
98
+ this.selectRegion = salla.lang.get('pages.checkout.select_region');
99
+ this.receiverEmailFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_email');
100
+ this.emailPlaceholder = salla.lang.get('common.elements.email_placeholder');
101
+ this.sendLater = salla.lang.get('blocks.buy_as_gift.send_later');
102
+ this.selectSendDateAndTime = salla.lang.get('blocks.buy_as_gift.select_send_date_and_time');
103
+ this.canNotEditOrderAfterSelectDate = salla.lang.get('blocks.buy_as_gift.can_not_edit_order_after_select_date');
104
+ this.sendGift = salla.lang.get('blocks.buy_as_gift.send_gift');
105
+ this.donationRequired = salla.lang.get('pages.products.donation_amount_required');
106
+ this.currentLang = salla.lang.locale;
107
+ });
108
+ salla.event.on(this.defaultEvent, () => {
109
+ this.open();
110
+ });
111
+ }
112
+ isPhysical() {
113
+ return this.physicalProducts || this.physical;
114
+ }
115
+ componentDidLoad() {
116
+ salla.event.product.onPriceUpdated(() => {
117
+ const quantityInput = document.querySelector(`.s-quantity-input-input`);
118
+ // @ts-ignore
119
+ this.quantity = quantityInput?.value;
120
+ });
121
+ }
122
+ getFormDataFromForm() {
123
+ if (!this.formSelector)
124
+ return null;
125
+ const form = document.querySelector(this.formSelector);
126
+ if (!form)
127
+ return null;
128
+ return new FormData(form);
129
+ }
130
+ mergeObjectToFormData(obj, formData, namespace) {
131
+ for (let property in obj) {
132
+ if (!obj.hasOwnProperty(property) || obj[property] === undefined || obj[property] === null)
133
+ continue;
134
+ const formKey = namespace ? `${namespace}[${property}]` : property;
135
+ if (typeof obj[property] === 'object' && obj[property] !== null && !(obj[property] instanceof File)) {
136
+ this.mergeObjectToFormData(obj[property], formData, formKey);
137
+ }
138
+ else {
139
+ formData.set(formKey, obj[property]);
140
+ }
141
+ }
142
+ return formData;
143
+ }
144
+ /**
145
+ * Show / Open the gifting modal window
146
+ */
147
+ async open() {
148
+ if (salla.config.isGuest()) {
149
+ salla.api.auth.setAfterLoginEvent(this.defaultEvent);
150
+ salla.event.dispatch('login::open', { withoutReload: true });
151
+ return;
152
+ }
153
+ await this.modal.open();
154
+ // Determine the appropriate method to call based on the `physicalProducts` flag
155
+ const giftDetailsMethod = this.productId ? () => salla.product.getGiftProductDetails(this.productId) : () => salla.cart.getGiftCartDetails();
156
+ return await salla.api.withoutNotifier(giftDetailsMethod)
157
+ .then((response) => {
158
+ this.gift = response.data;
159
+ this.senderName = this.gift.sender_name;
160
+ })
161
+ .catch(e => {
162
+ this.hasError = true;
163
+ this.errorMessage = e.response?.data?.error?.message || e.response?.data;
164
+ })
165
+ .finally(() => this.modal.stopLoading());
166
+ }
167
+ /**
168
+ *
169
+ * Hide / close the gifting modal window
170
+ */
171
+ async close() {
172
+ return this.modal.close();
173
+ }
174
+ /**
175
+ * Update the modal height based on the changes on the inner elements height for a specific step OR just a pass a new fixed height
176
+ */
177
+ async setWrapperHeight(asStep = 1, delay = 250, additionSpace = 0, newHeight = 0) {
178
+ let currentStep = document.querySelector(`#${this.hostId} .gift-step-${asStep}`);
179
+ const updateHeight = () => {
180
+ let currentStepHeight = currentStep.offsetHeight;
181
+ if (newHeight) {
182
+ this.stepsWrapper.style.height = `${newHeight}px`;
183
+ }
184
+ else {
185
+ this.stepsWrapper.style.height = currentStepHeight + additionSpace + 'px';
186
+ }
187
+ };
188
+ if (this.step2Animated && asStep === 2) {
189
+ requestAnimationFrame(updateHeight);
190
+ }
191
+ else {
192
+ setTimeout(updateHeight, delay);
193
+ }
194
+ }
195
+ toggleCalendar() {
196
+ this.showCalendar = !this.showCalendar;
197
+ this.setWrapperHeight(2, 150, 0);
198
+ }
199
+ toggleGiftText(event) {
200
+ this.textSelect?.classList.remove('s-form-has-error');
201
+ let dataID = event.target.children[event.target.selectedIndex].getAttribute('data-id');
202
+ let customID = dataID == "custom";
203
+ this.showGiftText = customID;
204
+ if (dataID) {
205
+ this.selectedGiftTextOption = dataID;
206
+ customID ? this.selectedText = undefined : this.selectedText = event.target.value;
207
+ this.setWrapperHeight(1, 150, 5);
208
+ }
209
+ else {
210
+ // empty textarea value
211
+ this.textArea.value = '';
212
+ this.selectedText = undefined;
213
+ this.selectedGiftTextOption = undefined;
214
+ this.setWrapperHeight(1, 150, -15);
215
+ }
216
+ }
217
+ /**
218
+ *
219
+ * Go to the step 2
220
+ */
221
+ async goToStep2() {
222
+ if (!this.selectedGiftTextOption) {
223
+ this.textSelect.classList.add('s-form-has-error');
224
+ this.customTextArea.classList.remove('s-form-has-error');
225
+ return;
226
+ }
227
+ else if (this.selectedGiftTextOption == 'custom' && !this.selectedText) {
228
+ this.textSelect.classList.remove('s-form-has-error');
229
+ this.customTextArea.classList.add('s-form-has-error');
230
+ return;
231
+ }
232
+ else {
233
+ this.textSelect.classList.remove('s-form-has-error');
234
+ this.customTextArea.classList.remove('s-form-has-error');
235
+ }
236
+ this.setWrapperHeight(2, 600, 0);
237
+ let stepNextAnime = new anime.timeline();
238
+ stepNextAnime.add({
239
+ targets: this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),
240
+ opacity: [1, 0],
241
+ translateX: [0, 50],
242
+ delay: anime.stagger(70),
243
+ // easing: 'easeOutExpo',
244
+ duration: 1200,
245
+ })
246
+ .add({
247
+ targets: '.gift-step-2',
248
+ translateX: ['-110%', 0],
249
+ opacity: [0, 1],
250
+ }, '-=1800')
251
+ .add({
252
+ targets: this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),
253
+ opacity: [0, 1],
254
+ translateX: [-50, 0],
255
+ delay: anime.stagger(70),
256
+ duration: 1200,
257
+ complete: () => {
258
+ this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach(item => {
259
+ item.classList.remove('opacity-0');
260
+ item.removeAttribute('style');
261
+ });
262
+ this.step2Animated = true;
263
+ }
264
+ }, '-=1200');
265
+ this.currentStep = 2;
266
+ this.parentClass = `is-current-step-${this.currentStep}`;
267
+ }
268
+ /**
269
+ *
270
+ * Go to the step 1
271
+ */
272
+ goToStep1(e) {
273
+ e.preventDefault();
274
+ let stepBackAnime = new anime.timeline({
275
+ autoplay: false,
276
+ });
277
+ stepBackAnime.add({
278
+ targets: this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),
279
+ opacity: [1, 0],
280
+ translateX: [0, -50],
281
+ delay: anime.stagger(70),
282
+ // easing: 'easeOutExpo',
283
+ duration: 1200,
284
+ })
285
+ .add({
286
+ targets: '.gift-step-1',
287
+ translateX: ['110%', 0],
288
+ opacity: [0, 1],
289
+ }, '-=1800')
290
+ .add({
291
+ targets: this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),
292
+ opacity: [0, 1],
293
+ translateX: [50, 0],
294
+ delay: anime.stagger(70),
295
+ duration: 1200,
296
+ complete: () => {
297
+ this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach(item => {
298
+ item.classList.remove('opacity-0');
299
+ item.removeAttribute('style');
300
+ });
301
+ }
302
+ }, '-=1200');
303
+ stepBackAnime.play();
304
+ this.step2Animated = false;
305
+ this.setWrapperHeight(1, 600, 0);
306
+ this.currentStep = 1;
307
+ this.parentClass = `is-current-step-${this.currentStep}`;
308
+ }
309
+ getFilepondPlaceholder() {
310
+ return `<div class="s-gifting-filepond-placeholder"><span class="s-gifting-filepond-placeholder-icon">${Images}</span><p class="s-gifting-filepond-placeholder-text">${this.selectImageOrUpload ? this.selectImageOrUpload : ''}</p></div>`;
311
+ }
312
+ setPreview(image) {
313
+ this.uploader?.classList.add('has-bg');
314
+ var bg = document.querySelector(`#${this.hostId}.filepond-bg`) ? document.querySelector(`#${this.hostId} .filepond-bg`) : document.createElement('div');
315
+ bg.classList.add('filepond-bg');
316
+ bg.classList.remove('s-hidden');
317
+ bg.style.backgroundImage = "url('" + image.url + "')";
318
+ this.uploader?.querySelector('.filepond--root')?.appendChild(bg);
319
+ this.uploadedImage = image.url;
320
+ if (!!this.gift && this.gift.gift_images.length) {
321
+ this.setWrapperHeight(1, 150, 0);
322
+ }
323
+ }
324
+ removePreview() {
325
+ this.uploader.classList.remove('has-bg');
326
+ let bg = document.querySelector(`#${this.hostId} .filepond-bg`);
327
+ bg.removeAttribute('style');
328
+ bg.classList.add('s-hidden');
329
+ this.handleRemoveImage();
330
+ }
331
+ handleTextAreaChange(event) {
332
+ this.selectedText = event.target.value;
333
+ this.customTextArea.classList.remove('s-form-has-error');
334
+ }
335
+ clearError(key) {
336
+ if (this.errors?.[key]) {
337
+ const { [key]: _, ...rest } = this.errors;
338
+ this.errors = rest;
339
+ }
340
+ }
341
+ handleSenderName(event) {
342
+ this.senderName = event.target.value;
343
+ this.clearError('sender_name');
344
+ }
345
+ handleReceiverName(event) {
346
+ this.receiverName = event.target.value;
347
+ this.clearError('receiver.name');
348
+ }
349
+ handleReceiverCity(event) {
350
+ this.receiverCity = event.target.value;
351
+ this.clearError('receiver.city_id');
352
+ }
353
+ async handleCountryChange(event) {
354
+ const countryId = Number(event.target.value);
355
+ this.selectedCountryId = countryId;
356
+ this.clearError('receiver.country');
357
+ // Find the selected country and store its country_code
358
+ const selectedCountry = this.gift?.countries?.find(country => country.id == countryId);
359
+ this.selectedCountryCode = selectedCountry?.country_code;
360
+ this.isKSA = selectedCountry?.country_code === 'SA';
361
+ // Reset region and city
362
+ this.regions = [];
363
+ this.selectedRegionId = undefined;
364
+ this.gift = { ...this.gift, cities: [] };
365
+ this.receiverCity = undefined;
366
+ if (!countryId || this.gift?.countries?.length === 0) {
367
+ this.selectedCountryCode = undefined;
368
+ this.isKSA = false;
369
+ this.setWrapperHeight(2, 0, 0);
370
+ return;
371
+ }
372
+ if (this.isKSA) {
373
+ // For KSA, fetch regions first
374
+ this.loadingRegions = true;
375
+ this.setWrapperHeight(2, 0, 0);
376
+ try {
377
+ const response = await salla.api.request(`shipping/countries/${countryId}/regions`);
378
+ if (response && response.data) {
379
+ this.regions = response.data;
380
+ }
381
+ }
382
+ catch (error) {
383
+ console.error('Error fetching regions:', error);
384
+ }
385
+ finally {
386
+ this.loadingRegions = false;
387
+ this.setWrapperHeight(2, 0, 0);
388
+ }
389
+ }
390
+ else {
391
+ // For non-KSA, fetch cities directly
392
+ this.loadingCities = true;
393
+ this.setWrapperHeight(2, 0, 0);
394
+ try {
395
+ const response = await salla.api.request(`shipping/cities?for_branch=0&country_id=${countryId}`);
396
+ if (response && response.data) {
397
+ this.gift = { ...this.gift, cities: response.data };
398
+ }
399
+ }
400
+ catch (error) {
401
+ console.error('Error fetching cities:', error);
402
+ }
403
+ finally {
404
+ this.loadingCities = false;
405
+ }
406
+ }
407
+ }
408
+ async handleRegionChange(event) {
409
+ const regionId = Number(event.target.value);
410
+ this.selectedRegionId = regionId;
411
+ this.clearError('receiver.region');
412
+ // Reset city when region changes
413
+ this.gift = { ...this.gift, cities: [] };
414
+ this.receiverCity = undefined;
415
+ if (!regionId)
416
+ return;
417
+ this.loadingCities = true;
418
+ try {
419
+ const response = await salla.api.request(`shipping/cities?for_branch=0&country_id=${this.selectedCountryId}&region_id=${regionId}`);
420
+ if (response && response.data) {
421
+ this.gift = { ...this.gift, cities: response.data };
422
+ }
423
+ }
424
+ catch (error) {
425
+ console.error('Error fetching cities:', error);
426
+ }
427
+ finally {
428
+ this.loadingCities = false;
429
+ this.setWrapperHeight(2, 0, 0);
430
+ }
431
+ }
432
+ handleUploadImage(img) {
433
+ this.uploadedImage = img;
434
+ if (!!this.gift && this.gift.gift_images.length) {
435
+ this.setWrapperHeight(1, 150, 0);
436
+ }
437
+ }
438
+ handleRemoveImage() {
439
+ this.uploadedImage = '';
440
+ if (!!this.gift && this.gift.gift_images.length) {
441
+ this.setWrapperHeight(1, 150, 0);
442
+ }
443
+ }
444
+ // private handleReceiverEmail(event) {
445
+ // this.receiverEmail = event.target.value;
446
+ // }
447
+ handlePhoneInputChange(event) {
448
+ let phone = event.detail;
449
+ this.receiverMobile = phone.number;
450
+ this.receiverCountryCode = phone.country_code;
451
+ this.clearError('receiver.mobile');
452
+ }
453
+ handleDateTimePicker(event) {
454
+ this.deliveryDate = event.detail;
455
+ }
456
+ getCalendarClasses() {
457
+ return {
458
+ "s-form-group": true,
459
+ "anime-item": true,
460
+ "s-gifting-calendar": true,
461
+ "shown": this.showCalendar,
462
+ "hide": !this.showCalendar,
463
+ "s-form-has-error": !!this.errors && this.errors['deliver_at']
464
+ };
465
+ }
466
+ async submitForm() {
467
+ // @ts-ignore
468
+ const donatingAmount = (document.querySelector(`#donating-amount`))?.value;
469
+ this.calendarFormGroup.classList.remove('s-form-has-error');
470
+ if (!!this.errors) {
471
+ this.errors = {};
472
+ this.setWrapperHeight(2, 150, 0);
473
+ }
474
+ if (this.showCalendar && !this.deliveryDate) {
475
+ this.calendarFormGroup.classList.add('s-form-has-error');
476
+ return;
477
+ }
478
+ // Validate required fields
479
+ const requiredFields = [
480
+ { key: 'sender_name', value: this.senderName, label: this.senderNameLabel },
481
+ { key: 'receiver.name', value: this.receiverName, label: this.receiverNameFieldLabel },
482
+ { key: 'receiver.mobile', value: this.receiverMobile, label: this.receiverMobileFieldLabel },
483
+ ...(this.isPhysical() ? [
484
+ { key: 'receiver.country', value: this.selectedCountryId, label: this.receiverCountryFieldLabel },
485
+ ...(this.isKSA ? [{ key: 'receiver.region', value: this.selectedRegionId, label: this.receiverRegionFieldLabel }] : []),
486
+ { key: 'receiver.city_id', value: this.receiverCity, label: this.receiverCityFieldLabel },
487
+ ] : []),
488
+ ];
489
+ const validationErrors = {};
490
+ requiredFields.forEach(({ key, value, label }) => {
491
+ if (!value) {
492
+ validationErrors[key] = salla.lang.get('common.errors.field_required', { attribute: label });
493
+ }
494
+ });
495
+ if (Object.keys(validationErrors).length) {
496
+ this.errors = validationErrors;
497
+ this.setWrapperHeight(2, 150, 0);
498
+ return;
499
+ }
500
+ const giftPayload = {
501
+ text: this.selectedText,
502
+ sender_name: this.senderName,
503
+ quantity: this.quantity,
504
+ deliver_at: this.showCalendar ? this.deliveryDate : null,
505
+ image_url: this.uploadedImage ?? this.selectedImage,
506
+ donation_amount: donatingAmount ? donatingAmount : null,
507
+ receiver: {
508
+ name: this.receiverName,
509
+ mobile_country_code: this.receiverCountryCode,
510
+ mobile: this.receiverMobile,
511
+ ...(this.isPhysical() && this.selectedCountryCode ? { country_code: this.selectedCountryCode } : {}),
512
+ ...(this.isPhysical() && this.selectedRegionId ? { region_id: this.selectedRegionId } : {}),
513
+ ...(this.receiverCity && this.isPhysical() ? { city_id: this.receiverCity } : {})
514
+ },
515
+ has_apple_pay: salla.helpers.hasApplePay(),
516
+ };
517
+ let formData;
518
+ if (this.productId && this.formSelector) {
519
+ formData = this.getFormDataFromForm() || new FormData();
520
+ formData = this.mergeObjectToFormData(giftPayload, formData);
521
+ }
522
+ const addGiftMethod = this.productId
523
+ ? () => salla.product.addProductGiftToCart(this.productId, formData, true)
524
+ : () => salla.cart.addCartGiftToCart(giftPayload, true);
525
+ return await addGiftMethod()
526
+ .then(() => this.modal.close())
527
+ .catch((e) => {
528
+ if (e.response && e.response.status == 422) {
529
+ this.errors = e.response.data.error.fields;
530
+ }
531
+ else {
532
+ console.log(e);
533
+ }
534
+ this.setWrapperHeight(2, 150, 0);
535
+ });
536
+ }
537
+ step2ItemClass(extra = '') {
538
+ const base = `anime-item${this.step2Animated ? '' : ' opacity-0'}`;
539
+ return extra ? `${extra} ${base}` : base;
540
+ }
541
+ generateClass() {
542
+ return {
543
+ "s-gifting-widget": true,
544
+ "s-gifting-widget-vertical": !!this.vertical,
545
+ "s-gifting-widget-horizontal": !this.vertical
546
+ };
547
+ }
548
+ async handleGiftButtonClick() {
549
+ if (!!this.productId && this.formSelector) {
550
+ const form = document.querySelector(this.formSelector);
551
+ if (!form) {
552
+ console.error('SallaGifting:: Form not found in the document!');
553
+ return;
554
+ }
555
+ if (!(form instanceof HTMLFormElement)) {
556
+ console.error('SallaGifting:: The specified selector does not correspond to a form tag!');
557
+ return;
558
+ }
559
+ if (!form.reportValidity()) {
560
+ console.error('SallaGifting:: Form is not valid!');
561
+ salla.error(salla.lang.get('common.messages.required_fields'));
562
+ return;
563
+ }
564
+ }
565
+ const optionsElement = document.querySelector(`salla-product-options[product-id="${this.productId}"]`);
566
+ if (optionsElement && !(await optionsElement.reportValidity())) {
567
+ salla.error(salla.lang.get('common.messages.required_fields'));
568
+ return;
569
+ }
570
+ this.open();
571
+ }
572
+ render() {
573
+ return [
574
+ h("div", { key: 'ea8b7581fc816b2984ec7a8c9f0d5bfb30710577' }, h("salla-list-tile", { key: '44e4b948c467ecbec4934f894af3e88a01567338', class: this.generateClass() }, h("div", { key: 'c36ccc48ff4209d2aad05123981c8efad4de8642', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: 'd5cfd335582f2af620ef50ae92b431b3fdf84b71' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '9623168820eefb63c833dd14c68c1dc20afe1cd1', slot: "subtitle" }, h("div", { key: 'e2fda7dc68054c0f382f61d74a578589b565a544' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'e888e024772c0ef848e4a4113b218bb4e05d78db', slot: "action" }, h("salla-button", { key: 'd443bfd1f5925299a4e0510fae8fc175d390b55a', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '8df23b83891ee2abf644cde76675ca6bb796db79', name: "widget-btn-content" }, h("div", { key: '6b5153a1f1b9d5e127093c3fcc96e2a0fa4954f4', class: "s-gifting-widget-action-content" }, h("span", { key: '41a7f2e88c8046d7211abf5d7fc9d3f533c02292', innerHTML: GiftSharing }), " \u00A0", h("span", { key: '45ea8eac19ca9cccf37cd34d8f84211e6172cd45' }, this.sectionBtnText)))))), h("salla-modal", { key: '5bd076c54c4d072886671653e536c649763785b1', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '378d12f388bd0627355af5b4e57929c00ae28044', slot: "loading" }, h("div", { key: '1b738d4b461a9ebe3a5184f4de727bb1b4b45890', class: "s-gifting-skeleton" }, h("div", { key: '660c901f477536e68d2a3bacd028438c9726b968', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '46f8e45a0a38c10784fc5f3505092e65ed2bba3a', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '09b3356d736e5eb46bb51df2e2fa539dc9d8c99f', class: "s-gifting-modal-title" }, h("div", { key: 'cc8cb7dece64c65d5891e32e49588316e9009f6c', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '41b30274a655babdd0c9e26e74dc3f0bdd4a2aea', height: '15px', width: '150px' })))), h("div", { key: 'b241162827a085279f646452a151d6483a37cc8e', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '5ac15a8e94b50ea03cd033375b08f9e4406a7e17', height: '10px', width: '150px' }), h("salla-skeleton", { key: '697e157e475df0cb71b79e3752019f522ed847a3', height: '230px' }), h("salla-skeleton", { key: '8a5e586c059b765f6425d7060a18e8d799be3c4f', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'e1ee17daef6904b8302b0f4437e99b221bd6b236', height: '30px' }), h("salla-skeleton", { key: '9dfbca00f18a37348eb83021ef4fec073685fe7d', height: '40px' })))), h("slot", { key: 'da2c687a186ed115acee04cc683eff3a6a73168f', name: "header" }), !!this.hasError ?
575
+ h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
576
+ :
577
+ [
578
+ h("div", { class: "s-gifting-modal-header" }, h("span", { class: "s-gifting-modal-icon" }, h("span", { innerHTML: GiftSharing })), h("h2", { class: "s-gifting-modal-title" }, h("div", { class: "s-gifting-modal-badge-wrapper" }, h("div", { class: "s-gifting-modal-badge" }, h("span", null, h("span", null, this.currentStep), "/2")), h("span", null, this.giftDetails)))),
579
+ h("div", { class: "s-gifting-steps-wrapper " + this.parentClass, ref: el => this.stepsWrapper = el }, h("div", { class: "s-gifting-step-one gift-step-1", ref: el => this.step1Elems = el }, h("div", { class: "s-gifting-modal-uploader-title anime-item" }, this.selectImageForYourGift), h("div", { class: "s-gifting-modal-uploader anime-item", ref: el => this.uploader = el }, h("span", { class: "s-gifting-remove-preview", onClick: () => this.removePreview(), innerHTML: Cancel }), this.selectImageOrUpload && h("salla-file-upload", { "instant-upload": true, name: "image_url", url: salla.url.api(salla.product.api.getUrl('giftImage')), onUploaded: event => this.handleUploadImage(event.detail), labelIdle: this.getFilepondPlaceholder(), onRemoved: () => this.handleRemoveImage() })), h("div", { class: "anime-item" }, !this.uploadedImage && !!this.gift && !!this.gift.gift_images && this.gift.gift_images.length > 0 ?
580
+ h("salla-slider", { id: "gifting-slider", loop: false, "controls-outer": true, class: "s-gifting-slider", type: "carousel" }, h("div", { slot: "items" }, this.gift && this.gift.gift_images ?
581
+ this.gift?.gift_images.map((item) => h("a", { class: "s-gifting-clickable s-gifting-image", onClick: () => this.setPreview(item) }, h("img", { style: { "width": "120px" }, src: item.url, alt: `${item.id}` }))) : ''))
582
+ : ""), h("div", { class: "anime-item" }, h("div", { class: "s-form-group s-gifting-selectText", ref: el => this.textSelect = el }, h("select", { id: "gift-text-selection", name: "gift-text-selection", class: "s-form-control s-gifting-select", onChange: e => this.toggleGiftText(e) }, h("option", { "data-id": null, selected: true }, this.selectGiftMessage), this.gift && this.gift.gift_texts ?
583
+ this.gift?.gift_texts.map((txt) => h("option", { "data-id": txt.id, value: txt.text, key: txt.id }, txt.text)) : '', h("option", { "data-id": "custom" }, this.giftCustomText))), h("div", { class: this.showGiftText ? "s-form-group s-gifting-textarea shown" : "s-form-group s-gifting-textarea hide", ref: (el) => this.customTextArea = el }, h("label", { htmlFor: "gift-custom-text", class: "s-form-label" }, this.giftCustomText), h("div", { class: "mt-1" }, h("textarea", { onInput: (event) => this.handleTextAreaChange(event), rows: 4, ref: (el) => this.textArea = el, name: "gift-custom-text", id: "gift-custom-text", class: "s-form-control" })))), h("div", { class: "anime-item" }, h("salla-button", { color: "primary", width: "wide", onClick: () => this.goToStep2() }, h("span", null, this.nextStep)))), h("div", { class: "s-gifting-step-two gift-step-2", ref: el => this.step2Elems = el }, h("div", { class: this.step2ItemClass(this.errors?.['sender_name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "sender_name", class: "s-form-label" }, this.senderNameLabel), h("input", { type: "text", class: "s-form-control", name: "sender_name", id: "sender_name", value: this.senderName, onInput: (event) => this.handleSenderName(event), placeholder: "" }), this.errors && this.errors['sender_name'] ?
584
+ h("span", { class: "s-gifting-error" }, this.errors['sender_name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "receiver_name", class: "s-form-label" }, this.receiverNameFieldLabel), h("input", { type: "text", class: "s-form-control", name: "receiver_name", id: "receiver_name", value: "", onInput: (event) => this.handleReceiverName(event), placeholder: "" }), this.errors && this.errors['receiver.name'] ?
585
+ h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.mobile'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.receiverCountryCode, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
586
+ h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.isPhysical() &&
587
+ h("div", { class: this.step2ItemClass(this.errors?.['receiver.country'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), h("select", { name: "country", class: "s-form-control", onChange: (event) => this.handleCountryChange(event), required: true }, h("option", { value: "" }, this.selectCountry), this.gift?.countries?.map((country) => (h("option", { value: country.id }, country.name)))), this.errors && this.errors['receiver.country'] ?
588
+ h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), this.isPhysical() && this.isKSA &&
589
+ h("div", { class: this.step2ItemClass(this.errors?.['receiver.region'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverRegionFieldLabel), h("select", { name: "region", class: "s-form-control", onChange: (event) => this.handleRegionChange(event), disabled: this.loadingRegions }, h("option", { value: "", selected: true }, this.loadingRegions ? salla.lang.get('common.elements.loading') : this.selectRegion), this.regions?.map((region) => (h("option", { value: region.id }, region.name)))), this.errors && this.errors['receiver.region'] ?
590
+ h("span", { class: "s-gifting-error" }, this.errors['receiver.region']) : ''), this.isPhysical() &&
591
+ h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", "aria-label": salla.lang.get('blocks.buy_as_gift.select_city'), class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId) }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
592
+ h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() &&
593
+ h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo)), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
594
+ ], h("slot", { key: '20793a5a50c708c93be79df033e43a36e615d075', name: "footer" })))
595
+ ];
596
+ }
597
+ static get style() { return sallaGiftingCss; }
598
+ }, [4, "salla-gifting", {
599
+ "productId": [2, "product-id"],
600
+ "widgetTitle": [1, "widget-title"],
601
+ "widgetSubtitle": [1, "widget-subtitle"],
602
+ "physicalProducts": [4, "physical-products"],
603
+ "physical": [4],
604
+ "vertical": [4],
605
+ "formSelector": [1025, "form-selector"],
606
+ "sectionTitle": [32],
607
+ "sectionSubtitle": [32],
608
+ "sectionBtnText": [32],
609
+ "giftDetails": [32],
610
+ "selectImageForYourGift": [32],
611
+ "selectImageOrUpload": [32],
612
+ "selectGiftMessage": [32],
613
+ "giftCustomText": [32],
614
+ "textId": [32],
615
+ "incorrectGiftText": [32],
616
+ "nextStep": [32],
617
+ "senderNameLabel": [32],
618
+ "receiverNameFieldLabel": [32],
619
+ "receiverMobileFieldLabel": [32],
620
+ "receiverCountryFieldLabel": [32],
621
+ "ksa": [32],
622
+ "selectCountry": [32],
623
+ "selectCity": [32],
624
+ "selectCityInfo": [32],
625
+ "receiverCityFieldLabel": [32],
626
+ "receiverRegionFieldLabel": [32],
627
+ "selectRegion": [32],
628
+ "receiverEmailFieldLabel": [32],
629
+ "emailPlaceholder": [32],
630
+ "sendLater": [32],
631
+ "selectSendDateAndTime": [32],
632
+ "canNotEditOrderAfterSelectDate": [32],
633
+ "sendGift": [32],
634
+ "donationRequired": [32],
635
+ "currentStep": [32],
636
+ "showCalendar": [32],
637
+ "showGiftText": [32],
638
+ "currentLang": [32],
639
+ "parentClass": [32],
640
+ "errors": [32],
641
+ "gift": [32],
642
+ "selectedGiftTextOption": [32],
643
+ "selectedCountryId": [32],
644
+ "selectedCountryCode": [32],
645
+ "loadingCities": [32],
646
+ "loadingRegions": [32],
647
+ "regions": [32],
648
+ "selectedRegionId": [32],
649
+ "isKSA": [32],
650
+ "parsedFormData": [32],
651
+ "showTextArea": [32],
652
+ "selectedImage": [32],
653
+ "uploadedImage": [32],
654
+ "selectedText": [32],
655
+ "senderName": [32],
656
+ "errorMessage": [32],
657
+ "hasError": [32],
658
+ "quantity": [32],
659
+ "deliveryDate": [32],
660
+ "timeZone": [32],
661
+ "receiverName": [32],
662
+ "receiverMobile": [32],
663
+ "receiverCountryCode": [32],
664
+ "receiverEmail": [32],
665
+ "hostId": [32],
666
+ "receiverCity": [32],
667
+ "open": [64],
668
+ "close": [64],
669
+ "goToStep2": [64]
670
+ }]);
671
+ function defineCustomElement$1() {
672
+ if (typeof customElements === "undefined") {
673
+ return;
674
+ }
675
+ const components = ["salla-gifting", "salla-button", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-modal", "salla-placeholder", "salla-skeleton", "salla-slider", "salla-tel-input"];
676
+ components.forEach(tagName => { switch (tagName) {
677
+ case "salla-gifting":
678
+ if (!customElements.get(tagName)) {
679
+ customElements.define(tagName, SallaGifting$1);
680
+ }
681
+ break;
682
+ case "salla-button":
683
+ if (!customElements.get(tagName)) {
684
+ defineCustomElement$b();
685
+ }
686
+ break;
687
+ case "salla-datetime-picker":
688
+ if (!customElements.get(tagName)) {
689
+ defineCustomElement$a();
690
+ }
691
+ break;
692
+ case "salla-file-upload":
693
+ if (!customElements.get(tagName)) {
694
+ defineCustomElement$9();
695
+ }
696
+ break;
697
+ case "salla-list-tile":
698
+ if (!customElements.get(tagName)) {
699
+ defineCustomElement$8();
700
+ }
701
+ break;
702
+ case "salla-loading":
703
+ if (!customElements.get(tagName)) {
704
+ defineCustomElement$7();
705
+ }
706
+ break;
707
+ case "salla-modal":
708
+ if (!customElements.get(tagName)) {
709
+ defineCustomElement$6();
710
+ }
711
+ break;
712
+ case "salla-placeholder":
713
+ if (!customElements.get(tagName)) {
714
+ defineCustomElement$5();
715
+ }
716
+ break;
717
+ case "salla-skeleton":
718
+ if (!customElements.get(tagName)) {
719
+ defineCustomElement$4();
720
+ }
721
+ break;
722
+ case "salla-slider":
723
+ if (!customElements.get(tagName)) {
724
+ defineCustomElement$3();
725
+ }
726
+ break;
727
+ case "salla-tel-input":
728
+ if (!customElements.get(tagName)) {
729
+ defineCustomElement$2();
730
+ }
731
+ break;
732
+ } });
733
+ }
734
+ defineCustomElement$1();
735
+
736
+ const SallaGifting = SallaGifting$1;
737
+ const defineCustomElement = defineCustomElement$1;
738
+
739
+ export { SallaGifting, defineCustomElement };