@salla.sa/twilight-components 2.14.526 → 2.14.527
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.
- package/dist/cjs/{filepond-dCwl_WGS.js → filepond-b0w4ucsY.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-JE47euyP.js → filepond-plugin-file-poster-DcK1l1GY.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CFbzBG_a.js → filepond-plugin-file-validate-size-CkPhV0MZ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-B95BRuZd.js → filepond-plugin-file-validate-type-FezmfZnb.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-QbQgAOte.js → filepond-plugin-image-edit-SjJnSovO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C3KRxOCO.js → filepond-plugin-image-exif-orientation-BadaWudo.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Bg5kON16.js → filepond-plugin-image-preview-OycIHnPl.js} +1 -1
- package/dist/cjs/{functions-DI3Yp4Of.js → functions-B5JSRkNf.js} +1 -1
- package/dist/cjs/{index-CL2v3rWe.js → index-C8azAHop.js} +2 -2
- package/dist/cjs/{intlTelInput-BhGMuXpz.js → intlTelInput-DCVpeeHH.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +5 -4
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/{tracked-promise-BE9q9nKy.js → tracked-promise-C_iMjRSx.js} +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-DOFw7Ga1.js → vanilla-picker-BlVuhlOr.js} +1 -1
- package/dist/collection/components/salla-basket-gap/salla-basket-gap.js +4 -3
- package/dist/components/index.js +2 -2
- package/dist/components/salla-basket-gap.js +4 -3
- package/dist/esm/{filepond-CTe79mlR.js → filepond-BRxfxd7t.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-FpMbRCuf.js → filepond-plugin-file-poster-5YXrzIG7.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-B_GPzKYu.js → filepond-plugin-file-validate-size-Cf8HW8zg.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-CgBrFV7x.js → filepond-plugin-file-validate-type-CYKPeh3k.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DElBchkY.js → filepond-plugin-image-edit-B3vxnYdF.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BhZHvn_5.js → filepond-plugin-image-exif-orientation-BbzOlsEM.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-D2oaWqOt.js → filepond-plugin-image-preview-BWeaWqAq.js} +1 -1
- package/dist/esm/{functions-DzuTSHQl.js → functions-Bni-nvUA.js} +1 -1
- package/dist/esm/{index-LKlIr4DH.js → index-MrxrxOqi.js} +2 -2
- package/dist/esm/{intlTelInput-Dv1YqwOl.js → intlTelInput-DpfK9QTH.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +5 -4
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down_2.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_2.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card_2.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/{tracked-promise-yYcxeJzZ.js → tracked-promise-r8GfVNie.js} +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-BAPOtEmC.js → vanilla-picker-odqYYCwx.js} +1 -1
- package/dist/twilight/{p-4cc9583f.entry.js → p-012f1725.entry.js} +1 -1
- package/dist/twilight/{p-cffe12a3.entry.js → p-01f19c8e.entry.js} +1 -1
- package/dist/twilight/{p-961941f2.entry.js → p-045bbe40.entry.js} +1 -1
- package/dist/twilight/{p-233039ec.entry.js → p-06089393.entry.js} +1 -1
- package/dist/twilight/{p-797a7c1e.entry.js → p-08514188.entry.js} +1 -1
- package/dist/twilight/{p-288e4fd6.entry.js → p-08bbb599.entry.js} +1 -1
- package/dist/twilight/{p-44bf6cdf.entry.js → p-0ab0dcc6.entry.js} +1 -1
- package/dist/twilight/{p-eed700e7.entry.js → p-0d1cc718.entry.js} +1 -1
- package/dist/twilight/{p-3a46d113.entry.js → p-112dfb27.entry.js} +1 -1
- package/dist/twilight/{p-f418df90.entry.js → p-14fe0051.entry.js} +1 -1
- package/dist/twilight/{p-c1036ebd.entry.js → p-1acb62f7.entry.js} +1 -1
- package/dist/twilight/{p-b5c106ac.entry.js → p-1b999b89.entry.js} +1 -1
- package/dist/twilight/{p-067f052b.entry.js → p-1f049143.entry.js} +1 -1
- package/dist/twilight/{p-5c5f4f73.entry.js → p-1f0fab6c.entry.js} +1 -1
- package/dist/twilight/{p-a435c54c.entry.js → p-1f2d4f6d.entry.js} +1 -1
- package/dist/twilight/{p-d477d0ab.entry.js → p-20ae6a3d.entry.js} +1 -1
- package/dist/twilight/{p-ef4a0ae4.entry.js → p-258f5ec9.entry.js} +1 -1
- package/dist/twilight/{p-1b5189f0.entry.js → p-27437b3c.entry.js} +1 -1
- package/dist/twilight/{p-9a9d4676.entry.js → p-29c02546.entry.js} +1 -1
- package/dist/twilight/{p-59dbe5f1.entry.js → p-30d348b3.entry.js} +1 -1
- package/dist/twilight/{p-71344ddc.entry.js → p-30d8f802.entry.js} +1 -1
- package/dist/twilight/{p-761165fd.entry.js → p-31eab38b.entry.js} +1 -1
- package/dist/twilight/{p-8bb53ed2.entry.js → p-3983347e.entry.js} +1 -1
- package/dist/twilight/{p-de14bb3d.entry.js → p-39e0472d.entry.js} +1 -1
- package/dist/twilight/{p-6204462a.entry.js → p-3b68796d.entry.js} +1 -1
- package/dist/twilight/{p-72e4ef6a.entry.js → p-402227e5.entry.js} +1 -1
- package/dist/twilight/{p-fd33515c.entry.js → p-48143622.entry.js} +1 -1
- package/dist/twilight/{p-60a7b50b.entry.js → p-491a8688.entry.js} +1 -1
- package/dist/twilight/{p-8a3cb52e.entry.js → p-4a71bc5b.entry.js} +1 -1
- package/dist/twilight/{p-6bbc3c94.entry.js → p-52d2c526.entry.js} +1 -1
- package/dist/twilight/{p-2e9fcab1.entry.js → p-58641d12.entry.js} +1 -1
- package/dist/twilight/{p-3f6fac09.entry.js → p-5b20bc08.entry.js} +1 -1
- package/dist/twilight/{p-f4733e21.entry.js → p-61b090d1.entry.js} +1 -1
- package/dist/twilight/{p-61cd30d3.entry.js → p-644d9658.entry.js} +1 -1
- package/dist/twilight/{p-beaf3f78.entry.js → p-67269624.entry.js} +1 -1
- package/dist/twilight/{p-97f12f7b.entry.js → p-67d0ce1c.entry.js} +1 -1
- package/dist/twilight/{p-9445f844.entry.js → p-6d0825be.entry.js} +1 -1
- package/dist/twilight/{p-4e213aab.entry.js → p-70da8cf5.entry.js} +1 -1
- package/dist/twilight/{p-50365a49.entry.js → p-714be207.entry.js} +1 -1
- package/dist/twilight/{p-e6ae56e1.entry.js → p-7206a775.entry.js} +1 -1
- package/dist/twilight/{p-b76720e1.entry.js → p-72094246.entry.js} +1 -1
- package/dist/twilight/{p-879de784.entry.js → p-7524a81a.entry.js} +1 -1
- package/dist/twilight/{p-166343b3.entry.js → p-7a32a312.entry.js} +1 -1
- package/dist/twilight/{p-9bd015e5.entry.js → p-7f923cb2.entry.js} +1 -1
- package/dist/twilight/{p-c7c2dad0.entry.js → p-8105ed54.entry.js} +1 -1
- package/dist/twilight/{p-c06229a1.entry.js → p-82c51ac3.entry.js} +1 -1
- package/dist/twilight/{p-1e799c60.entry.js → p-88013de3.entry.js} +1 -1
- package/dist/twilight/{p-b1b11ebb.entry.js → p-8bc4dc7e.entry.js} +1 -1
- package/dist/twilight/{p-630e769f.entry.js → p-8cd7ff9e.entry.js} +1 -1
- package/dist/twilight/{p-2766a17f.entry.js → p-8e0ddbe8.entry.js} +1 -1
- package/dist/twilight/{p-5555817c.entry.js → p-90836db4.entry.js} +1 -1
- package/dist/twilight/{p-4d46bd3d.entry.js → p-93af5955.entry.js} +1 -1
- package/dist/twilight/{p-e407d576.entry.js → p-9573a650.entry.js} +1 -1
- package/dist/twilight/{p-584817e5.entry.js → p-968e2822.entry.js} +1 -1
- package/dist/twilight/{p-882128d2.entry.js → p-9b2515ab.entry.js} +1 -1
- package/dist/twilight/{p-89ff463e.entry.js → p-9b768009.entry.js} +1 -1
- package/dist/twilight/{p-fe40bb32.entry.js → p-9be5a903.entry.js} +1 -1
- package/dist/twilight/{p-253afd49.entry.js → p-9df6fb80.entry.js} +1 -1
- package/dist/twilight/{p-j2CozAo8.js → p-BGtF1_Bf.js} +1 -1
- package/dist/twilight/{p-DmcP-9uS.js → p-BZYlNbpW.js} +1 -1
- package/dist/twilight/{p-BGqFcZFD.js → p-C34Ycrkk.js} +1 -1
- package/dist/twilight/{p-DkALFehO.js → p-C_BV2ex7.js} +1 -1
- package/dist/twilight/{p-BVtJp-gU.js → p-C_lEyosA.js} +1 -1
- package/dist/twilight/{p-By36wPtc.js → p-CcPplbOM.js} +1 -1
- package/dist/twilight/{p-HiDU1qAC.js → p-ChCYUlik.js} +1 -1
- package/dist/twilight/{p-BOmRCp86.js → p-Cr5HDKQ9.js} +1 -1
- package/dist/twilight/{p-CnIis-ob.js → p-DBIOj_I_.js} +1 -1
- package/dist/twilight/{p-Bdz016Fy.js → p-DffCiPZo.js} +1 -1
- package/dist/twilight/{p-BJ2QKyWM.js → p-J94Exn76.js} +1 -1
- package/dist/twilight/{p-LKlIr4DH.js → p-MrxrxOqi.js} +1 -1
- package/dist/twilight/{p-2f6e46b0.entry.js → p-a433dd94.entry.js} +1 -1
- package/dist/twilight/{p-10c3a012.entry.js → p-a8fe909f.entry.js} +1 -1
- package/dist/twilight/{p-bb242f20.entry.js → p-a9b36fde.entry.js} +1 -1
- package/dist/twilight/{p-c19412a4.entry.js → p-ab087e8d.entry.js} +1 -1
- package/dist/twilight/{p-b063d0f3.entry.js → p-ab18ee85.entry.js} +1 -1
- package/dist/twilight/{p-8993c586.entry.js → p-ab844de4.entry.js} +1 -1
- package/dist/twilight/{p-466fa362.entry.js → p-ac0ec991.entry.js} +1 -1
- package/dist/twilight/{p-eea93ac7.entry.js → p-ac8da0ee.entry.js} +1 -1
- package/dist/twilight/{p-96fff354.entry.js → p-ade37269.entry.js} +1 -1
- package/dist/twilight/{p-500f0db8.entry.js → p-b22b92fb.entry.js} +1 -1
- package/dist/twilight/{p-d81ee10d.entry.js → p-b28588ba.entry.js} +1 -1
- package/dist/twilight/{p-f5154b22.entry.js → p-b33582fd.entry.js} +1 -1
- package/dist/twilight/{p-dfea079f.entry.js → p-b6f4b3ec.entry.js} +1 -1
- package/dist/twilight/{p-c06ab3be.entry.js → p-bb7bd408.entry.js} +1 -1
- package/dist/twilight/{p-146706fc.entry.js → p-c41cb3fa.entry.js} +1 -1
- package/dist/twilight/{p-85819cea.entry.js → p-c45528db.entry.js} +1 -1
- package/dist/twilight/{p-7edb518f.entry.js → p-cac22061.entry.js} +1 -1
- package/dist/twilight/p-cadadc88.entry.js +4 -0
- package/dist/twilight/{p-cf3b863c.entry.js → p-d0696872.entry.js} +1 -1
- package/dist/twilight/{p-1227aa55.entry.js → p-d4d595c1.entry.js} +1 -1
- package/dist/twilight/{p-b46bd39f.entry.js → p-d5b9d505.entry.js} +1 -1
- package/dist/twilight/{p-06c4a0cd.entry.js → p-d76ad30b.entry.js} +1 -1
- package/dist/twilight/{p-4c36ba4c.entry.js → p-d7957d69.entry.js} +1 -1
- package/dist/twilight/{p-2ea5c336.entry.js → p-d9f1cd81.entry.js} +1 -1
- package/dist/twilight/{p-326a584d.entry.js → p-dd41634a.entry.js} +1 -1
- package/dist/twilight/{p-ebaa623e.entry.js → p-e43f07fc.entry.js} +1 -1
- package/dist/twilight/{p-b6ce3117.entry.js → p-ea3264f8.entry.js} +1 -1
- package/dist/twilight/{p-3a9c2e9d.entry.js → p-ea7e2466.entry.js} +1 -1
- package/dist/twilight/p-ec08c0b1.entry.js +4 -0
- package/dist/twilight/{p-0559d448.entry.js → p-ecf01eb1.entry.js} +1 -1
- package/dist/twilight/{p-cf95b06d.entry.js → p-ef7b606e.entry.js} +1 -1
- package/dist/twilight/{p-8f7579e4.entry.js → p-f3aba096.entry.js} +1 -1
- package/dist/twilight/{p-31a1bd9c.entry.js → p-f67ed203.entry.js} +1 -1
- package/dist/twilight/{p-385e1853.entry.js → p-f81029b5.entry.js} +1 -1
- package/dist/twilight/{p-99228024.entry.js → p-fa2ff605.entry.js} +1 -1
- package/dist/twilight/{p-2c14546d.entry.js → p-faf1ca68.entry.js} +1 -1
- package/dist/twilight/{p-172a034d.entry.js → p-fee87019.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-65d86157.entry.js +0 -4
- package/dist/twilight/p-ec1730a3.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-
|
|
4
|
+
import{r as s,h as t}from"./p-MrxrxOqi.js";import{T as o}from"./p-CJUR4sUM.js";import{i as n}from"./p-DqDX5na4.js";const e=class{constructor(t){s(this,t),this.coupon=null,this.isLoading=!0,this.titlePercentTpl="",this.titleFixedTpl="",this.badgeLabel="",this.minSpendTpl="",this.expiresTpl="",this.shopNowLabel="",this.copyLabel="",this.copiedLabel=""}componentWillLoad(){Salla.onReady().then((()=>Salla.lang.onLoaded())).then((()=>(this.loadTranslations(),this.loadCoupon()))).catch((()=>{this.isLoading=!1}))}loadTranslations(){this.titlePercentTpl=Salla.lang.get("pages.thank_you.next_order_coupon_title_percent")||"",this.titleFixedTpl=Salla.lang.get("pages.thank_you.next_order_coupon_title_fixed")||"",this.badgeLabel=Salla.lang.get("pages.thank_you.next_order_coupon_badge")||"",this.minSpendTpl=Salla.lang.get("pages.thank_you.next_order_coupon_min_spend")||"",this.expiresTpl=Salla.lang.get("pages.thank_you.next_order_coupon_expires")||"",this.shopNowLabel=Salla.lang.get("pages.thank_you.next_order_coupon_shop_now")||"",this.copyLabel=Salla.lang.get("common.elements.copy")||"",this.copiedLabel=Salla.lang.get("pages.thank_you.next_order_coupon_copied")||""}async loadCoupon(){try{const s=await salla.api.request("coupons",{params:{type:"thankyou"}}),t=s?.data,o=Array.isArray(t)?t:Array.isArray(t?.data)?t.data:[];this.coupon=o[0]??null}catch{this.coupon=null}finally{this.isLoading=!1}}async copyCode(){if(this.coupon)try{await navigator.clipboard.writeText(this.coupon.code),salla.notify.success(this.copiedLabel),salla.event.dispatch("salla::next-order-coupon.code.copied",{code:this.coupon.code})}catch{}}isPercentage(){return"P"===this.coupon?.type||"percentage"===this.coupon?.type}formatAmount(){if(!this.coupon)return"";if(this.isPercentage())return`${salla.helpers.number(this.coupon.amount)}%`;const s=this.coupon.amount;return t("span","object"==typeof s&&s.amount?{innerHTML:salla.money(s.amount,s.currency)}:{innerHTML:salla.money(s)})}formatMinSpend(){const s=this.coupon?.minimum_amount;return s&&("object"!=typeof s||s.amount)?"string"==typeof s?s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):salla.money(s.amount,s.currency):""}formatExpiry(){const s=this.coupon?.expiry_date;return s?new Date(s).toLocaleDateString(Salla.lang.locale||"en-GB"):""}renderSkeleton(){return t("div",{class:"s-next-order-coupon-wrapper s-next-order-coupon-skeleton"},t("div",{class:"s-next-order-coupon-inner"},t("div",{class:"s-next-order-coupon-info"},t("salla-skeleton",{type:"normal",width:"48px",height:"48px"}),t("div",{class:"s-next-order-coupon-details"},t("salla-skeleton",{height:"14px",width:"220px"}),t("salla-skeleton",{height:"12px",width:"140px"}))),t("div",{class:"s-next-order-coupon-actions"},t("salla-skeleton",{height:"40px",width:"140px"}),t("salla-skeleton",{height:"40px",width:"100px"}))))}renderTitle(){const s=this.formatAmount(),o=this.isPercentage()?this.titlePercentTpl:this.titleFixedTpl,n=this.isPercentage()?":amount%":":amount",e=o.split(n);return t("p",{class:"s-next-order-coupon-title"},e[0],t("span",{class:"s-next-order-coupon-amount"},s),e[1]||"")}render(){if(this.isLoading)return this.renderSkeleton();if(!this.coupon)return null;const s=this.formatMinSpend(),e=this.formatExpiry();return t("div",{class:"s-next-order-coupon-wrapper"},t("div",{class:"s-next-order-coupon-inner"},t("div",{class:"s-next-order-coupon-info"},t("div",{class:"s-next-order-coupon-icon-wrap"},t("span",{class:"s-next-order-coupon-icon-bg"}),t("span",{class:"s-next-order-coupon-icon",innerHTML:o})),t("div",{class:"s-next-order-coupon-details"},t("div",{class:"s-next-order-coupon-title-row"},this.renderTitle(),t("span",{class:"s-next-order-coupon-badge"},t("span",{class:"s-next-order-coupon-badge-bg"}),t("span",{class:"s-next-order-coupon-badge-text"},this.badgeLabel))),(s||e)&&t("p",{class:"s-next-order-coupon-meta"},s&&t("span",{innerHTML:this.minSpendTpl.replace(":amount",s)}),e&&t("span",null,this.expiresTpl.replace(":date",e))))),t("div",{class:"s-next-order-coupon-actions"},t("div",{class:"s-next-order-coupon-code-box"},t("span",{class:"s-next-order-coupon-code-text"},this.coupon.code),t("salla-button",{shape:"link",class:"s-next-order-coupon-copy-btn",title:this.copyLabel,onClick:()=>this.copyCode()},t("span",{class:"s-next-order-coupon-copy-icon",innerHTML:n}))),t("salla-button",{href:salla.url.get(""),class:"s-next-order-coupon-shop-btn"},this.shopNowLabel))))}};e.style=":host{display:block}";export{e as salla_next_order_coupon}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t,H as i,a as n}from"./p-
|
|
4
|
+
import{r as s,h as t,H as i,a as n}from"./p-MrxrxOqi.js";import{H as l}from"./p-XnA1YTjA.js";import"./p-CgtvEd63.js";const e=class{constructor(t){s(this,t),this.nextPage="",this.autoload=!1,this.container="salla-infinite-scroll",this.item="salla-infinite-scroll > *",this.status=document.createElement("div"),this.status.className="s-infinite-scroll-wrapper",this.status.innerHTML=`<div class="s-infinite-scroll-status" style="display:none">\n <p class="s-infinite-scroll-last infinite-scroll-last"></p>\n <p class="s-infinite-scroll-error infinite-scroll-error"></p>\n </div>\n <a href="${this.nextPage}" class="s-infinite-scroll-btn s-button-btn s-button-primary">\n <span class="s-button-text s-infinite-scroll-btn-text">${this.loadMoreText?this.loadMoreText:salla.lang.get("common.elements.load_more")}</span>\n <span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>\n </a>`,this.btnLoader=this.status.querySelector(".s-button-loader"),salla.lang.onLoaded((()=>{this.status.querySelector(".s-button-text").innerHTML=this.loadMoreText?this.loadMoreText:salla.lang.get("common.elements.load_more"),this.status.querySelector(".s-infinite-scroll-last").innerHTML=salla.lang.get("common.elements.end_of_content"),this.status.querySelector(".s-infinite-scroll-error").innerHTML=salla.lang.get("common.elements.failed_to_load_more")}))}loading(s=!0){let t=this.status.querySelector(".s-button-text");l.toggleElementClassIf(t,"s-button-hide","s-button-show",(()=>s)),this.btnLoader.style.display=s?"inherit":"none"}render(){return this.nextPage.length>1?t(i,{class:"s-infinite-scroll-container"},t("slot",null)):""}componentDidLoad(){if(0===this.nextPage.length)return;this.host.insertAdjacentElement("afterend",this.status);let s=this,t=salla.infiniteScroll.initiate(this.container,{history:!!this.autoload&&"push",scrollThreshold:!!this.autoload&&400,nextPage:this.nextPage,checkLastPage:'salla-infinite-scroll[next-page*=":"],salla-infinite-scroll[next-page*="."]',status:".s-infinite-scroll-status",button:this.status.querySelector(".s-button-btn"),append:this.item,path:function(){return s.nextPage.replace(/page\=(\d)/g,"page="+(this.loadCount+2))}}).on("request",(()=>this.loading())).on("load",(()=>{this.loading(!1),2==t.pageIndex&&t.option({loadOnScroll:!1}),3==t.pageIndex&&t.option({loadOnScroll:!0})})).on("error",(()=>this.loading(!1)))}get host(){return n(this)}};e.style="";export{e as salla_infinite_scroll}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as r,a as t}from"./p-
|
|
4
|
+
import{r as a,h as r,a as t}from"./p-MrxrxOqi.js";import{S as l}from"./p-CXRKXFgT.js";import{T as e}from"./p-DBIOj_I_.js";const o=class{constructor(r){a(this,r)}get productId(){return this.host.dataset.productId||salla.config.get("page.id")}componentWillLoad(){return salla.onReady().then((()=>salla.lang.onLoaded())).then((()=>this.prize())).catch((a=>salla.logger.error(a)))}handleClick(){salla.config.isGuest()?salla.event.dispatch("login::open"):this.exchangeModal.open()}render(){return"success"===this.prize.status&&this.productId?r("div",{class:"s-loyalty-program-banner-container"},r("div",null,r("p",{class:"s-loyalty-program-banner-container-banner-title"},salla.lang.get("pages.loyalty_program.want_to_redeem_free_product")),r("p",{class:"s-loyalty-program-banner-container-banner-subtitle"},salla.lang.get("pages.loyalty_program.exchange_points_for_free_product",{points:this.prize.data.cost_points}))),r("button",{onClick:()=>this.handleClick()},r("span",{innerHTML:l}),r("span",null,salla.lang.get("pages.loyalty_program.exchange_points"))),r("salla-modal",{ref:a=>this.exchangeModal=a,width:"sm"},this.prize.data?r("salla-reward-exchange",{productId:Number(this.productId),prize:this.prize.data}):"")):null}get host(){return t(this)}};(function(a,r,t,l){var e,o=arguments.length,s=o<3?r:null===l?l=Object.getOwnPropertyDescriptor(r,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(a,r,t,l);else for(var i=a.length-1;i>=0;i--)(e=a[i])&&(s=(o<3?e(s):o>3?e(r,t,s):e(r,t))||s);o>3&&s&&Object.defineProperty(r,t,s)})([e((async function(){if(!(salla.config.get("store.features")||[]).includes("loyalty-system"))return Promise.reject("Loyalty system is not enabled for merchant");const{loyalty_prize:a}=await salla.product.api.getDetails(this.productId);return a||Promise.reject("no loyalty prize for this product")}))],o.prototype,"prize",void 0),o.style="@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";export{o as salla_loyalty_banner}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as a}from"./p-
|
|
4
|
+
import{r as e,h as t,H as a}from"./p-MrxrxOqi.js";const c=class{constructor(t){e(this,t),this.href=void 0,this.target="_self"}generateClass(){return{"s-list-tile-item":!0,"s-list-tile-item-href":!!this.href}}render(){return t(a,{key:"b1b2a6bf65c40643d59f392e91cc76acaea5e89e"},t("a",{key:"4b2026fd739b243a41bfc37fcb55bc07a1a54636",class:this.generateClass(),href:this.href||"#",target:this.target,"aria-label":"List Tile Link"},t("div",{key:"bbc7a7133da0e471ad92a5466e9ec0481d74cdd7",class:"s-list-tile-item-icon"},t("slot",{key:"e4e338854bfc7e6843c4b87f419c9aa59970c77b",name:"icon"})),t("div",{key:"1b7b2e0a65193be521cdf6cccc314c83f853216d",class:"s-list-tile-item-content"},t("div",{key:"4e6a178d219827b1feef394ea5564769bf11ded2",class:"s-list-tile-item-title"},t("slot",{key:"75b036812aca3e00162fc8c40459b67d4db2cc6f",name:"title"})),t("div",{key:"ab0959a43214ae0eb4cf092ea3738c71ed987709",class:"s-list-tile-item-subtitle"},t("slot",{key:"e13f66fb2a0e1c5ab2a9081c808973c9f9ecca45",name:"subtitle"}))),t("div",{key:"78c7542367a41a1f8bc74bca73d2581f5c0b7bfd",class:"s-list-tile-item-action"},t("slot",{key:"14c8c0f31d29855d743b52f82d52a3bed300b25f",name:"action"}))))}};c.style="";export{c as salla_list_tile}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,H as i,a as s}from"./p-
|
|
4
|
+
import{r as t,h as e,H as i,a as s}from"./p-MrxrxOqi.js";const a=class{constructor(e){t(this,e),this.loading=!1,this.hasError=!1,this.productData=null}async componentWillLoad(){await salla.onReady(),await this.fetchProduct()}componentDidLoad(){this.ensureParentContainsFloats()}componentDidRender(){this.renderCardNode()}ensureParentContainsFloats(){if("left"!==this.align&&"right"!==this.align)return;const t=this.hostEl?.parentElement;if(!t)return;const e=getComputedStyle(t);"block"===e.display&&"visible"===e.overflow&&"none"===e.float&&(t.style.display="flow-root")}fetchProduct(){return this.productId?(this.loading=!0,this.hasError=!1,salla.api.withoutNotifier((()=>salla.product.api.getDetails(this.productId))).then((t=>{const e=t.data;this.productData=e??null,this.hasError=!e})).catch((()=>{this.productData=null,this.hasError=!0})).finally((()=>{this.loading=!1}))):(this.productData=null,this.loading=!1,void(this.hasError=!1))}renderCardNode(){if(!this.cardContainer)return;if(this.cardContainer.textContent="",!this.productData||this.loading||this.hasError)return;const t=window.customElements.get("custom-salla-product-card")?"custom-salla-product-card":"salla-product-card",e=document.createElement(t),i=this.source||"embed-card";e.setAttribute("source",i),e.product={...this.productData,url:this.withViewedSource(this.productData.url,i)},this.cardContainer.appendChild(e)}withViewedSource(t,e){if(!t)return t;try{const i=new URL(t,window.location.origin);return i.searchParams.set("_svs",e),i.toString()}catch{return t}}render(){const t={"s-product-card-embed-card":!0,"s-product-card-embed-card-align-left":"left"===this.align,"s-product-card-embed-card-align-right":"right"===this.align,"s-product-card-embed-card-align-center":"center"===this.align};return e(i,{key:"3d9fb0dc8473e0959bbe13b4f8c8eea7a51830ea"},this.hasError&&e("span",{key:"25228d6d007d7dcda5e5767e14d2c363abfdab3e",class:"s-product-card-embed-fallback"}),e("div",{key:"d66d592bfad1468b745f3a954c335f72ecda1e08",class:t,ref:t=>{this.cardContainer=t}}))}get hostEl(){return s(this)}};a.style='@charset "UTF-8";:host{display:inline-block;vertical-align:top;max-width:12rem}:host([align=left]){float:inline-start;margin-block-end:1em;margin-inline-end:1em;shape-outside:margin-box}:host([align=right]){float:inline-end;margin-block-end:1em;margin-inline-start:1em;shape-outside:margin-box}:host([align=center]){display:block;clear:both;margin-block:1em;margin-inline:auto}.s-product-card-embed-card{display:block}';export{a as salla_product_card_embed}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as s}from"./p-LKlIr4DH.js";const i=class{constructor(t){e(this,t),this.otpInputs=[],this.deletePendingDays=null,this.currentStep="confirm",this.isDeletePending=!1,this.otpType="email",this.otpHasError=!1,this.otpErrorMessage="",this.isSubmitting=!1,this.isVerifyingOtp=!1,this.isSwitchingChannel=!1,this.resendAfter=30,this.showResendLink=!1,this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.translationDefaults={"pages.profile.delete_account":{ar:"حذف الحساب",en:"Delete account"},"pages.profile.delete_account_description":{ar:"سيُحذف حسابك وبياناتك من المتجر نهائيًا، بما في ذلك سجل طلباتك.",en:"Your account and data will be permanently deleted from the store, including your order history."},"pages.profile.delete_account_confirm_title":{ar:"هل تريد حذف حسابك؟",en:"Do you want to delete your account?"},"pages.profile.delete_account_warning":{ar:"بعد الحذف، ستفقد الوصول إلى بياناتك، بما في ذلك سجل الطلبات، وقائمة الأمنيات، وأي نقاط ولاء أو رصيد متاح في المحفظة.",en:"After deletion, you will lose access to your data, including order history, wishlist, and any loyalty points or wallet balance."},"pages.profile.cancel":{ar:"إلغاء",en:"Cancel"},"pages.profile.delete_account_otp_title":{ar:"تأكيد حذف الحساب",en:"Confirm account deletion"},"pages.profile.delete_account_otp_instruction":{ar:"للمتابعة، أدخل رمز التحقٌّق المرسل إلى:",en:"To continue, enter the verification code sent to:"},"pages.profile.delete_account_confirm_otp":{ar:"تأكيد الحذف",en:"Confirm deletion"},"pages.profile.delete_account_otp_required":{ar:"يرجى إدخال رمز التحقٌّق",en:"Please enter the verification code"},"pages.profile.delete_account_send_via_phone":{ar:"إرسال عبر الهاتف",en:"Send via phone"},"pages.profile.delete_account_send_via_email":{ar:"إرسال عبر البريد الإلكتروني",en:"Send via email"},"pages.profile.delete_account_success_title":{ar:"أُرسل طلب حذف الحساب",en:"Account deletion request submitted"},"pages.profile.delete_account_success_message":{ar:"سيُحذف حسابك خلال 30 يومًا. يمكنك إلغاء الطلب بتسجيل الدخول مرة أخرى قبل اكتمال الحذف.",en:"Your account will be deleted within 30 days. You can cancel the request by signing in again before deletion is complete."},"pages.profile.ok":{ar:"موافق",en:"OK"},"pages.profile.cancel_deletion_request":{ar:"تراجع عن الحذف",en:"Withdraw deletion"},"pages.profile.delete_account_pending":{ar:"حسابك مجدول للحذف نهائيًا من المتجر خلال :days يومًا. يمكنك التراجع عن الحذف قبل انقضاء المدة.",en:"Your account will be deleted permanently from the store within :days days. You can withdraw the deletion before the deadline."},"pages.profile.delete_request_cancelled":{ar:"تم إلغاء طلب الحذف",en:"Deletion request cancelled"}},this.registerTranslationDefaults(),this.loadTranslations(),salla.onReady((()=>{this.isHiddenName=salla.config.get("user.is_hidden_name"),this.isNotifiable=salla.config.get("user.is_notifiable"),this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.fetchDeleteRequestStatus(),this.isNotifiable&&this.isHiddenName||salla.event.on("profile::info.fetched",(e=>{this.isHiddenName=e.data.is_hidden_name,this.isNotifiable=e.data.is_notifiable}))})),salla.lang.onLoaded((()=>{this.registerTranslationDefaults(),this.loadTranslations()}))}getDaysUntilExecution(e){return Math.max(0,Math.ceil(((e>1e12?e:1e3*e)-Date.now())/864e5))}applyPendingMessage(){const e=salla.lang.get("pages.profile.delete_account_pending");this.deleteAccountPending=null!=this.deletePendingDays?e.replace(/:days/g,String(salla.helpers.number(this.deletePendingDays))):e}async fetchDeleteRequestStatus(){try{const e=await salla.profile.getDeleteRequest(),t=e?.data??null,s=t?.data_request||t,i=s?.status;this.isDeletePending="pending"===i;const a=s?.execution_at;this.deletePendingDays=null==a||Number.isNaN(Number(a))?null:this.getDaysUntilExecution(Number(a)),this.applyPendingMessage()}catch{}}registerTranslationDefaults(){if(!salla?.lang?.addBulk)return;const e=Object.entries(this.translationDefaults).reduce(((e,[t,s])=>(salla.lang.get(t)===t&&(e[t]=s),e)),{});Object.keys(e).length&&salla.lang.addBulk(e)}loadTranslations(){this.deleteAccount=salla.lang.get("pages.profile.delete_account"),this.deleteAccountDesc=salla.lang.get("pages.profile.delete_account_description"),this.deleteConfirmTitle=salla.lang.get("pages.profile.delete_account_confirm_title"),this.deleteAccountWarning=salla.lang.get("pages.profile.delete_account_warning"),this.cancelLabel=salla.lang.get("pages.profile.cancel"),this.deleteOtpTitle=salla.lang.get("pages.profile.delete_account_otp_title"),this.deleteOtpInstruction=salla.lang.get("pages.profile.delete_account_otp_instruction"),this.deleteConfirmOtp=salla.lang.get("pages.profile.delete_account_confirm_otp"),this.sendViaPhone=salla.lang.get("pages.profile.delete_account_send_via_phone"),this.sendViaEmail=salla.lang.get("pages.profile.delete_account_send_via_email"),this.deleteSuccessTitle=salla.lang.get("pages.profile.delete_account_success_title"),this.deleteSuccessMessage=salla.lang.get("pages.profile.delete_account_success_message"),this.okLabel=salla.lang.get("pages.profile.ok"),this.cancelDeletionRequest=salla.lang.get("pages.profile.cancel_deletion_request"),this.applyPendingMessage(),this.resendAfterLabel=salla.lang.get("blocks.header.resend_after"),this.resendLabel=salla.lang.get("blocks.comments.submit"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.hideMyName=salla.lang.get("pages.profile.hide_my_name"),this.hideMyNameDesc=salla.lang.get("pages.profile.hide_my_name_desc"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description")}toggleSetting(e,t){salla.profile.updateSettings({name:e,value:t.target.checked})}capitalizeText(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}getOtpTarget(){return"email"===this.otpType?salla.config.get("user.email")||"":salla.config.get("user.mobile")||""}updateModalForStep(){if(this.confirmationModal)switch(this.currentStep){case"confirm":this.confirmationModal.setTitle(this.capitalizeText(this.deleteConfirmTitle));break;case"otp":this.confirmationModal.setTitle(this.capitalizeText(this.deleteOtpTitle));break;case"success":this.confirmationModal.setTitle(this.capitalizeText(this.deleteSuccessTitle))}}openDeleteModal(){this.currentStep="confirm",this.otpType="email",this.resetOtpInputs(),this.clearResendTimer(),this.updateModalForStep(),this.confirmationModal.open()}closeDeleteModal(){this.clearResendTimer(),this.confirmationModal?.close()}goBackFromOtp(){this.clearResendTimer(),this.resetOtpInputs(),this.resetOtpError(),this.currentStep="confirm",this.updateModalForStep()}async handleModalVisibilityChanged(e){if(e.detail)return;this.clearResendTimer();const t="success"===this.currentStep;t&&(this.isDeletePending=!0),this.currentStep="confirm",this.resetOtpInputs(),t&&await this.fetchDeleteRequestStatus()}formatResendTimer(e){return"00 : "+(e>=10?`${e}`:`0${e}`)}updateResendTimerDisplay(){this.timerEl&&(this.timerEl.innerHTML=this.formatResendTimer(this.resendAfter))}isDeleteRequestInFlight(){return this.isSubmitting||this.isSwitchingChannel||this.isVerifyingOtp}async initiateDeleteRequest(e="confirm"){if(!this.isDeleteRequestInFlight()){"switch"===e||"resend"===e?this.isSwitchingChannel=!0:this.isSubmitting=!0;try{await salla.profile.initiateDeleteRequest(this.otpType),this.currentStep="otp",this.updateModalForStep(),this.resetOtpInputs(),this.startResendTimer(),setTimeout((()=>this.otpInputs[0]?.focus()),100)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{"switch"===e||"resend"===e?this.isSwitchingChannel=!1:this.isSubmitting=!1}}}async switchOtpChannel(){this.isDeleteRequestInFlight()||(this.otpType="email"===this.otpType?"mobile":"email",await this.initiateDeleteRequest("switch"))}async resendOtp(){this.showResendLink&&!this.isDeleteRequestInFlight()&&await this.initiateDeleteRequest("resend")}collectOtpCode(){const e=salla.helpers.number(this.otpInputs.map((e=>e?.value||"")).join(""),!0).replace(/[^0-9]/g,"");return this.hiddenCodeInput&&(this.hiddenCodeInput.value=e),e}resetOtpError(){this.otpHasError=!1,this.otpErrorMessage=""}setOtpError(e){this.otpHasError=!0,this.otpErrorMessage=e}async verifyDeleteOtp(){if(this.isVerifyingOtp||this.isSwitchingChannel)return;const e=this.collectOtpCode();if(e.length<4)return this.setOtpError(salla.lang.get("pages.profile.delete_account_otp_required")),void this.otpInputs[e.length]?.focus();this.resetOtpError(),this.isVerifyingOtp=!0;try{const t=await salla.profile.verifyDeleteRequest({type:this.otpType,code:e});this.deleteSuccessMessage=t?.data?.message||salla.lang.get("pages.profile.delete_account_success_message"),this.clearResendTimer(),this.resetOtpInputs(),this.otpInputs=[],this.currentStep="success",this.updateModalForStep()}catch(e){this.setOtpError(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred")),this.resetOtpInputs()}finally{this.isVerifyingOtp=!1}}async confirmSuccess(){this.isDeletePending=!0,this.closeDeleteModal(),this.currentStep="confirm",await this.fetchDeleteRequestStatus()}async cancelDeleteRequest(){if(!this.isSubmitting){this.isSubmitting=!0;try{const e=(await salla.profile.cancelDeleteRequest()).message||salla.lang.get("pages.profile.delete_request_cancelled");this.isDeletePending=!1,salla.notify?.success?.(e)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{this.isSubmitting=!1}}}resetOtpInputs(){this.otpInputs.forEach((e=>{e&&(e.value="")})),this.hiddenCodeInput&&(this.hiddenCodeInput.value="")}modifyNextOtpInput(e,t){e.value=t[0],t=t.substring(1),e.nextElementSibling&&t.length?this.modifyNextOtpInput(e.nextElementSibling,t):e.nextElementSibling||0!==t.length?e.nextElementSibling&&0===t.length&&e.nextElementSibling.focus():e.focus()}splitOtpNumber(e){const t=salla.helpers.number(e.data||e.target.value||"",!0).replace(/[^0-9]/g,"");t&&1!==t.length&&this.modifyNextOtpInput(e.target,t)}allOtpInputsFilled(){return this.otpInputs.every((e=>e?.value))}handleOtpInput(e){this.resetOtpError(),e.target.value=salla.helpers.number(e.target.value||"",!0),salla.helpers.inputDigitsOnly(e.target),this.allOtpInputsFilled()&&setTimeout((()=>this.verifyDeleteOtp()),100)}handleOtpKeyUp(e){if(this.resetOtpError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(e.key))return;const t=e.keyCode||e.charCode;e.target.value?(e.target.nextElementSibling?.focus(),e.target.nextElementSibling?.select()):[8,46].includes(t)&&(e.target.previousElementSibling?.focus(),e.target.previousElementSibling?.select()),e.target.value.length>1&&this.splitOtpNumber(e)}handleOtpPaste(e){this.resetOtpError();const t=salla.helpers.number(e.clipboardData.getData("text")||"",!0).replace(/[^0-9]/g,"").substring(0,this.otpInputs.length);this.otpInputs.forEach((e=>e.value="")),this.otpInputs[0]&&this.modifyNextOtpInput(this.otpInputs[0],t)}handleOtpFocus(e){e.target!==this.otpInputs[0]&&(""===this.otpInputs[0]?.value&&this.otpInputs[0].focus(),""===e.target.previousElementSibling?.value&&e.target.previousElementSibling.focus())}startResendTimer(){this.clearResendTimer(),this.resendAfter=30,this.showResendLink=!1,this.updateResendTimerDisplay(),this.resendTimerId=setInterval((()=>{if(this.resendAfter--,this.resendAfter<=0)return this.clearResendTimer(),void(this.showResendLink=!0);this.updateResendTimerDisplay()}),1e3)}clearResendTimer(){this.resendTimerId&&(clearInterval(this.resendTimerId),this.resendTimerId=null),this.showResendLink=!1}renderUserDeleteIcon(){return t("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"},t("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"}),t("path",{d:"M15.5 21L18.5 18M18.5 18L21.5 15M18.5 18L15.5 15M18.5 18L21.5 21"}),t("path",{d:"M2.5 20C2.5 16.134 5.63401 13 9.5 13C10.775 13 11.9704 13.3409 13 13.9365"}))}renderConfirmStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-warning"},this.deleteAccountWarning),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--row"},t("salla-button",{width:"wide",fill:"outline",color:"danger",onClick:()=>this.closeDeleteModal()},this.capitalizeText(this.cancelLabel)),t("salla-button",{width:"wide",color:"primary",loading:this.isSubmitting,onClick:()=>this.initiateDeleteRequest()},this.capitalizeText(this.deleteAccount))))}renderOtpStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-otp-instruction"},this.deleteOtpInstruction),t("p",{class:"s-user-settings-delete-otp-target"},this.getOtpTarget()),t("input",{type:"hidden",name:"code",maxlength:"4",ref:e=>this.hiddenCodeInput=e}),t("div",{class:{"s-user-settings-delete-otp-codes":!0,"has-error":this.otpHasError},dir:"ltr"},[1,2,3,4].map((e=>t("input",{type:"text",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",id:`delete-otp-${e}`,class:{"s-user-settings-delete-otp-input":!0,"s-has-error":this.otpHasError},onInput:e=>this.handleOtpInput(e),onPaste:e=>this.handleOtpPaste(e),onKeyUp:e=>this.handleOtpKeyUp(e),onFocus:e=>this.handleOtpFocus(e),ref:t=>this.otpInputs[e-1]=t,required:!0})))),this.otpHasError&&this.otpErrorMessage?t("span",{class:"s-user-settings-delete-otp-error"},this.otpErrorMessage):"",t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{width:"wide",color:"primary",disabled:this.isSwitchingChannel,onClick:()=>this.verifyDeleteOtp()},this.capitalizeText(this.deleteConfirmOtp)),t("salla-button",{width:"wide",fill:"outline",color:"primary",disabled:this.isVerifyingOtp,onClick:()=>this.switchOtpChannel()},this.capitalizeText("email"===this.otpType?this.sendViaPhone:this.sendViaEmail))),t("p",{class:"s-user-settings-delete-otp-resend",style:{display:this.showResendLink?"none":"block"}},this.resendAfterLabel,t("b",{class:"s-user-settings-delete-otp-timer mx-1 font-bold",ref:e=>this.timerEl=e})),t("a",{href:"#",class:"s-user-settings-delete-otp-resend-link",style:{display:this.showResendLink?"block":"none"},onClick:e=>{e.preventDefault(),this.resendOtp()}},this.resendLabel))}renderSuccessStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-success-body"},this.deleteSuccessMessage),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{class:"s-user-settings-delete-success-btn",width:"wide",color:"primary",onClick:()=>this.confirmSuccess()},this.capitalizeText(this.okLabel))))}renderDeleteStep(){switch(this.currentStep){case"otp":return this.renderOtpStep();case"success":return this.renderSuccessStep();default:return this.renderConfirmStep()}}renderDeleteSectionAction(){return this.isDeletePending?t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",loading:this.isSubmitting,onClick:()=>this.cancelDeleteRequest()},this.capitalizeText(this.cancelDeletionRequest)):t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",onClick:()=>this.openDeleteModal()},this.capitalizeText(this.deleteAccount))}render(){return t(s,{key:"64356c5b57d826fce8c29cc319a9762464c7fe51",class:"s-user-settings-wrapper"},this.canHideName&&t("div",{key:"4f7b3eb703f89e4a758fca54ba1b214f6724aaea",class:"s-user-settings-section"},t("salla-list-tile",{key:"7ad109e36b278fe81a314d51e1ab68030dd96cdc"},t("div",{key:"c789b7e2c541e25aaaf336e052d1986f6429da71",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"5d7b377aefb80139527d8814ee2c636fa9c73e0f",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>user-cancel</title>\n<path d="M29.885 16l1.724-1.724c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-1.724 1.724-1.724-1.724c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l1.724 1.724-1.724 1.724c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l1.724-1.724 1.724 1.724c0.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.885zM10.667 16c4.043 0 7.333-3.289 7.333-7.333s-3.291-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.291 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>\n</svg>\n'})),t("div",{key:"fdb9d6130ef27cffbe4e2ef06e7b9155d0d04c2b",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.hideMyName)),t("div",{key:"bd8592a487c79926355eeea25a5e1429bca0fd80",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.hideMyNameDesc)),t("div",{key:"cf21ed12bb38dc3a613efac6d017a72aab38780b",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"160140e25cf8e6c4556e52c0b36ba5769618b419",class:"s-toggle"},t("input",{key:"369a694fabbd42e6c239b23c26d68f858775ffe2",class:"s-toggle-input",checked:this.isHiddenName,onChange:e=>this.toggleSetting("is_hidden_name",e),type:"checkbox"}),t("div",{key:"5952ec01913ef95d888eeb3aace14123ffd3ef6f",class:"s-toggle-switcher"}))))),t("div",{key:"885355f8435759c9359a3d9eb95d5637b1c74751",class:"s-user-settings-section"},t("salla-list-tile",{key:"93b607850b20add5384a3b28e4e58fbfcb181d53"},t("div",{key:"c795aabfdc6df0beb9c0bfcf73ad87625eb7f51b",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"a59ede027c4466a1e84e8e8b4c649c7b418dd0a3",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>bullhorn</title>\n<path d="M30.129 0.264c-0.339-0.252-0.776-0.328-1.179-0.208l-24.951 7.485v-0.216c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v14.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-0.112l3.448 1.207-0.595 1.704c-0.321 1.019-0.227 2.103 0.267 3.051s1.327 1.647 2.345 1.968l6.359 2.004c0.399 0.127 0.804 0.187 1.201 0.187 1.699 0 3.277-1.091 3.812-2.785l0.423-1.295 7.633 2.672c0.143 0.049 0.292 0.075 0.44 0.075 0.273 0 0.543-0.084 0.772-0.247 0.352-0.249 0.561-0.655 0.561-1.087v-28c0-0.421-0.199-0.819-0.537-1.069zM18.297 28.4c-0.221 0.701-0.973 1.089-1.673 0.871l-6.357-2.004c-0.34-0.108-0.617-0.34-0.781-0.656s-0.196-0.676-0.101-0.977l0.581-1.665 8.777 3.072zM28 27.453l-24-8.4v-8.728l24-7.2z"></path>\n</svg>\n'})),t("div",{key:"e7af96b6f919a8be8bb126237cb3977e72a7c089",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.promotionalMsgs)),t("div",{key:"dab7b270443b6eddccd7df739c2bee82eb7706af",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.promotionalMsgsDesc)),t("div",{key:"56a6f18c788891fe9215a57d0fcaa5cf98bd3aa5",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"1fc28780fe779099eaed7916f31cbbb681c10fe9",class:"s-toggle"},t("input",{key:"832edd6e5b806171bb913163b7d5c19dbb0833f5",class:"s-toggle-input",checked:this.isNotifiable,onChange:e=>this.toggleSetting("is_notifiable",e),type:"checkbox"}),t("div",{key:"54260d8cca19ca6914cdd3bf15093b9669fef44a",class:"s-toggle-switcher"}))))),t("div",{key:"549bae1159a55b035952a12c8dc9d2b9d660f5bf",class:"s-user-settings-section s-user-settings-section-delete-user"},t("salla-list-tile",{key:"7969327e863cd998a120f27d61621d83ef8e57d5"},t("div",{key:"acf14b5e6ce76657fe0016aa63e26851e7688cd5",slot:"icon",class:"s-user-settings-section-icon"},this.renderUserDeleteIcon()),t("div",{key:"4a38cf9d0510e784317b0eb4db2fd4589a9f71d4",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.deleteAccount)),t("div",{key:"054f6a6c30f2eb9794f83a0998f20e208c7ed85a",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.isDeletePending?this.deleteAccountPending:this.deleteAccountDesc)),t("div",{key:"00d392a300b986d5d3e6f6711e6996df9731962d",slot:"action",class:"s-user-settings-section-action"},this.renderDeleteSectionAction()))),t("salla-modal",{key:"d4e8006e57d9c35267177f07b60e510ea3e53400",id:"salla-user-settings-delete-modal",width:"xs",centered:!0,showBack:"otp"===this.currentStep,isClosable:"success"!==this.currentStep,iconStyle:"success"===this.currentStep?"success":void 0,onModalVisibilityChanged:e=>this.handleModalVisibilityChanged(e),onModalBack:()=>this.goBackFromOtp(),ref:e=>this.confirmationModal=e},"success"!==this.currentStep?t("span",{slot:"icon",class:"s-user-settings-delete-icon"},this.renderUserDeleteIcon()):null,t("div",{key:this.currentStep,class:"s-user-settings-delete-step"},this.renderDeleteStep())))}};i.style=".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}";export{i as salla_user_settings}
|
|
4
|
+
import{r as e,h as t,H as s}from"./p-MrxrxOqi.js";const i=class{constructor(t){e(this,t),this.otpInputs=[],this.deletePendingDays=null,this.currentStep="confirm",this.isDeletePending=!1,this.otpType="email",this.otpHasError=!1,this.otpErrorMessage="",this.isSubmitting=!1,this.isVerifyingOtp=!1,this.isSwitchingChannel=!1,this.resendAfter=30,this.showResendLink=!1,this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.translationDefaults={"pages.profile.delete_account":{ar:"حذف الحساب",en:"Delete account"},"pages.profile.delete_account_description":{ar:"سيُحذف حسابك وبياناتك من المتجر نهائيًا، بما في ذلك سجل طلباتك.",en:"Your account and data will be permanently deleted from the store, including your order history."},"pages.profile.delete_account_confirm_title":{ar:"هل تريد حذف حسابك؟",en:"Do you want to delete your account?"},"pages.profile.delete_account_warning":{ar:"بعد الحذف، ستفقد الوصول إلى بياناتك، بما في ذلك سجل الطلبات، وقائمة الأمنيات، وأي نقاط ولاء أو رصيد متاح في المحفظة.",en:"After deletion, you will lose access to your data, including order history, wishlist, and any loyalty points or wallet balance."},"pages.profile.cancel":{ar:"إلغاء",en:"Cancel"},"pages.profile.delete_account_otp_title":{ar:"تأكيد حذف الحساب",en:"Confirm account deletion"},"pages.profile.delete_account_otp_instruction":{ar:"للمتابعة، أدخل رمز التحقٌّق المرسل إلى:",en:"To continue, enter the verification code sent to:"},"pages.profile.delete_account_confirm_otp":{ar:"تأكيد الحذف",en:"Confirm deletion"},"pages.profile.delete_account_otp_required":{ar:"يرجى إدخال رمز التحقٌّق",en:"Please enter the verification code"},"pages.profile.delete_account_send_via_phone":{ar:"إرسال عبر الهاتف",en:"Send via phone"},"pages.profile.delete_account_send_via_email":{ar:"إرسال عبر البريد الإلكتروني",en:"Send via email"},"pages.profile.delete_account_success_title":{ar:"أُرسل طلب حذف الحساب",en:"Account deletion request submitted"},"pages.profile.delete_account_success_message":{ar:"سيُحذف حسابك خلال 30 يومًا. يمكنك إلغاء الطلب بتسجيل الدخول مرة أخرى قبل اكتمال الحذف.",en:"Your account will be deleted within 30 days. You can cancel the request by signing in again before deletion is complete."},"pages.profile.ok":{ar:"موافق",en:"OK"},"pages.profile.cancel_deletion_request":{ar:"تراجع عن الحذف",en:"Withdraw deletion"},"pages.profile.delete_account_pending":{ar:"حسابك مجدول للحذف نهائيًا من المتجر خلال :days يومًا. يمكنك التراجع عن الحذف قبل انقضاء المدة.",en:"Your account will be deleted permanently from the store within :days days. You can withdraw the deletion before the deadline."},"pages.profile.delete_request_cancelled":{ar:"تم إلغاء طلب الحذف",en:"Deletion request cancelled"}},this.registerTranslationDefaults(),this.loadTranslations(),salla.onReady((()=>{this.isHiddenName=salla.config.get("user.is_hidden_name"),this.isNotifiable=salla.config.get("user.is_notifiable"),this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.fetchDeleteRequestStatus(),this.isNotifiable&&this.isHiddenName||salla.event.on("profile::info.fetched",(e=>{this.isHiddenName=e.data.is_hidden_name,this.isNotifiable=e.data.is_notifiable}))})),salla.lang.onLoaded((()=>{this.registerTranslationDefaults(),this.loadTranslations()}))}getDaysUntilExecution(e){return Math.max(0,Math.ceil(((e>1e12?e:1e3*e)-Date.now())/864e5))}applyPendingMessage(){const e=salla.lang.get("pages.profile.delete_account_pending");this.deleteAccountPending=null!=this.deletePendingDays?e.replace(/:days/g,String(salla.helpers.number(this.deletePendingDays))):e}async fetchDeleteRequestStatus(){try{const e=await salla.profile.getDeleteRequest(),t=e?.data??null,s=t?.data_request||t,i=s?.status;this.isDeletePending="pending"===i;const a=s?.execution_at;this.deletePendingDays=null==a||Number.isNaN(Number(a))?null:this.getDaysUntilExecution(Number(a)),this.applyPendingMessage()}catch{}}registerTranslationDefaults(){if(!salla?.lang?.addBulk)return;const e=Object.entries(this.translationDefaults).reduce(((e,[t,s])=>(salla.lang.get(t)===t&&(e[t]=s),e)),{});Object.keys(e).length&&salla.lang.addBulk(e)}loadTranslations(){this.deleteAccount=salla.lang.get("pages.profile.delete_account"),this.deleteAccountDesc=salla.lang.get("pages.profile.delete_account_description"),this.deleteConfirmTitle=salla.lang.get("pages.profile.delete_account_confirm_title"),this.deleteAccountWarning=salla.lang.get("pages.profile.delete_account_warning"),this.cancelLabel=salla.lang.get("pages.profile.cancel"),this.deleteOtpTitle=salla.lang.get("pages.profile.delete_account_otp_title"),this.deleteOtpInstruction=salla.lang.get("pages.profile.delete_account_otp_instruction"),this.deleteConfirmOtp=salla.lang.get("pages.profile.delete_account_confirm_otp"),this.sendViaPhone=salla.lang.get("pages.profile.delete_account_send_via_phone"),this.sendViaEmail=salla.lang.get("pages.profile.delete_account_send_via_email"),this.deleteSuccessTitle=salla.lang.get("pages.profile.delete_account_success_title"),this.deleteSuccessMessage=salla.lang.get("pages.profile.delete_account_success_message"),this.okLabel=salla.lang.get("pages.profile.ok"),this.cancelDeletionRequest=salla.lang.get("pages.profile.cancel_deletion_request"),this.applyPendingMessage(),this.resendAfterLabel=salla.lang.get("blocks.header.resend_after"),this.resendLabel=salla.lang.get("blocks.comments.submit"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.hideMyName=salla.lang.get("pages.profile.hide_my_name"),this.hideMyNameDesc=salla.lang.get("pages.profile.hide_my_name_desc"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description")}toggleSetting(e,t){salla.profile.updateSettings({name:e,value:t.target.checked})}capitalizeText(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}getOtpTarget(){return"email"===this.otpType?salla.config.get("user.email")||"":salla.config.get("user.mobile")||""}updateModalForStep(){if(this.confirmationModal)switch(this.currentStep){case"confirm":this.confirmationModal.setTitle(this.capitalizeText(this.deleteConfirmTitle));break;case"otp":this.confirmationModal.setTitle(this.capitalizeText(this.deleteOtpTitle));break;case"success":this.confirmationModal.setTitle(this.capitalizeText(this.deleteSuccessTitle))}}openDeleteModal(){this.currentStep="confirm",this.otpType="email",this.resetOtpInputs(),this.clearResendTimer(),this.updateModalForStep(),this.confirmationModal.open()}closeDeleteModal(){this.clearResendTimer(),this.confirmationModal?.close()}goBackFromOtp(){this.clearResendTimer(),this.resetOtpInputs(),this.resetOtpError(),this.currentStep="confirm",this.updateModalForStep()}async handleModalVisibilityChanged(e){if(e.detail)return;this.clearResendTimer();const t="success"===this.currentStep;t&&(this.isDeletePending=!0),this.currentStep="confirm",this.resetOtpInputs(),t&&await this.fetchDeleteRequestStatus()}formatResendTimer(e){return"00 : "+(e>=10?`${e}`:`0${e}`)}updateResendTimerDisplay(){this.timerEl&&(this.timerEl.innerHTML=this.formatResendTimer(this.resendAfter))}isDeleteRequestInFlight(){return this.isSubmitting||this.isSwitchingChannel||this.isVerifyingOtp}async initiateDeleteRequest(e="confirm"){if(!this.isDeleteRequestInFlight()){"switch"===e||"resend"===e?this.isSwitchingChannel=!0:this.isSubmitting=!0;try{await salla.profile.initiateDeleteRequest(this.otpType),this.currentStep="otp",this.updateModalForStep(),this.resetOtpInputs(),this.startResendTimer(),setTimeout((()=>this.otpInputs[0]?.focus()),100)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{"switch"===e||"resend"===e?this.isSwitchingChannel=!1:this.isSubmitting=!1}}}async switchOtpChannel(){this.isDeleteRequestInFlight()||(this.otpType="email"===this.otpType?"mobile":"email",await this.initiateDeleteRequest("switch"))}async resendOtp(){this.showResendLink&&!this.isDeleteRequestInFlight()&&await this.initiateDeleteRequest("resend")}collectOtpCode(){const e=salla.helpers.number(this.otpInputs.map((e=>e?.value||"")).join(""),!0).replace(/[^0-9]/g,"");return this.hiddenCodeInput&&(this.hiddenCodeInput.value=e),e}resetOtpError(){this.otpHasError=!1,this.otpErrorMessage=""}setOtpError(e){this.otpHasError=!0,this.otpErrorMessage=e}async verifyDeleteOtp(){if(this.isVerifyingOtp||this.isSwitchingChannel)return;const e=this.collectOtpCode();if(e.length<4)return this.setOtpError(salla.lang.get("pages.profile.delete_account_otp_required")),void this.otpInputs[e.length]?.focus();this.resetOtpError(),this.isVerifyingOtp=!0;try{const t=await salla.profile.verifyDeleteRequest({type:this.otpType,code:e});this.deleteSuccessMessage=t?.data?.message||salla.lang.get("pages.profile.delete_account_success_message"),this.clearResendTimer(),this.resetOtpInputs(),this.otpInputs=[],this.currentStep="success",this.updateModalForStep()}catch(e){this.setOtpError(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred")),this.resetOtpInputs()}finally{this.isVerifyingOtp=!1}}async confirmSuccess(){this.isDeletePending=!0,this.closeDeleteModal(),this.currentStep="confirm",await this.fetchDeleteRequestStatus()}async cancelDeleteRequest(){if(!this.isSubmitting){this.isSubmitting=!0;try{const e=(await salla.profile.cancelDeleteRequest()).message||salla.lang.get("pages.profile.delete_request_cancelled");this.isDeletePending=!1,salla.notify?.success?.(e)}catch(e){salla.notify?.error?.(e.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"))}finally{this.isSubmitting=!1}}}resetOtpInputs(){this.otpInputs.forEach((e=>{e&&(e.value="")})),this.hiddenCodeInput&&(this.hiddenCodeInput.value="")}modifyNextOtpInput(e,t){e.value=t[0],t=t.substring(1),e.nextElementSibling&&t.length?this.modifyNextOtpInput(e.nextElementSibling,t):e.nextElementSibling||0!==t.length?e.nextElementSibling&&0===t.length&&e.nextElementSibling.focus():e.focus()}splitOtpNumber(e){const t=salla.helpers.number(e.data||e.target.value||"",!0).replace(/[^0-9]/g,"");t&&1!==t.length&&this.modifyNextOtpInput(e.target,t)}allOtpInputsFilled(){return this.otpInputs.every((e=>e?.value))}handleOtpInput(e){this.resetOtpError(),e.target.value=salla.helpers.number(e.target.value||"",!0),salla.helpers.inputDigitsOnly(e.target),this.allOtpInputsFilled()&&setTimeout((()=>this.verifyDeleteOtp()),100)}handleOtpKeyUp(e){if(this.resetOtpError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(e.key))return;const t=e.keyCode||e.charCode;e.target.value?(e.target.nextElementSibling?.focus(),e.target.nextElementSibling?.select()):[8,46].includes(t)&&(e.target.previousElementSibling?.focus(),e.target.previousElementSibling?.select()),e.target.value.length>1&&this.splitOtpNumber(e)}handleOtpPaste(e){this.resetOtpError();const t=salla.helpers.number(e.clipboardData.getData("text")||"",!0).replace(/[^0-9]/g,"").substring(0,this.otpInputs.length);this.otpInputs.forEach((e=>e.value="")),this.otpInputs[0]&&this.modifyNextOtpInput(this.otpInputs[0],t)}handleOtpFocus(e){e.target!==this.otpInputs[0]&&(""===this.otpInputs[0]?.value&&this.otpInputs[0].focus(),""===e.target.previousElementSibling?.value&&e.target.previousElementSibling.focus())}startResendTimer(){this.clearResendTimer(),this.resendAfter=30,this.showResendLink=!1,this.updateResendTimerDisplay(),this.resendTimerId=setInterval((()=>{if(this.resendAfter--,this.resendAfter<=0)return this.clearResendTimer(),void(this.showResendLink=!0);this.updateResendTimerDisplay()}),1e3)}clearResendTimer(){this.resendTimerId&&(clearInterval(this.resendTimerId),this.resendTimerId=null),this.showResendLink=!1}renderUserDeleteIcon(){return t("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"},t("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"}),t("path",{d:"M15.5 21L18.5 18M18.5 18L21.5 15M18.5 18L15.5 15M18.5 18L21.5 21"}),t("path",{d:"M2.5 20C2.5 16.134 5.63401 13 9.5 13C10.775 13 11.9704 13.3409 13 13.9365"}))}renderConfirmStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-warning"},this.deleteAccountWarning),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--row"},t("salla-button",{width:"wide",fill:"outline",color:"danger",onClick:()=>this.closeDeleteModal()},this.capitalizeText(this.cancelLabel)),t("salla-button",{width:"wide",color:"primary",loading:this.isSubmitting,onClick:()=>this.initiateDeleteRequest()},this.capitalizeText(this.deleteAccount))))}renderOtpStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-otp-instruction"},this.deleteOtpInstruction),t("p",{class:"s-user-settings-delete-otp-target"},this.getOtpTarget()),t("input",{type:"hidden",name:"code",maxlength:"4",ref:e=>this.hiddenCodeInput=e}),t("div",{class:{"s-user-settings-delete-otp-codes":!0,"has-error":this.otpHasError},dir:"ltr"},[1,2,3,4].map((e=>t("input",{type:"text",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",id:`delete-otp-${e}`,class:{"s-user-settings-delete-otp-input":!0,"s-has-error":this.otpHasError},onInput:e=>this.handleOtpInput(e),onPaste:e=>this.handleOtpPaste(e),onKeyUp:e=>this.handleOtpKeyUp(e),onFocus:e=>this.handleOtpFocus(e),ref:t=>this.otpInputs[e-1]=t,required:!0})))),this.otpHasError&&this.otpErrorMessage?t("span",{class:"s-user-settings-delete-otp-error"},this.otpErrorMessage):"",t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{width:"wide",color:"primary",disabled:this.isSwitchingChannel,onClick:()=>this.verifyDeleteOtp()},this.capitalizeText(this.deleteConfirmOtp)),t("salla-button",{width:"wide",fill:"outline",color:"primary",disabled:this.isVerifyingOtp,onClick:()=>this.switchOtpChannel()},this.capitalizeText("email"===this.otpType?this.sendViaPhone:this.sendViaEmail))),t("p",{class:"s-user-settings-delete-otp-resend",style:{display:this.showResendLink?"none":"block"}},this.resendAfterLabel,t("b",{class:"s-user-settings-delete-otp-timer mx-1 font-bold",ref:e=>this.timerEl=e})),t("a",{href:"#",class:"s-user-settings-delete-otp-resend-link",style:{display:this.showResendLink?"block":"none"},onClick:e=>{e.preventDefault(),this.resendOtp()}},this.resendLabel))}renderSuccessStep(){return t("div",{class:"s-user-settings-delete-body"},t("p",{class:"s-user-settings-delete-success-body"},this.deleteSuccessMessage),t("div",{class:"s-user-settings-delete-actions s-user-settings-delete-actions--stack"},t("salla-button",{class:"s-user-settings-delete-success-btn",width:"wide",color:"primary",onClick:()=>this.confirmSuccess()},this.capitalizeText(this.okLabel))))}renderDeleteStep(){switch(this.currentStep){case"otp":return this.renderOtpStep();case"success":return this.renderSuccessStep();default:return this.renderConfirmStep()}}renderDeleteSectionAction(){return this.isDeletePending?t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",loading:this.isSubmitting,onClick:()=>this.cancelDeleteRequest()},this.capitalizeText(this.cancelDeletionRequest)):t("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",onClick:()=>this.openDeleteModal()},this.capitalizeText(this.deleteAccount))}render(){return t(s,{key:"64356c5b57d826fce8c29cc319a9762464c7fe51",class:"s-user-settings-wrapper"},this.canHideName&&t("div",{key:"4f7b3eb703f89e4a758fca54ba1b214f6724aaea",class:"s-user-settings-section"},t("salla-list-tile",{key:"7ad109e36b278fe81a314d51e1ab68030dd96cdc"},t("div",{key:"c789b7e2c541e25aaaf336e052d1986f6429da71",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"5d7b377aefb80139527d8814ee2c636fa9c73e0f",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>user-cancel</title>\n<path d="M29.885 16l1.724-1.724c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-1.724 1.724-1.724-1.724c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l1.724 1.724-1.724 1.724c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l1.724-1.724 1.724 1.724c0.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.885zM10.667 16c4.043 0 7.333-3.289 7.333-7.333s-3.291-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.291 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>\n</svg>\n'})),t("div",{key:"fdb9d6130ef27cffbe4e2ef06e7b9155d0d04c2b",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.hideMyName)),t("div",{key:"bd8592a487c79926355eeea25a5e1429bca0fd80",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.hideMyNameDesc)),t("div",{key:"cf21ed12bb38dc3a613efac6d017a72aab38780b",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"160140e25cf8e6c4556e52c0b36ba5769618b419",class:"s-toggle"},t("input",{key:"369a694fabbd42e6c239b23c26d68f858775ffe2",class:"s-toggle-input",checked:this.isHiddenName,onChange:e=>this.toggleSetting("is_hidden_name",e),type:"checkbox"}),t("div",{key:"5952ec01913ef95d888eeb3aace14123ffd3ef6f",class:"s-toggle-switcher"}))))),t("div",{key:"885355f8435759c9359a3d9eb95d5637b1c74751",class:"s-user-settings-section"},t("salla-list-tile",{key:"93b607850b20add5384a3b28e4e58fbfcb181d53"},t("div",{key:"c795aabfdc6df0beb9c0bfcf73ad87625eb7f51b",slot:"icon",class:"s-user-settings-section-icon"},t("span",{key:"a59ede027c4466a1e84e8e8b4c649c7b418dd0a3",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>bullhorn</title>\n<path d="M30.129 0.264c-0.339-0.252-0.776-0.328-1.179-0.208l-24.951 7.485v-0.216c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v14.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-0.112l3.448 1.207-0.595 1.704c-0.321 1.019-0.227 2.103 0.267 3.051s1.327 1.647 2.345 1.968l6.359 2.004c0.399 0.127 0.804 0.187 1.201 0.187 1.699 0 3.277-1.091 3.812-2.785l0.423-1.295 7.633 2.672c0.143 0.049 0.292 0.075 0.44 0.075 0.273 0 0.543-0.084 0.772-0.247 0.352-0.249 0.561-0.655 0.561-1.087v-28c0-0.421-0.199-0.819-0.537-1.069zM18.297 28.4c-0.221 0.701-0.973 1.089-1.673 0.871l-6.357-2.004c-0.34-0.108-0.617-0.34-0.781-0.656s-0.196-0.676-0.101-0.977l0.581-1.665 8.777 3.072zM28 27.453l-24-8.4v-8.728l24-7.2z"></path>\n</svg>\n'})),t("div",{key:"e7af96b6f919a8be8bb126237cb3977e72a7c089",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.promotionalMsgs)),t("div",{key:"dab7b270443b6eddccd7df739c2bee82eb7706af",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.promotionalMsgsDesc)),t("div",{key:"56a6f18c788891fe9215a57d0fcaa5cf98bd3aa5",slot:"action",class:"s-user-settings-section-action"},t("label",{key:"1fc28780fe779099eaed7916f31cbbb681c10fe9",class:"s-toggle"},t("input",{key:"832edd6e5b806171bb913163b7d5c19dbb0833f5",class:"s-toggle-input",checked:this.isNotifiable,onChange:e=>this.toggleSetting("is_notifiable",e),type:"checkbox"}),t("div",{key:"54260d8cca19ca6914cdd3bf15093b9669fef44a",class:"s-toggle-switcher"}))))),t("div",{key:"549bae1159a55b035952a12c8dc9d2b9d660f5bf",class:"s-user-settings-section s-user-settings-section-delete-user"},t("salla-list-tile",{key:"7969327e863cd998a120f27d61621d83ef8e57d5"},t("div",{key:"acf14b5e6ce76657fe0016aa63e26851e7688cd5",slot:"icon",class:"s-user-settings-section-icon"},this.renderUserDeleteIcon()),t("div",{key:"4a38cf9d0510e784317b0eb4db2fd4589a9f71d4",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.deleteAccount)),t("div",{key:"054f6a6c30f2eb9794f83a0998f20e208c7ed85a",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.isDeletePending?this.deleteAccountPending:this.deleteAccountDesc)),t("div",{key:"00d392a300b986d5d3e6f6711e6996df9731962d",slot:"action",class:"s-user-settings-section-action"},this.renderDeleteSectionAction()))),t("salla-modal",{key:"d4e8006e57d9c35267177f07b60e510ea3e53400",id:"salla-user-settings-delete-modal",width:"xs",centered:!0,showBack:"otp"===this.currentStep,isClosable:"success"!==this.currentStep,iconStyle:"success"===this.currentStep?"success":void 0,onModalVisibilityChanged:e=>this.handleModalVisibilityChanged(e),onModalBack:()=>this.goBackFromOtp(),ref:e=>this.confirmationModal=e},"success"!==this.currentStep?t("span",{slot:"icon",class:"s-user-settings-delete-icon"},this.renderUserDeleteIcon()):null,t("div",{key:this.currentStep,class:"s-user-settings-delete-step"},this.renderDeleteStep())))}};i.style=".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}";export{i as salla_user_settings}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as e,a}from"./p-
|
|
4
|
+
import{r as s,h as e,a}from"./p-MrxrxOqi.js";import{S as t}from"./p-Ctkfc4K-.js";import{S as l}from"./p-cgSL_BIo.js";import{S as o}from"./p-D1s2kXqL.js";const i=class{constructor(e){s(this,e),this.offer=null,this.hasError=!1,this.translationLoaded=!1,this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),salla.event.on("offer-modal::open",(s=>this.open(s))),salla.lang.onLoaded((()=>{this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),this.translationLoaded=!0})),this.categorySlot=this.host.querySelector('[slot="category"]')?.innerHTML||'<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>',salla.event.on("offer-modal::open",(s=>this.open(s))),salla.product.event.onOfferExisted((s=>{salla.storage.get("remember-offer-"+s.id)?salla.log("User selected to don't show this offer again."):this.open(s.product_id)}))}emitPromotionViewed(s){s&&salla.event.emit("promotion::viewed",[{id:s.id?.toString(),creative:s.message,name:s.name,position:`${this.offer_type}_offer_modal`}])}emitPromotionClicked(s){s&&salla.event.emit("promotion::clicked",[{id:s.id?.toString(),creative:s.message,name:s.name,position:`${this.offer_type}_offer_modal`}])}async open(s){return this.productID=s,this.hasError=!1,this.modal.loading(),await salla.api.withoutNotifier((()=>salla.product.offers(s))).then((s=>{s.data&&s.data.length&&(this.modal.open(),this.showOffer(s.data[0]))})).catch((s=>{this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||s.response?.data,this.modal.open()})).finally((()=>{this.modal.visible&&setTimeout((()=>this.modal.stopLoading()),1e3)}))}async showOffer(s){this.offer=s,this.offer_name=s.name,this.offer_message=s.message,this.offer.get.discounts_table?this.offer_type="discounts-table":this.offer.get.products?.length?this.offer_type="products":this.offer.get.categories?.length?this.offer_type="categories":this.offer.get.brands?.length?this.offer_type="brands":this.offer.get.tags?.length&&(this.offer_type="tags"),this.modal.setTitle(this.offer_name),this.emitPromotionViewed(this.offer)}rememberMe(s){salla.storage.set("remember-offer-"+this.offer.id,s.target.checked)}addToCart(s){this.emitPromotionClicked(this.offer),salla.api.withoutNotifier((()=>salla.cart.quickAdd(this.productID,s,this.offer_type))).then((()=>this.modal.close()))}getOfferContent(){if(this.offer.get.discounts_table)return e("div",{class:"s-offer-modal-discount-table"},e("table",null,e("tbody",null,this.offer.get.discounts_table?.map((s=>e("tr",null,e("td",null,s.text),e("td",{class:"s-offer-modal-discount-table-cell"},e("salla-button",{fill:"outline",shape:"btn",color:"primary",size:"medium",width:"normal",onClick:()=>this.addToCart(s.quantity)},this.addToCartLabel))))))));if(this.offer.get.products?.length){const s=this.offer.get.products?.length||0,a={slidesPerView:"auto",spaceBetween:16,breakpoints:{768:{slidesPerView:Math.min(2,s),spaceBetween:16},1024:{slidesPerView:Math.min(3,s),spaceBetween:16}}};return e("salla-products-slider",{key:(this.offer.get.products?.map((s=>s.id))||[]).join(","),source:"selected","source-value":`[${(this.offer.get.products?.map((s=>s.id))||[]).join(",")}]`,"slider-config":JSON.stringify(a)})}return this.offer.get.categories?.length?e("salla-slider",{type:"carousel",class:{"s-offer-modal-slider-centered":this.offer.get.categories?.length<=2,"s-offer-modal-slider":!0},id:"offer-modal-slider","controls-outer":!0,"show-controls":this.offer.get.categories?.length<=2?"false":"true"},e("div",{slot:"items"},this.offer.get.categories.map((s=>e("a",{href:s.urls.customer,class:"s-offer-modal-badge s-offer-modal-slider-item s-offer-modal-cat-item",innerHTML:this.categorySlot.replace(/\{tagIcon\}/g,l).replace(/\{name\}/g,s.name).replace(/\{url\}/g,s.urls.customer)}))))):this.offer.get.brands?.length?e("salla-slider",{type:"carousel",class:{"s-offer-modal-slider-centered":this.offer.get.brands?.length<=2,"s-offer-modal-slider":!0},id:"offer-modal-slider","controls-outer":!0,"show-controls":this.offer.get.brands?.length<=2?"false":"true"},e("div",{slot:"items"},this.offer.get.brands.map((s=>e("a",{href:s.url||salla.url.create("brands",s.id),class:"s-offer-modal-badge s-offer-modal-slider-item s-offer-modal-brand-item"},e("div",{class:"s-offer-modal-brand-logo"},e("img",{src:s.logo,alt:s.name})),e("span",{class:"s-offer-modal-badge-text"},s.name)))))):this.offer.get.tags?.length?e("salla-slider",{type:"carousel",class:{"s-offer-modal-slider-centered":this.offer.get.tags?.length<=2,"s-offer-modal-slider":!0},id:"offer-modal-slider","controls-outer":!0,"show-controls":this.offer.get.tags?.length<=2?"false":"true"},e("div",{slot:"items"},this.offer.get.tags.map((s=>e("a",{href:s.url||salla.url.create("tags",s.id),class:"s-offer-modal-badge s-offer-modal-slider-item s-offer-modal-tag-item"},e("span",{class:"s-offer-modal-badge-icon",innerHTML:l}),e("span",{class:"s-offer-modal-badge-text"},s.name)))))):void 0}render(){return e("salla-modal",{key:"570466318b6cd66a7a8b3dd0d80424c2fd73328d","has-skeleton":!0,"sub-title":this.offer_message,ref:s=>this.modal=s,isLoading:!0,class:`s-offer-modal-type-${this.offer_type?this.offer_type:""}`},e("div",{key:"ded0c8df17d5e5c1d6e77b8e1be469e69d3ee12f",slot:"loading"},e("div",{key:"fc96c54fcecc896b3e5a1838e2d07d545fce2f85",class:"s-offer-modal-skeleton"},e("div",{key:"ee7a6f25aabbf4263b43fc7545bbb2c7bfca9b3a",class:"s-offer-modal-skeleton-header"},e("salla-skeleton",{key:"9604f5f33d1d8e074cc3c314addb945b087431ee",type:"circle",height:"80px",width:"80px"}),e("salla-skeleton",{key:"65194ecfee0a01f7c38aa72f7ce2c8c81c893b1f",height:"15px",width:"50%"}),e("salla-skeleton",{key:"21d466bf32f435a511dcece76f51f4052089c130",height:"10px",width:"30%"})),e("div",{key:"53fb44c7c60ca8236dc7ec60ff65cb71df39c03b",class:"s-offer-modal-skeleton-items"},[...Array(3)].map((()=>e("div",{class:"s-offer-modal-skeleton-item"},e("salla-skeleton",{height:"9rem"}),e("div",{class:"s-offer-modal-skeleton-item-title"},e("salla-skeleton",{height:"15px",width:"100%"})),e("div",{class:"s-offer-modal-skeleton-item-subtitle"},e("salla-skeleton",{height:"9px",width:"50%"}),e("div",{innerHTML:o})))))),e("div",{key:"52ad47514b0c00b73ec7d98073b09d21ce6a2b12",class:"s-offer-modal-skeleton-footer"},e("salla-skeleton",{key:"a271e30ab34d96731cc1f51c32cba9aaefee1953",height:"15px",width:"50%"}),e("salla-skeleton",{key:"6e199a5b1283c9d82588c60c712d3799b88c5c8d",height:"15px",width:"30%"})))),this.hasError||null===this.offer?e("salla-placeholder",{class:"s-loyalty-placeholder",alignment:"center"},this.errorMessage?e("span",{slot:"description"},this.errorMessage):""):[e("span",{slot:"icon",class:"s-offer-modal-header-icon",innerHTML:t}),this.getOfferContent(),e("div",{class:"s-offer-modal-footer",slot:"footer"},this.offer.formatted_date?e("p",{class:"s-offer-modal-expiry"},salla.lang.get("pages.products.offer_expires_in")," ",this.offer.formatted_date):"",e("label",{class:"s-offer-modal-remember-label"},e("input",{type:"checkbox",onChange:s=>this.rememberMe(s),class:"s-offer-modal-remember-input"})," ",salla.lang.get("common.elements.remember_my_choice")))])}get host(){return a(this)}};i.style=".s-offer-modal-type-products .s-modal-body{min-height:690px;position:relative}";export{i as salla_offer_modal}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as e,a}from"./p-
|
|
4
|
+
import{r as s,h as e,a}from"./p-MrxrxOqi.js";import{S as t}from"./p-BscTeWDc.js";import{H as i}from"./p-XnA1YTjA.js";import"./p-CgtvEd63.js";const c=class{constructor(e){s(this,e),this.inputValue="",this.translationLoaded=!1,this.loading=!1,this.typing=!1,this.debounce=setTimeout((()=>""),1e3),this.placeholder=!1,this.inline=!1,this.oval=!1,this.height=60,this.maxWords=5,this.showAction=!1,this.productSlot=this.host.querySelector('[slot="product"]')?.innerHTML||this.getDefaultProductSlot(),salla.event.on("search::open",(()=>this.open())),salla.lang.onLoaded((()=>{this.translationLoaded=!0})),salla.event.on("modalClosed",(()=>this.onModalClose()))}async open(){this.inline||await this.modal.open().then((()=>setTimeout((()=>this.searchInput.focus()),300)))}onModalClose(){this.searchInput.value="",this.results=void 0,this.afterSearching(),this.container.classList.remove("s-search-no-results")}handleKeyDown(s){"Enter"===s.key&&this.search_term?.length&&(window.location.href=salla.url.get("search?q="+encodeURI(this.search_term)))}getDefaultProductSlot(){return'<div class="s-search-product-image-container"> <img class="s-search-product-image" src="{image}" alt="{name}"/></div><div class="s-search-product-details"> <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div></div>'}debounceSearch(s){this.typing=!0,clearTimeout(this.debounce),this.debounce=setTimeout((()=>{this.typing=!1,this.search_term=s.target.value}),700)}limitWordsAndSearch(s){const e=s.target.value.trim().split(/\s+/);if(e.length>this.maxWords){const s=e.slice(0,this.maxWords).join(" ");this.searchInput.value=s}this.debounceSearch(s)}getQueryParam(s){return new URLSearchParams(window.location.search).get(s)}handleActionClick(){if(this.search_term&&this.search_term.length>2)return this.search(this.search_term)}handleSearch(s){this.inputValue=s,s.length>2?this.search(s):(this.results=void 0,this.afterSearching())}search(s){this.noResults.style.display="none",this.loading=!0,salla.product.fetch({source:"search",source_value:s}).then((e=>{this.results=e,salla.event.emit("Products Searched",s)})).catch((s=>"Query is same as previous one!"!==s?this.results=void 0:null)).finally((()=>this.afterSearching(!1)))}afterSearching(s=!0){this.noResults.style.display=s||this.results?.data.length>0?"none":"block",i.toggleElementClassIf(this.container,"s-search-container-open","s-search-no-results",(()=>this.results?.data.length)),this.loading=!1,salla.product.api.previousQuery="",this.inputValue.length<3&&this.container.classList.remove("s-search-no-results")}render(){const s=e("div",{key:"ca8dec5eb90cd0893a1a3364df34ba0ee4d60891",class:{"s-search-container":!0,"s-search-inline":this.inline},ref:s=>this.container=s},e("div",{key:"212f8180ecca220a8b89231311dec6cdf3ef0b06",class:"s-search-input-wrapper"},e("span",{key:"51fb0f9a2e342afd35eb82b57f55471aa9e1519f",class:"s-search-icon-wrap"},e("span",{key:"e75117068c51c6d200e8e20fa0f00ca02ed0c61d",class:"s-search-icon",innerHTML:this.loading?'<i class="s-search-spinner-loader"/>':t})),e("input",{key:"442b1704b75a33e8c9e02da8200151a1d8e8db72",type:"search",enterkeyhint:"search",autocomplete:"off",class:"s-search-input",placeholder:salla.lang.get("blocks.header.search_placeholder"),onInput:s=>this.limitWordsAndSearch(s),onKeyDown:s=>this.handleKeyDown(s),ref:s=>this.searchInput=s,style:{height:this.height+"px",borderRadius:this.oval?this.height/2+"px":""}}),this.showAction?e("salla-button",{loading:this.loading,class:{"s-search-action":!0,"s-search-action-oval":this.oval},onClick:()=>this.handleActionClick()},!this.loading&&e("span",{innerHTML:t})):null),e("div",{key:"f3b40ce4ec24678f6d8421f3da8ac9e1bd631c3a",class:"s-search-results"},this.results?.data.map((s=>e("a",{href:s.url+"?from=search-bar",class:{"s-search-product":!0,"s-search-product-not-available":!s.is_available},innerHTML:this.productSlot.replace(/\{name\}/g,s.name).replace(/\{price\}/g,s.price?salla.money(s.price):"").replace(/\{regular_price\}/g,s.is_on_sale&&s.regular_price?salla.money(s.regular_price):"").replace(/\{image\}/g,s.image.url)}))),e("p",{key:"fdbb21061c599a59c6d828eec80e8d591a708cca",ref:s=>this.noResults=s,class:"s-search-no-results-placeholder"},salla.lang.get("common.elements.no_options")))),a=e("salla-modal",{key:"ca90aea3fb92d1ba7d8270c26e2ecd82d5018784",position:"top",class:"s-search-modal",ref:s=>this.modal=s},s),i=e("div",{key:"73333ce51cabadc4963a9fe9d1372bb7d63925c8",class:"s-search-placeholder-wrapper s-search-inline"},e("div",{key:"77a66e9bba504557160c8c50d91f1216cc68f253",class:"s-search-input-wrapper"},e("span",{key:"18fb5ce6e3e72874e76dd1ef2c6db8718a68f778",class:"s-search-icon-wrap"},e("span",{key:"63b9e9af1c51647df734cc4d5cf7a825b922ce38",class:"s-search-icon",innerHTML:t})),e("button",{key:"b70169ed2d80ec2ad6b09952ad104824610212df",type:"button",class:"s-search-input s-search-placeholder-trigger",onClick:()=>this.open(),style:{height:this.height+"px",borderRadius:this.oval?this.height/2+"px":""}},salla.lang.get("blocks.header.search_placeholder"))),a);return this.placeholder?i:this.inline?e("div",{class:"s-search-modal"},s):a}componentDidLoad(){this.afterSearching(),this.searchInput.value=this.getQueryParam("q")}get host(){return a(this)}static get watchers(){return{search_term:["handleSearch"]}}};c.style=".s-search-placeholder-wrapper{position:relative;display:inline-block}.s-search-input-wrapper{position:relative}.s-search-placeholder-trigger{cursor:pointer;appearance:none;text-align:start}";export{c as salla_search}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as s,a}from"./p-LKlIr4DH.js";import{P as l}from"./p-DY4LZmNP.js";import{I as o}from"./p-C-tzSDxw.js";const i=class{constructor(t){e(this,t),this.variant="info"}renderIcon(){const e=this.icon||this.variant;if("none"===e)return null;switch(e){case"success":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.5-1.5z"}));case"warning":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));case"error":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 \n 10 10 10-4.48 10-10S17.52 2 12 2zm5 \n 13.59L15.59 17 12 13.41 8.41 17 \n 7 15.59 10.59 12 7 8.41 8.41 7 \n 12 10.59 15.59 7 17 8.41 13.41 \n 12 17 15.59z"}));default:return t("span",{innerHTML:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.99935 18.3332C5.39697 18.3332 1.66602 14.6022 1.66602 9.99984C1.66602 5.39746 5.39697 1.6665 9.99935 1.6665C14.6017 1.6665 18.3327 5.39746 18.3327 9.99984C18.3327 14.6022 14.6017 18.3332 9.99935 18.3332ZM9.99935 16.6665C13.6813 16.6665 16.666 13.6818 16.666 9.99984C16.666 6.31794 13.6813 3.33317 9.99935 3.33317C6.31745 3.33317 3.33268 6.31794 3.33268 9.99984C3.33268 13.6818 6.31745 16.6665 9.99935 16.6665ZM9.16602 5.83317H10.8327V7.49984H9.16602V5.83317ZM9.16602 9.1665H10.8327V14.1665H9.16602V9.1665Z" fill="#417AC8"/>\n</svg>\n'})}}render(){return t(s,{key:"e26a52cc275ac4c2e4090c113cb7e7d4d578fc11",class:`s-alert-wrapper s-alert-${this.variant}`},t("span",{key:"bdb1c6693b226a4e136e89640fcc19fbefc6e29e",class:"s-alert-icon"},this.renderIcon()),t("span",{key:"de8997f9617e74fc082ae9603bf16eac4c0a4b17",class:"s-alert-text"},this.message,t("slot",{key:"37fb1adba1fa7f0226143250632cf20b514ee06b"})))}};i.style=":host{display:block}";const n=class{constructor(t){e(this,t),this.storeId=salla.config.get("store.id"),this.template=salla.config.get("store.template"),this.loading=!1,this.templateData={},this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.storePrice=salla.lang.getWithDefault("common.elements.store_price","سعر المتجر"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template"),this.isRtl=salla.config.get("theme.is_rtl",!0),this.storeName=salla.config.get("store.name"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","تفاصيل أكثر"),this.type="popup",salla.lang.onLoaded((()=>{this.defaultMessage=salla.lang.get("common.elements.experimental_and_available_store"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template");const e=salla.lang.messages?.["ar.trans"],t=salla.lang.messages?.["en.trans"];e&&t&&(salla.helpers.setNested(e,"common.elements.more_details","تفاصيل أكثر"),salla.helpers.setNested(t,"common.elements.more_details","More Details"),salla.helpers.setNested(e,"common.elements.store_price","سعر المتجر"),salla.helpers.setNested(t,"common.elements.store_price","Store Price"),salla.helpers.setNested(e,"common.elements.the_developer","المطور"),salla.helpers.setNested(t,"common.elements.the_developer","the developer"),salla.helpers.setNested(e,"common.elements.store_price_details","السعر يشمل"),salla.helpers.setNested(t,"common.elements.store_price_details","Price Includes"),salla.helpers.setNested(e,"common.elements.salla","سلة"),salla.helpers.setNested(t,"common.elements.salla","Salla"),salla.helpers.setNested(e,"common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),salla.helpers.setNested(t,"common.elements.store_is_available_for_purchase","This ready store is available for purchase from"),salla.helpers.setNested(e,"common.elements.ready_stores","المتاجر الجاهزة"),salla.helpers.setNested(t,"common.elements.ready_stores","Ready Stores"),setTimeout((()=>{this.storePrice=salla.lang.get("common.elements.store_price"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","More Details")}),100))}))}componentDidLoad(){this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0&&this.fetchTemplateData()}open(){return this.drawer.open()}fetchTemplateData(){if(!Object.keys(this.templateData).length)return this.loading=!0,salla.api.request("/store/template",{},"get",{"Store-Identifier":this.storeId}).then((e=>{this.templateData=e.data,this.loading=!1})).catch((()=>{this.loading=!1}))}handleAction(){"link"===this.type&&(window.location.href=this.actionUrl),"popup"===this.type&&this.open()}popup(){return t("salla-drawer",{class:"s-bottom-alert-modal",ref:e=>this.drawer=e,"no-padding":!0,onLoad:()=>{this.drawer&&Object.keys(this.templateData).length&&this.drawer.setTitle(this.storeDetails+" "+this.storeName)}},Object.keys(this.templateData).length?[t("div",{class:"s-bottom-alert-modal-inner s-scrollbar"},t("div",{class:{"s-bottom-alert-modal-content":!0}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{innerHTML:o,class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storeFeatures)),t("div",{class:"s-bottom-alert-modal-content-features",innerHTML:this.templateData?.features})]:""),t("div",{class:{"s-bottom-alert-modal-content":!0,"s-bottom-alert-modal-content-extra-padding":this.templateData?.price}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{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>money-card</title>\n<path d="M17.333 14.667h-2.667c-0.736 0-1.333-0.599-1.333-1.333s0.597-1.333 1.333-1.333h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-1.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333c-2.205 0-4 1.795-4 4s1.795 4 4 4h2.667c0.736 0 1.333 0.597 1.333 1.333s-0.597 1.333-1.333 1.333h-4c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h1.333v1.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-1.333c2.205 0 4-1.795 4-4s-1.795-4-4-4zM28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.736-0.597 1.333-1.333 1.333h-24c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.735 0.597-1.333 1.333-1.333h24c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storePriceDetails)),t("div",{class:"s-bottom-alert-modal-content-price-details"},this.templateData?.price_details?.items.map((e=>t("div",{class:"s-bottom-alert-modal-content-price-details-item"},t("i",{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>check-circle</title>\n<path d="M19.557 11.26l-4.593 6.891-2.891-1.927c-0.616-0.411-1.441-0.243-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l4 2.667c0.228 0.152 0.485 0.224 0.739 0.224 0.431 0 0.855-0.208 1.111-0.593l5.333-8c0.409-0.612 0.244-1.441-0.369-1.849-0.616-0.411-1.443-0.243-1.849 0.369zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-price-details-item-icon"}),t("span",{class:"s-bottom-alert-modal-content-price-details-item-name"},e.name),t("span",{class:"s-bottom-alert-modal-content-price-details-item-price",innerHTML:salla.money(e.price)})))))]:""),this.templateData?.link?t("div",{class:"s-bottom-alert-modal-content-footer"},t("salla-button",{color:"primary",size:"medium",width:"wide",href:this.templateData?.link},t("i",{innerHTML:l}),this.buyTheTemplate)):"")]:"")}render(){const e=this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0;return t(s,{key:"1e598df3c91be1e357fc5d771061ec386573f968",class:"s-bottom-alert-wrapper "+(e?"s-bottom-alert-wrapper-with-template":"")},e&&t("div",{key:"20a0173dfa6a01b793f8e1e9416d295ee4e61783",class:"s-bottom-alert-logo-section"},t("img",{key:"2c9042f0ce022aeb9b2879496ec2837ed14dfe9f",src:"https://cdn.salla.network/images/logo/logo-light.svg",alt:"Salla",class:"s-bottom-alert-logo"}),t("span",{key:"69c2bc09acca8a535d2f982131ccc09d65ea44e6",class:"s-bottom-alert-logo-text"},this.readyStores)),t("div",{key:"553122bac6f1f11c2bcc41a92ac798b3701ebfb9",class:"s-bottom-alert-content"},t("div",{key:"e0df96405998b70c15a8320c8400fa75db77d041",class:"flex items-center gap-2"},t("div",{key:"26f241c725c763dfc25f58cdcd0f2979571a2061",class:"s-bottom-alert-icon"},t("i",this.icon?{class:this.icon}:{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>info</title>\n<path d="M16 13.333c-0.737 0-1.333 0.596-1.333 1.333v9.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-9.333c0-0.737-0.596-1.333-1.333-1.333zM16 7.987c-0.737 0-1.333 0.596-1.333 1.333v0.013c0 0.737 0.596 1.327 1.333 1.327s1.333-0.603 1.333-1.34-0.596-1.333-1.333-1.333zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n'})),t("div",{key:"5e6ba42a2924aec3b99050e8f53634716023a535",class:"s-bottom-alert-message"},this.message?this.message:e?t("span",{class:"flex flex-wrap items-center gap-1"},this.defaultMessage,t("span",{class:{"s-bottom-alert-message-highlight":!0},"aria-label":"Developer"},this.salla),t("span",{innerHTML:salla.money(this.template.price)})):this.defaultMessage)),"banner"!==this.type&&t("div",{key:"44c4d9499736d84da97b640b8ab063a6b9dd6d3c",class:e?"s-bottom-alert-actions-group":"s-bottom-alert-action"},e?this.loading?t("salla-loading",{size:"20"}):t("div",{class:"s-bottom-alert-actions-group-container"},t("a",{class:"s-bottom-alert-action-link",onClick:()=>this.handleAction()},this.actionLabel||this.moreDetailsLabel),this.templateData?.link?t("button",{type:"button",class:"s-bottom-alert-action-purchase-button",onClick:()=>window.open(this.templateData?.link,"_blank")},this.buyTheTemplate):null):t("salla-button",{href:this.actionUrl,size:"medium",onClick:()=>this.handleAction(),width:"normal"},this.actionLabel||this.defaultActionLabel)),"popup"===this.type&&this.popup()))}get host(){return a(this)}};n.style=":host{display:block}";export{i as salla_alert,n as salla_bottom_alert}
|
|
4
|
+
import{r as e,h as t,H as s,a}from"./p-MrxrxOqi.js";import{P as l}from"./p-DY4LZmNP.js";import{I as o}from"./p-C-tzSDxw.js";const i=class{constructor(t){e(this,t),this.variant="info"}renderIcon(){const e=this.icon||this.variant;if("none"===e)return null;switch(e){case"success":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.5-1.5z"}));case"warning":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));case"error":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 \n 10 10 10-4.48 10-10S17.52 2 12 2zm5 \n 13.59L15.59 17 12 13.41 8.41 17 \n 7 15.59 10.59 12 7 8.41 8.41 7 \n 12 10.59 15.59 7 17 8.41 13.41 \n 12 17 15.59z"}));default:return t("span",{innerHTML:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.99935 18.3332C5.39697 18.3332 1.66602 14.6022 1.66602 9.99984C1.66602 5.39746 5.39697 1.6665 9.99935 1.6665C14.6017 1.6665 18.3327 5.39746 18.3327 9.99984C18.3327 14.6022 14.6017 18.3332 9.99935 18.3332ZM9.99935 16.6665C13.6813 16.6665 16.666 13.6818 16.666 9.99984C16.666 6.31794 13.6813 3.33317 9.99935 3.33317C6.31745 3.33317 3.33268 6.31794 3.33268 9.99984C3.33268 13.6818 6.31745 16.6665 9.99935 16.6665ZM9.16602 5.83317H10.8327V7.49984H9.16602V5.83317ZM9.16602 9.1665H10.8327V14.1665H9.16602V9.1665Z" fill="#417AC8"/>\n</svg>\n'})}}render(){return t(s,{key:"e26a52cc275ac4c2e4090c113cb7e7d4d578fc11",class:`s-alert-wrapper s-alert-${this.variant}`},t("span",{key:"bdb1c6693b226a4e136e89640fcc19fbefc6e29e",class:"s-alert-icon"},this.renderIcon()),t("span",{key:"de8997f9617e74fc082ae9603bf16eac4c0a4b17",class:"s-alert-text"},this.message,t("slot",{key:"37fb1adba1fa7f0226143250632cf20b514ee06b"})))}};i.style=":host{display:block}";const n=class{constructor(t){e(this,t),this.storeId=salla.config.get("store.id"),this.template=salla.config.get("store.template"),this.loading=!1,this.templateData={},this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.storePrice=salla.lang.getWithDefault("common.elements.store_price","سعر المتجر"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template"),this.isRtl=salla.config.get("theme.is_rtl",!0),this.storeName=salla.config.get("store.name"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","تفاصيل أكثر"),this.type="popup",salla.lang.onLoaded((()=>{this.defaultMessage=salla.lang.get("common.elements.experimental_and_available_store"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template");const e=salla.lang.messages?.["ar.trans"],t=salla.lang.messages?.["en.trans"];e&&t&&(salla.helpers.setNested(e,"common.elements.more_details","تفاصيل أكثر"),salla.helpers.setNested(t,"common.elements.more_details","More Details"),salla.helpers.setNested(e,"common.elements.store_price","سعر المتجر"),salla.helpers.setNested(t,"common.elements.store_price","Store Price"),salla.helpers.setNested(e,"common.elements.the_developer","المطور"),salla.helpers.setNested(t,"common.elements.the_developer","the developer"),salla.helpers.setNested(e,"common.elements.store_price_details","السعر يشمل"),salla.helpers.setNested(t,"common.elements.store_price_details","Price Includes"),salla.helpers.setNested(e,"common.elements.salla","سلة"),salla.helpers.setNested(t,"common.elements.salla","Salla"),salla.helpers.setNested(e,"common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),salla.helpers.setNested(t,"common.elements.store_is_available_for_purchase","This ready store is available for purchase from"),salla.helpers.setNested(e,"common.elements.ready_stores","المتاجر الجاهزة"),salla.helpers.setNested(t,"common.elements.ready_stores","Ready Stores"),setTimeout((()=>{this.storePrice=salla.lang.get("common.elements.store_price"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","More Details")}),100))}))}componentDidLoad(){this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0&&this.fetchTemplateData()}open(){return this.drawer.open()}fetchTemplateData(){if(!Object.keys(this.templateData).length)return this.loading=!0,salla.api.request("/store/template",{},"get",{"Store-Identifier":this.storeId}).then((e=>{this.templateData=e.data,this.loading=!1})).catch((()=>{this.loading=!1}))}handleAction(){"link"===this.type&&(window.location.href=this.actionUrl),"popup"===this.type&&this.open()}popup(){return t("salla-drawer",{class:"s-bottom-alert-modal",ref:e=>this.drawer=e,"no-padding":!0,onLoad:()=>{this.drawer&&Object.keys(this.templateData).length&&this.drawer.setTitle(this.storeDetails+" "+this.storeName)}},Object.keys(this.templateData).length?[t("div",{class:"s-bottom-alert-modal-inner s-scrollbar"},t("div",{class:{"s-bottom-alert-modal-content":!0}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{innerHTML:o,class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storeFeatures)),t("div",{class:"s-bottom-alert-modal-content-features",innerHTML:this.templateData?.features})]:""),t("div",{class:{"s-bottom-alert-modal-content":!0,"s-bottom-alert-modal-content-extra-padding":this.templateData?.price}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{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>money-card</title>\n<path d="M17.333 14.667h-2.667c-0.736 0-1.333-0.599-1.333-1.333s0.597-1.333 1.333-1.333h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-1.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333c-2.205 0-4 1.795-4 4s1.795 4 4 4h2.667c0.736 0 1.333 0.597 1.333 1.333s-0.597 1.333-1.333 1.333h-4c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h1.333v1.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-1.333c2.205 0 4-1.795 4-4s-1.795-4-4-4zM28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.736-0.597 1.333-1.333 1.333h-24c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.735 0.597-1.333 1.333-1.333h24c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storePriceDetails)),t("div",{class:"s-bottom-alert-modal-content-price-details"},this.templateData?.price_details?.items.map((e=>t("div",{class:"s-bottom-alert-modal-content-price-details-item"},t("i",{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>check-circle</title>\n<path d="M19.557 11.26l-4.593 6.891-2.891-1.927c-0.616-0.411-1.441-0.243-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l4 2.667c0.228 0.152 0.485 0.224 0.739 0.224 0.431 0 0.855-0.208 1.111-0.593l5.333-8c0.409-0.612 0.244-1.441-0.369-1.849-0.616-0.411-1.443-0.243-1.849 0.369zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-price-details-item-icon"}),t("span",{class:"s-bottom-alert-modal-content-price-details-item-name"},e.name),t("span",{class:"s-bottom-alert-modal-content-price-details-item-price",innerHTML:salla.money(e.price)})))))]:""),this.templateData?.link?t("div",{class:"s-bottom-alert-modal-content-footer"},t("salla-button",{color:"primary",size:"medium",width:"wide",href:this.templateData?.link},t("i",{innerHTML:l}),this.buyTheTemplate)):"")]:"")}render(){const e=this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0;return t(s,{key:"1e598df3c91be1e357fc5d771061ec386573f968",class:"s-bottom-alert-wrapper "+(e?"s-bottom-alert-wrapper-with-template":"")},e&&t("div",{key:"20a0173dfa6a01b793f8e1e9416d295ee4e61783",class:"s-bottom-alert-logo-section"},t("img",{key:"2c9042f0ce022aeb9b2879496ec2837ed14dfe9f",src:"https://cdn.salla.network/images/logo/logo-light.svg",alt:"Salla",class:"s-bottom-alert-logo"}),t("span",{key:"69c2bc09acca8a535d2f982131ccc09d65ea44e6",class:"s-bottom-alert-logo-text"},this.readyStores)),t("div",{key:"553122bac6f1f11c2bcc41a92ac798b3701ebfb9",class:"s-bottom-alert-content"},t("div",{key:"e0df96405998b70c15a8320c8400fa75db77d041",class:"flex items-center gap-2"},t("div",{key:"26f241c725c763dfc25f58cdcd0f2979571a2061",class:"s-bottom-alert-icon"},t("i",this.icon?{class:this.icon}:{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>info</title>\n<path d="M16 13.333c-0.737 0-1.333 0.596-1.333 1.333v9.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-9.333c0-0.737-0.596-1.333-1.333-1.333zM16 7.987c-0.737 0-1.333 0.596-1.333 1.333v0.013c0 0.737 0.596 1.327 1.333 1.327s1.333-0.603 1.333-1.34-0.596-1.333-1.333-1.333zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n'})),t("div",{key:"5e6ba42a2924aec3b99050e8f53634716023a535",class:"s-bottom-alert-message"},this.message?this.message:e?t("span",{class:"flex flex-wrap items-center gap-1"},this.defaultMessage,t("span",{class:{"s-bottom-alert-message-highlight":!0},"aria-label":"Developer"},this.salla),t("span",{innerHTML:salla.money(this.template.price)})):this.defaultMessage)),"banner"!==this.type&&t("div",{key:"44c4d9499736d84da97b640b8ab063a6b9dd6d3c",class:e?"s-bottom-alert-actions-group":"s-bottom-alert-action"},e?this.loading?t("salla-loading",{size:"20"}):t("div",{class:"s-bottom-alert-actions-group-container"},t("a",{class:"s-bottom-alert-action-link",onClick:()=>this.handleAction()},this.actionLabel||this.moreDetailsLabel),this.templateData?.link?t("button",{type:"button",class:"s-bottom-alert-action-purchase-button",onClick:()=>window.open(this.templateData?.link,"_blank")},this.buyTheTemplate):null):t("salla-button",{href:this.actionUrl,size:"medium",onClick:()=>this.handleAction(),width:"normal"},this.actionLabel||this.defaultActionLabel)),"popup"===this.type&&this.popup()))}get host(){return a(this)}};n.style=":host{display:block}";export{i as salla_alert,n as salla_bottom_alert}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as e,h as i,H as s,a as o}from"./p-
|
|
4
|
+
import{r as t,c as e,h as i,H as s,a as o}from"./p-MrxrxOqi.js";import{L as n}from"./p-BO5AoBAP.js";import{S as a}from"./p-BscTeWDc.js";const r="BulletDeliveryAPI",l=t=>{const e=null==t?Number.NaN:Number(t);return!Number.isNaN(e)&&0!==e};async function h(t,e,i){try{return await t()}catch(t){return console.error(`${r}: ${i}`,t),e}}const c=new Map;function d(t){const e=c.get(t);return!e||Date.now()-e.timestamp>3e5?(c.delete(t),null):e.data}function u(t,e){c.set(t,{data:e,timestamp:Date.now()})}const p=t=>"SA"===String(t).toUpperCase(),m={async getCountries(t=!1,e){const i=e?.trim()?null:"countries_"+(t?1:0);if(i){const t=d(i);if(t)return t}const s=await h((async()=>{const i={for_branch:t?1:0};return t&&(i.for_allocation=1),e?.trim()&&(i.query=e.trim()),((await salla.api.request("shipping/countries",{params:i}))?.data??[]).map((t=>({id:t.id,code:t.code,name:t.name,has_regions:p(t.code)})))}),[],"Error getting countries");return i&&s.length>0&&u(i,s),s},async getRegions(t,e){if(!l(t))return console.warn(`${r}: getRegions called without valid country_id`),[];const i=e?.trim()?null:`regions_${t}`;if(i){const t=d(i);if(t)return t}const s=await h((async()=>{const i={};return e?.trim()&&(i.query=e.trim()),((await salla.api.request(`shipping/countries/${t}/regions`,{params:i}))?.data??[]).map((e=>({id:e.id,name:e.name,code:e.code,country_id:Number(t)})))}),[],"Error fetching regions");return i&&s.length>0&&u(i,s),s},async getCities(t,e,i){if(!l(t))return console.warn(`${r}: getCities called without valid country_id`),[];const s=i?.trim()?null:`cities_${t}_${e||"all"}`;if(s){const t=d(s);if(t)return t}const o=await h((async()=>{const s={for_branch:0,country_id:t};return e&&(s.region_id=e),i?.trim()&&(s.query=i.trim()),((await salla.api.request("shipping/cities",{params:s}))?.data??[]).map((e=>({id:e.id,name:e.name,country_id:t,...null!=e.region_id&&{region_id:e.region_id}})))}),[],"Error fetching cities");return s&&o.length>0&&u(s,o),o},getDistricts:async(t,e)=>l(t)?h((async()=>{const i={for_branch:0,city_id:t};e?.trim()&&(i.query=e.trim());const s=(await salla.api.request("shipping/districts",{params:i}))?.data;return(Array.isArray(s)?s:Array.isArray(s?.districts)?s.districts:[]).map((e=>({id:e.id,name:e.name,name_en:e.name_en,city_id:t})))}),[],"Error fetching districts"):(console.warn(`${r}: getDistricts called without valid city_id`),[]),getSavedAddresses:async()=>h((async()=>{const t=(await salla.api.request("address"))?.data;return Array.isArray(t)?t:[]}),[],"Error fetching user addresses"),async getBranches({query:t,lat:e,lng:i,country_id:s,per_page:o=20}={}){const n=t?.trim()?.length>=2||e||i||!s?null:`branches_${s}`;if(n){const t=d(n);if(t)return t}const a=await h((async()=>{const n={per_page:o};t?.trim().length>=2&&(n.query=t),e&&(n.lat=e),i&&(n.lng=i),s&&(n.country_id=s);const a=await salla.api.request("branches",{params:n});return Array.isArray(a?.data)?a.data:[]}),[],"Error fetching branches");return n&&a.length>0&&u(n,a),a},saveAddressLocation:async t=>h((async()=>{const e=await salla.api.request("address/location",{...t,for_allocation:!0},"post"),i=e?.data??e;return{success:!0,address:"object"==typeof i&&null!=i&&"id"in i?i:void 0}}),{success:!1},"Error saving address/location"),setDeliveryScope:async t=>h((async()=>(await salla.api.withoutNotifier((()=>salla.scope.change({id:t}))),salla.storage.set("scope",{...salla.storage.get("scope")||{},id:t}),!0)),!1,"Error setting delivery scope"),async allocateScope(t){const e=t=>t?.error?.message??t?.message??"Failed to allocate scope";try{const e=await salla.api.withoutNotifier((()=>salla.api.request("scopes/allocation",t,"post")));return{success:!0,data:e?.data??e}}catch(t){console.error(`${r}: Error allocating scope`,t);const i=t;return{success:!1,error:null!=i?.response?.data?e(i.response.data):i?.message??"Unknown error"}}},getAddressToken:async()=>h((async()=>{const t=await salla.api.request("address/autocomplete-token");return t?.data?.token??null}),null,"Error fetching address autocomplete token")};function g(){c.clear()}const b=t=>t*(Math.PI/180);function f(t,e,i,s){const o=b(i-t),n=b(s-e),a=Math.sin(o/2)**2+Math.cos(b(t))*Math.cos(b(i))*Math.sin(n/2)**2;return 12742*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function v(t,e){const[i,s]=String(t).trim().split(":").map(Number);return Number.isNaN(i)||Number.isNaN(s)?t:new Date(2e3,0,1,i,s).toLocaleTimeString(e,{hour:"numeric",minute:"2-digit",hour12:!0})}const y=(t,e,i)=>{if("branch"===t.type){const e=t.branch_details?.city??t.branch_details?.name;return e?`${i} ${e}`.trim():""}if("address"===t.type&&t.address_details){const i=[t.address_details.district?.name,t.address_details.city?.name,t.address_details.country?.name].filter(Boolean).join("، ")||t.address_details.short_address||"";return i?`${e} ${i}`.trim():""}return""},w=t=>null!=t?Number(t):void 0,S=t=>w(t?.address_details?.country?.id),k=t=>t?.country_code??t?.address_details?.country?.code??"",C=t=>w(t?.address_details?.region?.id),x=t=>w(t?.address_details?.city?.id),_=t=>w(t?.address_details?.district?.id),A=t=>t?.branch_details?.id,$=t=>t?.branch_details?.latitude,M=t=>t?.branch_details?.longitude,L=t=>{if(!t||"address"!==t.type||t.address_id)return!1;const e=S(t),i=x(t),s=_(t),o=k(t),n=null!=s&&0!==Number(s),a=Boolean(t.address_details?.district?.name?.trim()),r=!p(o)||n||a;return!!(e&&i&&r)},E=(t,e,i)=>!t||!p(t)||null!=e&&0!==Number(e)&&null!=i&&("number"==typeof i?0!==i:String(i).trim().length>0),z={[GeolocationPositionError.PERMISSION_DENIED]:"Location permission denied",[GeolocationPositionError.POSITION_UNAVAILABLE]:"Location unavailable",[GeolocationPositionError.TIMEOUT]:"Location timeout"},I=globalThis,P=I.ShadowRoot&&(void 0===I.ShadyCSS||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,T=Symbol(),B=new WeakMap;let N=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==T)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(P&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=B.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&B.set(e,t))}return t}toString(){return this.cssText}};const D=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new N(i,t,T)},O=P?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new N("string"==typeof t?t:t+"",void 0,T))(e)})(t):t
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as s,H as o,a as t}from"./p-
|
|
4
|
+
import{r as a,h as s,H as o,a as t}from"./p-MrxrxOqi.js";const n=class{constructor(s){a(this,s)}async mount(a){this.host.before(a)}render(){return s(o,{key:"1acc6e7c4e3e9695576a820cbc68c539e81fa36e"})}async componentDidLoad(){await Salla.hooks.registerComponent("salla-hook",this)}get host(){return t(this)}};n.style=":host {\n all: unset;\n display: none; /* marker only */\n }";export{n as salla_hook}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,H as i,a as e}from"./p-
|
|
4
|
+
import{r as t,h as s,H as i,a as e}from"./p-MrxrxOqi.js";const r=class{constructor(s){t(this,s),this.dark=!1,this.commercialRegisterLabel="",this.freelanceLabel="",this.cachedChain=[],this.enforceVisibility=()=>{const t=this.hostEl;if(t&&t.isConnected&&this.getBadgeData()&&!this.isHostVisible(t))for(const s of this.getAncestorChain(t)){const t=getComputedStyle(s);"none"===t.display&&s.style.setProperty("display","flex","important"),"hidden"!==t.visibility&&"collapse"!==t.visibility||s.style.setProperty("visibility","visible","important"),parseFloat(t.opacity)<r.OPACITY_THRESHOLD&&s.style.setProperty("opacity","1","important"),"hidden"===t.contentVisibility&&s.style.setProperty("content-visibility","visible","important")}},this.runEnforce=()=>{this.clearEnforceTimers(),this.enforceVisibility()}}componentWillLoad(){this.initializeTranslations()}async componentDidLoad(){await salla.onReady(),this.isVisibilityEnforced()&&(this.setupVisibilityGuard(),this.scheduleEnforce())}componentDidRender(){this.scheduleEnforce()}disconnectedCallback(){this.attrObserver?.disconnect(),this.attrObserver=void 0,this.moveObserver?.disconnect(),this.moveObserver=void 0,this.cachedChain=[],this.clearEnforceTimers()}isVisibilityEnforced(){return"SA"===salla.config.get("store.store_country")}getAncestorChain(t){const s=[];let i=t;for(;i&&(s.push(i),i!==document.documentElement);)i=i.parentElement;return s}didChainChange(t){const s=this.getAncestorChain(t);if(s.length!==this.cachedChain.length)return!0;for(let t=0;t<s.length;t++)if(s[t]!==this.cachedChain[t])return!0;return!1}isHostVisible(t){return"function"==typeof t.checkVisibility?t.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0}):this.isVisibleFallback(t)}isVisibleFallback(t){let s=t;for(;s;){const t=getComputedStyle(s);if("none"===t.display)return!1;if("hidden"===t.visibility||"collapse"===t.visibility)return!1;if(parseFloat(t.opacity)<r.OPACITY_THRESHOLD)return!1;if("hidden"===t.contentVisibility)return!1;if(s===document.documentElement)break;s=s.parentElement}return!0}clearEnforceTimers(){void 0!==this.enforceTimer&&(clearTimeout(this.enforceTimer),this.enforceTimer=void 0),void 0!==this.maxWaitTimer&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=void 0)}scheduleEnforce(){this.isVisibilityEnforced()&&(void 0!==this.enforceTimer&&clearTimeout(this.enforceTimer),this.enforceTimer=setTimeout(this.runEnforce,r.ENFORCE_DEBOUNCE_MS),void 0===this.maxWaitTimer&&(this.maxWaitTimer=setTimeout(this.runEnforce,r.ENFORCE_MAX_WAIT_MS)))}setupVisibilityGuard(){const t=this.hostEl;t&&"undefined"!=typeof MutationObserver&&(this.attrObserver?.disconnect(),this.moveObserver?.disconnect(),this.attrObserver=new MutationObserver((()=>{const t=this.hostEl;t&&t.isConnected&&(this.isHostVisible(t)||this.scheduleEnforce())})),this.attachAttrObserver(t),this.moveObserver=new MutationObserver((()=>{const t=this.hostEl;t&&t.isConnected&&this.didChainChange(t)&&(this.attachAttrObserver(t),this.scheduleEnforce())})),this.moveObserver.observe(document.documentElement,{childList:!0,subtree:!0}))}attachAttrObserver(t){if(this.attrObserver){this.attrObserver.disconnect(),this.cachedChain=this.getAncestorChain(t);for(const t of this.cachedChain)this.attrObserver.observe(t,{attributes:!0,attributeFilter:["style","class","hidden"]})}}initializeTranslations(){salla.lang.onLoaded((()=>{const t=(t,s,i)=>{salla.helpers.setNested(salla.lang.messages[t],s,i)};t("ar.trans","blocks.footer.commercial_register","السجل التجاري"),t("en.trans","blocks.footer.commercial_register","Commercial Register"),t("ar.trans","blocks.footer.freelance","وثيقة العمل الحر"),t("en.trans","blocks.footer.freelance","Freelance Certificate"),this.commercialRegisterLabel=salla.lang.getWithDefault("blocks.footer.commercial_register","السجل التجاري"),this.freelanceLabel=salla.lang.getWithDefault("blocks.footer.freelance","وثيقة العمل الحر")}))}getBadgeData(){const t=salla.config.get("store.settings.commercial_number"),s=salla.config.get("store.settings.freelance_number");return t?{number:t,label:this.commercialRegisterLabel||"السجل التجاري",imageUrl:salla.url.cdn("images/commercial-register.png",70,70),type:"commercial"}:s?{number:s,label:this.freelanceLabel||"وثيقة العمل الحر",imageUrl:this.dark?salla.url.cdn("images/freelance-white.png"):salla.url.cdn("images/freelance.png"),type:"freelance"}:null}render(){const t=this.getBadgeData();return t?s(i,{class:"s-trust-badges-wrapper "+(this.dark?"dark":"")},this.isVisibilityEnforced()?s("img",{class:"s-trust-badges-image",width:"55",height:"55",src:t.imageUrl,alt:t.label}):null,s("div",{class:"s-trust-badges-content"},s("p",{class:"s-trust-badges-label"},t.label),s("b",{class:"s-trust-badges-number"},t.number))):null}get hostEl(){return e(this)}};r.OPACITY_THRESHOLD=.1,r.ENFORCE_DEBOUNCE_MS=1500,r.ENFORCE_MAX_WAIT_MS=3e3,r.style="";export{r as salla_trust_badges}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,H as s}from"./p-
|
|
4
|
+
import{r as t,h as e,H as s}from"./p-MrxrxOqi.js";const r=class{constructor(e){t(this,e),this.parsedSections=[]}parseProducts(t){let e=[];if("string"==typeof t)try{const s=JSON.parse(t);e=this.extractSections(s)}catch(s){console.error("Invalid JSON passed to bundleSections prop:",t),e=[]}else t&&(e=this.extractSections(t));this.parsedSections=e}extractSections(t){return t.bundle&&t.bundle.sections&&Array.isArray(t.bundle.sections)?t.bundle.sections:Array.isArray(t)?t:t.sections&&Array.isArray(t.sections)?t.sections:(console.warn("No valid sections found in data:",t),[])}isCartPage(){return salla.url.is_page("cart")}renderCartPage(){return e("salla-multiple-bundle-product-cart",{sections:this.parsedSections})}renderDetailsPage(){return e("salla-multiple-bundle-product-details",{sections:this.parsedSections})}componentWillLoad(){this.parseProducts(this.bundleSections)}render(){return e(s,{key:"db7efe81ce29dd1bc45cc5f1dbd45b6b03e31de8",class:"s-multiple-bundle-product-wrapper"},this.isCartPage()?this.renderCartPage():this.renderDetailsPage())}static get watchers(){return{bundleSections:["parseProducts"]}}};r.style=":host{display:block}";export{r as salla_multiple_bundle_product}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,c as r,h as e}from"./p-
|
|
4
|
+
import{r as a,c as r,h as e}from"./p-MrxrxOqi.js";import{c as s}from"./p-CcPplbOM.js";import{S as t}from"./p-CXRKXFgT.js";const d=class{constructor(e){a(this,e),this.rewardModalOpen=r(this,"rewardModalOpen"),this.confirmModalOpen=r(this,"confirmModalOpen"),this.size="md",this.isActionClickable=a=>"free_product"!==a.key?.toLowerCase()||a.is_product_available,this.handleActionArea=()=>{this.rewardModalOpen.emit(this.prize)},this.handleAction=()=>{this.isActionClickable(this.prize)&&(salla.config.isUser()?this.confirmModalOpen.emit(this.prize):s((()=>salla.event.dispatch("login::open"))))}}render(){return e("div",{key:"22e55c164715cff3ab89a9d2d0ac98042aee3063",class:{"s-loyalty-program-reward-container":!0,"s-loyalty-program-reward-xs":"xs"===this.size}},e("div",{key:"f4854008846b39552fdce909b497e43c649543ca",onClick:this.handleActionArea,role:"button"},e("div",{key:"adc5c0df86193798cc166f6adfa0c2447df0832b",class:"s-loyalty-program-reward-img"},e("img",{key:"859cc1f77a4be5548ff1caa6820ec40b09af213d",src:this.prize.image,class:"s-loyalty-program-rewards-img",alt:""})),e("div",{key:"8c7d6248e557108462dfb82ba2974768686734c7",class:"s-loyalty-program-reward-content"},e("div",{key:"a2bf4e4971697d3cefb3d14d5ef5fbe4406edd09",class:"s-loyalty-program-reward-points"},e("salla-badge",{key:"06640ab8ec19795a8a451274c371e0f77f888fb7",size:"xs"},e("span",{key:"f5c90a08e80d106bf11fe45a9c3ace3cedf61af1",innerHTML:t}),e("span",{key:"7feeea4188439c1c23acacf222149e7c59367dc4",class:"s-loyalty-program-rewards-points",innerHTML:salla.lang.choice("pages.loyalty_program.points",this.prize.cost_points)}))),e("div",{key:"8e5ef727a8c704b8f0040b752796bc59924ee64c",class:"s-loyalty-program-reward-title"},e("span",{key:"fbdd1636477122d629ec2fec71d8a57bc8dfe4cb"},this.group)),e("div",{key:"a0d4f204e207be64bdb515e7e4e8ba89235b2693",class:"s-loyalty-program-reward-name"},e("div",{key:"000794a28c85f67d0c72a4f886c81d303a41f345",class:"s-loyalty-program-rewards-name",id:`prize-${this.prize.id}`},this.prize.name)))),e("div",{key:"d4c51e1fe48bf9ec23f9c9d0b48b0e2343428d59",class:"p-4"},e("button",{key:"ca12fd9a4ee98380ed1db9f7aebbbf1e2906ab79",onClick:this.handleAction,disabled:!this.isActionClickable(this.prize),class:{"s-loyalty-program-rewards-action-base":!0,"s-loyalty-program-rewards-action-on":this.isActionClickable(this.prize),"s-loyalty-program-rewards-action-off":!this.isActionClickable(this.prize)}},this.isActionClickable(this.prize)?salla.lang.get("pages.loyalty_program.redeem_reward"):salla.lang.get("pages.loyalty_program.out_of_stock"))))}};d.style="@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";export{d as salla_loyalty_reward}
|