@salla.sa/twilight-components 2.14.521 → 2.14.523

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 (360) hide show
  1. package/dist/cjs/arrow-right-Cd6JoegH.js +13 -0
  2. package/dist/cjs/{filepond-BxIqz4X5.js → filepond-DCHVhc44.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-CgcL8KEM.js → filepond-plugin-file-poster-CfA-n2Oh.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-CE5D63gi.js → filepond-plugin-file-validate-size-DZQkwEKK.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-CTZlbHeg.js → filepond-plugin-file-validate-type-Dl8je2Fu.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-DwwaA0xD.js → filepond-plugin-image-edit-BzYslA6t.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-Ds2jzd-0.js → filepond-plugin-image-exif-orientation-D856YsXh.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-zMIkW3BA.js → filepond-plugin-image-preview-CYa8C4oD.js} +1 -1
  9. package/dist/cjs/{functions-kxrglIIV.js → functions-DG_jVKBR.js} +1 -1
  10. package/dist/cjs/{index-BqVQnSPs.js → index-D-YSscuC.js} +1 -1
  11. package/dist/cjs/{index-D9nhi8-6.js → index-EWm59_5l.js} +10 -10
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +18 -3
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  23. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +7 -4
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down_2.cjs.entry.js +12 -7
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  48. package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
  49. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  50. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  55. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  56. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-price-range.cjs.entry.js +3 -9
  84. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-user-settings.cjs.entry.js +471 -34
  105. package/dist/cjs/salla-verify.cjs.entry.js +9 -1
  106. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  107. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
  108. package/dist/cjs/{tracked-promise-I3cWE57r.js → tracked-promise-C2tbWLf_.js} +1 -1
  109. package/dist/cjs/twilight.cjs.js +2 -2
  110. package/dist/cjs/{vanilla-picker-BN2v2WSB.js → vanilla-picker-BXezTQQL.js} +1 -1
  111. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +6 -3
  112. package/dist/collection/components/salla-modal/salla-modal.css +12 -0
  113. package/dist/collection/components/salla-modal/salla-modal.js +50 -1
  114. package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.js +11 -6
  115. package/dist/collection/components/salla-user-settings/salla-user-settings.css +137 -0
  116. package/dist/collection/components/salla-user-settings/salla-user-settings.js +497 -32
  117. package/dist/collection/components/salla-verify/salla-verify.js +8 -0
  118. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
  119. package/dist/components/arrow-right.js +11 -0
  120. package/dist/components/index.js +2 -2
  121. package/dist/components/salla-bullet-delivery.js +6 -3
  122. package/dist/components/salla-login-modal2.js +7 -1
  123. package/dist/components/salla-loyalty-point2.js +8 -2
  124. package/dist/components/salla-modal2.js +25 -3
  125. package/dist/components/salla-order-options-modal2.js +11 -6
  126. package/dist/components/salla-price-range2.js +1 -7
  127. package/dist/components/salla-product-size-guide.js +7 -1
  128. package/dist/components/salla-user-menu.js +7 -1
  129. package/dist/components/salla-user-settings.js +498 -39
  130. package/dist/components/salla-verify.js +8 -0
  131. package/dist/components/salla-wishlist-actions.js +1 -1
  132. package/dist/esm/arrow-right-B9q7ymSg.js +11 -0
  133. package/dist/esm/{filepond-DiqSFaKJ.js → filepond-DQ6pHM8K.js} +1 -1
  134. package/dist/esm/{filepond-plugin-file-poster-CIhvZWr3.js → filepond-plugin-file-poster-Cin3Drv6.js} +1 -1
  135. package/dist/esm/{filepond-plugin-file-validate-size-Dh-rJsdI.js → filepond-plugin-file-validate-size-Bo-SgRcF.js} +1 -1
  136. package/dist/esm/{filepond-plugin-file-validate-type-I9XENo4v.js → filepond-plugin-file-validate-type-DvBZJiZ0.js} +1 -1
  137. package/dist/esm/{filepond-plugin-image-edit-D7HhgEBr.js → filepond-plugin-image-edit-DTVE32mN.js} +1 -1
  138. package/dist/esm/{filepond-plugin-image-exif-orientation-CJ6QNX7n.js → filepond-plugin-image-exif-orientation-W7UUFbyD.js} +1 -1
  139. package/dist/esm/{filepond-plugin-image-preview-ChlwE2Wy.js → filepond-plugin-image-preview-DGuRiudm.js} +1 -1
  140. package/dist/esm/{functions-DG90cyVT.js → functions-D7FvvD3w.js} +1 -1
  141. package/dist/esm/{index-BmH_SCLp.js → index-BM5d07q2.js} +10 -10
  142. package/dist/esm/{index-CceR4m1x.js → index-Bg8UYNC5.js} +1 -1
  143. package/dist/esm/loader.js +3 -3
  144. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  145. package/dist/esm/salla-accordion_6.entry.js +18 -3
  146. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  147. package/dist/esm/salla-advertisement.entry.js +1 -1
  148. package/dist/esm/salla-alert_2.entry.js +1 -1
  149. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  150. package/dist/esm/salla-apps-icons.entry.js +1 -1
  151. package/dist/esm/salla-badge.entry.js +1 -1
  152. package/dist/esm/salla-basket-gap.entry.js +1 -1
  153. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  154. package/dist/esm/salla-bullet-delivery_2.entry.js +7 -4
  155. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  156. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  157. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  158. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  159. package/dist/esm/salla-comment-factors.entry.js +1 -1
  160. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  161. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  162. package/dist/esm/salla-contacts.entry.js +1 -1
  163. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  164. package/dist/esm/salla-count-down_2.entry.js +12 -7
  165. package/dist/esm/salla-custom-fields.entry.js +1 -1
  166. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  167. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  168. package/dist/esm/salla-filters-widget.entry.js +1 -1
  169. package/dist/esm/salla-filters.entry.js +1 -1
  170. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  171. package/dist/esm/salla-gifting.entry.js +1 -1
  172. package/dist/esm/salla-hook.entry.js +1 -1
  173. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  174. package/dist/esm/salla-installment.entry.js +1 -1
  175. package/dist/esm/salla-list-tile.entry.js +1 -1
  176. package/dist/esm/salla-localization-modal.entry.js +1 -1
  177. package/dist/esm/salla-login-modal.entry.js +1 -1
  178. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  179. package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
  180. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  181. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  182. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  183. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  184. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  185. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  186. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  187. package/dist/esm/salla-loyalty.entry.js +1 -1
  188. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  189. package/dist/esm/salla-map_2.entry.js +1 -1
  190. package/dist/esm/salla-menu.entry.js +1 -1
  191. package/dist/esm/salla-metadata.entry.js +1 -1
  192. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  193. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  194. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  195. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  196. package/dist/esm/salla-notification-item.entry.js +1 -1
  197. package/dist/esm/salla-notifications.entry.js +1 -1
  198. package/dist/esm/salla-offer-modal.entry.js +1 -1
  199. package/dist/esm/salla-offer.entry.js +1 -1
  200. package/dist/esm/salla-order-branch.entry.js +1 -1
  201. package/dist/esm/salla-order-cancel.entry.js +1 -1
  202. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  203. package/dist/esm/salla-order-details-options.entry.js +1 -1
  204. package/dist/esm/salla-order-details.entry.js +1 -1
  205. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  206. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  207. package/dist/esm/salla-order-edit.entry.js +1 -1
  208. package/dist/esm/salla-order-shipments.entry.js +1 -1
  209. package/dist/esm/salla-order-summary.entry.js +1 -1
  210. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  211. package/dist/esm/salla-orders.entry.js +1 -1
  212. package/dist/esm/salla-payments.entry.js +1 -1
  213. package/dist/esm/salla-placeholder.entry.js +1 -1
  214. package/dist/esm/salla-price-range.entry.js +2 -8
  215. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  216. package/dist/esm/salla-product-card_2.entry.js +1 -1
  217. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  218. package/dist/esm/salla-products-list.entry.js +1 -1
  219. package/dist/esm/salla-quick-order.entry.js +1 -1
  220. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  221. package/dist/esm/salla-rating-modal.entry.js +1 -1
  222. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  223. package/dist/esm/salla-scopes.entry.js +1 -1
  224. package/dist/esm/salla-search.entry.js +1 -1
  225. package/dist/esm/salla-skeleton.entry.js +1 -1
  226. package/dist/esm/salla-slider.entry.js +1 -1
  227. package/dist/esm/salla-social-share.entry.js +1 -1
  228. package/dist/esm/salla-social.entry.js +1 -1
  229. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  230. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  231. package/dist/esm/salla-tooltip.entry.js +1 -1
  232. package/dist/esm/salla-trust-badges.entry.js +1 -1
  233. package/dist/esm/salla-user-menu.entry.js +1 -1
  234. package/dist/esm/salla-user-profile.entry.js +1 -1
  235. package/dist/esm/salla-user-settings.entry.js +471 -34
  236. package/dist/esm/salla-verify.entry.js +9 -1
  237. package/dist/esm/salla-wallet.entry.js +1 -1
  238. package/dist/esm/salla-wishlist-actions.entry.js +2 -2
  239. package/dist/esm/{tracked-promise-Ci6ut_FU.js → tracked-promise-C6Ob-qmO.js} +1 -1
  240. package/dist/esm/twilight.js +3 -3
  241. package/dist/esm/{vanilla-picker-vyxTZ0dX.js → vanilla-picker-DgInak8N.js} +1 -1
  242. package/dist/twilight/{p-849c72c4.entry.js → p-01f81bed.entry.js} +1 -1
  243. package/dist/twilight/{p-7dd7b06b.entry.js → p-04756108.entry.js} +1 -1
  244. package/dist/twilight/{p-8bc95f60.entry.js → p-0a1790b8.entry.js} +1 -1
  245. package/dist/twilight/{p-4db788b8.entry.js → p-0e4332c5.entry.js} +1 -1
  246. package/dist/twilight/{p-0bc95bea.entry.js → p-1062425d.entry.js} +1 -1
  247. package/dist/twilight/{p-00a79225.entry.js → p-1865bb17.entry.js} +1 -1
  248. package/dist/twilight/{p-6304507a.entry.js → p-1966d0ca.entry.js} +1 -1
  249. package/dist/twilight/{p-29d997c7.entry.js → p-1de72efd.entry.js} +1 -1
  250. package/dist/twilight/p-1eb9b42d.entry.js +4 -0
  251. package/dist/twilight/{p-2cb0a5c2.entry.js → p-23dc064a.entry.js} +1 -1
  252. package/dist/twilight/{p-cdd9e371.entry.js → p-2562e44b.entry.js} +1 -1
  253. package/dist/twilight/p-26cac2a2.entry.js +4 -0
  254. package/dist/twilight/{p-9fbf4a49.entry.js → p-29396bf6.entry.js} +1 -1
  255. package/dist/twilight/{p-772b2587.entry.js → p-2aa80a12.entry.js} +1 -1
  256. package/dist/twilight/{p-2bdf089c.entry.js → p-2ac41a04.entry.js} +1 -1
  257. package/dist/twilight/{p-5245c9fb.entry.js → p-30089930.entry.js} +1 -1
  258. package/dist/twilight/{p-3b4f6d09.entry.js → p-3c5c8040.entry.js} +1 -1
  259. package/dist/twilight/{p-1fa3928c.entry.js → p-3e3b4ace.entry.js} +1 -1
  260. package/dist/twilight/{p-719d5824.entry.js → p-3f1b74c4.entry.js} +1 -1
  261. package/dist/twilight/{p-d4b5c142.entry.js → p-3fb2daff.entry.js} +1 -1
  262. package/dist/twilight/{p-8dd3312e.entry.js → p-42551c8c.entry.js} +1 -1
  263. package/dist/twilight/{p-9c738246.entry.js → p-42fc5f2f.entry.js} +1 -1
  264. package/dist/twilight/{p-ae2071d6.entry.js → p-45729b8e.entry.js} +1 -1
  265. package/dist/twilight/{p-781d048b.entry.js → p-45f5fa27.entry.js} +1 -1
  266. package/dist/twilight/{p-0331b059.entry.js → p-55d1c6c9.entry.js} +1 -1
  267. package/dist/twilight/{p-c337127b.entry.js → p-5aa658d1.entry.js} +1 -1
  268. package/dist/twilight/{p-ad95d915.entry.js → p-5c5f6ad3.entry.js} +1 -1
  269. package/dist/twilight/{p-a025825a.entry.js → p-5ce9e4e4.entry.js} +1 -1
  270. package/dist/twilight/{p-3aa708ac.entry.js → p-62ff80dc.entry.js} +1 -1
  271. package/dist/twilight/{p-b41da249.entry.js → p-65dd99ed.entry.js} +1 -1
  272. package/dist/twilight/p-66312912.entry.js +4 -0
  273. package/dist/twilight/{p-b74d7a0c.entry.js → p-66714663.entry.js} +1 -1
  274. package/dist/twilight/{p-ff2cf3a4.entry.js → p-698f2e97.entry.js} +1 -1
  275. package/dist/twilight/{p-919d1d2f.entry.js → p-6dcd7b46.entry.js} +1 -1
  276. package/dist/twilight/{p-9329c9ae.entry.js → p-6f0215ec.entry.js} +1 -1
  277. package/dist/twilight/{p-e258f515.entry.js → p-70d1e905.entry.js} +1 -1
  278. package/dist/twilight/{p-f8b734e1.entry.js → p-719cd9a6.entry.js} +1 -1
  279. package/dist/twilight/{p-f7e468c7.entry.js → p-7741fc5c.entry.js} +1 -1
  280. package/dist/twilight/{p-5b98f12c.entry.js → p-78ed3c14.entry.js} +1 -1
  281. package/dist/twilight/{p-54b18586.entry.js → p-7b0fd2d3.entry.js} +1 -1
  282. package/dist/twilight/{p-dbd42678.entry.js → p-7cdfa2ed.entry.js} +1 -1
  283. package/dist/twilight/{p-93b9c55e.entry.js → p-7dd8a87f.entry.js} +1 -1
  284. package/dist/twilight/{p-314e1a7e.entry.js → p-80bdb370.entry.js} +1 -1
  285. package/dist/twilight/{p-5327d518.entry.js → p-82384661.entry.js} +1 -1
  286. package/dist/twilight/{p-bd5baa3a.entry.js → p-8b16e8b8.entry.js} +1 -1
  287. package/dist/twilight/{p-050f0c6a.entry.js → p-8bcbf94b.entry.js} +1 -1
  288. package/dist/twilight/{p-097f2555.entry.js → p-8db3e0c5.entry.js} +1 -1
  289. package/dist/twilight/{p-25a5a6e1.entry.js → p-90ea6647.entry.js} +1 -1
  290. package/dist/twilight/{p-2199c255.entry.js → p-9b28408b.entry.js} +1 -1
  291. package/dist/twilight/{p-edc7d892.entry.js → p-9c1e5214.entry.js} +1 -1
  292. package/dist/twilight/{p-2235f1f2.entry.js → p-9e1645b7.entry.js} +1 -1
  293. package/dist/twilight/{p-c9e00ab5.entry.js → p-9fb0a8ad.entry.js} +1 -1
  294. package/dist/twilight/{p-da16958f.entry.js → p-9fdbb0fe.entry.js} +1 -1
  295. package/dist/twilight/p-B9q7ymSg.js +4 -0
  296. package/dist/twilight/{p-BmH_SCLp.js → p-BM5d07q2.js} +2 -2
  297. package/dist/twilight/{p-3JgvsDKa.js → p-BbNEoGml.js} +2 -2
  298. package/dist/twilight/{p-CyJQdnNc.js → p-CHQutKQ7.js} +1 -1
  299. package/dist/twilight/{p-Jgd9UbQM.js → p-Cc9owUMd.js} +1 -1
  300. package/dist/twilight/{p-5h7fTMtR.js → p-Cvx2P5Pg.js} +1 -1
  301. package/dist/twilight/{p-Duga6KlO.js → p-CyUI27N5.js} +1 -1
  302. package/dist/twilight/{p-BFMG8k2g.js → p-DaCdMnag.js} +1 -1
  303. package/dist/twilight/{p-DNxVGDCc.js → p-DnmPgY_G.js} +1 -1
  304. package/dist/twilight/{p-DcFiC1dv.js → p-JQryHMzJ.js} +1 -1
  305. package/dist/twilight/{p-169ccb83.entry.js → p-a3aef8bb.entry.js} +1 -1
  306. package/dist/twilight/{p-f639f01e.entry.js → p-a43ce575.entry.js} +1 -1
  307. package/dist/twilight/{p-9eb20b1e.entry.js → p-a4d7223f.entry.js} +1 -1
  308. package/dist/twilight/{p-28f8858c.entry.js → p-a560ee5f.entry.js} +1 -1
  309. package/dist/twilight/{p-5659163f.entry.js → p-a6a1affc.entry.js} +1 -1
  310. package/dist/twilight/{p-761f03b0.entry.js → p-aba9e8c2.entry.js} +1 -1
  311. package/dist/twilight/{p-9e73018d.entry.js → p-abc35ead.entry.js} +1 -1
  312. package/dist/twilight/{p-7d6d2166.entry.js → p-abf4c948.entry.js} +1 -1
  313. package/dist/twilight/{p-c8fa6a7e.entry.js → p-ac6abf15.entry.js} +1 -1
  314. package/dist/twilight/{p-6481d82b.entry.js → p-ace9d8f0.entry.js} +1 -1
  315. package/dist/twilight/{p-5a17a1ea.entry.js → p-af6f8519.entry.js} +2 -2
  316. package/dist/twilight/{p-5aa54ac9.entry.js → p-afe2670a.entry.js} +1 -1
  317. package/dist/twilight/{p-0043e129.entry.js → p-afe7c1ba.entry.js} +1 -1
  318. package/dist/twilight/{p-f6644651.entry.js → p-b2a4ebbb.entry.js} +1 -1
  319. package/dist/twilight/{p-258ddfbb.entry.js → p-b3f60292.entry.js} +1 -1
  320. package/dist/twilight/{p-3b927d75.entry.js → p-b5203de2.entry.js} +1 -1
  321. package/dist/twilight/{p-42ab7e46.entry.js → p-b827f3d2.entry.js} +1 -1
  322. package/dist/twilight/{p-0c59cc4f.entry.js → p-b8e31d81.entry.js} +1 -1
  323. package/dist/twilight/{p-4dcb3f48.entry.js → p-bad00f10.entry.js} +1 -1
  324. package/dist/twilight/{p-7054391f.entry.js → p-bc0558d2.entry.js} +1 -1
  325. package/dist/twilight/{p-4afedde2.entry.js → p-beb0a808.entry.js} +1 -1
  326. package/dist/twilight/{p-88137e81.entry.js → p-bfc96cf2.entry.js} +1 -1
  327. package/dist/twilight/{p-eb06c23f.entry.js → p-c16c5ef5.entry.js} +1 -1
  328. package/dist/twilight/{p-c32a7b18.entry.js → p-c82feb7c.entry.js} +1 -1
  329. package/dist/twilight/{p-aa3de1af.entry.js → p-c98be632.entry.js} +1 -1
  330. package/dist/twilight/{p-fbbf8d50.entry.js → p-ce653f7c.entry.js} +1 -1
  331. package/dist/twilight/{p-a6f1ab9d.entry.js → p-d1b29d76.entry.js} +1 -1
  332. package/dist/twilight/{p-c8e712e4.entry.js → p-d23989f3.entry.js} +1 -1
  333. package/dist/twilight/{p-a54f3e4d.entry.js → p-d5d107ea.entry.js} +1 -1
  334. package/dist/twilight/p-d97d37ec.entry.js +4 -0
  335. package/dist/twilight/{p-4b425007.entry.js → p-dec7ad63.entry.js} +1 -1
  336. package/dist/twilight/{p-CVQzCtED.js → p-e-mxvhkF.js} +1 -1
  337. package/dist/twilight/{p-2e23d889.entry.js → p-e060ee6b.entry.js} +1 -1
  338. package/dist/twilight/{p-3977e18c.entry.js → p-e0a0653e.entry.js} +1 -1
  339. package/dist/twilight/{p-22b5b7c5.entry.js → p-e2e84b7e.entry.js} +1 -1
  340. package/dist/twilight/{p-9338485b.entry.js → p-e45ead59.entry.js} +1 -1
  341. package/dist/twilight/{p-22b1d1b5.entry.js → p-e9259ff2.entry.js} +1 -1
  342. package/dist/twilight/{p-86509218.entry.js → p-e99c1765.entry.js} +1 -1
  343. package/dist/twilight/p-ee69544b.entry.js +4 -0
  344. package/dist/twilight/{p-1afaa214.entry.js → p-f443ae10.entry.js} +1 -1
  345. package/dist/twilight/{p-e9fb7554.entry.js → p-f72a852a.entry.js} +1 -1
  346. package/dist/twilight/{p-8ee28c75.entry.js → p-fdfa010d.entry.js} +1 -1
  347. package/dist/twilight/{p-456c03b1.entry.js → p-ff5fc7fa.entry.js} +1 -1
  348. package/dist/twilight/{p-1HIaZAiz.js → p-kYkXTeTb.js} +1 -1
  349. package/dist/twilight/{p-D5XsQ4D9.js → p-lri6csDE.js} +1 -1
  350. package/dist/twilight/twilight.esm.js +1 -1
  351. package/dist/types/components/salla-modal/salla-modal.d.ts +10 -0
  352. package/dist/types/components/salla-order-options-modal/salla-order-options-modal.d.ts +5 -1
  353. package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +84 -9
  354. package/dist/types/components.d.ts +15 -0
  355. package/package.json +5 -5
  356. package/dist/twilight/p-19173dca.entry.js +0 -4
  357. package/dist/twilight/p-26f2eea3.entry.js +0 -4
  358. package/dist/twilight/p-3d4ea448.entry.js +0 -4
  359. package/dist/twilight/p-6ce962f1.entry.js +0 -4
  360. package/dist/twilight/p-ec66b2a0.entry.js +0 -4
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BmH_SCLp.js';
4
+ import { r as registerInstance, h, H as Host } from './index-BM5d07q2.js';
5
5
 
6
6
  var Bullhorn = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -10,13 +10,6 @@ var Bullhorn = `<!-- Generated by IcoMoon.io -->
10
10
  </svg>
11
11
  `;
12
12
 
13
- var UserOff = `<!-- Generated by IcoMoon.io -->
14
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
15
- <title>user-off</title>
16
- <path d="M10.837 19.309c-4.963 1.284-8.171 4.303-8.171 7.691v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-2.101 2.48-4.155 6.172-5.109 0.713-0.184 1.141-0.912 0.957-1.625-0.184-0.711-0.908-1.137-1.625-0.956zM12.859 3.715c0.933-0.685 2.020-1.048 3.141-1.048 2.941 0 5.333 2.392 5.333 5.333 0 1.121-0.363 2.208-1.048 3.141-0.436 0.593-0.308 1.428 0.284 1.864 0.239 0.175 0.515 0.259 0.788 0.259 0.411 0 0.815-0.188 1.076-0.544 1.025-1.393 1.567-3.025 1.567-4.72 0-4.412-3.588-8-8-8-1.695 0-3.327 0.541-4.721 1.567-0.592 0.435-0.72 1.269-0.284 1.864 0.436 0.593 1.269 0.721 1.864 0.284zM31.609 29.724l-29.333-29.333c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l29.333 29.333c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>
17
- </svg>
18
- `;
19
-
20
13
  var UserCancel = `<!-- Generated by IcoMoon.io -->
21
14
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
22
15
  <title>user-cancel</title>
@@ -24,27 +17,94 @@ var UserCancel = `<!-- Generated by IcoMoon.io -->
24
17
  </svg>
25
18
  `;
26
19
 
27
- const sallaUserSettingsCss = "";
20
+ const sallaUserSettingsCss = ".s-modal-header-inner{display:flex;flex-direction:column !important;align-items:center !important;justify-content:center !important}.s-modal-header-content{text-align:center !important}.s-user-settings-delete-body{text-align:center}.s-user-settings-delete-icon{display:inline-flex;align-items:center;justify-content:center;width:4rem;height:4rem;border-radius:9999px;border:1px solid var(--infinte-color);color:var(--infinte-color);margin:0 auto 1rem}.s-user-settings-delete-icon svg{width:1.5rem;height:1.5rem}.s-user-settings-delete-warning{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-actions--row{display:flex;gap:0.75rem;justify-content:center}.s-user-settings-delete-actions--row salla-button{flex:1}.s-user-settings-delete-actions--stack{display:flex;flex-direction:column;gap:0.75rem;margin-top:1.25rem}.s-user-settings-delete-otp-instruction{color:#6b7280;font-size:0.875rem}.s-user-settings-delete-otp-target{color:#6b7280;direction:ltr;margin-bottom:1.25rem}.s-user-settings-delete-otp-codes{display:flex;justify-content:stretch;gap:0.75rem;direction:ltr;margin-bottom:0.75rem;width:100%}.s-user-settings-delete-otp-codes.has-error{margin-bottom:0}.s-user-settings-delete-otp-input{flex:1 1 0;min-width:0;width:100%;height:3.5rem;text-align:center;border:1px solid #d1d5db;border-radius:0.5rem;font-size:1.25rem;font-weight:600;color:#111827;outline:none}.s-user-settings-delete-otp-input:focus{border-color:#004956;box-shadow:0 0 0 1px #004956}.s-user-settings-delete-otp-input.s-has-error{border-color:#ef4444 !important}.s-user-settings-delete-otp-input.s-has-error:focus{border-color:#ef4444 !important;box-shadow:0 0 0 1px #ef4444}.s-user-settings-delete-otp-input::-webkit-outer-spin-button,.s-user-settings-delete-otp-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-user-settings-delete-otp-input[type=text]{-moz-appearance:textfield}.s-user-settings-delete-otp-error{display:block;color:#ef4444;font-size:0.75rem;text-align:center;padding-top:0.75rem;margin-bottom:1.25rem}.s-user-settings-delete-otp-resend{color:#6b7280;font-size:0.75rem;margin-top:1rem;text-align:center}.s-user-settings-delete-otp-timer{font-weight:600;direction:ltr;display:inline-block}.s-user-settings-delete-otp-resend-link{display:block;color:#004956;font-size:0.875rem;margin-top:1rem;text-align:center;text-decoration:underline;cursor:pointer}.s-user-settings-delete-success-body{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-success-btn{--s-button-color:#004956}";
28
21
 
29
22
  const SallaUserSettings = class {
30
23
  constructor(hostRef) {
31
24
  registerInstance(this, hostRef);
32
- // Texts
33
- this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
34
- this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
35
- this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
36
- this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
37
- this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
38
- this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
39
- this.sorryForLeavingText = salla.lang.get('pages.profile.warning_for_deactivate');
40
- this.warningText = salla.lang.get('pages.profile.sorry_for_leaving');
41
- this.keepAccount = salla.lang.get('pages.profile.keep_account');
42
- this.buttonLoading = false;
25
+ this.otpInputs = [];
26
+ this.deletePendingDays = null;
27
+ this.currentStep = 'confirm';
28
+ this.isDeletePending = false;
29
+ this.otpType = 'email';
30
+ this.otpHasError = false;
31
+ this.otpErrorMessage = '';
32
+ this.isSubmitting = false;
33
+ this.isVerifyingOtp = false;
34
+ this.isSwitchingChannel = false;
35
+ this.resendAfter = 30;
36
+ this.showResendLink = false;
43
37
  this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
38
+ /**
39
+ * Bilingual defaults for delete-account keys.
40
+ * Registered via `salla.lang.addBulk` only when missing, so store/central
41
+ * translations always take precedence.
42
+ */
43
+ this.translationDefaults = {
44
+ 'pages.profile.delete_account': { ar: 'حذف الحساب', en: 'Delete account' },
45
+ 'pages.profile.delete_account_description': {
46
+ ar: 'سيُحذف حسابك وبياناتك من المتجر نهائيًا، بما في ذلك سجل طلباتك.',
47
+ en: 'Your account and data will be permanently deleted from the store, including your order history.',
48
+ },
49
+ 'pages.profile.delete_account_confirm_title': {
50
+ ar: 'هل تريد حذف حسابك؟',
51
+ en: 'Do you want to delete your account?',
52
+ },
53
+ 'pages.profile.delete_account_warning': {
54
+ ar: 'بعد الحذف، ستفقد الوصول إلى بياناتك، بما في ذلك سجل الطلبات، وقائمة الأمنيات، وأي نقاط ولاء أو رصيد متاح في المحفظة.',
55
+ en: 'After deletion, you will lose access to your data, including order history, wishlist, and any loyalty points or wallet balance.',
56
+ },
57
+ 'pages.profile.cancel': { ar: 'إلغاء', en: 'Cancel' },
58
+ 'pages.profile.delete_account_otp_title': {
59
+ ar: 'تأكيد حذف الحساب',
60
+ en: 'Confirm account deletion',
61
+ },
62
+ 'pages.profile.delete_account_otp_instruction': {
63
+ ar: 'للمتابعة، أدخل رمز التحقٌّق المرسل إلى:',
64
+ en: 'To continue, enter the verification code sent to:',
65
+ },
66
+ 'pages.profile.delete_account_confirm_otp': { ar: 'تأكيد الحذف', en: 'Confirm deletion' },
67
+ 'pages.profile.delete_account_otp_required': {
68
+ ar: 'يرجى إدخال رمز التحقٌّق',
69
+ en: 'Please enter the verification code',
70
+ },
71
+ 'pages.profile.delete_account_send_via_phone': {
72
+ ar: 'إرسال عبر الهاتف',
73
+ en: 'Send via phone',
74
+ },
75
+ 'pages.profile.delete_account_send_via_email': {
76
+ ar: 'إرسال عبر البريد الإلكتروني',
77
+ en: 'Send via email',
78
+ },
79
+ 'pages.profile.delete_account_success_title': {
80
+ ar: 'أُرسل طلب حذف الحساب',
81
+ en: 'Account deletion request submitted',
82
+ },
83
+ 'pages.profile.delete_account_success_message': {
84
+ ar: 'سيُحذف حسابك خلال 30 يومًا. يمكنك إلغاء الطلب بتسجيل الدخول مرة أخرى قبل اكتمال الحذف.',
85
+ en: 'Your account will be deleted within 30 days. You can cancel the request by signing in again before deletion is complete.',
86
+ },
87
+ 'pages.profile.ok': { ar: 'موافق', en: 'OK' },
88
+ 'pages.profile.cancel_deletion_request': {
89
+ ar: 'تراجع عن الحذف',
90
+ en: 'Withdraw deletion',
91
+ },
92
+ 'pages.profile.delete_account_pending': {
93
+ ar: 'حسابك مجدول للحذف نهائيًا من المتجر خلال :days يومًا. يمكنك التراجع عن الحذف قبل انقضاء المدة.',
94
+ en: 'Your account will be deleted permanently from the store within :days days. You can withdraw the deletion before the deadline.',
95
+ },
96
+ 'pages.profile.delete_request_cancelled': {
97
+ ar: 'تم إلغاء طلب الحذف',
98
+ en: 'Deletion request cancelled',
99
+ },
100
+ };
101
+ this.registerTranslationDefaults();
102
+ this.loadTranslations();
44
103
  salla.onReady(() => {
45
104
  this.isHiddenName = salla.config.get('user.is_hidden_name');
46
105
  this.isNotifiable = salla.config.get('user.is_notifiable');
47
106
  this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
107
+ this.fetchDeleteRequestStatus();
48
108
  if (!this.isNotifiable || !this.isHiddenName) {
49
109
  salla.event.on('profile::info.fetched', res => {
50
110
  this.isHiddenName = res.data.is_hidden_name;
@@ -53,32 +113,409 @@ const SallaUserSettings = class {
53
113
  }
54
114
  });
55
115
  salla.lang.onLoaded(() => {
56
- this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
57
- this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
58
- this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
59
- this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
60
- this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
61
- this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
62
- this.warningText = salla.lang.get('pages.profile.warning_for_deactivate');
63
- this.sorryForLeavingText = salla.lang.get('pages.profile.sorry_for_leaving');
64
- this.keepAccount = salla.lang.get('pages.profile.keep_account');
116
+ this.registerTranslationDefaults();
117
+ this.loadTranslations();
65
118
  });
66
119
  }
120
+ getDaysUntilExecution(executionAt) {
121
+ const executionMs = executionAt > 1e12 ? executionAt : executionAt * 1000;
122
+ return Math.max(0, Math.ceil((executionMs - Date.now()) / 86400000));
123
+ }
124
+ applyPendingMessage() {
125
+ const template = salla.lang.get('pages.profile.delete_account_pending');
126
+ this.deleteAccountPending =
127
+ this.deletePendingDays != null
128
+ ? template.replace(/:days/g, String(salla.helpers.number(this.deletePendingDays)))
129
+ : template;
130
+ }
131
+ async fetchDeleteRequestStatus() {
132
+ try {
133
+ const response = await salla.profile.getDeleteRequest();
134
+ const request = response?.data ?? null;
135
+ const dataRequest = request?.data_request || request;
136
+ const status = dataRequest?.status;
137
+ this.isDeletePending = status === 'pending';
138
+ const executionAt = dataRequest?.execution_at;
139
+ this.deletePendingDays =
140
+ executionAt != null && !Number.isNaN(Number(executionAt))
141
+ ? this.getDaysUntilExecution(Number(executionAt))
142
+ : null;
143
+ this.applyPendingMessage();
144
+ }
145
+ catch {
146
+ // Preserve current pending state. After OTP success we set isDeletePending
147
+ // optimistically; a transient GET failure must not flip the UI back to
148
+ // "Delete account" for a request that is already queued.
149
+ }
150
+ }
151
+ /**
152
+ * Register bilingual (ar/en) defaults without overriding existing translations.
153
+ */
154
+ registerTranslationDefaults() {
155
+ if (!salla?.lang?.addBulk) {
156
+ return;
157
+ }
158
+ const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
159
+ if (salla.lang.get(key) === key) {
160
+ acc[key] = value;
161
+ }
162
+ return acc;
163
+ }, {});
164
+ if (Object.keys(missing).length) {
165
+ salla.lang.addBulk(missing);
166
+ }
167
+ }
168
+ loadTranslations() {
169
+ this.deleteAccount = salla.lang.get('pages.profile.delete_account');
170
+ this.deleteAccountDesc = salla.lang.get('pages.profile.delete_account_description');
171
+ this.deleteConfirmTitle = salla.lang.get('pages.profile.delete_account_confirm_title');
172
+ this.deleteAccountWarning = salla.lang.get('pages.profile.delete_account_warning');
173
+ this.cancelLabel = salla.lang.get('pages.profile.cancel');
174
+ this.deleteOtpTitle = salla.lang.get('pages.profile.delete_account_otp_title');
175
+ this.deleteOtpInstruction = salla.lang.get('pages.profile.delete_account_otp_instruction');
176
+ this.deleteConfirmOtp = salla.lang.get('pages.profile.delete_account_confirm_otp');
177
+ this.sendViaPhone = salla.lang.get('pages.profile.delete_account_send_via_phone');
178
+ this.sendViaEmail = salla.lang.get('pages.profile.delete_account_send_via_email');
179
+ this.deleteSuccessTitle = salla.lang.get('pages.profile.delete_account_success_title');
180
+ this.deleteSuccessMessage = salla.lang.get('pages.profile.delete_account_success_message');
181
+ this.okLabel = salla.lang.get('pages.profile.ok');
182
+ this.cancelDeletionRequest = salla.lang.get('pages.profile.cancel_deletion_request');
183
+ this.applyPendingMessage();
184
+ this.resendAfterLabel = salla.lang.get('blocks.header.resend_after');
185
+ this.resendLabel = salla.lang.get('blocks.comments.submit');
186
+ this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
187
+ this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
188
+ this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
189
+ this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
190
+ }
67
191
  toggleSetting(setting, event) {
68
192
  salla.profile.updateSettings({ name: setting, value: event.target.checked });
69
193
  }
70
194
  capitalizeText(str) {
195
+ if (!str)
196
+ return '';
71
197
  return str.charAt(0).toUpperCase() + str.slice(1);
72
198
  }
73
- openDeactivateModal() {
74
- this.confirmationModal.setTitle(this.capitalizeText(this.deactivateAccount));
199
+ getOtpTarget() {
200
+ if (this.otpType === 'email') {
201
+ return salla.config.get('user.email') || '';
202
+ }
203
+ return salla.config.get('user.mobile') || '';
204
+ }
205
+ updateModalForStep() {
206
+ if (!this.confirmationModal)
207
+ return;
208
+ switch (this.currentStep) {
209
+ case 'confirm':
210
+ this.confirmationModal.setTitle(this.capitalizeText(this.deleteConfirmTitle));
211
+ break;
212
+ case 'otp':
213
+ this.confirmationModal.setTitle(this.capitalizeText(this.deleteOtpTitle));
214
+ break;
215
+ case 'success':
216
+ this.confirmationModal.setTitle(this.capitalizeText(this.deleteSuccessTitle));
217
+ break;
218
+ }
219
+ }
220
+ openDeleteModal() {
221
+ this.currentStep = 'confirm';
222
+ this.otpType = 'email';
223
+ this.resetOtpInputs();
224
+ this.clearResendTimer();
225
+ this.updateModalForStep();
75
226
  this.confirmationModal.open();
76
227
  }
77
- async deleteAccount() {
78
- await salla.profile.delete().finally(() => this.confirmationModal.close());
228
+ closeDeleteModal() {
229
+ this.clearResendTimer();
230
+ this.confirmationModal?.close();
231
+ }
232
+ goBackFromOtp() {
233
+ this.clearResendTimer();
234
+ this.resetOtpInputs();
235
+ this.resetOtpError();
236
+ this.currentStep = 'confirm';
237
+ this.updateModalForStep();
238
+ }
239
+ async handleModalVisibilityChanged(event) {
240
+ if (event.detail)
241
+ return;
242
+ this.clearResendTimer();
243
+ const closedAfterSuccess = this.currentStep === 'success';
244
+ if (closedAfterSuccess) {
245
+ this.isDeletePending = true;
246
+ }
247
+ this.currentStep = 'confirm';
248
+ this.resetOtpInputs();
249
+ if (closedAfterSuccess) {
250
+ await this.fetchDeleteRequestStatus();
251
+ }
252
+ }
253
+ formatResendTimer(seconds) {
254
+ const padded = seconds >= 10 ? `${seconds}` : `0${seconds}`;
255
+ return `00 : ${padded}`;
256
+ }
257
+ updateResendTimerDisplay() {
258
+ if (this.timerEl) {
259
+ this.timerEl.innerHTML = this.formatResendTimer(this.resendAfter);
260
+ }
261
+ }
262
+ isDeleteRequestInFlight() {
263
+ return this.isSubmitting || this.isSwitchingChannel || this.isVerifyingOtp;
264
+ }
265
+ async initiateDeleteRequest(source = 'confirm') {
266
+ // Ignore overlapping clicks/auto-retries so loading flags stay paired with one request.
267
+ if (this.isDeleteRequestInFlight()) {
268
+ return;
269
+ }
270
+ if (source === 'switch' || source === 'resend') {
271
+ this.isSwitchingChannel = true;
272
+ }
273
+ else {
274
+ this.isSubmitting = true;
275
+ }
276
+ try {
277
+ await salla.profile.initiateDeleteRequest(this.otpType);
278
+ this.currentStep = 'otp';
279
+ this.updateModalForStep();
280
+ this.resetOtpInputs();
281
+ this.startResendTimer();
282
+ // salla-verify ignores profile::verification while this delete modal is open
283
+ // (and when payload.request_type === 'delete_account').
284
+ setTimeout(() => this.otpInputs[0]?.focus(), 100);
285
+ }
286
+ catch (error) {
287
+ salla.notify?.error?.(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
288
+ }
289
+ finally {
290
+ if (source === 'switch' || source === 'resend') {
291
+ this.isSwitchingChannel = false;
292
+ }
293
+ else {
294
+ this.isSubmitting = false;
295
+ }
296
+ }
297
+ }
298
+ async switchOtpChannel() {
299
+ if (this.isDeleteRequestInFlight()) {
300
+ return;
301
+ }
302
+ this.otpType = this.otpType === 'email' ? 'mobile' : 'email';
303
+ await this.initiateDeleteRequest('switch');
304
+ }
305
+ async resendOtp() {
306
+ if (!this.showResendLink || this.isDeleteRequestInFlight())
307
+ return;
308
+ await this.initiateDeleteRequest('resend');
309
+ }
310
+ collectOtpCode() {
311
+ const code = salla.helpers
312
+ .number(this.otpInputs.map(input => input?.value || '').join(''), true)
313
+ .replace(/[^0-9]/g, '');
314
+ if (this.hiddenCodeInput) {
315
+ this.hiddenCodeInput.value = code;
316
+ }
317
+ return code;
318
+ }
319
+ resetOtpError() {
320
+ this.otpHasError = false;
321
+ this.otpErrorMessage = '';
322
+ }
323
+ setOtpError(message) {
324
+ this.otpHasError = true;
325
+ this.otpErrorMessage = message;
326
+ }
327
+ async verifyDeleteOtp() {
328
+ // Auto-fill and the confirm button can both fire — only one verify at a time.
329
+ if (this.isVerifyingOtp || this.isSwitchingChannel) {
330
+ return;
331
+ }
332
+ const code = this.collectOtpCode();
333
+ if (code.length < 4) {
334
+ this.setOtpError(salla.lang.get('pages.profile.delete_account_otp_required'));
335
+ this.otpInputs[code.length]?.focus();
336
+ return;
337
+ }
338
+ this.resetOtpError();
339
+ this.isVerifyingOtp = true;
340
+ try {
341
+ const response = await salla.profile.verifyDeleteRequest({ type: this.otpType, code });
342
+ this.deleteSuccessMessage =
343
+ response?.data?.message || salla.lang.get('pages.profile.delete_account_success_message');
344
+ this.clearResendTimer();
345
+ this.resetOtpInputs();
346
+ this.otpInputs = [];
347
+ this.currentStep = 'success';
348
+ this.updateModalForStep();
349
+ }
350
+ catch (error) {
351
+ this.setOtpError(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
352
+ this.resetOtpInputs();
353
+ }
354
+ finally {
355
+ this.isVerifyingOtp = false;
356
+ }
357
+ }
358
+ async confirmSuccess() {
359
+ this.isDeletePending = true;
360
+ this.closeDeleteModal();
361
+ this.currentStep = 'confirm';
362
+ await this.fetchDeleteRequestStatus();
363
+ }
364
+ async cancelDeleteRequest() {
365
+ if (this.isSubmitting) {
366
+ return;
367
+ }
368
+ this.isSubmitting = true;
369
+ try {
370
+ const response = await salla.profile.cancelDeleteRequest();
371
+ const message = response.message || salla.lang.get('pages.profile.delete_request_cancelled');
372
+ this.isDeletePending = false;
373
+ salla.notify?.success?.(message);
374
+ }
375
+ catch (error) {
376
+ salla.notify?.error?.(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
377
+ }
378
+ finally {
379
+ this.isSubmitting = false;
380
+ }
381
+ }
382
+ resetOtpInputs() {
383
+ this.otpInputs.forEach(input => {
384
+ if (input)
385
+ input.value = '';
386
+ });
387
+ if (this.hiddenCodeInput) {
388
+ this.hiddenCodeInput.value = '';
389
+ }
390
+ }
391
+ modifyNextOtpInput(el, data) {
392
+ el.value = data[0];
393
+ data = data.substring(1);
394
+ if (el.nextElementSibling && data.length) {
395
+ this.modifyNextOtpInput(el.nextElementSibling, data);
396
+ }
397
+ else if (!el.nextElementSibling && data.length === 0) {
398
+ el.focus();
399
+ }
400
+ else if (el.nextElementSibling && data.length === 0) {
401
+ el.nextElementSibling.focus();
402
+ }
403
+ }
404
+ splitOtpNumber(e) {
405
+ const data = salla.helpers.number(e.data || e.target.value || '', true).replace(/[^0-9]/g, '');
406
+ if (!data || data.length === 1)
407
+ return;
408
+ this.modifyNextOtpInput(e.target, data);
409
+ }
410
+ allOtpInputsFilled() {
411
+ return this.otpInputs.every(input => input?.value);
412
+ }
413
+ handleOtpInput(ev) {
414
+ this.resetOtpError();
415
+ ev.target.value = salla.helpers.number(ev.target.value || '', true);
416
+ salla.helpers.inputDigitsOnly(ev.target);
417
+ if (this.allOtpInputsFilled()) {
418
+ setTimeout(() => this.verifyDeleteOtp(), 100);
419
+ }
420
+ }
421
+ handleOtpKeyUp(ev) {
422
+ this.resetOtpError();
423
+ if (['Alt', 'Shift', 'Control', 'AltGraph', 'Ctrl'].includes(ev.key))
424
+ return;
425
+ const key = ev.keyCode || ev.charCode;
426
+ if (ev.target.value) {
427
+ ev.target.nextElementSibling?.focus();
428
+ ev.target.nextElementSibling?.select();
429
+ }
430
+ else if ([8, 46].includes(key)) {
431
+ ev.target.previousElementSibling?.focus();
432
+ ev.target.previousElementSibling?.select();
433
+ }
434
+ if (ev.target.value.length > 1) {
435
+ this.splitOtpNumber(ev);
436
+ }
437
+ }
438
+ handleOtpPaste(ev) {
439
+ this.resetOtpError();
440
+ const clipboardText = salla.helpers.number(ev.clipboardData.getData('text') || '', true);
441
+ const text = clipboardText.replace(/[^0-9]/g, '').substring(0, this.otpInputs.length);
442
+ this.otpInputs.forEach(input => (input.value = ''));
443
+ if (this.otpInputs[0]) {
444
+ this.modifyNextOtpInput(this.otpInputs[0], text);
445
+ }
446
+ }
447
+ handleOtpFocus(ev) {
448
+ if (ev.target === this.otpInputs[0])
449
+ return;
450
+ if (this.otpInputs[0]?.value === '') {
451
+ this.otpInputs[0].focus();
452
+ }
453
+ if (ev.target.previousElementSibling?.value === '') {
454
+ ev.target.previousElementSibling.focus();
455
+ }
456
+ }
457
+ startResendTimer() {
458
+ this.clearResendTimer();
459
+ this.resendAfter = 30;
460
+ this.showResendLink = false;
461
+ this.updateResendTimerDisplay();
462
+ this.resendTimerId = setInterval(() => {
463
+ this.resendAfter--;
464
+ if (this.resendAfter <= 0) {
465
+ this.clearResendTimer();
466
+ this.showResendLink = true;
467
+ return;
468
+ }
469
+ this.updateResendTimerDisplay();
470
+ }, 1000);
471
+ }
472
+ clearResendTimer() {
473
+ if (this.resendTimerId) {
474
+ clearInterval(this.resendTimerId);
475
+ this.resendTimerId = null;
476
+ }
477
+ this.showResendLink = false;
478
+ }
479
+ renderUserDeleteIcon() {
480
+ return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", color: "currentColor", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14.5 8C14.5 5.23858 12.2614 3 9.5 3C6.73858 3 4.5 5.23858 4.5 8C4.5 10.7614 6.73858 13 9.5 13C12.2614 13 14.5 10.7614 14.5 8Z" }), h("path", { d: "M15.5 21L18.5 18M18.5 18L21.5 15M18.5 18L15.5 15M18.5 18L21.5 21" }), h("path", { d: "M2.5 20C2.5 16.134 5.63401 13 9.5 13C10.775 13 11.9704 13.3409 13 13.9365" })));
481
+ }
482
+ renderConfirmStep() {
483
+ return (h("div", { class: "s-user-settings-delete-body" }, h("p", { class: "s-user-settings-delete-warning" }, this.deleteAccountWarning), h("div", { class: "s-user-settings-delete-actions s-user-settings-delete-actions--row" }, h("salla-button", { width: "wide", fill: "outline", color: "danger", onClick: () => this.closeDeleteModal() }, this.capitalizeText(this.cancelLabel)), h("salla-button", { width: "wide", color: "primary", loading: this.isSubmitting, onClick: () => this.initiateDeleteRequest() }, this.capitalizeText(this.deleteAccount)))));
484
+ }
485
+ renderOtpStep() {
486
+ return (h("div", { class: "s-user-settings-delete-body" }, h("p", { class: "s-user-settings-delete-otp-instruction" }, this.deleteOtpInstruction), h("p", { class: "s-user-settings-delete-otp-target" }, this.getOtpTarget()), h("input", { type: "hidden", name: "code", maxlength: "4", ref: el => (this.hiddenCodeInput = el) }), h("div", { class: {
487
+ 's-user-settings-delete-otp-codes': true,
488
+ 'has-error': this.otpHasError,
489
+ }, dir: "ltr" }, [1, 2, 3, 4].map(i => (h("input", { type: "text", autocomplete: "one-time-code", pattern: "[0-9]*", inputmode: "numeric", maxlength: "1", id: `delete-otp-${i}`, class: {
490
+ 's-user-settings-delete-otp-input': true,
491
+ 's-has-error': this.otpHasError,
492
+ }, onInput: e => this.handleOtpInput(e), onPaste: e => this.handleOtpPaste(e), onKeyUp: e => this.handleOtpKeyUp(e), onFocus: e => this.handleOtpFocus(e), ref: el => (this.otpInputs[i - 1] = el), required: true })))), this.otpHasError && this.otpErrorMessage ? (h("span", { class: "s-user-settings-delete-otp-error" }, this.otpErrorMessage)) : (''), h("div", { class: "s-user-settings-delete-actions s-user-settings-delete-actions--stack" }, h("salla-button", { width: "wide", color: "primary", disabled: this.isSwitchingChannel, onClick: () => this.verifyDeleteOtp() }, this.capitalizeText(this.deleteConfirmOtp)), h("salla-button", { width: "wide", fill: "outline", color: "primary", disabled: this.isVerifyingOtp, onClick: () => this.switchOtpChannel() }, this.capitalizeText(this.otpType === 'email' ? this.sendViaPhone : this.sendViaEmail))), h("p", { class: "s-user-settings-delete-otp-resend", style: { display: this.showResendLink ? 'none' : 'block' } }, this.resendAfterLabel, h("b", { class: "s-user-settings-delete-otp-timer mx-1 font-bold", ref: el => (this.timerEl = el) })), h("a", { href: "#", class: "s-user-settings-delete-otp-resend-link", style: { display: this.showResendLink ? 'block' : 'none' }, onClick: e => {
493
+ e.preventDefault();
494
+ this.resendOtp();
495
+ } }, this.resendLabel)));
496
+ }
497
+ renderSuccessStep() {
498
+ return (h("div", { class: "s-user-settings-delete-body" }, h("p", { class: "s-user-settings-delete-success-body" }, this.deleteSuccessMessage), h("div", { class: "s-user-settings-delete-actions s-user-settings-delete-actions--stack" }, h("salla-button", { class: "s-user-settings-delete-success-btn", width: "wide", color: "primary", onClick: () => this.confirmSuccess() }, this.capitalizeText(this.okLabel)))));
499
+ }
500
+ renderDeleteStep() {
501
+ switch (this.currentStep) {
502
+ case 'otp':
503
+ return this.renderOtpStep();
504
+ case 'success':
505
+ return this.renderSuccessStep();
506
+ case 'confirm':
507
+ default:
508
+ return this.renderConfirmStep();
509
+ }
510
+ }
511
+ renderDeleteSectionAction() {
512
+ if (this.isDeletePending) {
513
+ return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", loading: this.isSubmitting, onClick: () => this.cancelDeleteRequest() }, this.capitalizeText(this.cancelDeletionRequest)));
514
+ }
515
+ return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeleteModal() }, this.capitalizeText(this.deleteAccount)));
79
516
  }
80
517
  render() {
81
- return (h(Host, { key: 'ae94c12d52ff04f41f08d4a107a35aa2bd94ee0a', class: "s-user-settings-wrapper" }, this.canHideName && h("div", { key: '5b46a680b85fc72976c5c3d4f478b64b6c1d483c', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'b41bb42ea03a2ed63c7664d0b98ee045110c31d0' }, h("div", { key: '29abb43471c5160b7817f153c8968593332e7826', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '3fd763ac2437570eed2073acb6b57cbdd0f1cdac', innerHTML: UserCancel })), h("div", { key: 'cbff9be1b97a31a11d1b10d88d2408070047fd3b', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: '5fd0a91c56d9b8deeed04fb52a033fe5c1ad84ee', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '81ed76bd7b69ae7b16440f131cd78905d33da607', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: 'ae98c8814636b4e6008c421b291353ba2c4b91e7', class: "s-toggle" }, h("input", { key: '0c01d7706053667e80539a0a293ea21f4304e423', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: '31d91e01bc2a28a6cd81af024b99bd42f1a04947', class: "s-toggle-switcher" }))))), h("div", { key: '7dd3c504babb5b79d07d08c5665cd5e080cb9a4d', class: "s-user-settings-section" }, h("salla-list-tile", { key: '9573ce56a617ac5c3e64f7cd868269f7f5f991cd' }, h("div", { key: 'deb424768ebb4b1086067816f4359e5b56da6044', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'db74169678f85313ef3b6c9a5ff92f8afaf012c2', innerHTML: Bullhorn })), h("div", { key: '569cc0dd9462bb606dab18116c071acb49fd8f48', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'fbe15f41b42ee2f98585ae29ff985cbe3b6f0ef1', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: 'c1a4fd8a0a340a73adb9efac7c7d75534b13ce3a', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: 'fade0f4d1a9214169bb087900561afd482674a75', class: "s-toggle" }, h("input", { key: '87cf0b041a89d79b23c2dd0d929c3b14dd18fb96', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '7812c9a8f51a7ad64172db275ac050f8b45ec6e5', class: "s-toggle-switcher" }))))), h("div", { key: '7224d14d365a9fd767e2b900dd1e30c6bee69e7e', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", { key: 'cb61e0a146115885a36455159d808d7edbbdff5b' }, h("div", { key: 'c073c1bbca5ae9496a4116323611d15f33d68566', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'ed78cb19724511219f35ed85e3d915ced708d46c', innerHTML: UserOff })), h("div", { key: 'f8a9ba483b7af0216536a130554186b722f9ad6e', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { key: 'fd9cdf72725204e320c56b1bd6ac4cf2d77d2176', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { key: '739a99cfb762cd18d91c955b218ab0d06a289a9a', slot: 'action', class: "s-user-settings-section-action" }, h("salla-button", { key: 'c2fd322ae8ff4060c21c65cfdd8b1d89bb338e3f', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), h("salla-modal", { key: 'f8c8a2922ffd79d2dc04a35cf964882526b6b91c', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, h("span", { key: 'b036e50b12f521c0f623ae7afded1113b0fc20ab', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { key: '0ae61369ece6d96056e0b461ba7a3e0104e00583', class: "s-user-settings-confirmation" }, h("div", { key: 'ef2eef33396e9eaa0c43d2196e43b61917f3c5fe', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { key: '1656cb466302c11990d5e0d9833b21cb47766846', class: "s-user-settings-confirmation-actions" }, h("salla-button", { key: 'ce75f721106b103e6c7f2cfc75f8be08aba54f9c', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { key: '006ceecf237eee2febde96ff584eb8256b820049', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
518
+ return (h(Host, { key: '64356c5b57d826fce8c29cc319a9762464c7fe51', class: "s-user-settings-wrapper" }, this.canHideName && (h("div", { key: '4f7b3eb703f89e4a758fca54ba1b214f6724aaea', class: "s-user-settings-section" }, h("salla-list-tile", { key: '7ad109e36b278fe81a314d51e1ab68030dd96cdc' }, h("div", { key: 'c789b7e2c541e25aaaf336e052d1986f6429da71', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '5d7b377aefb80139527d8814ee2c636fa9c73e0f', innerHTML: UserCancel })), h("div", { key: 'fdb9d6130ef27cffbe4e2ef06e7b9155d0d04c2b', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: 'bd8592a487c79926355eeea25a5e1429bca0fd80', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: 'cf21ed12bb38dc3a613efac6d017a72aab38780b', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '160140e25cf8e6c4556e52c0b36ba5769618b419', class: "s-toggle" }, h("input", { key: '369a694fabbd42e6c239b23c26d68f858775ffe2', class: "s-toggle-input", checked: this.isHiddenName, onChange: e => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: '5952ec01913ef95d888eeb3aace14123ffd3ef6f', class: "s-toggle-switcher" })))))), h("div", { key: '885355f8435759c9359a3d9eb95d5637b1c74751', class: "s-user-settings-section" }, h("salla-list-tile", { key: '93b607850b20add5384a3b28e4e58fbfcb181d53' }, h("div", { key: 'c795aabfdc6df0beb9c0bfcf73ad87625eb7f51b', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'a59ede027c4466a1e84e8e8b4c649c7b418dd0a3', innerHTML: Bullhorn })), h("div", { key: 'e7af96b6f919a8be8bb126237cb3977e72a7c089', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'dab7b270443b6eddccd7df739c2bee82eb7706af', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '56a6f18c788891fe9215a57d0fcaa5cf98bd3aa5', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '1fc28780fe779099eaed7916f31cbbb681c10fe9', class: "s-toggle" }, h("input", { key: '832edd6e5b806171bb913163b7d5c19dbb0833f5', class: "s-toggle-input", checked: this.isNotifiable, onChange: e => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '54260d8cca19ca6914cdd3bf15093b9669fef44a', class: "s-toggle-switcher" }))))), h("div", { key: '549bae1159a55b035952a12c8dc9d2b9d660f5bf', class: "s-user-settings-section s-user-settings-section-delete-user" }, h("salla-list-tile", { key: '7969327e863cd998a120f27d61621d83ef8e57d5' }, h("div", { key: 'acf14b5e6ce76657fe0016aa63e26851e7688cd5', slot: "icon", class: "s-user-settings-section-icon" }, this.renderUserDeleteIcon()), h("div", { key: '4a38cf9d0510e784317b0eb4db2fd4589a9f71d4', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deleteAccount)), h("div", { key: '054f6a6c30f2eb9794f83a0998f20e208c7ed85a', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.isDeletePending ? this.deleteAccountPending : this.deleteAccountDesc)), h("div", { key: '00d392a300b986d5d3e6f6711e6996df9731962d', slot: "action", class: "s-user-settings-section-action" }, this.renderDeleteSectionAction()))), h("salla-modal", { key: 'd4e8006e57d9c35267177f07b60e510ea3e53400', id: "salla-user-settings-delete-modal", width: "xs", centered: true, showBack: this.currentStep === 'otp', isClosable: this.currentStep !== 'success', iconStyle: this.currentStep === 'success' ? 'success' : undefined, onModalVisibilityChanged: e => this.handleModalVisibilityChanged(e), onModalBack: () => this.goBackFromOtp(), ref: modal => (this.confirmationModal = modal) }, this.currentStep !== 'success' ? (h("span", { slot: "icon", class: "s-user-settings-delete-icon" }, this.renderUserDeleteIcon())) : null, h("div", { key: this.currentStep, class: "s-user-settings-delete-step" }, this.renderDeleteStep()))));
82
519
  }
83
520
  };
84
521
  SallaUserSettings.style = sallaUserSettingsCss;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BmH_SCLp.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BM5d07q2.js';
5
5
  import { e as email } from './mail-DzAIgzdz.js';
6
6
 
7
7
  var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
@@ -51,6 +51,14 @@ const SallaVerify = class {
51
51
  //todo:: change this way, now we fire the event from the backend, we should listen to salla.profile.event.onUpdated
52
52
  salla.event.on('profile::verification', data => {
53
53
  let payload = Array.isArray(data) ? data[0] : data;
54
+ // Account-deletion OTP is owned by <salla-user-settings>; opening this modal
55
+ // (and auto-reloading) would break that flow. Prefer payload.request_type when
56
+ // present; fall back to the delete modal being open.
57
+ const isDeleteRequest = payload?.request_type === 'delete_account'
58
+ || document.getElementById('salla-user-settings-delete-modal')?.hasAttribute('visible');
59
+ if (isDeleteRequest) {
60
+ return;
61
+ }
54
62
  this.isProfileVerify = true;
55
63
  this.open(payload);
56
64
  this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + payload.type);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-BmH_SCLp.js';
4
+ import { r as registerInstance, h, H as Host } from './index-BM5d07q2.js';
5
5
 
6
6
  const sallaWalletCss = ".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";
7
7