@salla.sa/twilight-components 2.14.548 → 2.14.549
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-CGA4aTUA.js → filepond-COUccQWv.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DyVz7vP9.js → filepond-plugin-file-poster-B_yyvbJ6.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CgzYDBcU.js → filepond-plugin-file-validate-size-KDZtJpSs.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Dx2CbMZ9.js → filepond-plugin-file-validate-type-Dbm_-1V2.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-D3aTsFmD.js → filepond-plugin-image-edit-C-q8yFXi.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BW3usWts.js → filepond-plugin-image-exif-orientation-C2Q2chpj.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Bb7_UNPY.js → filepond-plugin-image-preview-DVK8eIMv.js} +1 -1
- package/dist/cjs/{index-BssNhL-x.js → index-CSq9uCjw.js} +3 -3
- package/dist/cjs/{intlTelInput-B7QYiZ0d.js → intlTelInput-NQOLNYxO.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-attachment-view_9.cjs.entry.js +10 -10
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- 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_9.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.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_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- 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.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_2.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-options-modal_2.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-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.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-review-order-item.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/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-H1di5S1s.js → vanilla-picker-My41190Y.js} +1 -1
- package/dist/components/index.js +3 -3
- package/dist/esm/{filepond-CXmbiROU.js → filepond-CA4TWKuz.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DrmkMK37.js → filepond-plugin-file-poster-C4_NyGjO.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-fRXLDtKY.js → filepond-plugin-file-validate-size-DVV7mZ-K.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-9x4CtZKy.js → filepond-plugin-file-validate-type-DT1IX9KM.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BTjvSjn9.js → filepond-plugin-image-edit-RrqhOPfq.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CnSOx2Lm.js → filepond-plugin-image-exif-orientation-Dc9_Qlva.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-Cy0Nd8Xr.js → filepond-plugin-image-preview-Iu7ULzAy.js} +1 -1
- package/dist/esm/{index-B64o_70M.js → index-C0qiFNJn.js} +3 -3
- package/dist/esm/{intlTelInput-FF2eKbuC.js → intlTelInput-CrkMI_sC.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-attachment-view_9.entry.js +10 -10
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- 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_9.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.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_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- 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.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_2.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-options-modal_2.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-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.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-review-order-item.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/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-DMNociUd.js → vanilla-picker-Cf9pEgos.js} +1 -1
- package/dist/twilight/{p-3f460184.entry.js → p-01b52f2f.entry.js} +1 -1
- package/dist/twilight/{p-569ad58b.entry.js → p-0357b501.entry.js} +1 -1
- package/dist/twilight/{p-56e553e4.entry.js → p-0d44c47f.entry.js} +1 -1
- package/dist/twilight/{p-ace041b9.entry.js → p-0dea4239.entry.js} +1 -1
- package/dist/twilight/{p-a5199e7d.entry.js → p-14f2c393.entry.js} +1 -1
- package/dist/twilight/{p-b4fda5f4.entry.js → p-1adf1893.entry.js} +1 -1
- package/dist/twilight/{p-87227eb2.entry.js → p-27b6fd51.entry.js} +1 -1
- package/dist/twilight/{p-e354292f.entry.js → p-28efc3a8.entry.js} +1 -1
- package/dist/twilight/{p-6451e759.entry.js → p-2a64e50b.entry.js} +1 -1
- package/dist/twilight/{p-897b8824.entry.js → p-32af49cd.entry.js} +1 -1
- package/dist/twilight/{p-b0500232.entry.js → p-33c2f3bc.entry.js} +1 -1
- package/dist/twilight/{p-c8dae54b.entry.js → p-344f751a.entry.js} +1 -1
- package/dist/twilight/{p-5f9b8ada.entry.js → p-34889d17.entry.js} +1 -1
- package/dist/twilight/{p-9dbf3ff4.entry.js → p-354da069.entry.js} +1 -1
- package/dist/twilight/{p-b4f2f280.entry.js → p-368beadc.entry.js} +1 -1
- package/dist/twilight/{p-0c7bdda5.entry.js → p-3c99951e.entry.js} +1 -1
- package/dist/twilight/{p-13978ff2.entry.js → p-42efd1b1.entry.js} +1 -1
- package/dist/twilight/{p-6cd863b9.entry.js → p-4358c48e.entry.js} +1 -1
- package/dist/twilight/{p-2ddabee9.entry.js → p-453f92f9.entry.js} +1 -1
- package/dist/twilight/{p-7eca6506.entry.js → p-499ccb8b.entry.js} +1 -1
- package/dist/twilight/{p-e4db462b.entry.js → p-4a8b3e89.entry.js} +1 -1
- package/dist/twilight/{p-7c2a0a8b.entry.js → p-4cfccc31.entry.js} +1 -1
- package/dist/twilight/{p-3eb853f9.entry.js → p-4d149e9e.entry.js} +1 -1
- package/dist/twilight/{p-647832d9.entry.js → p-4ebdef90.entry.js} +1 -1
- package/dist/twilight/{p-991fa4ad.entry.js → p-5364f42e.entry.js} +1 -1
- package/dist/twilight/{p-19b03612.entry.js → p-55c716a4.entry.js} +1 -1
- package/dist/twilight/{p-be916b5f.entry.js → p-5be5be8b.entry.js} +1 -1
- package/dist/twilight/{p-e826d3aa.entry.js → p-5d261682.entry.js} +1 -1
- package/dist/twilight/{p-cacf3c75.entry.js → p-5d71c16a.entry.js} +1 -1
- package/dist/twilight/{p-b4d47e7c.entry.js → p-6bedb896.entry.js} +1 -1
- package/dist/twilight/{p-db4dc7cc.entry.js → p-6da0b2b3.entry.js} +1 -1
- package/dist/twilight/{p-309f771b.entry.js → p-6da4a9b3.entry.js} +1 -1
- package/dist/twilight/{p-37b73a97.entry.js → p-709af483.entry.js} +1 -1
- package/dist/twilight/{p-441ee14a.entry.js → p-7122a097.entry.js} +1 -1
- package/dist/twilight/{p-3b7cbf05.entry.js → p-73db9793.entry.js} +1 -1
- package/dist/twilight/{p-ba32a9d2.entry.js → p-7a1169f6.entry.js} +1 -1
- package/dist/twilight/{p-f12f8db3.entry.js → p-7bdf543a.entry.js} +1 -1
- package/dist/twilight/{p-923a35da.entry.js → p-7e26332e.entry.js} +1 -1
- package/dist/twilight/{p-5c9e4502.entry.js → p-7f11af86.entry.js} +1 -1
- package/dist/twilight/{p-63acbca7.entry.js → p-84181d45.entry.js} +1 -1
- package/dist/twilight/{p-660a552a.entry.js → p-862f7fda.entry.js} +1 -1
- package/dist/twilight/{p-9ae25175.entry.js → p-86cec54b.entry.js} +1 -1
- package/dist/twilight/{p-49c7dc56.entry.js → p-875beddd.entry.js} +1 -1
- package/dist/twilight/{p-0dfd760b.entry.js → p-88148fed.entry.js} +1 -1
- package/dist/twilight/{p-63a2ee05.entry.js → p-8c086859.entry.js} +1 -1
- package/dist/twilight/{p-1628c63c.entry.js → p-8f2f8693.entry.js} +1 -1
- package/dist/twilight/{p-40d4ccbb.entry.js → p-8fa81b10.entry.js} +1 -1
- package/dist/twilight/{p-5f860460.entry.js → p-945b3f38.entry.js} +1 -1
- package/dist/twilight/{p-55cbacd7.entry.js → p-95117a08.entry.js} +1 -1
- package/dist/twilight/p-B3th5No1.js +9 -0
- package/dist/twilight/{p-GwasjFLA.js → p-BeFR_h3q.js} +1 -1
- package/dist/twilight/{p-B64o_70M.js → p-C0qiFNJn.js} +1 -1
- package/dist/twilight/{p-DWqu98fW.js → p-C7NprL2x.js} +1 -1
- package/dist/twilight/{p-BK166pHQ.js → p-CW2JQnYK.js} +1 -1
- package/dist/twilight/{p-BcGXp0zm.js → p-ClV-F79e.js} +1 -1
- package/dist/twilight/{p-UxfFm_QX.js → p-CyO2XGkr.js} +1 -1
- package/dist/twilight/{p-cb02e6db.entry.js → p-a243d3cc.entry.js} +1 -1
- package/dist/twilight/{p-d0847af9.entry.js → p-a30ae3e6.entry.js} +1 -1
- package/dist/twilight/{p-a867beee.entry.js → p-a37a692a.entry.js} +1 -1
- package/dist/twilight/{p-c26f1183.entry.js → p-a5185029.entry.js} +1 -1
- package/dist/twilight/{p-1edbb249.entry.js → p-a5f477fd.entry.js} +1 -1
- package/dist/twilight/{p-971b8ff5.entry.js → p-a72bf47b.entry.js} +1 -1
- package/dist/twilight/{p-602e632c.entry.js → p-a8561cc8.entry.js} +1 -1
- package/dist/twilight/{p-7ce5c2cd.entry.js → p-a909aff5.entry.js} +1 -1
- package/dist/twilight/{p-2f64c3b3.entry.js → p-a9554697.entry.js} +1 -1
- package/dist/twilight/{p-1ce848ab.entry.js → p-a9b9deb9.entry.js} +1 -1
- package/dist/twilight/{p-a0e8ca67.entry.js → p-ab86dc29.entry.js} +1 -1
- package/dist/twilight/{p-26c750c8.entry.js → p-adbf6324.entry.js} +1 -1
- package/dist/twilight/{p-fa0467a7.entry.js → p-ae96e338.entry.js} +1 -1
- package/dist/twilight/{p-b8cd26a7.entry.js → p-b217fea1.entry.js} +1 -1
- package/dist/twilight/{p-840dd411.entry.js → p-b2662a4f.entry.js} +1 -1
- package/dist/twilight/{p-b0a87a8d.entry.js → p-b3ba53c5.entry.js} +1 -1
- package/dist/twilight/{p-1ad71324.entry.js → p-b5028411.entry.js} +1 -1
- package/dist/twilight/{p-177e9071.entry.js → p-b6d259be.entry.js} +1 -1
- package/dist/twilight/{p-522fb030.entry.js → p-b73b7e15.entry.js} +1 -1
- package/dist/twilight/{p-5273dbb2.entry.js → p-b8da968d.entry.js} +1 -1
- package/dist/twilight/{p-233b9115.entry.js → p-bbd2cb8c.entry.js} +1 -1
- package/dist/twilight/{p-63cebaef.entry.js → p-bf9cc549.entry.js} +1 -1
- package/dist/twilight/{p-d7e4f0f8.entry.js → p-c0d89d74.entry.js} +1 -1
- package/dist/twilight/{p-74a1a32f.entry.js → p-c15eeb62.entry.js} +1 -1
- package/dist/twilight/{p-f99550d8.entry.js → p-c2005d4a.entry.js} +1 -1
- package/dist/twilight/{p-74c7cc02.entry.js → p-c3bed022.entry.js} +1 -1
- package/dist/twilight/{p-a7fccb9c.entry.js → p-c55c576c.entry.js} +1 -1
- package/dist/twilight/{p-8e631629.entry.js → p-c72a1861.entry.js} +1 -1
- package/dist/twilight/{p-1485dedd.entry.js → p-c82b8aa7.entry.js} +1 -1
- package/dist/twilight/{p-c5d1b2e4.entry.js → p-d322a3e8.entry.js} +1 -1
- package/dist/twilight/{p-5ab11313.entry.js → p-dc51e991.entry.js} +1 -1
- package/dist/twilight/{p-e0f3e985.entry.js → p-dc7f11e4.entry.js} +1 -1
- package/dist/twilight/{p-c9b1ad01.entry.js → p-e190e1cf.entry.js} +1 -1
- package/dist/twilight/{p-52607d64.entry.js → p-e2d501f5.entry.js} +1 -1
- package/dist/twilight/{p-9a617c41.entry.js → p-e36310e2.entry.js} +1 -1
- package/dist/twilight/{p-77fa0f9f.entry.js → p-e4c3ca60.entry.js} +1 -1
- package/dist/twilight/{p-04cc5898.entry.js → p-e806b976.entry.js} +1 -1
- package/dist/twilight/{p-8e293878.entry.js → p-ecaf7d87.entry.js} +1 -1
- package/dist/twilight/{p-b17c6f84.entry.js → p-ed5d8787.entry.js} +1 -1
- package/dist/twilight/{p-66ece3d6.entry.js → p-ee7530fe.entry.js} +1 -1
- package/dist/twilight/{p-b16264a3.entry.js → p-f3bd1c09.entry.js} +1 -1
- package/dist/twilight/{p-003648b5.entry.js → p-f51a1326.entry.js} +1 -1
- package/dist/twilight/{p-440687a4.entry.js → p-fba13fd5.entry.js} +1 -1
- package/dist/twilight/{p-DBnECOny.js → p-i-tkvIE0.js} +2 -2
- package/dist/twilight/{p-Bh11vKua.js → p-l7Rr63jq.js} +1 -1
- package/dist/twilight/{p-0MyCcOKI.js → p-yV2X3Oc1.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-DrJZdc5M.js +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as l}from"./p-
|
|
4
|
+
import{r as e,h as t,H as l}from"./p-C0qiFNJn.js";const i=class{constructor(t){e(this,t),this.methods=[],this.shouldRender=!1}async componentDidLoad(){await Salla.onReady(),await Salla.lang.onLoaded(),Salla.config.get("store.shipping.support_pickup")&&(this.shouldRender=!0,this.setLabels())}setLabels(){this.methods=[{id:"delivery",title:Salla.lang.getWithDefault("pages.products.promise_delivery_title","متاح للتوصيل"),subtitle:Salla.lang.getWithDefault("pages.products.promise_delivery_subtitle","طلبك يوصلك لباب البيت بسهولة."),iconClass:"sicon-location"},{id:"pickup",title:Salla.lang.getWithDefault("pages.products.promise_pickup_title","متاح للاستلام"),subtitle:Salla.lang.getWithDefault("pages.products.promise_pickup_subtitle","استلام فوري من أقرب فرع."),iconClass:"sicon-store"}]}render(){return this.shouldRender?t(l,{class:"s-fulfillment-methods"},t("div",{class:"s-fulfillment-methods-list"},this.methods.map((e=>t("div",{key:e.id,class:"s-fulfillment-methods-card"},t("div",{class:"s-fulfillment-methods-content"},t("div",{class:"s-fulfillment-methods-icon-wrap"},t("i",{class:`${e.iconClass} s-fulfillment-methods-icon`})),t("div",{class:"s-fulfillment-methods-text"},t("span",{class:"s-fulfillment-methods-title"},e.title),t("span",{class:"s-fulfillment-methods-subtitle"},e.subtitle)))))))):null}};i.style='/*!twlt*/:host{display:block}.s-fulfillment-methods{font-family:inherit}.s-fulfillment-methods-list{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:12px;margin-top:12px}:host-context([dir=rtl]) .s-fulfillment-methods-content{flex-direction:row-reverse}:host-context([dir=ltr]) .s-fulfillment-methods-content{flex-direction:row}.s-fulfillment-methods-card{flex:1;min-width:0;border:1px solid var(--color-border, #e5e7eb);border-radius:12px;padding:16px}.s-fulfillment-methods-content{display:flex;align-items:center;gap:12px}.s-fulfillment-methods-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.s-fulfillment-methods-title{font-weight:700;font-size:14px;line-height:1.3;color:var(--color-text-primary, #2b2d34)}.s-fulfillment-methods-subtitle{font-size:12px;line-height:1.4;color:var(--color-text-secondary, #6b7280)}.s-fulfillment-methods-icon-wrap{flex-shrink:0;width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:var(--color-surface-secondary, #f3f4f6);border-radius:10px}.s-fulfillment-methods-icon{font-size:22px;color:var(--color-text-secondary, #6b7280);line-height:1}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-fulfillment-methods-list{margin-bottom:0.75rem;margin-top:0.75rem;display:flex;flex-wrap:wrap;gap:1rem}.s-fulfillment-methods-card{min-width:0px;flex:1 1 0%;border-radius:0.75rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:1rem}.s-fulfillment-methods-content{display:flex;flex-direction:row;align-items:center;gap:0.75rem}.s-fulfillment-methods-content:where([dir="rtl"],[dir="rtl"] *){flex-direction:row-reverse}.s-fulfillment-methods-text{display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;gap:0.25rem}.s-fulfillment-methods-title{font-size:0.875rem;line-height:1.25rem;font-weight:700;line-height:1.375;color:var(--color-text-primary,#2b2d34)}.s-fulfillment-methods-subtitle{font-size:0.75rem;line-height:1rem;line-height:1.4;color:var(--color-text-secondary,#6b7280)}.s-fulfillment-methods-icon-wrap{display:flex;height:2.75rem;width:2.75rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:10px;background-color:var(--color-surface-secondary,#f3f4f6)}.s-fulfillment-methods-icon{font-size:22px;line-height:1;color:var(--color-text-secondary,#6b7280)}';export{i as salla_fulfillment_methods}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,H as a}from"./p-B64o_70M.js";const l=class{constructor(e){t(this,e),this.transactionsArray=[],this.isLoading=!1,this.nextPageUrl="",this.handleClick=()=>{this.loadMoreTransactions()}}componentWillLoad(){return salla.onReady().then((()=>this.loadTransactions()))}normalizeTransactions(t){if(Array.isArray(t))return{list:t,nextPageUrl:""};const e=t?.current_page??1,a=e<(t?.last_page??e)?`/balance/wallet?per_page=${t?.per_page??10}&page=${e+1}`:"";return{list:t?.data??[],nextPageUrl:a}}async loadTransactions(){this.isLoading=!0;try{let t="/balance/wallet?per_page=10&page=1",e=await salla.api.request(t);const{list:a,nextPageUrl:l}=this.normalizeTransactions(e.data.transactions);this.nextPageUrl=l,this.transactionsArray=a,this.balance=e.data.balance}catch(t){console.error("Error loading wallet transactions",t)}finally{this.isLoading=!1}}async loadMoreTransactions(){this.isLoading=!0;try{let t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10",e=await salla.api.request(t);const{list:a,nextPageUrl:l}=this.normalizeTransactions(e.data.transactions);this.nextPageUrl=l,this.transactionsArray=[...this.transactionsArray,...a],this.balance=e.data.balance}catch(t){console.error("Error loading wallet transactions",t)}finally{this.isLoading=!1}}render(){return this.transactionsArray.length>0?e(a,null,e("table",{class:"s-wallet-table"},e("tbody",{class:"s-wallet-table-tbody"},e("tr",{class:"s-table__tr"},e("td",null,e("div",{class:"s-wallet-table-balance-container"},e("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),e("div",null,e("div",{innerHTML:salla.money(this.balance)}),e("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),e("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),e("table",{class:"s-wallet-table"},e("thead",{class:"s-wallet-table-head"},e("tr",{class:"s-wallet-table-head-tr"},e("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),e("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((t=>e("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},e("td",{class:"s-wallet-table-tbody-tr-td"},e("div",{class:"s-wallet-table-tbody-tr-td-content"},e("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&e("span",{class:"hidden md:inline-block"},"#",t.id),e("div",{class:"flex items-center md:hidden"},e("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&e("span",null,"#",t.order_id))))),e("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},e("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},e("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),e("div",{innerHTML:salla.money(t.amount)}))),e("td",{class:"s-wallet-table-tbody-tr-td"},e("div",{class:"s-wallet-table-tbody-tr-td-content"},e("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(1e3*t.created_at).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),e("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},e("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},e("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),e("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&e("span",null,"#",t.order_id)))),e("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},e("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},e("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),e("span",null,t.expired_at&&new Date(1e3*t.expired_at).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),e("td",{class:"s-wallet-table-tbody-tr-td"},e("div",{class:"s-wallet-table-tbody-tr-td-content"},e("div",null,e("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),e("div",{class:{"s-wallet-table-transaction-status-default":!0,"s-wallet-table-transaction-status-cashback":"cashback"===t.action_type,"s-wallet-table-transaction-status-refund":"refund"===t.action_type,"s-wallet-table-transaction-status-purchase":"purchase_by_wallet"===t.action_type}},!!t.description&&e("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&e("salla-tooltip",{text:t.description,targetId:t.id.toString()}),e("span",null,t.title))))))))),e("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&e("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more")))):e(a,null,e("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),e("div",{class:"s-wallet-table-empty-state"},e("i",{class:"sicon-full-wallet"}),e("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),e("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};l.style='/*!twlt*/.s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.hidden{display:none}.items-center{align-items:center}.p-3{padding:0.75rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.625rem * var(--tw-space-y-reverse))}@media (min-width: 768px){.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}}.s-wallet-mobile-title{display:inline-block;width:8rem;font-weight:400;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-wallet-mobile-title{display:none}}.s-wallet-reference-id{display:none}@media (min-width: 768px){.s-wallet-reference-id{display:inline-block}}.s-wallet-buy-as-gift-icon{margin-left:0.25rem;margin-right:0.25rem;display:inline-block;color:var(--color-primary)}.s-wallet-copy-to-clipboard-button{display:flex;align-items:center}@media (min-width: 768px){.s-wallet-copy-to-clipboard-button{display:none}}.s-wallet-copy-to-clipboard-button salla-button{position:relative}.s-wallet-copy-to-clipboard-button-icon{pointer-events:none;font-size:0.75rem;line-height:1rem}.s-wallet-copy-to-clipboard-button-icon:where([dir="ltr"],[dir="ltr"] *){margin-left:0.25rem}.s-wallet-copy-to-clipboard-button-icon:where([dir="rtl"],[dir="rtl"] *){margin-right:0.25rem}@media (min-width: 768px){.s-wallet-status-container{margin-left:0px;margin-right:0px}}.s-wallet-status-container:where([dir="ltr"],[dir="ltr"] *){margin-left:auto}.s-wallet-status-container:where([dir="rtl"],[dir="rtl"] *){margin-right:auto}.s-wallet-status-container i{margin-top:0.25rem}.s-wallet-status-container i:where([dir="ltr"],[dir="ltr"] *){margin-right:0.25rem}.s-wallet-status-container i:where([dir="rtl"],[dir="rtl"] *){margin-left:0.25rem}.s-wallet-rated-text{--tw-text-opacity:1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.s-wallet-unrated-text{--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-wallet-no-content{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding-top:2.5rem;padding-bottom:5rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-wallet-no-content p{margin-bottom:1rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-wallet-table{min-width:100%;border-collapse:separate}@media (min-width: 768px){.s-wallet-table{margin-bottom:-0.75rem;--tw-border-spacing-y:1.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}}.s-wallet-table-head{margin-bottom:1.25rem;display:none;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 768px){.s-wallet-table-head{display:table-header-group}}.s-wallet-table-head-tr-th{padding-left:1.5rem;padding-right:1.5rem;text-align:start;font-size:0.875rem;line-height:1.25rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.s-wallet-table-head-tr-th:where([dir="ltr"],[dir="ltr"] *){text-align:left}.s-wallet-table-head-tr-th:last-child:where([dir="ltr"],[dir="ltr"] *){text-align:right}.s-wallet-table-head-tr-th:where([dir="rtl"],[dir="rtl"] *){text-align:right}.s-wallet-table-head-tr-th:last-child:where([dir="rtl"],[dir="rtl"] *){text-align:left}.s-wallet-table-tbody-tr{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-radius:var(--s-radius, 0.25rem);border-bottom-width:8px;border-top-width:8px;--tw-border-opacity:1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}@media (min-width: 768px){.s-wallet-table-tbody-tr{display:table-row;flex-direction:row;flex-wrap:nowrap;padding:0px}}.s-wallet-table-tbody-tr-td{width:100%;white-space:nowrap;font-size:0.875rem;line-height:1.25rem}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}@media (min-width: 768px){.s-wallet-table-tbody-tr-td{height:5rem;width:auto}.s-wallet-table-tbody-tr-td:last-child{text-align:end}.s-wallet-table-tbody-tr-td:first-child:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem}.s-wallet-table-tbody-tr-td:first-child:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem}}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}.s-wallet-table-tbody-tr-td-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem}@media (min-width: 768px){.s-wallet-table-tbody-tr-td-content{padding-left:1.5rem;padding-right:1.5rem;padding-top:1.5rem;padding-bottom:1.5rem}}.s-wallet-table-tbody-tr-td-content:where([dir="ltr"],[dir="ltr"] *){padding-right:0.5rem}.s-wallet-table-tbody-tr-td-content:where([dir="rtl"],[dir="rtl"] *){padding-left:0.5rem}.s-wallet-table-tbody-tr a{position:absolute;top:0px;bottom:0px;display:block;width:100%}.s-wallet-table-tbody-tr a:where([dir="ltr"],[dir="ltr"] *){left:0px}.s-wallet-table-tbody-tr a:where([dir="rtl"],[dir="rtl"] *){right:0px}@media (min-width: 768px){.md\\:mx-0{margin-left:0px;margin-right:0px}.md\\:inline-block{display:inline-block}.md\\:hidden{display:none}}.ltr\\:ml-auto:where([dir="ltr"],[dir="ltr"] *){margin-left:auto}.ltr\\:mr-4:where([dir="ltr"],[dir="ltr"] *){margin-right:1rem}.rtl\\:ml-4:where([dir="rtl"],[dir="rtl"] *){margin-left:1rem}.rtl\\:mr-auto:where([dir="rtl"],[dir="rtl"] *){margin-right:auto}/*!twlt*/.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-text{pointer-events:none;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-loader{margin-left:0.5rem;margin-right:0.5rem;display:flex;align-items:center;justify-content:center;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-button-loader::before{display:inline-block;height:1rem;content:var(--tw-content);width:1rem}@keyframes spin{to{content:var(--tw-content);transform:rotate(360deg)}}.s-button-loader::before{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;border-style:solid;border-top-color:var(--color-primary);border-left-color:var(--color-primary);border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-border-opacity:1;border-right-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-content:\'\';content:var(--tw-content)}.s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;margin:0px !important;--tw-translate-y:-50%;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-infinite-scroll-wrapper{margin-top:1rem;text-align:center}.s-infinite-scroll-last{margin:0px;text-align:center}.s-infinite-scroll-error{margin:0px;text-align:center}';export{l as salla_wallet}
|
|
4
|
+
import{r as t,h as e,H as a}from"./p-C0qiFNJn.js";const l=class{constructor(e){t(this,e),this.transactionsArray=[],this.isLoading=!1,this.nextPageUrl="",this.handleClick=()=>{this.loadMoreTransactions()}}componentWillLoad(){return salla.onReady().then((()=>this.loadTransactions()))}normalizeTransactions(t){if(Array.isArray(t))return{list:t,nextPageUrl:""};const e=t?.current_page??1,a=e<(t?.last_page??e)?`/balance/wallet?per_page=${t?.per_page??10}&page=${e+1}`:"";return{list:t?.data??[],nextPageUrl:a}}async loadTransactions(){this.isLoading=!0;try{let t="/balance/wallet?per_page=10&page=1",e=await salla.api.request(t);const{list:a,nextPageUrl:l}=this.normalizeTransactions(e.data.transactions);this.nextPageUrl=l,this.transactionsArray=a,this.balance=e.data.balance}catch(t){console.error("Error loading wallet transactions",t)}finally{this.isLoading=!1}}async loadMoreTransactions(){this.isLoading=!0;try{let t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10",e=await salla.api.request(t);const{list:a,nextPageUrl:l}=this.normalizeTransactions(e.data.transactions);this.nextPageUrl=l,this.transactionsArray=[...this.transactionsArray,...a],this.balance=e.data.balance}catch(t){console.error("Error loading wallet transactions",t)}finally{this.isLoading=!1}}render(){return this.transactionsArray.length>0?e(a,null,e("table",{class:"s-wallet-table"},e("tbody",{class:"s-wallet-table-tbody"},e("tr",{class:"s-table__tr"},e("td",null,e("div",{class:"s-wallet-table-balance-container"},e("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),e("div",null,e("div",{innerHTML:salla.money(this.balance)}),e("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),e("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),e("table",{class:"s-wallet-table"},e("thead",{class:"s-wallet-table-head"},e("tr",{class:"s-wallet-table-head-tr"},e("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),e("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),e("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((t=>e("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},e("td",{class:"s-wallet-table-tbody-tr-td"},e("div",{class:"s-wallet-table-tbody-tr-td-content"},e("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&e("span",{class:"hidden md:inline-block"},"#",t.id),e("div",{class:"flex items-center md:hidden"},e("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&e("span",null,"#",t.order_id))))),e("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},e("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},e("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),e("div",{innerHTML:salla.money(t.amount)}))),e("td",{class:"s-wallet-table-tbody-tr-td"},e("div",{class:"s-wallet-table-tbody-tr-td-content"},e("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(1e3*t.created_at).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),e("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},e("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},e("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),e("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&e("span",null,"#",t.order_id)))),e("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},e("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},e("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),e("span",null,t.expired_at&&new Date(1e3*t.expired_at).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),e("td",{class:"s-wallet-table-tbody-tr-td"},e("div",{class:"s-wallet-table-tbody-tr-td-content"},e("div",null,e("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),e("div",{class:{"s-wallet-table-transaction-status-default":!0,"s-wallet-table-transaction-status-cashback":"cashback"===t.action_type,"s-wallet-table-transaction-status-refund":"refund"===t.action_type,"s-wallet-table-transaction-status-purchase":"purchase_by_wallet"===t.action_type}},!!t.description&&e("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&e("salla-tooltip",{text:t.description,targetId:t.id.toString()}),e("span",null,t.title))))))))),e("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&e("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more")))):e(a,null,e("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),e("div",{class:"s-wallet-table-empty-state"},e("i",{class:"sicon-full-wallet"}),e("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),e("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};l.style='/*!twlt*/.s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.hidden{display:none}.items-center{align-items:center}.p-3{padding:0.75rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.625rem * var(--tw-space-y-reverse))}@media (min-width: 768px){.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}}.s-wallet-mobile-title{display:inline-block;width:8rem;font-weight:400;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-wallet-mobile-title{display:none}}.s-wallet-reference-id{display:none}@media (min-width: 768px){.s-wallet-reference-id{display:inline-block}}.s-wallet-buy-as-gift-icon{margin-left:0.25rem;margin-right:0.25rem;display:inline-block;color:var(--color-primary)}.s-wallet-copy-to-clipboard-button{display:flex;align-items:center}@media (min-width: 768px){.s-wallet-copy-to-clipboard-button{display:none}}.s-wallet-copy-to-clipboard-button salla-button{position:relative}.s-wallet-copy-to-clipboard-button-icon{pointer-events:none;font-size:0.75rem;line-height:1rem}.s-wallet-copy-to-clipboard-button-icon:where([dir="ltr"],[dir="ltr"] *){margin-left:0.25rem}.s-wallet-copy-to-clipboard-button-icon:where([dir="rtl"],[dir="rtl"] *){margin-right:0.25rem}@media (min-width: 768px){.s-wallet-status-container{margin-left:0px;margin-right:0px}}.s-wallet-status-container:where([dir="ltr"],[dir="ltr"] *){margin-left:auto}.s-wallet-status-container:where([dir="rtl"],[dir="rtl"] *){margin-right:auto}.s-wallet-status-container i{margin-top:0.25rem}.s-wallet-status-container i:where([dir="ltr"],[dir="ltr"] *){margin-right:0.25rem}.s-wallet-status-container i:where([dir="rtl"],[dir="rtl"] *){margin-left:0.25rem}.s-wallet-rated-text{--tw-text-opacity:1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.s-wallet-unrated-text{--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-wallet-no-content{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding-top:2.5rem;padding-bottom:5rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-wallet-no-content p{margin-bottom:1rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-wallet-table{min-width:100%;border-collapse:separate}@media (min-width: 768px){.s-wallet-table{margin-bottom:-0.75rem;--tw-border-spacing-y:1.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}}.s-wallet-table-head{margin-bottom:1.25rem;display:none;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 768px){.s-wallet-table-head{display:table-header-group}}.s-wallet-table-head-tr-th{padding-left:1.5rem;padding-right:1.5rem;text-align:start;font-size:0.875rem;line-height:1.25rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.s-wallet-table-head-tr-th:where([dir="ltr"],[dir="ltr"] *){text-align:left}.s-wallet-table-head-tr-th:last-child:where([dir="ltr"],[dir="ltr"] *){text-align:right}.s-wallet-table-head-tr-th:where([dir="rtl"],[dir="rtl"] *){text-align:right}.s-wallet-table-head-tr-th:last-child:where([dir="rtl"],[dir="rtl"] *){text-align:left}.s-wallet-table-tbody-tr{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-radius:var(--s-radius, 0.25rem);border-bottom-width:8px;border-top-width:8px;--tw-border-opacity:1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}@media (min-width: 768px){.s-wallet-table-tbody-tr{display:table-row;flex-direction:row;flex-wrap:nowrap;padding:0px}}.s-wallet-table-tbody-tr-td{width:100%;white-space:nowrap;font-size:0.875rem;line-height:1.25rem}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}@media (min-width: 768px){.s-wallet-table-tbody-tr-td{height:5rem;width:auto}.s-wallet-table-tbody-tr-td:last-child{text-align:end}.s-wallet-table-tbody-tr-td:first-child:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem}.s-wallet-table-tbody-tr-td:first-child:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem}}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}.s-wallet-table-tbody-tr-td-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem}@media (min-width: 768px){.s-wallet-table-tbody-tr-td-content{padding-left:1.5rem;padding-right:1.5rem;padding-top:1.5rem;padding-bottom:1.5rem}}.s-wallet-table-tbody-tr-td-content:where([dir="ltr"],[dir="ltr"] *){padding-right:0.5rem}.s-wallet-table-tbody-tr-td-content:where([dir="rtl"],[dir="rtl"] *){padding-left:0.5rem}.s-wallet-table-tbody-tr a{position:absolute;top:0px;bottom:0px;display:block;width:100%}.s-wallet-table-tbody-tr a:where([dir="ltr"],[dir="ltr"] *){left:0px}.s-wallet-table-tbody-tr a:where([dir="rtl"],[dir="rtl"] *){right:0px}@media (min-width: 768px){.md\\:mx-0{margin-left:0px;margin-right:0px}.md\\:inline-block{display:inline-block}.md\\:hidden{display:none}}.ltr\\:ml-auto:where([dir="ltr"],[dir="ltr"] *){margin-left:auto}.ltr\\:mr-4:where([dir="ltr"],[dir="ltr"] *){margin-right:1rem}.rtl\\:ml-4:where([dir="rtl"],[dir="rtl"] *){margin-left:1rem}.rtl\\:mr-auto:where([dir="rtl"],[dir="rtl"] *){margin-right:auto}/*!twlt*/.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-text{pointer-events:none;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-loader{margin-left:0.5rem;margin-right:0.5rem;display:flex;align-items:center;justify-content:center;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-button-loader::before{display:inline-block;height:1rem;content:var(--tw-content);width:1rem}@keyframes spin{to{content:var(--tw-content);transform:rotate(360deg)}}.s-button-loader::before{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;border-style:solid;border-top-color:var(--color-primary);border-left-color:var(--color-primary);border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-border-opacity:1;border-right-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-content:\'\';content:var(--tw-content)}.s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;margin:0px !important;--tw-translate-y:-50%;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-infinite-scroll-wrapper{margin-top:1rem;text-align:center}.s-infinite-scroll-last{margin:0px;text-align:center}.s-infinite-scroll-error{margin:0px;text-align:center}';export{l as salla_wallet}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as t,H as s,a as e}from"./p-
|
|
4
|
+
import{r as a,h as t,H as s,a as e}from"./p-C0qiFNJn.js";const r=class{constructor(t){a(this,t),this.cashbackData=void 0,this.productId=null,this.handlePriceUpdated=(a,t)=>{if(String(t)!==String(this.productId))return;const s=a?.data?.cashback;void 0!==s&&(this.cashbackData=s)}}async componentWillLoad(){try{if(this.productId=this.host.dataset.productId||salla.config.get("page.id"),this.productId&&salla.event.on("product::price.updated",this.handlePriceUpdated),await salla.onReady(),await salla.lang.onLoaded(),!this.productId)return;const a=await salla.api.request(`/products/${this.productId}/cashback-offer`).catch((()=>null));void 0===this.cashbackData&&(this.cashbackData=a?.data??null)}catch(a){salla?.logger?.warn?.("salla-cashback-banner: init failed",a)}}disconnectedCallback(){salla.event.off("product::price.updated",this.handlePriceUpdated)}getPaymentMethodsText(a=[]){return a.map((a=>String(a||"").trim())).filter(Boolean).map((a=>salla.lang.get(`pages.checkout.${a}`)||a)).join(", ")}getCashbackMessage(){const a=this.cashbackData?.payment_method_restrictions?.included??[];return a.length?salla.lang.get("pages.loyalty_program.cashback_when_buying_product_payment_method",{payment_method:this.getPaymentMethodsText(a)}):salla.lang.get("pages.loyalty_program.cashback_when_buying_product")}render(){const a=this.cashbackData;if(!this.productId||!a||!Number(a.amount))return null;const e=a.amount,r=a.currency,n=this.getCashbackMessage(),i=a.offer_type;return t(s,null,t("div",{class:"s-cashback-banner-container"},t("div",{class:"s-cashback-banner-icon"},t("span",{class:"s-cashback-banner-inner-icon",innerHTML:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_5667_2008)">\n<path d="M9.00003 0.935974C9.37203 0.935974 9.72003 1.06797 10.044 1.33197C10.344 1.57197 10.596 1.90797 10.8 2.33997L12.114 5.00397C12.174 5.09997 12.27 5.19897 12.402 5.30097C12.534 5.40297 12.66 5.46597 12.78 5.48997L15.174 5.88597C15.618 5.95797 15.996 6.10197 16.308 6.31797C16.644 6.54597 16.869 6.83697 16.983 7.19097C17.097 7.54497 17.082 7.91397 16.938 8.29797C16.806 8.64597 16.578 8.98797 16.254 9.32397L14.4 11.196C14.316 11.28 14.247 11.409 14.193 11.583C14.139 11.757 14.13 11.91 14.166 12.042L14.688 14.364C14.808 14.88 14.832 15.342 14.76 15.75C14.676 16.206 14.475 16.551 14.157 16.785C13.839 17.019 13.452 17.106 12.996 17.046C12.588 16.998 12.156 16.836 11.7 16.56L9.45003 15.21C9.34203 15.15 9.19203 15.12 9.00003 15.12C8.80803 15.12 8.65803 15.15 8.55003 15.21L6.30003 16.56C5.84403 16.836 5.41203 16.998 5.00403 17.046C4.54803 17.106 4.16103 17.016 3.84303 16.776C3.52503 16.536 3.32403 16.194 3.24003 15.75C3.16803 15.342 3.19203 14.88 3.31203 14.364L3.83403 12.042C3.85803 11.91 3.84603 11.757 3.79803 11.583C3.75003 11.409 3.68403 11.28 3.60003 11.196L1.74603 9.32397C1.41003 8.98797 1.18203 8.64597 1.06203 8.29797C0.918027 7.91397 0.900027 7.54497 1.00803 7.19097C1.11603 6.83697 1.34403 6.54597 1.69203 6.31797C1.99203 6.10197 2.37003 5.95797 2.82603 5.88597L5.22003 5.48997C5.32803 5.46597 5.45103 5.40297 5.58903 5.30097C5.72703 5.19897 5.82003 5.09997 5.86803 5.00397L7.18203 2.33997C7.39803 1.90797 7.65603 1.57197 7.95603 1.33197C8.28003 1.06797 8.62803 0.935974 9.00003 0.935974Z" fill="white"/>\n</g>\n<defs>\n<clipPath id="clip0_5667_2008">\n<rect width="18" height="18" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n'})),t("p",null,t("span",{class:"s-cashback-banner-label"},salla.lang.get("pages.loyalty_program.earn")," "),t("span",{class:"s-cashback-banner-value"},"percentage"===i?"+":"",e," ",["SAR","ر.س"].includes(r)?t("i",{class:"sicon-sar"}):r," "),t("span",{class:"s-cashback-banner-label"},n))))}get host(){return e(this)}};r.style="/*!twlt*/.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-cashback-banner-container{margin-bottom:0.75rem;display:flex;width:100%;align-items:center;gap:0.5rem;border-radius:0.5rem;background-color:rgb(46 16 101 / var(--tw-bg-opacity, 1));--tw-bg-opacity:0.1;padding-left:0.75rem;padding-right:0.75rem;padding-top:0.5rem;padding-bottom:0.5rem}.s-cashback-banner-icon{display:flex;height:2rem;width:2rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(46 16 101 / var(--tw-bg-opacity, 1))}.s-cashback-banner-label{font-size:0.875rem;line-height:1.25rem}.s-cashback-banner-value{font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(46 16 101 / var(--tw-text-opacity, 1))}";export{r as salla_cashback_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 r}from"./p-B64o_70M.js";var i;!function(e){e.PERCENTAGE="percentage",e.FIXED="fixed"}(i||(i={}));const o={staticIcons:['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>'],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class s{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){return this.findTierByIndex(e,t)?.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--)if(e>=t[r].threshold)return t[r].index;return 0}}const n=class{constructor(t){e(this,t),this.currentTierIndex=0,this.canRender=!1,this.isLoading=!1,this.handleTabClick=e=>{this.activeTabTier=e},salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title"),this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier"),this.discountText=salla.lang.get("blocks.tiered_offer.discount"),this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{if(await salla.onReady(),!this.checkFeatureEnabled())return;if(!this.checkCartExists())return;this.isLoading=!0;const e=await this.fetchTieredOfferData();if(!e)return;this.initializeComponent(e)}catch(e){this.canRender=!1,salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=!1}}checkFeatureEnabled(){return salla.config.get("store.features")?.includes("tiered-offer")}checkCartExists(){return!!salla.storage.get("cart")?.summary?.count}validateCouponCompatibility(e,t){return!(t&&!e.details?.applied_with_coupon)}shouldHideForGuest(){return salla.config.isGuest()}shouldHideUntilThreshold(e,t){return!(!e?.hide_until_threshold||0!==t)}resolveTierName(e,t){return s.getTierNameByIndex(e,t)||""}async fetchTieredOfferData(){try{const{data:e}=await salla.api.cart.offers(),t=e.find((e=>"tiered_offer"===e.type));return t?this.validateCouponCompatibility(t,salla.storage.get("cart")?.coupon)?t:(this.canRender=!1,null):null}catch(e){throw e}}initializeComponent(e){this.apiOfferData=e,this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData),this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const t=this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0);this.shouldHideForGuest()||this.shouldHideUntilThreshold(this.apiOfferData.details,t)?this.canRender=!1:(this.currentTierIndex=t,this.currentTier=this.resolveTierName(this.tieredOfferData.tiers,t),this.activeTabTier=this.currentTier||this.tieredOfferData.tiers[0]?.tier_name,this.canRender=!0)}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();t&&(this.tieredOfferData?this.updateOfferValues(e,t):this.initializeComponent(t))}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend)).map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===i.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:o.staticIcons[t]||o.staticIcons[0],threshold:e.min_spend,text_color:o.staticColors[t],index:t+1})));return{current_tier:s.getTierNameByIndex(t,this.findCurrentTierIndex(e.details.current_value,t)),tiers:t}}findCurrentTierIndex(e,t=this.tieredOfferData?.tiers){return s.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){if(!t||!this.tieredOfferData)return;if(!t.details?.discounts?.length)return void(this.canRender=!1);if(!this.validateCouponCompatibility(t,e.coupon))return void(this.canRender=!1);if(this.shouldHideForGuest())return void(this.canRender=!1);const r=this.mapApiDataToTiers(t),i=this.findCurrentTierIndex(t.details?.current_value||0,r.tiers);if(this.shouldHideUntilThreshold(t.details,i))return void(this.canRender=!1);if(!1===t.details?.with_current_cart)return void(this.canRender=!0);this.apiOfferData=t,this.tieredOfferData=r,this.canRender=!0,this.currentTierIndex=i,this.currentTier=this.resolveTierName(r.tiers,i);const o=this.currentTier||r.tiers[0]?.tier_name;this.activeTabTier!==o&&(this.activeTabTier=o)}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return s.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){const e=this.tieredOfferData.tiers.length;return this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0)/e*100}calculateMilestonePosition(e,t){return 1===t?"calc(100% - 18px)":`${Math.max(2,Math.min(95,(e+1)/t*100-8/t))}%`}getMilestoneStyles(e,t,r){const i="rtl"===document.documentElement.dir,o=this.calculateMilestonePosition(t,r),s=e.name.length>6?"flex-end":"center";return{[i?"right":"left"]:o,alignItems:s,position:"absolute",transform:i?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){return t?{color:e.text_color}:r?{color:"var(--color-primary)"}:{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,i){const o=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",i?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:o,style:this.getMilestoneIconStyles(e,r,i)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:1===r?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones"},this.tieredOfferData.tiers.map(((i,o)=>{const s=e>=i.threshold,n=i.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(i,o,r)},this.renderMilestoneIcon(i,n,s),this.renderMilestoneName(i,n))}))))}renderProgressBar(){const e=this.getProgressWidth(),r=this.tieredOfferData.tiers.length,i=this.apiOfferData.details?.current_value||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(i,r)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>t("button",{class:"s-tiered-offer-tab-header "+(e.tier_name===this.activeTabTier?"s-tiered-offer-tab-active":""),onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=s.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);return e?t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name)))):null})()))}render(){if(this.isLoading)return this.getLoadingSkeletonView();if(!this.canRender||!this.tieredOfferData)return null;const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),this.currentTier&&t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};n.style="/*!twlt*/.s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{transform:scaleX(-1)}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-tiered-offer-container{position:relative;margin-bottom:1.25rem;width:100%;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:1rem;--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}@media (min-width: 640px){.s-tiered-offer-container{padding:1.25rem;padding-left:1.5rem;padding-right:1.5rem}}.s-tiered-offer-header{margin-bottom:1.5rem;display:flex;align-items:center;gap:0.75rem}.s-tiered-offer-header-content{flex:1 1 0%}.s-tiered-offer-current-tier-name-wrapper{display:flex;flex-direction:row;align-items:flex-start;gap:0.375rem}.s-tiered-offer-current-tier-name-wrapper h2{font-size:1.125rem;line-height:1.75rem}.s-tiered-offer-current-tier-name-wrapper svg{height:1.5rem;width:1.5rem}.s-tiered-offer-program-title{margin:0px;margin-bottom:0.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-tiered-offer-program-title h2{font-size:1.125rem;line-height:1.75rem}.s-tiered-offer-current-tier{margin:0px;margin-bottom:0.375rem;font-weight:700}.s-tiered-offer-tier-name{font-weight:600;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-tiered-offer-progress-container{margin-top:1.5rem;margin-bottom:1rem}.s-tiered-offer-progress-wrapper{position:relative}.s-tiered-offer-progress-bg{position:absolute;top:0.5rem;left:1rem;right:1rem;height:1rem;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-tiered-offer-progress-fill{position:absolute;top:0.5rem;height:1rem;border-radius:9999px;background-color:var(--color-primary);transition-property:all;transition-duration:500ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-tiered-offer-milestones-wrapper{display:flex;justify-content:flex-end}.s-tiered-offer-milestones{position:relative;display:flex;height:3rem;width:100%;align-items:center;justify-content:space-between}.s-tiered-offer-single-milestone-justify-end{position:relative;display:flex;height:3rem;width:100%;align-items:center;justify-content:flex-end}.s-tiered-offer-milestone{display:flex;flex-direction:column;align-items:center}.s-tiered-offer-milestone-icon{position:relative;z-index:10;margin-top:0px;display:flex;height:2.25rem;width:2.25rem;align-items:center;justify-content:center;border-radius:0.75rem;border-width:2px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-tiered-offer-milestone-icon span{display:flex;align-items:center;justify-content:center}.s-tiered-offer-milestone-icon svg{height:1.25rem;width:1.25rem;color:currentColor}.s-tiered-offer-milestone-name{margin-top:0.5rem;display:flex;height:1rem;align-items:center;justify-content:center}.s-tiered-offer-milestone-name span{text-align:center;font-size:0.875rem;line-height:1.25rem;font-weight:500}@media (min-width: 640px){.s-tiered-offer-milestone-name span{font-size:0.75rem;line-height:1rem}}.s-tiered-offer-tabs-container{margin-top:1rem}.s-tiered-offer-tab-headers{display:flex;gap:0.25rem;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.25rem}.s-tiered-offer-tab-header{display:flex;flex:1 1 0%;cursor:pointer;align-items:center;justify-content:center;border-radius:0.125rem;border-style:none;background-color:transparent;padding-top:0.625rem;padding-bottom:0.625rem;padding-left:0.75rem;padding-right:0.75rem;font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}@media (min-width: 640px){.s-tiered-offer-tab-header{padding-top:0.5rem;padding-bottom:0.5rem;font-size:0.75rem;line-height:1rem}}.s-tiered-offer-tab-active{border-radius:0.375rem;background-color:var(--color-primary);--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-tiered-offer-tab-active:hover{background-color:var(--color-primary-dark);opacity:0.8}.s-tiered-offer-tab-content-wrapper{border-bottom-right-radius:0.375rem;border-bottom-left-radius:0.375rem;border-width:1px;border-top-width:0px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.s-tiered-offer-tab-content{padding-left:1.5rem;padding-right:1.5rem}@media (min-width: 640px){.s-tiered-offer-tab-content{padding-left:1rem;padding-right:1rem}}.s-tiered-offer-tab-content.tab-hidden{display:none}.s-tiered-offer-tab-content-inner{padding-top:1rem}.s-tiered-offer-discount-section{margin-bottom:0.5rem}.s-tiered-offer-discount-title{margin:0px;margin-bottom:0.5rem;font-size:1rem;line-height:1.5rem;font-weight:700;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-tiered-offer-benefit-description{margin:0px;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-tiered-offer-skeleton-wrapper{padding:1.25rem}.s-tiered-offer-skeleton-title{margin-bottom:0.75rem}.s-tiered-offer-skeleton-subtitle{margin-bottom:1.5rem}.s-tiered-offer-skeleton-progress{margin-bottom:1.25rem}";export{n as salla_tiered_offer}
|
|
4
|
+
import{r as e,h as t,H as r}from"./p-C0qiFNJn.js";var i;!function(e){e.PERCENTAGE="percentage",e.FIXED="fixed"}(i||(i={}));const o={staticIcons:['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>'],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class s{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){return this.findTierByIndex(e,t)?.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--)if(e>=t[r].threshold)return t[r].index;return 0}}const n=class{constructor(t){e(this,t),this.currentTierIndex=0,this.canRender=!1,this.isLoading=!1,this.handleTabClick=e=>{this.activeTabTier=e},salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title"),this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier"),this.discountText=salla.lang.get("blocks.tiered_offer.discount"),this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{if(await salla.onReady(),!this.checkFeatureEnabled())return;if(!this.checkCartExists())return;this.isLoading=!0;const e=await this.fetchTieredOfferData();if(!e)return;this.initializeComponent(e)}catch(e){this.canRender=!1,salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=!1}}checkFeatureEnabled(){return salla.config.get("store.features")?.includes("tiered-offer")}checkCartExists(){return!!salla.storage.get("cart")?.summary?.count}validateCouponCompatibility(e,t){return!(t&&!e.details?.applied_with_coupon)}shouldHideForGuest(){return salla.config.isGuest()}shouldHideUntilThreshold(e,t){return!(!e?.hide_until_threshold||0!==t)}resolveTierName(e,t){return s.getTierNameByIndex(e,t)||""}async fetchTieredOfferData(){try{const{data:e}=await salla.api.cart.offers(),t=e.find((e=>"tiered_offer"===e.type));return t?this.validateCouponCompatibility(t,salla.storage.get("cart")?.coupon)?t:(this.canRender=!1,null):null}catch(e){throw e}}initializeComponent(e){this.apiOfferData=e,this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData),this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const t=this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0);this.shouldHideForGuest()||this.shouldHideUntilThreshold(this.apiOfferData.details,t)?this.canRender=!1:(this.currentTierIndex=t,this.currentTier=this.resolveTierName(this.tieredOfferData.tiers,t),this.activeTabTier=this.currentTier||this.tieredOfferData.tiers[0]?.tier_name,this.canRender=!0)}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();t&&(this.tieredOfferData?this.updateOfferValues(e,t):this.initializeComponent(t))}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend)).map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===i.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:o.staticIcons[t]||o.staticIcons[0],threshold:e.min_spend,text_color:o.staticColors[t],index:t+1})));return{current_tier:s.getTierNameByIndex(t,this.findCurrentTierIndex(e.details.current_value,t)),tiers:t}}findCurrentTierIndex(e,t=this.tieredOfferData?.tiers){return s.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){if(!t||!this.tieredOfferData)return;if(!t.details?.discounts?.length)return void(this.canRender=!1);if(!this.validateCouponCompatibility(t,e.coupon))return void(this.canRender=!1);if(this.shouldHideForGuest())return void(this.canRender=!1);const r=this.mapApiDataToTiers(t),i=this.findCurrentTierIndex(t.details?.current_value||0,r.tiers);if(this.shouldHideUntilThreshold(t.details,i))return void(this.canRender=!1);if(!1===t.details?.with_current_cart)return void(this.canRender=!0);this.apiOfferData=t,this.tieredOfferData=r,this.canRender=!0,this.currentTierIndex=i,this.currentTier=this.resolveTierName(r.tiers,i);const o=this.currentTier||r.tiers[0]?.tier_name;this.activeTabTier!==o&&(this.activeTabTier=o)}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return s.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){const e=this.tieredOfferData.tiers.length;return this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0)/e*100}calculateMilestonePosition(e,t){return 1===t?"calc(100% - 18px)":`${Math.max(2,Math.min(95,(e+1)/t*100-8/t))}%`}getMilestoneStyles(e,t,r){const i="rtl"===document.documentElement.dir,o=this.calculateMilestonePosition(t,r),s=e.name.length>6?"flex-end":"center";return{[i?"right":"left"]:o,alignItems:s,position:"absolute",transform:i?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){return t?{color:e.text_color}:r?{color:"var(--color-primary)"}:{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,i){const o=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",i?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:o,style:this.getMilestoneIconStyles(e,r,i)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:1===r?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones"},this.tieredOfferData.tiers.map(((i,o)=>{const s=e>=i.threshold,n=i.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(i,o,r)},this.renderMilestoneIcon(i,n,s),this.renderMilestoneName(i,n))}))))}renderProgressBar(){const e=this.getProgressWidth(),r=this.tieredOfferData.tiers.length,i=this.apiOfferData.details?.current_value||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(i,r)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>t("button",{class:"s-tiered-offer-tab-header "+(e.tier_name===this.activeTabTier?"s-tiered-offer-tab-active":""),onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=s.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);return e?t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name)))):null})()))}render(){if(this.isLoading)return this.getLoadingSkeletonView();if(!this.canRender||!this.tieredOfferData)return null;const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),this.currentTier&&t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};n.style="/*!twlt*/.s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{transform:scaleX(-1)}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-tiered-offer-container{position:relative;margin-bottom:1.25rem;width:100%;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:1rem;--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}@media (min-width: 640px){.s-tiered-offer-container{padding:1.25rem;padding-left:1.5rem;padding-right:1.5rem}}.s-tiered-offer-header{margin-bottom:1.5rem;display:flex;align-items:center;gap:0.75rem}.s-tiered-offer-header-content{flex:1 1 0%}.s-tiered-offer-current-tier-name-wrapper{display:flex;flex-direction:row;align-items:flex-start;gap:0.375rem}.s-tiered-offer-current-tier-name-wrapper h2{font-size:1.125rem;line-height:1.75rem}.s-tiered-offer-current-tier-name-wrapper svg{height:1.5rem;width:1.5rem}.s-tiered-offer-program-title{margin:0px;margin-bottom:0.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-tiered-offer-program-title h2{font-size:1.125rem;line-height:1.75rem}.s-tiered-offer-current-tier{margin:0px;margin-bottom:0.375rem;font-weight:700}.s-tiered-offer-tier-name{font-weight:600;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-tiered-offer-progress-container{margin-top:1.5rem;margin-bottom:1rem}.s-tiered-offer-progress-wrapper{position:relative}.s-tiered-offer-progress-bg{position:absolute;top:0.5rem;left:1rem;right:1rem;height:1rem;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-tiered-offer-progress-fill{position:absolute;top:0.5rem;height:1rem;border-radius:9999px;background-color:var(--color-primary);transition-property:all;transition-duration:500ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-tiered-offer-milestones-wrapper{display:flex;justify-content:flex-end}.s-tiered-offer-milestones{position:relative;display:flex;height:3rem;width:100%;align-items:center;justify-content:space-between}.s-tiered-offer-single-milestone-justify-end{position:relative;display:flex;height:3rem;width:100%;align-items:center;justify-content:flex-end}.s-tiered-offer-milestone{display:flex;flex-direction:column;align-items:center}.s-tiered-offer-milestone-icon{position:relative;z-index:10;margin-top:0px;display:flex;height:2.25rem;width:2.25rem;align-items:center;justify-content:center;border-radius:0.75rem;border-width:2px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-tiered-offer-milestone-icon span{display:flex;align-items:center;justify-content:center}.s-tiered-offer-milestone-icon svg{height:1.25rem;width:1.25rem;color:currentColor}.s-tiered-offer-milestone-name{margin-top:0.5rem;display:flex;height:1rem;align-items:center;justify-content:center}.s-tiered-offer-milestone-name span{text-align:center;font-size:0.875rem;line-height:1.25rem;font-weight:500}@media (min-width: 640px){.s-tiered-offer-milestone-name span{font-size:0.75rem;line-height:1rem}}.s-tiered-offer-tabs-container{margin-top:1rem}.s-tiered-offer-tab-headers{display:flex;gap:0.25rem;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.25rem}.s-tiered-offer-tab-header{display:flex;flex:1 1 0%;cursor:pointer;align-items:center;justify-content:center;border-radius:0.125rem;border-style:none;background-color:transparent;padding-top:0.625rem;padding-bottom:0.625rem;padding-left:0.75rem;padding-right:0.75rem;font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}@media (min-width: 640px){.s-tiered-offer-tab-header{padding-top:0.5rem;padding-bottom:0.5rem;font-size:0.75rem;line-height:1rem}}.s-tiered-offer-tab-active{border-radius:0.375rem;background-color:var(--color-primary);--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-tiered-offer-tab-active:hover{background-color:var(--color-primary-dark);opacity:0.8}.s-tiered-offer-tab-content-wrapper{border-bottom-right-radius:0.375rem;border-bottom-left-radius:0.375rem;border-width:1px;border-top-width:0px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.s-tiered-offer-tab-content{padding-left:1.5rem;padding-right:1.5rem}@media (min-width: 640px){.s-tiered-offer-tab-content{padding-left:1rem;padding-right:1rem}}.s-tiered-offer-tab-content.tab-hidden{display:none}.s-tiered-offer-tab-content-inner{padding-top:1rem}.s-tiered-offer-discount-section{margin-bottom:0.5rem}.s-tiered-offer-discount-title{margin:0px;margin-bottom:0.5rem;font-size:1rem;line-height:1.5rem;font-weight:700;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-tiered-offer-benefit-description{margin:0px;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-tiered-offer-skeleton-wrapper{padding:1.25rem}.s-tiered-offer-skeleton-title{margin-bottom:0.75rem}.s-tiered-offer-skeleton-subtitle{margin-bottom:1.5rem}.s-tiered-offer-skeleton-progress{margin-bottom:1.25rem}";export{n as salla_tiered_offer}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,c as r,a}from"./p-
|
|
4
|
+
import{r as t,h as e,c as r,a}from"./p-C0qiFNJn.js";const s=class{constructor(e){t(this,e),this.isSelected=!1}async getChild(){return{selected:this.selected.bind(this),unselect:this.unselect.bind(this),name:this.name}}unselect(){this.isSelected=!1}selected(){this.isSelected=!0}render(){return e("div",{key:"f5cfa9676bc8314149cb78e103b9ef580c0d7559",class:{"s-tabs-content":!0,"s-tabs-content-selected":this.isSelected}},e("slot",{key:"1b86591377c09f1acb25cda20024b3af9c6a874d"}))}};s.style="";const o=class{constructor(e){t(this,e),this.tabSelected=r(this,"tabSelected"),this.id=Math.random().toString(36).slice(2,10),this.activeClass=void 0,this.height=void 0,this.centered=!1,this.isSelected=!1}async getChild(){return{selected:this.selected.bind(this),unselect:this.unselect.bind(this),name:this.name,id:this.id}}unselect(){this.isSelected=!1}selected(){this.isSelected=!0}onClick(){this.getChild().then((t=>{this.tabSelected.emit(t)}))}render(){return[e("div",{key:"a9548ed2a74d30e6fcf365dbe26aa5f7fdab2468",class:{"s-tabs-header-item":!0,"s-tabs-bg-normal":!0,"s-tabs-active":this.isSelected},onClick:this.onClick.bind(this)},e("slot",{key:"547edd40aab5843c6035bd3c36a34d9449dc12d3"}))]}};o.style="";const i=class{constructor(e){t(this,e),this.backgroundColor=void 0,this.vertical=!1}componentWillLoad(){this.createGroup().then((()=>{const[t]=this.tabGroup;this.selectGroup(t)}))}onSelectedTab(t){const e=this.tabGroup.find((e=>e.header.id===t.detail.id));this.selectGroup(e)}async createGroup(){const t=Array.from(this.host.querySelectorAll("salla-tab-header"));this.tabsHeader=await Promise.all(t.map((async t=>await t.getChild())));const e=Array.from(this.host.querySelectorAll("salla-tab-content"));this.tabsContent=await Promise.all(e.map((async t=>await t.getChild()))),this.tabGroup=this.tabsHeader.map((t=>{const e=this.tabsContent.find((e=>e.name===t.name));return{header:t,content:e}}))}selectGroup(t){this.tabGroup.map((t=>{t.header.unselect(),t.content.unselect()})),t.header.selected(),t.content.selected()}render(){return[e("div",{key:"e9054cb114c2bd66940b6afa98d7c7c230353a74",class:"s-tabs"},e("div",{key:"d245f64aef9b7fd77c9c51eb1d86ddfd9202e5fb",class:"s-tabs-header"},e("slot",{key:"f1b9a982cd746d637db5d514cb691f188af0cb7e",name:"header"})),e("div",{key:"0ba8441707b087a8c4d068b1a72bf10c8efb41cc",class:"s-tabs-content-wrapper"},e("slot",{key:"afcee28724a5a9ce263fcc3a38d624a631069945",name:"content"})))]}get host(){return a(this)}};i.style='/*!twlt*/.s-tabs-header{-ms-overflow-style:none;scrollbar-width:none;}.s-tabs-header::-webkit-scrollbar{display:none}.flex{display:flex}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-loyalty-program-rewards-container .s-tabs-content-wrapper{padding:0px}@media (min-width: 768px){.s-loyalty-program-rewards-container .s-tabs-content-wrapper{padding-top:1rem}}.s-loyalty-program-rewards-container .s-tabs-header{display:flex;align-items:center;justify-content:space-between;border-style:none}.s-loyalty-program-rewards-container .s-tabs-header div{order:1}.s-loyalty-program-rewards-container .s-tabs-header-item{position:relative;margin:0px;display:flex;width:max-content;align-items:center;justify-content:center;gap:0.5rem;border-radius:0.5rem;background-color:transparent;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container .s-tabs-bg-normal{background-color:transparent;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container-cart .s-tabs-bg-normal{background-color:transparent;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container-cart .s-tabs-header-item{display:flex;width:max-content;align-items:center;justify-content:center;gap:0.5rem;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem}.s-loyalty-program-rewards-container-cart .s-tabs-content-wrapper{padding:0px}.s-loyalty-program-rewards-container-cart .s-tabs-header{overflow-x:auto;border-bottom-width:1px;border-color:var(--color-primary-light);padding-left:1.25rem;padding-right:1.25rem}@media (min-width: 640px){.s-loyalty-program-rewards-container-cart .s-tabs-header{margin-left:1.25rem;margin-right:1.25rem;padding-left:0px;padding-right:0px}}.s-loyalty-program-rewards-container .s-tabs-active{background-color:var(--color-primary-light);--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container-cart .s-tabs-active{background-color:var(--color-primary-light);--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-loyalty-program-reward-details .s-tabs-header{margin-top:0.5rem;margin-bottom:0.5rem;margin-left:1rem;margin-right:1rem;display:flex}.s-loyalty-program-reward-details .s-tabs-header>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-loyalty-program-reward-details .s-tabs-header{border-style:none}@media (min-width: 768px){.s-loyalty-program-reward-details .s-tabs-header{margin-left:3rem;margin-right:3rem}}.s-loyalty-program-reward-details .s-tabs-header:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-loyalty-program-reward-details .s-tabs-header-item{display:flex;width:max-content;align-items:center}.s-loyalty-program-reward-details .s-tabs-header-item>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-loyalty-program-reward-details .s-tabs-header-item{border-radius:9999px;padding-top:0.25rem;padding-bottom:0.25rem;padding-left:1rem;padding-right:1rem}.s-loyalty-program-reward-details .s-tabs-header-item:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-loyalty-program-reward-details .s-tabs-bg-normal{background-color:transparent;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-loyalty-program-reward-details .s-tabs-active{background-color:var(--color-primary-light);font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-loyalty-program-reward-details .s-tabs-header-item span{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-loyalty-program-tabs-hider .s-tabs-header{border-style:none}.s-product-size-guide-wrapper .s-tabs-content{max-height:60vh;overflow:auto}@media (min-width: 768px){.s-product-size-guide-wrapper .s-tabs-content{max-height:70vh}}.s-tabs-bg-normal{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.s-tabs-header{display:flex;cursor:pointer;align-content:center;justify-content:flex-start}.s-tabs-header>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-tabs-header{overflow-x:auto;border-bottom-width:2px;border-color:var(--color-primary)}@media (min-width: 768px){.s-tabs-header{overflow-x:hidden}}.s-tabs-header:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-tabs-header *{pointer-events:auto !important}.s-tabs-header-item{border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-top:0.5rem;padding-bottom:0.5rem;padding-left:0.75rem;padding-right:0.75rem;font-size:0.875rem;line-height:1.25rem}@media (min-width: 768px){.s-tabs-header-item{padding-left:1.75rem;padding-right:1.75rem}}.s-tabs-content{display:none}.s-tabs-content-wrapper{padding-top:0.75rem}.s-tabs-content-selected{display:block}.s-tabs-active{background-color:var(--color-primary);--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}';export{s as salla_tab_content,o as salla_tab_header,i as salla_tabs}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as t,H as l,a as n}from"./p-
|
|
4
|
+
import{r as a,h as t,H as l,a as n}from"./p-C0qiFNJn.js";const s=class{constructor(t){a(this,t),this.pointsData=null,this.productId=null}async componentWillLoad(){try{if(await salla.onReady(),await salla.lang.onLoaded(),this.productId=this.host.dataset.productId||salla.config.get("page.id"),!this.productId)return;const a=await salla.api.request(`/loyalty/products/${this.productId}/points`).catch((()=>null));this.pointsData=a?.data||null}catch(a){salla?.logger?.warn?.("salla-loyalty-points-banner: init failed",a)}}render(){return this.productId&&this.pointsData?.points?t(l,null,t("div",{class:"s-loyalty-points-banner-container"},t("div",{class:"s-loyalty-points-banner-icon"},t("span",{class:"s-loyalty-points-banner-inner-icon",innerHTML:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.76604 2.86201C9.31804 2.61001 9.93304 2.41501 10.611 2.27701C11.289 2.13901 12 2.07001 12.744 2.07001C13.572 2.07001 14.364 2.15401 15.12 2.32201C15.84 2.49001 16.356 2.81401 16.668 3.29401C16.932 3.70201 17.064 4.26001 17.064 4.96801V13.032C17.064 13.416 16.95 13.752 16.722 14.04C16.506 14.304 16.227 14.493 15.885 14.607C15.543 14.721 15.204 14.742 14.868 14.67C14.196 14.514 13.488 14.436 12.744 14.436C12.084 14.436 11.442 14.502 10.818 14.634C10.23 14.754 9.70204 14.922 9.23404 15.138C8.68204 15.39 8.06704 15.585 7.38904 15.723C6.71104 15.861 6.00004 15.93 5.25604 15.93C4.42804 15.93 3.63604 15.846 2.88004 15.678C2.18404 15.522 1.68004 15.21 1.36804 14.742C1.08004 14.322 0.936035 13.752 0.936035 13.032V4.96801C0.936035 4.58401 1.05004 4.24801 1.27804 3.96001C1.49404 3.69601 1.77304 3.50701 2.11504 3.39301C2.45704 3.27901 2.79604 3.25801 3.13204 3.33001C3.80404 3.48601 4.51204 3.56401 5.25604 3.56401C5.91604 3.56401 6.55804 3.49801 7.18204 3.36601C7.77004 3.24601 8.29804 3.07801 8.76604 2.86201ZM11.25 9.00001C11.25 8.59201 11.148 8.21701 10.944 7.87501C10.74 7.53301 10.467 7.26001 10.125 7.05601C9.78304 6.85201 9.40804 6.75001 9.00004 6.75001C8.59204 6.75001 8.21704 6.85201 7.87504 7.05601C7.53304 7.26001 7.26004 7.53301 7.05604 7.87501C6.85204 8.21701 6.75004 8.59201 6.75004 9.00001C6.75004 9.40801 6.85204 9.78301 7.05604 10.125C7.26004 10.467 7.53304 10.74 7.87504 10.944C8.21704 11.148 8.59204 11.25 9.00004 11.25C9.40804 11.25 9.78304 11.148 10.125 10.944C10.467 10.74 10.74 10.467 10.944 10.125C11.148 9.78301 11.25 9.40801 11.25 9.00001ZM14.328 7.79401C14.076 7.75801 13.812 7.73401 13.536 7.72201C13.38 7.71001 13.245 7.75501 13.131 7.85701C13.017 7.95901 12.954 8.08801 12.942 8.24401C12.93 8.40001 12.975 8.53501 13.077 8.64901C13.179 8.76301 13.308 8.82601 13.464 8.83801C13.704 8.85001 13.938 8.87401 14.166 8.91001C14.322 8.93401 14.463 8.90101 14.589 8.81101C14.715 8.72101 14.787 8.59801 14.805 8.44201C14.823 8.28601 14.787 8.14501 14.697 8.01901C14.607 7.89301 14.484 7.81801 14.328 7.79401ZM4.53604 9.16201C4.29604 9.15001 4.06204 9.12601 3.83404 9.09001C3.67804 9.06601 3.53704 9.09901 3.41104 9.18901C3.28504 9.27901 3.21304 9.40201 3.19504 9.55801C3.17704 9.71401 3.21304 9.85501 3.30304 9.98101C3.39304 10.107 3.51604 10.182 3.67204 10.206C3.92404 10.242 4.18804 10.266 4.46404 10.278C4.62004 10.29 4.75504 10.245 4.86904 10.143C4.98304 10.041 5.04604 9.91201 5.05804 9.75601C5.07004 9.60001 5.02504 9.46501 4.92304 9.35101C4.82104 9.23701 4.69204 9.17401 4.53604 9.16201Z" fill="white"/>\n</svg>\n'})),t("p",null,t("span",{class:"s-loyalty-points-banner-label"},salla.lang.get("pages.loyalty_program.earn")," "),t("span",{class:"s-loyalty-points-banner-label"},`+${this.pointsData.points}`," "),t("span",{class:"s-loyalty-points-banner-label"},salla.lang.get("pages.loyalty_program.loyalty_point")," "),t("span",{class:"s-loyalty-points-banner-description"},salla.lang.get("pages.loyalty_program.on_order_total_when_purchase"))))):null}get host(){return n(this)}};s.style="/*!twlt*/.s-loyalty-points-banner-container{margin-bottom:0.75rem;display:flex;width:100%;align-items:center;gap:0.5rem;border-radius:0.5rem;background-color:rgb(209 180 76 / var(--tw-bg-opacity, 1));--tw-bg-opacity:0.1;padding-left:0.75rem;padding-right:0.75rem;padding-top:0.5rem;padding-bottom:0.5rem}.s-loyalty-points-banner-icon{display:flex;height:2rem;width:2rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(209 180 76 / var(--tw-bg-opacity, 1))}.s-loyalty-points-banner-label{font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(209 180 76 / var(--tw-text-opacity, 1))}.s-loyalty-points-banner-description{font-size:0.875rem;line-height:1.25rem}";export{s as salla_loyalty_points_banner}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as r,h as i,H as e,a as s}from"./p-B64o_70M.js";import{M as o}from"./p-DmgxDvXL.js";const a=class{constructor(i){t(this,i),this.verified=r(this,"verified"),this.translationLoaded=!1,this.display="modal",this.type="mobile",this.autoReload=!0,this.supportWebAuth=!0,this.resendAfter=30,this.isProfileVerify=!1,salla.lang.onLoaded((()=>{this.translationLoaded=!0,this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type),this.modal?.setTitle(this.title)})),"inline"!=this.display?(salla.event.on("profile::verification",(t=>{let r=Array.isArray(t)?t[0]:t;"delete_account"===r?.request_type||document.getElementById("salla-user-settings-delete-modal")?.hasAttribute("visible")||(this.isProfileVerify=!0,this.open(r),this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+r.type),this.modal?.setTitle(this.title))})),salla.event.on("modalClosed",(()=>{this.resendAfter=0,this.timer.innerHTML="30 : 00"}))):this.modal={open:()=>"",close:()=>"",setTitle:()=>""}}splitNumber(t){this.resetError();let r=t.data||t.target.value;r&&1!==r.length&&this.modifyNext(t.target,r)}modifyNext(t,r){t.value=r[0],r=r.substring(1),t.nextElementSibling&&r.length?this.modifyNext(t.nextElementSibling,r):t.nextElementSibling||0!==r.length?t.nextElementSibling&&0===r.length&&t.nextElementSibling.focus():t.focus()}checkAllInputs(){let t=!0;for(let r=0;r<this.otpInputs.length;r++)""===this.otpInputs[r].value&&(t=!1);return t}handleKeyUp(t){if(this.resetError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key))return;let r=t.keyCode||t.charCode;t.target.value?(t.target.nextElementSibling?.focus(),t.target.nextElementSibling?.select()):[8,46].includes(r)&&(t.target.previousElementSibling?.focus(),t.target.previousElementSibling?.select()),t.target.value.length>1&&this.splitNumber(t)}handlePaste(t){this.resetError();let r=(salla.helpers.number(t.clipboardData.getData("text"))||"").replace(/[^0-9]/g,"");r=r.substring(0,this.otpInputs.length),this.otpInputs.forEach((t=>t.value="")),this.modifyNext(this.otpInputs[0],r)}handleInput(t){this.resetError(),salla.helpers.inputDigitsOnly(t.target),this.checkAllInputs()&&setTimeout((()=>{this.toggleOTPSubmit()}),100)}resetError(){this.hasError=!1,this.errorMessage=""}handleFocus(t){t.target!==this.firstOtpInput&&(""==this.firstOtpInput?.value&&this.firstOtpInput.focus(),""==t.target.previousElementSibling.value&&t.target.previousElementSibling.focus())}async getCode(){return this.code.value}async open(t){this.data=t,this.data.type=this.data.type||this.type,this.type=this.data.type,this.resendTimer(),this.otpInputs=this.body.querySelectorAll(".s-verify-input"),this.firstOtpInput=this.body.querySelector("#otp-1"),this.reset(),this.resetError(),"modal"==this.display&&this.modal?.setTitle(this.title),this.modal.open(),this.firstOtpInput?.addEventListener("input",(t=>this.splitNumber(t))),setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let t=[];if(this.otpInputs.forEach((r=>r.value&&t.push(r.value))),this.code.value=t.join(""),4===t.length)return this.btn.disable(),void this.btn.click();this.btn.enable()}reset(){this.otpInputs.forEach((t=>t.value="")),this.code.value="",this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block",this.resend.style.display="none",this.resendAfter=30;let t=setInterval((()=>{this.resendAfter<=0?(clearInterval(t),this.resend.style.display="block",this.resendMessage.style.display="none"):(this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`,this.resendAfter--)}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((t=>t.value="")),this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4)return this.otpInputs[this.code.value.length].focus(),void salla.log("Trying to submit without 4 digits!");let t={code:this.code.value,...this.data};return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(t):salla.auth.verify(t,this.supportWebAuth))).then((t=>this.verified.emit(t))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((t=>{this.hasError=!0,this.errorMessage=t.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"),t.response?salla.logger.error(t):console.log("Unexpected error",t),this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return"inline"==this.display?i(e,null,this.myBody()):i("salla-modal",{width:"xs",class:"s-verify",ref:t=>this.modal=t,"modal-title":this.title},i("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:"mobile"==this.type?'\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>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n':o}),this.myBody())}myBody(){return i("div",{class:"s-verify-body",ref:t=>this.body=t},i("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),i("slot",{name:"mobile"}),i("slot",{name:"email"}),i("input",{type:"hidden",name:"code",maxlength:"4",required:!0,ref:t=>this.code=t}),i("div",{class:{"s-verify-codes":!0,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((t=>i("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${t}`,class:{"s-verify-input":!0,"s-has-error":this.hasError},onInput:t=>this.handleInput(t),onPaste:t=>this.handlePaste(t),onKeyUp:t=>this.handleKeyUp(t),onFocus:t=>this.handleFocus(t),required:!0})))),this.hasError&&this.errorMessage?i("span",{class:"s-verify-error-message"},this.errorMessage):"",i("div",{slot:"footer",class:"s-verify-footer"},i("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:!0,onClick:()=>this.submit(),ref:t=>this.btn=t},salla.lang.get("pages.profile.verify")),i("p",{class:"s-verify-resend-message",ref:t=>this.resendMessage=t},salla.lang.get("blocks.header.resend_after"),i("b",{class:"s-verify-timer",ref:t=>this.timer=t})),i("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:t=>this.resend=t},salla.lang.get("blocks.comments.submit"))),i("slot",{name:"after-footer"}))}get host(){return s(this)}};a.style='/*!twlt*/salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}.visible{visibility:visible}.block{display:block}.inline{display:inline}.hidden{display:none}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-message{text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-verify-label{margin-bottom:1rem;display:block;text-align:center;font-size:0.875rem;line-height:1.25rem}.s-verify-codes{margin-left:-0.25rem;margin-right:-0.25rem;margin-bottom:1.25rem;display:flex;justify-content:space-between}.s-verify-codes.has-error{margin-bottom:0px}.s-verify-input{margin-left:0.25rem;margin-right:0.25rem;height:2.5rem;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;text-align:center;font-size:1.125rem;line-height:1.75rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-input:focus{border-color:var(--color-primary)}.s-verify-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-verify-footer{text-align:center}.s-verify-submit{margin-bottom:1.25rem;width:100%}.s-verify-header-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.s-verify-header-icon{margin-left:auto;margin-right:auto;margin-bottom:1rem;height:5rem;width:5rem}}.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}}.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}}.s-verify-resend-message{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-verify-error-message{margin-bottom:1.25rem;display:block;height:1.75rem;padding-top:0.75rem;text-align:center;font-size:0.75rem;line-height:1rem;--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-verify-error-message:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-verify-error-message{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-timer{margin-left:0.25rem;margin-right:0.25rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-verify-resend{text-align:center;font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-verify-back{position:absolute;left:10px;top:10px;display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-back:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-verify-back:where([dir="rtl"],[dir="rtl"] *){left:unset;right:10px}.s-verify-back svg{height:18px;width:18px}[dir=\'ltr\'] .s-verify-back{transform:scale(-1)}';export{a as salla_verify}
|
|
4
|
+
import{r as t,c as r,h as i,H as e,a as s}from"./p-C0qiFNJn.js";import{M as o}from"./p-DmgxDvXL.js";const a=class{constructor(i){t(this,i),this.verified=r(this,"verified"),this.translationLoaded=!1,this.display="modal",this.type="mobile",this.autoReload=!0,this.supportWebAuth=!0,this.resendAfter=30,this.isProfileVerify=!1,salla.lang.onLoaded((()=>{this.translationLoaded=!0,this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type),this.modal?.setTitle(this.title)})),"inline"!=this.display?(salla.event.on("profile::verification",(t=>{let r=Array.isArray(t)?t[0]:t;"delete_account"===r?.request_type||document.getElementById("salla-user-settings-delete-modal")?.hasAttribute("visible")||(this.isProfileVerify=!0,this.open(r),this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+r.type),this.modal?.setTitle(this.title))})),salla.event.on("modalClosed",(()=>{this.resendAfter=0,this.timer.innerHTML="30 : 00"}))):this.modal={open:()=>"",close:()=>"",setTitle:()=>""}}splitNumber(t){this.resetError();let r=t.data||t.target.value;r&&1!==r.length&&this.modifyNext(t.target,r)}modifyNext(t,r){t.value=r[0],r=r.substring(1),t.nextElementSibling&&r.length?this.modifyNext(t.nextElementSibling,r):t.nextElementSibling||0!==r.length?t.nextElementSibling&&0===r.length&&t.nextElementSibling.focus():t.focus()}checkAllInputs(){let t=!0;for(let r=0;r<this.otpInputs.length;r++)""===this.otpInputs[r].value&&(t=!1);return t}handleKeyUp(t){if(this.resetError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key))return;let r=t.keyCode||t.charCode;t.target.value?(t.target.nextElementSibling?.focus(),t.target.nextElementSibling?.select()):[8,46].includes(r)&&(t.target.previousElementSibling?.focus(),t.target.previousElementSibling?.select()),t.target.value.length>1&&this.splitNumber(t)}handlePaste(t){this.resetError();let r=(salla.helpers.number(t.clipboardData.getData("text"))||"").replace(/[^0-9]/g,"");r=r.substring(0,this.otpInputs.length),this.otpInputs.forEach((t=>t.value="")),this.modifyNext(this.otpInputs[0],r)}handleInput(t){this.resetError(),salla.helpers.inputDigitsOnly(t.target),this.checkAllInputs()&&setTimeout((()=>{this.toggleOTPSubmit()}),100)}resetError(){this.hasError=!1,this.errorMessage=""}handleFocus(t){t.target!==this.firstOtpInput&&(""==this.firstOtpInput?.value&&this.firstOtpInput.focus(),""==t.target.previousElementSibling.value&&t.target.previousElementSibling.focus())}async getCode(){return this.code.value}async open(t){this.data=t,this.data.type=this.data.type||this.type,this.type=this.data.type,this.resendTimer(),this.otpInputs=this.body.querySelectorAll(".s-verify-input"),this.firstOtpInput=this.body.querySelector("#otp-1"),this.reset(),this.resetError(),"modal"==this.display&&this.modal?.setTitle(this.title),this.modal.open(),this.firstOtpInput?.addEventListener("input",(t=>this.splitNumber(t))),setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let t=[];if(this.otpInputs.forEach((r=>r.value&&t.push(r.value))),this.code.value=t.join(""),4===t.length)return this.btn.disable(),void this.btn.click();this.btn.enable()}reset(){this.otpInputs.forEach((t=>t.value="")),this.code.value="",this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block",this.resend.style.display="none",this.resendAfter=30;let t=setInterval((()=>{this.resendAfter<=0?(clearInterval(t),this.resend.style.display="block",this.resendMessage.style.display="none"):(this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`,this.resendAfter--)}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((t=>t.value="")),this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4)return this.otpInputs[this.code.value.length].focus(),void salla.log("Trying to submit without 4 digits!");let t={code:this.code.value,...this.data};return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(t):salla.auth.verify(t,this.supportWebAuth))).then((t=>this.verified.emit(t))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((t=>{this.hasError=!0,this.errorMessage=t.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"),t.response?salla.logger.error(t):console.log("Unexpected error",t),this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return"inline"==this.display?i(e,null,this.myBody()):i("salla-modal",{width:"xs",class:"s-verify",ref:t=>this.modal=t,"modal-title":this.title},i("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:"mobile"==this.type?'\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>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n':o}),this.myBody())}myBody(){return i("div",{class:"s-verify-body",ref:t=>this.body=t},i("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),i("slot",{name:"mobile"}),i("slot",{name:"email"}),i("input",{type:"hidden",name:"code",maxlength:"4",required:!0,ref:t=>this.code=t}),i("div",{class:{"s-verify-codes":!0,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((t=>i("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${t}`,class:{"s-verify-input":!0,"s-has-error":this.hasError},onInput:t=>this.handleInput(t),onPaste:t=>this.handlePaste(t),onKeyUp:t=>this.handleKeyUp(t),onFocus:t=>this.handleFocus(t),required:!0})))),this.hasError&&this.errorMessage?i("span",{class:"s-verify-error-message"},this.errorMessage):"",i("div",{slot:"footer",class:"s-verify-footer"},i("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:!0,onClick:()=>this.submit(),ref:t=>this.btn=t},salla.lang.get("pages.profile.verify")),i("p",{class:"s-verify-resend-message",ref:t=>this.resendMessage=t},salla.lang.get("blocks.header.resend_after"),i("b",{class:"s-verify-timer",ref:t=>this.timer=t})),i("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:t=>this.resend=t},salla.lang.get("blocks.comments.submit"))),i("slot",{name:"after-footer"}))}get host(){return s(this)}};a.style='/*!twlt*/salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}.visible{visibility:visible}.block{display:block}.inline{display:inline}.hidden{display:none}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-message{text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-verify-label{margin-bottom:1rem;display:block;text-align:center;font-size:0.875rem;line-height:1.25rem}.s-verify-codes{margin-left:-0.25rem;margin-right:-0.25rem;margin-bottom:1.25rem;display:flex;justify-content:space-between}.s-verify-codes.has-error{margin-bottom:0px}.s-verify-input{margin-left:0.25rem;margin-right:0.25rem;height:2.5rem;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;text-align:center;font-size:1.125rem;line-height:1.75rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-input:focus{border-color:var(--color-primary)}.s-verify-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-verify-footer{text-align:center}.s-verify-submit{margin-bottom:1.25rem;width:100%}.s-verify-header-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.s-verify-header-icon{margin-left:auto;margin-right:auto;margin-bottom:1rem;height:5rem;width:5rem}}.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="ltr"],[dir="ltr"] *){margin-right:0px}}.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir="rtl"],[dir="rtl"] *){margin-left:0px}}.s-verify-resend-message{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-verify-error-message{margin-bottom:1.25rem;display:block;height:1.75rem;padding-top:0.75rem;text-align:center;font-size:0.75rem;line-height:1rem;--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-verify-error-message:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-verify-error-message{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-timer{margin-left:0.25rem;margin-right:0.25rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-verify-resend{text-align:center;font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-verify-back{position:absolute;left:10px;top:10px;display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-back:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-verify-back:where([dir="rtl"],[dir="rtl"] *){left:unset;right:10px}.s-verify-back svg{height:18px;width:18px}[dir=\'ltr\'] .s-verify-back{transform:scale(-1)}';export{a as salla_verify}
|