@salla.sa/twilight-components 2.14.260 → 2.14.261
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/{app-globals-C-RMRzcr.js → app-globals-9KVXzA9b.js} +3 -3
- package/dist/cjs/{app-globals-C-RMRzcr.js.map → app-globals-9KVXzA9b.js.map} +1 -1
- package/dist/cjs/{index-Cb0SQNc9.js → index-CfmOwvmC.js} +4 -4
- package/dist/cjs/index-CfmOwvmC.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion_4.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.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-booking-field_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.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-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.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.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.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-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.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-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{app-globals-CYjWTTrt.js → app-globals-BgG-hCSq.js} +3 -3
- package/dist/esm/{app-globals-CYjWTTrt.js.map → app-globals-BgG-hCSq.js.map} +1 -1
- package/dist/esm/{index-DtlYcjlJ.js → index-LSZwJPPB.js} +4 -4
- package/dist/esm/index-LSZwJPPB.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion_4.entry.js +1 -1
- package/dist/esm/salla-add-product-button_51.entry.js +1 -1
- package/dist/esm/salla-advertisement.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-booking-field_2.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.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-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.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-price-range.entry.js +1 -1
- package/dist/esm/salla-product-options.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.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-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm-es5/{app-globals-CYjWTTrt.js → app-globals-BgG-hCSq.js} +2 -2
- package/dist/esm-es5/{app-globals-CYjWTTrt.js.map → app-globals-BgG-hCSq.js.map} +1 -1
- package/dist/esm-es5/{index-DtlYcjlJ.js → index-LSZwJPPB.js} +3 -3
- package/dist/esm-es5/index-LSZwJPPB.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-accordion_4.entry.js +1 -1
- package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
- package/dist/esm-es5/salla-advertisement.entry.js +1 -1
- package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
- package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
- package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
- package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
- package/dist/esm-es5/salla-contacts.entry.js +1 -1
- package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
- package/dist/esm-es5/salla-filters.entry.js +1 -1
- package/dist/esm-es5/salla-installment.entry.js +1 -1
- package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
- package/dist/esm-es5/salla-metadata.entry.js +2 -2
- package/dist/esm-es5/salla-notification-item.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +2 -2
- package/dist/esm-es5/salla-offer.entry.js +1 -1
- package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm-es5/salla-order-details.entry.js +1 -1
- package/dist/esm-es5/salla-order-summary.entry.js +2 -2
- package/dist/esm-es5/salla-orders.entry.js +1 -1
- package/dist/esm-es5/salla-payments.entry.js +1 -1
- package/dist/esm-es5/salla-price-range.entry.js +1 -1
- package/dist/esm-es5/salla-product-options.entry.js +1 -1
- package/dist/esm-es5/salla-review-card.entry.js +1 -1
- package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js +1 -1
- package/dist/esm-es5/salla-social.entry.js +1 -1
- package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
- package/dist/esm-es5/salla-tooltip.entry.js +1 -1
- package/dist/esm-es5/salla-verify.entry.js +1 -1
- package/dist/esm-es5/salla-wallet.entry.js +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/{p-58768895.entry.js → p-008a771c.entry.js} +2 -2
- package/dist/twilight/{p-385257e0.entry.js → p-0407da23.entry.js} +2 -2
- package/dist/twilight/{p-c6fde185.system.entry.js → p-059405fc.system.entry.js} +2 -2
- package/dist/twilight/{p-0303d452.system.entry.js → p-09bc1f72.system.entry.js} +2 -2
- package/dist/twilight/{p-66464e8e.system.entry.js → p-0e1cd76c.system.entry.js} +3 -3
- package/dist/twilight/p-13a2e582.system.entry.js +5 -0
- package/dist/twilight/{p-2bb3b70e.system.entry.js → p-143dd94c.system.entry.js} +2 -2
- package/dist/twilight/{p-1362c93c.system.entry.js → p-188e8d1c.system.entry.js} +2 -2
- package/dist/twilight/p-1f8bf87a.entry.js +5 -0
- package/dist/twilight/{p-d632f1fa.system.entry.js → p-1f93b886.system.entry.js} +2 -2
- package/dist/twilight/{p-57cfb4b1.system.entry.js → p-275332fa.system.entry.js} +2 -2
- package/dist/twilight/{p-db7a231b.entry.js → p-2957c27c.entry.js} +2 -2
- package/dist/twilight/{p-c94f95c1.system.entry.js → p-2ed6d081.system.entry.js} +2 -2
- package/dist/twilight/{p-e0e29fb0.system.entry.js → p-39d68fc1.system.entry.js} +2 -2
- package/dist/twilight/{p-939f9104.entry.js → p-3ede6721.entry.js} +2 -2
- package/dist/twilight/{p-3f20e330.entry.js → p-42bcde7d.entry.js} +2 -2
- package/dist/twilight/{p-7f20c85c.entry.js → p-47de107e.entry.js} +2 -2
- package/dist/twilight/{p-784ee964.system.entry.js → p-4806aee6.system.entry.js} +2 -2
- package/dist/twilight/{p-54a5d0ac.system.entry.js → p-4eef3c0e.system.entry.js} +2 -2
- package/dist/twilight/{p-2323e473.entry.js → p-5271a9e8.entry.js} +2 -2
- package/dist/twilight/{p-0259d6cb.system.entry.js → p-528aa2c4.system.entry.js} +2 -2
- package/dist/twilight/{p-39a319ec.system.entry.js → p-53e00642.system.entry.js} +2 -2
- package/dist/twilight/{p-4cf011a4.system.entry.js → p-5bae6d14.system.entry.js} +2 -2
- package/dist/twilight/{p-93e6452b.system.entry.js → p-64c8b0e2.system.entry.js} +2 -2
- package/dist/twilight/{p-0ba23365.system.entry.js → p-64de4869.system.entry.js} +2 -2
- package/dist/twilight/{p-e28d3b71.entry.js → p-675d4ab7.entry.js} +2 -2
- package/dist/twilight/{p-5f352ca9.system.entry.js → p-68285203.system.entry.js} +2 -2
- package/dist/twilight/{p-f0dd4f76.entry.js → p-68327c54.entry.js} +2 -2
- package/dist/twilight/{p-c0072de1.system.entry.js → p-6a8ba65f.system.entry.js} +3 -3
- package/dist/twilight/{p-099e8eb6.entry.js → p-6ad30bc0.entry.js} +2 -2
- package/dist/twilight/{p-e1e90d0c.entry.js → p-6b1753ce.entry.js} +2 -2
- package/dist/twilight/{p-36b00bb1.system.entry.js → p-71bd4d79.system.entry.js} +2 -2
- package/dist/twilight/{p-d14a8edc.system.entry.js → p-81b99416.system.entry.js} +2 -2
- package/dist/twilight/{p-cbcfb963.entry.js → p-87d32e2f.entry.js} +2 -2
- package/dist/twilight/{p-b23ce243.system.entry.js → p-88e53a1e.system.entry.js} +2 -2
- package/dist/twilight/{p-xfMEaBec.system.js.map → p-8i-yI1XS.system.js.map} +1 -1
- package/dist/twilight/{p-83549a90.entry.js → p-9847a4f4.entry.js} +2 -2
- package/dist/twilight/{p-a80652d3.entry.js → p-9e6c5671.entry.js} +2 -2
- package/dist/twilight/{p-DS9YDo5Q.system.js.map → p-B2wed4KP.system.js.map} +1 -1
- package/dist/twilight/{p-CvcXa2TU.system.js.map → p-B4sHNRyB.system.js.map} +1 -1
- package/dist/twilight/{p-_Zg_vfYO.system.js → p-B52cxJwt.system.js} +2 -2
- package/dist/twilight/{p-_Zg_vfYO.system.js.map → p-B52cxJwt.system.js.map} +1 -1
- package/dist/twilight/{p-BNKx_fXu.system.js.map → p-B7SRc_rs.system.js.map} +1 -1
- package/dist/twilight/{p-t6iSIvKc.system.js.map → p-BBjPvuu7.system.js.map} +1 -1
- package/dist/twilight/{p-C0zi3xso.system.js.map → p-BC-cnFy-.system.js.map} +1 -1
- package/dist/twilight/{p-DqqqpQLX.system.js.map → p-BL3DMysj.system.js.map} +1 -1
- package/dist/twilight/{p-DF5hpYv8.system.js → p-BMCxvVxH.system.js} +2 -2
- package/dist/twilight/{p-DF5hpYv8.system.js.map → p-BMCxvVxH.system.js.map} +1 -1
- package/dist/twilight/{p-lKe9xnuY.system.js.map → p-BMe9fgvJ.system.js.map} +1 -1
- package/dist/twilight/{p-CdPxDxze.system.js.map → p-BtWTphPP.system.js.map} +1 -1
- package/dist/twilight/{p--178guyc.system.js.map → p-C51w7Au-.system.js.map} +1 -1
- package/dist/twilight/{p-C8JDkECr.system.js.map → p-CCJYFUxF.system.js.map} +1 -1
- package/dist/twilight/{p-D2T3kwP1.system.js.map → p-CGmIt4gq.system.js.map} +1 -1
- package/dist/twilight/{p-C_tZ3UPA.system.js.map → p-CLHJmBGj.system.js.map} +1 -1
- package/dist/twilight/{p-Ch2ngfCk.system.js.map → p-CNqf1L3p.system.js.map} +1 -1
- package/dist/twilight/{p-B9diX3Ld.system.js.map → p-C_Jmr6ar.system.js.map} +1 -1
- package/dist/twilight/{p-y6fipjol.system.js.map → p-Cb9M2a-j.system.js.map} +1 -1
- package/dist/twilight/{p-DiFVtThr.system.js → p-Ce2XJNsy.system.js} +3 -3
- package/dist/twilight/p-Ce2XJNsy.system.js.map +1 -0
- package/dist/twilight/{p-D0CcSuA9.system.js.map → p-Cnbdx_CN.system.js.map} +1 -1
- package/dist/twilight/{p-DHzL55RC.system.js.map → p-Co12cj-7.system.js.map} +1 -1
- package/dist/twilight/{p-C6nl4csu.system.js.map → p-D3JDyRUW.system.js.map} +1 -1
- package/dist/twilight/{p-UHVUEdWQ.system.js.map → p-D8jKZnWs.system.js.map} +1 -1
- package/dist/twilight/{p-CX4G4VV7.system.js.map → p-DHFCX5Dz.system.js.map} +1 -1
- package/dist/twilight/{p-CI_HtUC7.system.js.map → p-DN3CCyG-.system.js.map} +1 -1
- package/dist/twilight/{p-C9OfFWmp.system.js.map → p-DNiwBHdX.system.js.map} +1 -1
- package/dist/twilight/{p-FCntN3lB.js → p-DQg5Q6X-.js} +2 -2
- package/dist/twilight/{p-FCntN3lB.js.map → p-DQg5Q6X-.js.map} +1 -1
- package/dist/twilight/{p-BP64ZxhW.system.js.map → p-DS9HrJPI.system.js.map} +1 -1
- package/dist/twilight/{p-NwP5WLUz.system.js.map → p-DVEvrSjN.system.js.map} +1 -1
- package/dist/twilight/{p-Bx7mzn4-.system.js.map → p-DaMdjqfe.system.js.map} +1 -1
- package/dist/twilight/{p-C3b5GFVP.system.js.map → p-DaTp8sB1.system.js.map} +1 -1
- package/dist/twilight/{p-Brt6MZMy.system.js.map → p-DzjfnKbb.system.js.map} +1 -1
- package/dist/twilight/{p-hUWZ36QL.system.js.map → p-H5xAa3Fp.system.js.map} +1 -1
- package/dist/twilight/{p-DtlYcjlJ.js → p-LSZwJPPB.js} +3 -3
- package/dist/twilight/p-LSZwJPPB.js.map +1 -0
- package/dist/twilight/{p-Cl6TP9Ol.system.js.map → p-MzTS1h7j.system.js.map} +1 -1
- package/dist/twilight/{p-DG_xtA-f.system.js.map → p-NCpDIEN8.system.js.map} +1 -1
- package/dist/twilight/{p-DhIVzS4b.system.js.map → p-Xd4af-0t.system.js.map} +1 -1
- package/dist/twilight/{p-3ad79104.entry.js → p-a13fcfe1.entry.js} +2 -2
- package/dist/twilight/{p-109f5735.entry.js → p-a6961af5.entry.js} +2 -2
- package/dist/twilight/{p-f2bac5d5.system.entry.js → p-aa357e2b.system.entry.js} +2 -2
- package/dist/twilight/{p-d71d6dff.entry.js → p-aa49c07f.entry.js} +2 -2
- package/dist/twilight/{p-C25xo2I9.system.js.map → p-aff393D5.system.js.map} +1 -1
- package/dist/twilight/{p-e6d51e3a.entry.js → p-b0d88d59.entry.js} +2 -2
- package/dist/twilight/{p-19061cec.entry.js → p-b7572664.entry.js} +2 -2
- package/dist/twilight/{p-97cc91c4.entry.js → p-b94bc357.entry.js} +2 -2
- package/dist/twilight/{p-ee66c0dd.entry.js → p-c09565da.entry.js} +2 -2
- package/dist/twilight/{p-862ad154.entry.js → p-c38dbed0.entry.js} +2 -2
- package/dist/twilight/{p-5cb3dd8e.system.entry.js → p-c5fa09d1.system.entry.js} +2 -2
- package/dist/twilight/{p-c6a3fdb0.entry.js → p-ccffcd08.entry.js} +2 -2
- package/dist/twilight/{p-9fa8d963.entry.js → p-ce02710a.entry.js} +2 -2
- package/dist/twilight/{p-f1d6fdbf.entry.js → p-d02a08e9.entry.js} +2 -2
- package/dist/twilight/{p-3e960ee9.system.entry.js → p-d1ca52ee.system.entry.js} +2 -2
- package/dist/twilight/{p-3ad485dd.entry.js → p-d1ef5396.entry.js} +2 -2
- package/dist/twilight/{p-1b42ce8a.entry.js → p-d3a36873.entry.js} +2 -2
- package/dist/twilight/{p-7105480a.system.entry.js → p-d62c20f1.system.entry.js} +2 -2
- package/dist/twilight/{p-6a611226.entry.js → p-d660efad.entry.js} +2 -2
- package/dist/twilight/{p-04e33bba.system.entry.js → p-dad1b603.system.entry.js} +2 -2
- package/dist/twilight/{p-55771cda.system.entry.js → p-de2b1078.system.entry.js} +2 -2
- package/dist/twilight/{p-007ca6d7.system.entry.js → p-e5eae8ce.system.entry.js} +2 -2
- package/dist/twilight/p-ea832823.system.entry.js +5 -0
- package/dist/twilight/{p-fba0b0f7.system.entry.js → p-ef823dbd.system.entry.js} +2 -2
- package/dist/twilight/{p-6e1ecf18.entry.js → p-f0cc5b35.entry.js} +2 -2
- package/dist/twilight/{p-d8aab17c.system.entry.js → p-f1218836.system.entry.js} +2 -2
- package/dist/twilight/{p-7dc3a160.system.entry.js → p-f80b373d.system.entry.js} +2 -2
- package/dist/twilight/{p-ef04d7e0.entry.js → p-fa5ead87.entry.js} +2 -2
- package/dist/twilight/{p-d1809737.entry.js → p-fcfd9a2b.entry.js} +2 -2
- package/dist/twilight/{p-138b8ce7.entry.js → p-fe0234a1.entry.js} +2 -2
- package/dist/twilight/{p-BWbXuc8f.system.js.map → p-jGMZVThE.system.js.map} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/package.json +5 -5
- package/dist/cjs/index-Cb0SQNc9.js.map +0 -1
- package/dist/esm/index-DtlYcjlJ.js.map +0 -1
- package/dist/esm-es5/index-DtlYcjlJ.js.map +0 -1
- package/dist/twilight/p-DiFVtThr.system.js.map +0 -1
- package/dist/twilight/p-DtlYcjlJ.js.map +0 -1
- package/dist/twilight/p-bcae7f12.system.entry.js +0 -5
- package/dist/twilight/p-ce103d4c.system.entry.js +0 -5
- package/dist/twilight/p-f702aead.entry.js +0 -5
- /package/dist/twilight/{p-58768895.entry.js.map → p-008a771c.entry.js.map} +0 -0
- /package/dist/twilight/{p-385257e0.entry.js.map → p-0407da23.entry.js.map} +0 -0
- /package/dist/twilight/{p-c6fde185.system.entry.js.map → p-059405fc.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0303d452.system.entry.js.map → p-09bc1f72.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-66464e8e.system.entry.js.map → p-0e1cd76c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bcae7f12.system.entry.js.map → p-13a2e582.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2bb3b70e.system.entry.js.map → p-143dd94c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-1362c93c.system.entry.js.map → p-188e8d1c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f702aead.entry.js.map → p-1f8bf87a.entry.js.map} +0 -0
- /package/dist/twilight/{p-d632f1fa.system.entry.js.map → p-1f93b886.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-57cfb4b1.system.entry.js.map → p-275332fa.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-db7a231b.entry.js.map → p-2957c27c.entry.js.map} +0 -0
- /package/dist/twilight/{p-c94f95c1.system.entry.js.map → p-2ed6d081.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e0e29fb0.system.entry.js.map → p-39d68fc1.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-939f9104.entry.js.map → p-3ede6721.entry.js.map} +0 -0
- /package/dist/twilight/{p-3f20e330.entry.js.map → p-42bcde7d.entry.js.map} +0 -0
- /package/dist/twilight/{p-7f20c85c.entry.js.map → p-47de107e.entry.js.map} +0 -0
- /package/dist/twilight/{p-784ee964.system.entry.js.map → p-4806aee6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-54a5d0ac.system.entry.js.map → p-4eef3c0e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2323e473.entry.js.map → p-5271a9e8.entry.js.map} +0 -0
- /package/dist/twilight/{p-0259d6cb.system.entry.js.map → p-528aa2c4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-39a319ec.system.entry.js.map → p-53e00642.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4cf011a4.system.entry.js.map → p-5bae6d14.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-93e6452b.system.entry.js.map → p-64c8b0e2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0ba23365.system.entry.js.map → p-64de4869.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e28d3b71.entry.js.map → p-675d4ab7.entry.js.map} +0 -0
- /package/dist/twilight/{p-5f352ca9.system.entry.js.map → p-68285203.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f0dd4f76.entry.js.map → p-68327c54.entry.js.map} +0 -0
- /package/dist/twilight/{p-c0072de1.system.entry.js.map → p-6a8ba65f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-099e8eb6.entry.js.map → p-6ad30bc0.entry.js.map} +0 -0
- /package/dist/twilight/{p-e1e90d0c.entry.js.map → p-6b1753ce.entry.js.map} +0 -0
- /package/dist/twilight/{p-36b00bb1.system.entry.js.map → p-71bd4d79.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d14a8edc.system.entry.js.map → p-81b99416.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-cbcfb963.entry.js.map → p-87d32e2f.entry.js.map} +0 -0
- /package/dist/twilight/{p-b23ce243.system.entry.js.map → p-88e53a1e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-83549a90.entry.js.map → p-9847a4f4.entry.js.map} +0 -0
- /package/dist/twilight/{p-a80652d3.entry.js.map → p-9e6c5671.entry.js.map} +0 -0
- /package/dist/twilight/{p-3ad79104.entry.js.map → p-a13fcfe1.entry.js.map} +0 -0
- /package/dist/twilight/{p-109f5735.entry.js.map → p-a6961af5.entry.js.map} +0 -0
- /package/dist/twilight/{p-f2bac5d5.system.entry.js.map → p-aa357e2b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d71d6dff.entry.js.map → p-aa49c07f.entry.js.map} +0 -0
- /package/dist/twilight/{p-e6d51e3a.entry.js.map → p-b0d88d59.entry.js.map} +0 -0
- /package/dist/twilight/{p-19061cec.entry.js.map → p-b7572664.entry.js.map} +0 -0
- /package/dist/twilight/{p-97cc91c4.entry.js.map → p-b94bc357.entry.js.map} +0 -0
- /package/dist/twilight/{p-ee66c0dd.entry.js.map → p-c09565da.entry.js.map} +0 -0
- /package/dist/twilight/{p-862ad154.entry.js.map → p-c38dbed0.entry.js.map} +0 -0
- /package/dist/twilight/{p-5cb3dd8e.system.entry.js.map → p-c5fa09d1.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c6a3fdb0.entry.js.map → p-ccffcd08.entry.js.map} +0 -0
- /package/dist/twilight/{p-9fa8d963.entry.js.map → p-ce02710a.entry.js.map} +0 -0
- /package/dist/twilight/{p-f1d6fdbf.entry.js.map → p-d02a08e9.entry.js.map} +0 -0
- /package/dist/twilight/{p-3e960ee9.system.entry.js.map → p-d1ca52ee.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3ad485dd.entry.js.map → p-d1ef5396.entry.js.map} +0 -0
- /package/dist/twilight/{p-1b42ce8a.entry.js.map → p-d3a36873.entry.js.map} +0 -0
- /package/dist/twilight/{p-7105480a.system.entry.js.map → p-d62c20f1.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6a611226.entry.js.map → p-d660efad.entry.js.map} +0 -0
- /package/dist/twilight/{p-04e33bba.system.entry.js.map → p-dad1b603.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-55771cda.system.entry.js.map → p-de2b1078.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-007ca6d7.system.entry.js.map → p-e5eae8ce.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ce103d4c.system.entry.js.map → p-ea832823.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-fba0b0f7.system.entry.js.map → p-ef823dbd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6e1ecf18.entry.js.map → p-f0cc5b35.entry.js.map} +0 -0
- /package/dist/twilight/{p-d8aab17c.system.entry.js.map → p-f1218836.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7dc3a160.system.entry.js.map → p-f80b373d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ef04d7e0.entry.js.map → p-fa5ead87.entry.js.map} +0 -0
- /package/dist/twilight/{p-d1809737.entry.js.map → p-fcfd9a2b.entry.js.map} +0 -0
- /package/dist/twilight/{p-138b8ce7.entry.js.map → p-fe0234a1.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-Ce2XJNsy.system.js","./p-C2rVu_Jb.system.js"],(function(t){"use strict";var s,e,i,a,o,n,r;return{setters:[function(t){s=t.r;e=t.h;i=t.H;a=t.g;o=t.c},function(t){n=t.p;r=t.m}],execute:function(){var c="";var l=t("salla_accordion",function(){function t(t){s(this,t);this.collapsible=true;this.bordered=false;this.size="md";this.collapsed=true;this.dir=document.dir||"rtl"}t.prototype.directionChangedHandler=function(t){this.dir=t.detail.dir};t.prototype.handleCollapse=function(t){this.collapsed=t.detail.payload.collapsed};t.prototype.setcollapsibleProp=function(){var t=this.host.querySelector("salla-accordion-head");if(this.collapsible&&t){t.setAttribute("collapsible","true");t.setAttribute("collapsed",this.collapsed.toString())}};t.prototype.componentDidRender=function(){this.setcollapsibleProp();var t=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());t===null||t===void 0?void 0:t.setAttribute("data-collapsed",this.collapsed.toString())}};t.prototype.render=function(){return e(i,{key:"ed8e4c0f24fa4462654e94fa46706e892c141351",class:"s-accordion-wrapper ".concat(this.dir," ").concat(this.bordered?"s-accordion-wrapper-bordered":""," ").concat(this.size?"size-".concat(this.size):""),"data-collapsed":this.collapsed.toString()},e("slot",{key:"1dbda01c073f3018a55ebcf5d8613a82a5dc6b27"}))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());l.style=c;var d="";var h=t("salla_accordion_body",function(){function t(t){s(this,t)}t.prototype.render=function(){return e(i,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},e("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))};return t}());h.style=d;var u="";var f=t("salla_accordion_head",function(){function t(t){s(this,t);this.accordionToggle=o(this,"accordionToggle");this.collapsible=false;this.collapsed=true}t.prototype.emitCollapsePanel=function(){this.accordionToggle.emit({payload:{collapsed:this.collapsed}})};t.prototype.toggleCollapse=function(){var t,s,e;if(!this.collapsible)return;this.collapsed=!this.collapsed;(t=this.host.parentElement)===null||t===void 0?void 0:t.setAttribute("data-collapsed",this.collapsed.toString());(e=(s=this.host.parentElement)===null||s===void 0?void 0:s.querySelector("salla-accordion-body"))===null||e===void 0?void 0:e.setAttribute("data-collapsed",this.collapsed.toString());this.emitCollapsePanel()};t.prototype.render=function(){var t=this;return e(i,{key:"9bb7ad4ad615f5316968b48839b2433619bd3850","data-collapsed":this.collapsed.toString(),onClick:function(){return t.toggleCollapse()},class:"s-accordion-head-wrapper"},e("div",{key:"6826492e1c552440d6407435dfe4e0ca3915cdf4",class:"s-accordion-head-wrapper-start"},e("slot",{key:"2c19c500b57444ac8f69c2f64616904a819f54da",name:"title"}),e("slot",{key:"a6ed0daccd969ec94128f5f749ccddfa9f62e5d3",name:"subtitle"}),e("slot",{key:"adc2122dce76eee34653bc3f47324188c89d80f1",name:"html"})),(this.collapsible||this.host.querySelector('[slot="note"]'))&&e("div",{key:"f61363b6836fb857a0e832de99175936ec4bce29",class:"s-accordion-head-wrapper-end"},e("slot",{key:"15ee81e943714b30bfbaf718364f5d34b14617eb",name:"note"}),this.collapsible&&e("button",{key:"c5f8d32af544ddfba7b2fc2f273ae5b2e8cb7ae5",class:{"s-accordion-head-wrapper-toggle":true,active:!this.collapsed},onClick:function(s){s.stopPropagation();t.toggleCollapse()}},e("span",{key:"4c4e3fa6ddeda1a59f65ba47665a9203356037a6",class:"s-accordion-head-wrapper-toggle-icon",innerHTML:this.collapsed?n:r}))))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());f.style=u;var p='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>swap-fill</title>\n<path d="M28 10.667h-2.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h2.667c0.735 0 1.333 0.597 1.333 1.333v13.333c0 0.736-0.599 1.333-1.333 1.333h-13.333c-0.735 0-1.333-0.597-1.333-1.333v-2.667c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v2.667c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM21.333 17.333v-13.333c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4zM2.667 17.333v-13.333c0-0.736 0.599-1.333 1.333-1.333h13.333c0.735 0 1.333 0.597 1.333 1.333v13.333c0 0.736-0.599 1.333-1.333 1.333h-13.333c-0.735 0-1.333-0.597-1.333-1.333z"></path>\n</svg>\n';var b="";var v=t("salla_order_details_options",function(){function t(t){s(this,t);this.bordered=true;this.placeholderImage="images/placeholder.png";this.optionsData=[]}t.prototype.componentWillLoad=function(){this.parseOptionsData()};t.prototype.componentWillUpdate=function(){this.parseOptionsData()};t.prototype.parseOptionsData=function(){if(!this.options){this.optionsData=[];return}if(typeof this.options==="string"){try{this.optionsData=JSON.parse(this.options)}catch(t){this.optionsData=[]}}else{this.optionsData=Array.isArray(this.options)?this.options:[]}};t.prototype.renderOptionValue=function(t){var s=this;if(t.is_image){return e("div",{class:"s-order-details-option-image-container"},e("a",{href:t.value,target:"_blank"},e("img",{class:"s-order-details-option-image",src:t.value||this.placeholderImage,alt:t.name})))}if(t.color){return e("span",{title:t.value,class:"s-order-details-option-color-swatch",style:{backgroundColor:t.color}})}if(t.is_file){return e("a",{href:t.value,target:"_blank",class:"s-order-details-option-file-link"},"Attachments")}if(t.is_color_picker){return e("div",{class:"s-order-details-option-color-picker"},e("div",{class:"s-order-details-option-color-picker-content"},e("span",{class:"s-order-details-option-color-picker-text"},t.value),e("span",{class:"s-order-details-option-color-picker-swatch",style:{backgroundColor:t.value,width:"1rem"}})),e("salla-button",{onClick:function(e){return s.copyToClipboard(e,t.value)},shape:"link",class:"s-order-details-option-color-picker-button"},e("span",{class:"s-order-details-option-color-copy-icon",innerHTML:p})))}if(t.is_map&&t.latitude&&t.longitude){return e("salla-map",{id:"location_map_".concat(t.id),class:"map_".concat(t.id),zoom:15,readonly:true,lat:t.latitude,lng:t.longitude},e("div",{slot:"button"},e("button",{type:"button",class:"s-order-details-option-map-button",onClick:function(){return s.openMap(t.id)}},"Show Location")))}return e("span",{class:"s-order-details-option-default-text"},t.display_value||t.value)};t.prototype.copyToClipboard=function(t,s){t.preventDefault();if(navigator.clipboard){navigator.clipboard.writeText(s)}};t.prototype.openMap=function(t){var s=document.querySelector("salla-map.map_".concat(t));if(s&&s.open){s.open()}};t.prototype.render=function(){var t=this;if(!this.optionsData.length){return null}var s=this.bordered?"s-order-details-options-container":"s-order-details-options-container-borderless";return e(i,{class:"s-order-details-options-wrapper"},e("h2",{class:"s-order-details-options-title"},salla.lang.get("pages.cart.item_options")),e("div",{class:s},e("dl",{class:"s-order-details-options-list"},this.optionsData.map((function(s){return e("div",{key:s.id,class:"s-order-details-options-item"},e("dt",{class:"s-order-details-options-item-name"},s.name,":"),e("dd",{class:s.is_image?"s-order-details-options-item-value-image":"s-order-details-options-item-value-text"},t.renderOptionValue(s)))})))))};return t}());v.style=b}}}));
|
|
5
|
+
//# sourceMappingURL=p-4806aee6.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,a,l,e){function s(t){return t instanceof l?t:new l((function(a){a(t)}))}return new(l||(l=Promise))((function(l,n){function r(t){try{c(e.next(t))}catch(t){n(t)}}function i(t){try{c(e["throw"](t))}catch(t){n(t)}}function c(t){t.done?l(t.value):s(t.value).then(r,i)}c((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var l={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},e,s,n,r;return r={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function i(t){return function(a){return c([t,a])}}function c(i){if(e)throw new TypeError("Generator is already executing.");while(r&&(r=0,i[0]&&(l=0)),l)try{if(e=1,s&&(n=i[0]&2?s["return"]:i[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,i[1])).done)return n;if(s=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:l.label++;return{value:i[1],done:false};case 5:l.label++;s=i[1];i=[0];continue;case 7:i=l.ops.pop();l.trys.pop();continue;default:if(!(n=l.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){l=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){l.label=i[1];break}if(i[0]===6&&l.label<n[1]){l.label=n[1];n=i;break}if(n&&l.label<n[2]){l.label=n[2];l.ops.push(i);break}if(n[2])l.ops.pop();l.trys.pop();continue}i=a.call(t,l)}catch(t){i=[6,t];s=0}finally{e=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ce2XJNsy.system.js"],(function(t){"use strict";var a,l,e;return{setters:[function(t){a=t.r;l=t.h;e=t.H}],execute:function(){var s=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !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:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;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:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;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}";var n=t("salla_wallet",function(){function t(t){var l=this;a(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){l.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return l(e,null,l("table",{class:"s-wallet-table"},l("tbody",{class:"s-wallet-table-tbody"},l("tr",{class:"s-table__tr"},l("td",null,l("div",{class:"s-wallet-table-balance-container"},l("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),l("div",null,l("div",{innerHTML:salla.money(this.balance)}),l("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("table",{class:"s-wallet-table"},l("thead",{class:"s-wallet-table-head"},l("tr",{class:"s-wallet-table-head-tr"},l("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),l("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return l("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&l("span",{class:"hidden md:inline-block"},"#",t.id),l("div",{class:"flex items-center md:hidden"},l("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&l("span",null,"#",t.order_id))))),l("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),l("div",{innerHTML:salla.money(t.amount)}))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),l("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),l("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&l("span",null,"#",t.order_id)))),l("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),l("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("div",null,l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),l("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&l("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&&l("salla-tooltip",{text:t.description,targetId:t.id.toString()}),l("span",null,t.title)))))})))),l("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&l("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return l(e,null,l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("div",{class:"s-wallet-table-empty-state"},l("i",{class:"sicon-full-wallet"}),l("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),l("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}());n.style=s}}}));
|
|
5
|
+
//# sourceMappingURL=p-4eef3c0e.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,c as i,h as t,H as e,g as l}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as s,c as i,h as t,H as e,g as l}from"./p-LSZwJPPB.js";import{M as r}from"./p-DmgxDvXL.js";var h=`\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`;const o="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}";const a=class{constructor(t){s(this,t);this.verified=i(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((()=>{var s;this.translationLoaded=true;this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type);(s=this.modal)===null||s===void 0?void 0:s.setTitle(this.title)}));if(this.display=="inline"){this.modal={open:()=>"",close:()=>"",setTitle:()=>""};return}salla.event.on("profile::verification",(s=>{var i;let t=Array.isArray(s)?s[0]:s;this.isProfileVerify=true;this.open(t);this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type);(i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title)}));salla.event.on("modalClosed",(()=>{this.resendAfter=0;this.timer.innerHTML="30 : 00"}))}splitNumber(s){this.resetError();let i=s.data||s.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(s.target,i)}modifyNext(s,i){s.value=i[0];i=i.substring(1);if(s.nextElementSibling&&i.length){this.modifyNext(s.nextElementSibling,i)}else if(!s.nextElementSibling&&i.length===0){s.focus()}else if(s.nextElementSibling&&i.length===0){s.nextElementSibling.focus()}}checkAllInputs(){let s=true;for(let i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){s=false}}return s}handleKeyUp(s){var i,t,e,l;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(s.key)){return}let r=s.keyCode||s.charCode;if(s.target.value){(i=s.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(t=s.target.nextElementSibling)===null||t===void 0?void 0:t.select()}else if([8,46].includes(r)){(e=s.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(l=s.target.previousElementSibling)===null||l===void 0?void 0:l.select()}if(s.target.value.length>1){this.splitNumber(s)}}handlePaste(s){this.resetError();const i=salla.helpers.number(s.clipboardData.getData("text"))||"";let t=i.replace(/[^0-9]/g,"");t=t.substring(0,this.otpInputs.length);this.otpInputs.forEach((s=>s.value=""));this.modifyNext(this.otpInputs[0],t)}handleInput(s){this.resetError();salla.helpers.inputDigitsOnly(s.target);if(this.checkAllInputs()){setTimeout((()=>{this.toggleOTPSubmit()}),100)}}resetError(){this.hasError=false;this.errorMessage=""}handleFocus(s){var i;if(s.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(s.target.previousElementSibling.value==""){s.target.previousElementSibling.focus()}}async getCode(){return this.code.value}async open(s){var i,t;this.data=s;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();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(t=this.firstOtpInput)===null||t===void 0?void 0:t.addEventListener("input",(s=>this.splitNumber(s)));setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let s=[];this.otpInputs.forEach((i=>i.value&&s.push(i.value)));this.code.value=s.join("");if(s.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()}reset(){this.otpInputs.forEach((s=>s.value=""));this.code.value="";this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;let s=setInterval((()=>{if(this.resendAfter<=0){clearInterval(s);this.resend.style.display="block";this.resendMessage.style.display="none"}else{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((s=>s.value=""));this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}let s=Object.assign({code:this.code.value},this.data);return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(s):salla.auth.verify(s,this.supportWebAuth))).then((s=>this.verified.emit(s))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((s=>{var i,t,e;this.hasError=true;this.errorMessage=((e=(t=(i=s.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)===null||e===void 0?void 0:e.message)||salla.lang.get("common.errors.error_occurred");if(!s.response){console.log("Unexpected error",s)}else{salla.logger.error(s)}this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return this.display=="inline"?t(e,null,this.myBody()):t("salla-modal",{width:"xs",class:"s-verify",ref:s=>this.modal=s,"modal-title":this.title},t("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?h:r}),this.myBody())}myBody(){return t("div",{class:"s-verify-body",ref:s=>this.body=s},t("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),t("slot",{name:"mobile"}),t("slot",{name:"email"}),t("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:s=>this.code=s}),t("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((s=>t("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${s}`,class:{"s-verify-input":true,"s-has-error":this.hasError},onInput:s=>this.handleInput(s),onPaste:s=>this.handlePaste(s),onKeyUp:s=>this.handleKeyUp(s),onFocus:s=>this.handleFocus(s),required:true})))),this.hasError&&this.errorMessage?t("span",{class:"s-verify-error-message"},this.errorMessage):"",t("div",{slot:"footer",class:"s-verify-footer"},t("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:()=>this.submit(),ref:s=>this.btn=s},salla.lang.get("pages.profile.verify")),t("p",{class:"s-verify-resend-message",ref:s=>this.resendMessage=s},salla.lang.get("blocks.header.resend_after"),t("b",{class:"s-verify-timer",ref:s=>this.timer=s})),t("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:s=>this.resend=s},salla.lang.get("blocks.comments.submit"))),t("slot",{name:"after-footer"}))}get host(){return l(this)}};a.style=o;export{a as salla_verify};
|
|
5
|
+
//# sourceMappingURL=p-5271a9e8.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function s(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,r){function a(t){try{c(n.next(t))}catch(t){r(t)}}function u(t){try{c(n["throw"](t))}catch(t){r(t)}}function c(t){t.done?e(t.value):s(t.value).then(a,u)}c((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(i){return c([t,i])}}function c(u){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(n=1,s&&(r=u[0]&2?s["return"]:u[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,u[1])).done)return r;if(s=0,r)u=[u[0]&2,r.value];switch(u[0]){case 0:case 1:r=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;s=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){e.label=u[1];break}if(u[0]===6&&e.label<r[1]){e.label=r[1];r=u;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(u);break}if(r[2])e.ops.pop();e.trys.pop();continue}u=i.call(t,e)}catch(t){u=[6,t];s=0}finally{n=r=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ce2XJNsy.system.js","./p-CzwwMHuN.system.js","./p-Bnro4LR3.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var i,e,n,s,r,a,u;return{setters:[function(t){i=t.r;e=t.c;n=t.h;s=t.H;r=t.g},function(t){a=t.H},function(t){u=t.F},null],execute:function(){var c=":host{display:block}";var o=t("salla_filters_widget",function(){function t(t){i(this,t);this.changed=e(this,"changed");this.initHeight=195;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}t.prototype.connectedCallback=function(){var t=this;this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((function(){t.page=salla.config.get("page")}));salla.lang.onLoaded((function(){t.showMoreLabel=salla.lang.getWithDefault("common.titles.more",t.showMoreLabel);t.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",t.showLessLabel)}))};t.prototype.componentDidLoad=function(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight="".concat(this.initHeight,"px"));this.widgetContent.style.height="".concat(this.widgetContent.scrollHeight,"px")};t.prototype.setWidgetHeight=function(){return __awaiter(this,arguments,void 0,(function(t){var i=this;if(t===void 0){t=250}return __generator(this,(function(e){this.widgetContent.removeAttribute("style");setTimeout((function(){var t=i.widgetContent.scrollHeight;i.widgetContent.style.height=t+"px"}),t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.option.type===u.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((function(t){return t.checked=false}));return[2]}))}))};t.prototype.showMore=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?"".concat(this.widgetValues.scrollHeight,"px"):"".concat(this.initHeight,"px");setTimeout((function(){t.widgetContent.style.height="".concat(t.widgetContent.scrollHeight,"px")}),400);return[2]}))}))};t.prototype.toggleWidget=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){this.isOpen=!this.isOpen;a.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(function(){return t.isOpen}));return[2]}))}))};t.prototype.renderFilterOption=function(t){var i=this;if(![u.VALUES,u.MINIMUM,u.VARIANTS].includes(t.type)){return""}return t.values.map((function(e,s){var r=typeof e=="number"?e:e.key||e.value;return n("label",{class:"s-filters-label",htmlFor:"".concat(t.key,"-option-").concat(r),key:"".concat(t.key,"-option-").concat(r)},n("input",{id:"".concat(t.key,"-option-").concat(r),name:t.key,type:"radio",checked:i.isSelectedOption(t,r),class:"s-filters-radio",onChange:function(e){return i.changed.emit({event:e,option:t,value:r})}}),i.getOptionLabel(t,e))}))};t.prototype.isSelectedOption=function(t,i){if(t.type===u.MINIMUM){return this.filtersData[t.key]==i}if(t.type===u.VARIANTS){return this.filtersData[t.type]&&this.filtersData[t.type][Object.keys(this.filtersData[t.type])[0]]==i}if(t.type===u.RANGE){return this.filtersData[t.key]&&this.filtersData[t.key].min==i.min&&this.filtersData[t.key].max==i.max}if(t.type===u.VALUES){return this.filtersData[t.key]&&Number(this.filtersData[t.key])==Number(i)}return false};t.prototype.getOptionLabel=function(t,i){if(t.key=="rating"){return n("salla-rating-stars",{size:"small",value:i})}var e=i.value||"null";return n("span",{class:"s-filters-option-name"},e)};t.prototype.render=function(){var t=this;return n(s,{key:"1987fec03cfe48cddc60af2d81bbc30a476dcb61",class:"s-filters-widget-container"},n("h3",{key:"4232775c4012d1be8bb3036d9d09e5d29d951ee4",class:"s-filters-widget-title",onClick:function(){return t.toggleWidget()}},n("span",{key:"61cf9ea5a69f3ab5377502a396cc84478c6152a1"},this.option.label),n("span",{key:"b75914eb06f9d419d0a89da2a8f2da2f891f3d27",class:"s-filters-widget-plusminus ".concat(this.isOpen?"s-filters-widget-plusminus-active":"")})),n("div",{key:"f65e2f8a44648b034dacf1bda1aa64b5398627b7",class:"s-filters-widget-content",ref:function(i){return t.widgetContent=i}},n("div",{key:"adcafe169ce8cbef671263f3624bce071b168c36",class:"s-filters-widget-values",ref:function(i){return t.widgetValues=i}},n("slot",{key:"fa006556e44e508c3c64cc5ae76cc826b7e7601e"}),this.option.type!==u.RANGE?this.renderFilterOption(this.option):n("salla-price-range",{onChanged:function(i){t.changed.emit(i.detail)},ref:function(i){return t.priceRange=i},filtersData:this.filtersData,option:this.option})),this.withLoadMore&&n("a",{key:"16a4ddeb365dc1d52fc51a8999fc6d7dbe094658",class:"s-filters-widget-more",onClick:function(){return t.showMore()}},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());o.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-528aa2c4.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function c(t){try{l(n["throw"](t))}catch(t){s(t)}}function l(t){t.done?i(t.value):r(t.value).then(a,c)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(t){return function(e){return l([t,e])}}function l(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(n=1,r&&(s=c[0]&2?r["return"]:c[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,c[1])).done)return s;if(r=0,s)c=[c[0]&2,s.value];switch(c[0]){case 0:case 1:s=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;r=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){i.label=c[1];break}if(c[0]===6&&i.label<s[1]){i.label=s[1];s=c;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(c);break}if(s[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];r=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ce2XJNsy.system.js","./p-D5o2VQTp.system.js"],(function(t){"use strict";var e,i,n,r,s;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H},function(t){s=t.a}],execute:function(){var a='\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>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var c=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";var l=t("salla_price_range",function(){function t(t){e(this,t);this.changed=i(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var n=0;n<this.option.values.length;n+=i){this.filterValues.push(this.option.values.slice(n,n+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return n(r,{key:"dc09f4be81c3652da570b522894917f6b70faf61"},this.filterValues.map((function(e,i){return n("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},n("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),n("span",{innerHTML:t.getPriceLabel(e)}))})),n("div",{key:"97f20e2bcff15d906dc5566a7f147339e4423138",class:"flex justify-center items-center"},n("div",{key:"4c631a9f5c77890bcffd365db6dab471ba989246",class:"relative max-w-xl w-full"},n("div",{key:"3e4c53b29c4e6fa90eba1a23f646d8391b1ce462",class:"s-price-range-inputs"},n("div",{key:"6bb515095db500d78c5cc22f2bd25635d157793d",class:"s-price-range-relative"},n("div",{key:"59617a36c7095a0766155521afb20d517fc5321a",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"bc1ae88ba28bcc11a7373cad13cdd2104646023b",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),n("div",{key:"49e12143570efe2f019e9a3240f9d1c184482f9c",class:"s-price-range-gray-text"}," -"),n("div",{key:"1e61ef602dbb0f1622bbd7279f15b5ef71d0f2db",class:"s-price-range-relative"},n("div",{key:"5aac7489a79f52156f382e0e4e181b6d0a8e5fb3",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"104a3ce0be1d461715fdc6a29d0df33a8a378ad3",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),n("salla-button",{key:"2e722552816b6ceabf030d596fac580e1fa8d41a",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},n("span",{key:"6f41a0dfa95c9910ab5d17e98ba815444fab8cca",innerHTML:this.isRTL?s:a}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}());l.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-53e00642.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-Ce2XJNsy.system.js","./p-CmE8W9Xg.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var n,s,e,c,i,a;return{setters:[function(t){n=t.r;s=t.h;e=t.H;c=t.g},function(t){i=t.w},function(t){a=t.M}],execute:function(){var o='\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>iphone</title>\n<path d="M15.053 27.613c0.133 0.12 0.28 0.213 0.44 0.28s0.333 0.107 0.507 0.107c0.36 0 0.693-0.135 0.947-0.387 0.12-0.135 0.213-0.28 0.28-0.44 0.080-0.16 0.107-0.333 0.107-0.507 0-0.347-0.147-0.695-0.387-0.947-0.507-0.493-1.387-0.493-1.893 0-0.12 0.12-0.213 0.267-0.28 0.44-0.067 0.16-0.107 0.333-0.107 0.507s0.040 0.347 0.107 0.507 0.16 0.305 0.28 0.44zM24 0h-16c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h16c2.205 0 4-1.795 4-4v-24c0-2.205-1.795-4-4-4zM25.333 28c0 0.736-0.599 1.333-1.333 1.333h-16c-0.735 0-1.333-0.597-1.333-1.333v-4h18.667zM25.333 21.333h-18.667v-17.333c0-0.735 0.599-1.333 1.333-1.333h16c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';var l='\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>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n';var r='\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>paper-plane-o</title>\n<path d="M31.5 0.482c0.375 0.268 0.554 0.696 0.482 1.143l-4.571 27.429c-0.054 0.339-0.268 0.625-0.571 0.804-0.161 0.089-0.357 0.143-0.554 0.143-0.143 0-0.286-0.036-0.429-0.089l-9.411-3.839-5.321 5.839c-0.214 0.25-0.518 0.375-0.839 0.375-0.143 0-0.286-0.018-0.411-0.071-0.446-0.179-0.732-0.607-0.732-1.071v-8.071l-8.429-3.446c-0.411-0.161-0.679-0.536-0.714-0.982-0.036-0.429 0.196-0.839 0.571-1.054l29.714-17.143c0.375-0.232 0.857-0.214 1.214 0.036zM25.393 27.25l3.946-23.625-25.607 14.768 6 2.446 15.411-11.411-8.536 14.232z"></path>\n</svg>\n';var h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";var u=t("salla_contacts",function(){function t(t){var s=this;n(this,t);var e;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:o,whatsapp:i,phone:l,telegram:r,email:a};this.contactSlot=((e=this.host.querySelector('[slot="contact"]'))===null||e===void 0?void 0:e.innerHTML)||'<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>'.concat(!this.iconsOnly&&"<span class='unicode'>{value}</span>","</a>");salla.onReady((function(){s.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((function(){s.contactsTitle=s.contactsTitle||salla.lang.get("blocks.footer.social")}))}t.prototype.getContactsArray=function(){return Object.entries(this.contacts).filter((function(t){var n=t[0],s=t[1];return s!==""})).map((function(t){var n=t[0],s=t[1];return{type:n,value:s}}))};t.prototype.getContactLink=function(t){var n=this.contacts[t];switch(t){case"phone":case"mobile":return"tel:".concat(n);case"whatsapp":return salla.url.get("whatsapp/send");case"email":return"mailto:".concat(n);case"telegram":return n.startsWith("https://t.me/")?n:"https://t.me/".concat(n);default:return n}};t.prototype.getContactIcon=function(t){return this.iconsList[t]};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var n=this.getContactsArray();if(!n||n.length==0){return}if(this.isHeader){return s(e,{class:"s-contacts s-contacts-header"},n.filter((function(t){return t.type=="phone"||t.type=="email"})).map((function(n,e){return s("a",{href:t.getContactLink(n.type),key:e,class:"s-contacts-topnav-link"},n.type==="email"?n.value:[s("span",null,t.contactsTitle,": "),s("a",{class:"unicode",href:t.iconsList[n.type]},n.value)])})))}return s(e,{class:"s-contacts"},!this.hideTitle&&s("h3",{class:"s-contacts-title"},this.contactsTitle),s("div",{class:{"s-contacts-list":true,"s-contacts-list-horizontal":this.horizontal,"s-contacts-list-vertical":!this.horizontal,"s-contacts-list-icons-only":this.iconsOnly}},n.map((function(n,e){return s("div",{key:e,id:"contact-slot",innerHTML:t.contactSlot.replace(/\{icon\}/g,t.getContactIcon(n.type)).replace(/\{value\}/g,n.value.toString()).replace(/\{link\}/g,t.getContactLink(n.type))})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return c(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
|
|
5
|
+
//# sourceMappingURL=p-5bae6d14.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-Ce2XJNsy.system.js"],(function(t){"use strict";var e,i,s,a;return{setters:[function(t){e=t.r;i=t.c;s=t.h;a=t.H}],execute:function(){var c="salla-loyalty-prize-item:hover{-webkit-box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important;box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";var b=t("salla_loyalty_prize_item",function(){function t(t){e(this,t);this.prizeItemSelected=i(this,"prizeItemSelected")}t.prototype.onPrizeItemClick=function(){this.prizeItemSelected.emit(this.item)};t.prototype.render=function(){return s(a,{key:"5ca09a4202a344b0483bdfec61051430c6804143"},s("div",{key:"685bab3cdebcc0ebb8899bf41af4864dc613835b",onClick:this.onPrizeItemClick.bind(this)},s("img",{key:"412d27faaf4fdb3df213806613ce0ce362f86f63",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),s("div",{key:"9de2b85059c3db4cf750303e549938a577995d92",class:"s-loyalty-prize-item-title"},this.item.name),s("div",{key:"9ecf6845d0edf53937476a8bebfc36372ab1b4d9",class:"s-loyalty-prize-item-subtitle"},this.item.description),s("div",{key:"0c5f1cd8d22bc90178063c06eaf32bbac9f167ff",class:"s-loyalty-prize-item-points"},this.item.cost_points," Points")))};return t}());b.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-64c8b0e2.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,a,r,e){function l(t){return t instanceof r?t:new r((function(a){a(t)}))}return new(r||(r=Promise))((function(r,s){function o(t){try{i(e.next(t))}catch(t){s(t)}}function n(t){try{i(e["throw"](t))}catch(t){s(t)}}function i(t){t.done?r(t.value):l(t.value).then(o,n)}i((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},e,l,s,o;return o={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(t){return function(a){return i([t,a])}}function i(n){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,n[0]&&(r=0)),r)try{if(e=1,l&&(s=n[0]&2?l["return"]:n[0]?l["throw"]||((s=l["return"])&&s.call(l),0):l.next)&&!(s=s.call(l,n[1])).done)return s;if(l=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;l=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){r.label=n[1];break}if(n[0]===6&&r.label<s[1]){r.label=s[1];s=n;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(n);break}if(s[2])r.ops.pop();r.trys.pop();continue}n=a.call(t,r)}catch(t){n=[6,t];l=0}finally{e=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,a,r){if(r||arguments.length===2)for(var e=0,l=a.length,s;e<l;e++){if(s||!(e in a)){if(!s)s=Array.prototype.slice.call(a,0,e);s[e]=a[e]}}return t.concat(s||Array.prototype.slice.call(a))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ce2XJNsy.system.js","./p-Ik1kuM1-.system.js"],(function(t){"use strict";var a,r,e,l;return{setters:[function(t){a=t.r;r=t.h;e=t.H},function(t){l=t.G}],execute:function(){var s="";var o=function(t){if(!t)return"";return new Date(Number(t)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})};var n=function(t){if(!t)return"";try{var a=t.toLowerCase();var r=salla.lang.get("pages.loyalty_program.".concat(a));return r==="pages.loyalty_program.".concat(a)?t:r}catch(a){return t}};var i=t("salla_loyalty_program",function(){function t(t){var r=this;a(this,t);this.loyaltyPointsArray=[];this.isLoadingLoyalty=false;this.nextPageUrlLoyalty="";this.handleClick=function(){r.loadMoreLoyaltyPoints()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){t.loadLoyaltyPoints()}))};t.prototype.loadLoyaltyPoints=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,r;return __generator(this,(function(e){switch(e.label){case 0:this.isLoadingLoyalty=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/points?page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.loyaltyPointsArray=a.data;this.nextPageUrlLoyalty=a.cursor.next;return[3,5];case 3:r=e.sent();console.error("Error loading loyalty points transactions",r);return[3,5];case 4:this.isLoadingLoyalty=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreLoyaltyPoints=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,r;return __generator(this,(function(e){switch(e.label){case 0:if(!this.nextPageUrlLoyalty)return[2];this.isLoadingLoyalty=true;e.label=1;case 1:e.trys.push([1,3,4,5]);return[4,salla.api.request(this.nextPageUrlLoyalty)];case 2:a=e.sent();this.loyaltyPointsArray=__spreadArray(__spreadArray([],this.loyaltyPointsArray,true),a.data,true);this.nextPageUrlLoyalty=((t=a.cursor)===null||t===void 0?void 0:t.next)||"";return[3,5];case 3:r=e.sent();console.error("Error loading more loyalty points",r);return[3,5];case 4:this.isLoadingLoyalty=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){return r(e,{key:"300d58186edf747b1dd6dc7a1d67c0c93606aa5e"},r("div",{key:"98e3a15104e813c6798ccac75fbd1bb163735c54"},this.isLoadingLoyalty?r("salla-loading",null):r("div",null,this.loyaltyPointsArray.length>0?r("div",null,r("table",{class:"s-loyalty-program-table"},r("thead",{class:"s-loyalty-program-table-head"},r("tr",{class:"s-loyalty-program-table-head-tr"},r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),r("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),r("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((function(t){return r("tr",{class:"s-loyalty-program-table-tbody-tr"},r("td",{class:"s-loyalty-program-table-tbody-tr-td"},(t===null||t===void 0?void 0:t.type)==="plus"?"+":"",(t===null||t===void 0?void 0:t.points)||""," ",salla.lang.get("pages.loyalty_program.point")),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},o((t===null||t===void 0?void 0:t.created_at)?Number(t.created_at)*1e3:undefined)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},o(t===null||t===void 0?void 0:t.points_expire_date)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},n(t===null||t===void 0?void 0:t.key)),r("td",{class:"s-loyalty-program-table-tbody-tr-td"},n(t===null||t===void 0?void 0:t.status_key)))})))),r("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&r("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):r("div",null,r("div",{class:"s-loyalty-program-table-empty-state"},r("span",{innerHTML:l}),r("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),r("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))};return t}());i.style=s}}}));
|
|
5
|
+
//# sourceMappingURL=p-64de4869.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as r}from"./p-DtlYcjlJ.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<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>`;var o=`<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>`;var n=`<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>`;var l=`<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>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{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){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.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 f=".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{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;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{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();if(t){this.updateOfferValues(e,t)}}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){var r,s;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,e.coupon)){this.canRender=false;return}this.canRender=true;if(((r=t.details)===null||r===void 0?void 0:r.with_current_cart)===false){return}const i=((s=t.details)===null||s===void 0?void 0:s.current_value)||0;this.apiOfferData=t;const o=this.findCurrentTierIndex(i);if(o===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=o;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,o);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}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 d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}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,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},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){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"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=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return 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))))})()))}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),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()))}};c.style=f;export{c as salla_tiered_offer};
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as e,h as t,H as r}from"./p-LSZwJPPB.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<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>`;var o=`<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>`;var n=`<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>`;var l=`<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>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{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){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.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 f=".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{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;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{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();if(t){this.updateOfferValues(e,t)}}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){var r,s;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,e.coupon)){this.canRender=false;return}this.canRender=true;if(((r=t.details)===null||r===void 0?void 0:r.with_current_cart)===false){return}const i=((s=t.details)===null||s===void 0?void 0:s.current_value)||0;this.apiOfferData=t;const o=this.findCurrentTierIndex(i);if(o===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=o;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,o);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}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 d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}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,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},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){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"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=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return 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))))})()))}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),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()))}};c.style=f;export{c as salla_tiered_offer};
|
|
5
|
+
//# sourceMappingURL=p-675d4ab7.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,r,s){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):n(e.value).then(a,o)}l((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(e){return function(t){return l([e,t])}}function l(o){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(r=0)),r)try{if(s=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];n=0}finally{s=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-DiFVtThr.system.js"],(function(e){"use strict";var t,r,s;return{setters:[function(e){t=e.r;r=e.h;s=e.g}],execute:function(){var n;(function(e){e["ProductDetail"]="product.single";e["Cart"]="cart"})(n||(n={}));var i;(function(e){e["Conditional"]="conditional";e["PercentageOrFixed"]="fixed";e["DiscountsTable"]="discounts_table";e["Bank"]="bank";e["BuyXGetY"]="buy_x_get_y";e["SpecialPrice"]="special_price"})(i||(i={}));var a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';var o=e("salla_offer",function(){function e(e){var r=this;t(this,e);var s;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=function(e){return salla.lang.get("pages.offer.buy_quantity",{quantity:e})};salla.lang.onLoaded((function(){r.offer_with_price_text=salla.lang.get("pages.offer.with_price");r.with_discount_text=salla.lang.get("pages.products.with_a_discount");r.product_discount_text=salla.lang.get("pages.products.discount");r.special_offer_text=salla.lang.get("pages.products.special_offer");r.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");r.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug");r.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((s=this.host.querySelector('[slot="category"]'))===null||s===void 0?void 0:s.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}e.prototype.getEndpointByPageName=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!(this.currentPage==n.Cart))return[3,2];return[4,Salla.cart.getCurrentCartId()];case 1:e=t.sent();return[2,"offers/cart/".concat(e)];case 2:if(this.currentPage==n.ProductDetail){return[2,"offers/product/".concat(salla.config.get("page.id"))]}return[2,"offers"]}}))}))};e.prototype.emitPromotionViewed=function(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[e])};e.prototype.emitPromotionClicked=function(e){if(e===void 0){e=1}if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var t={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:e};salla.event.emit("promotion::clicked",[t])};e.prototype.componentWillLoad=function(){var e=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((function(e){return salla.onReady(e)})).then((function(){e.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(e.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:t=(e=salla.api).request;return[4,this.getEndpointByPageName()];case 1:return[2,t.apply(e,[r.sent()])]}}))}))})).then((function(t){if(!(e.offersList=t.data).length){throw new Error("salla-offers:: There is no offers!")}var r=e.offersList.find((function(e){return[i.SpecialPrice,i.Bank,i.BuyXGetY,i.DiscountsTable].includes(e.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===i.DiscountsTable){return e.offersList=[r]}if(e.isBankOffer=r.type===i.Bank){e.offersList=e.offersList.filter((function(e){return e.type===i.Bank}));e.isMultipleBank=e.offersList.length>1;return e.offersList}if(r.type===i.SpecialPrice){var s=r.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((function(t){r.details.products=t.data;return e.offersList=[r]})):salla.product.api.categories().then((function(t){var n=e.findCategories(t.data,s.targets);r.details.categories=n;return e.offersList=[r]}))}var n=r.details.get;return n.source==="products"?salla.product.api.fetch({source:"selected",source_value:n.source_value}).then((function(t){n.products=t.data;r.details.get=n;return e.offersList=[r]})):salla.product.api.categories().then((function(t){n.categories=e.findCategories(t.data,n.source_value);r.details.get=n;return e.offersList=[r]}))})).then((function(t){salla.storage.set(e.getStorageKey(),{offers:t,stored_at:(new Date).getTime()});e.canRender=true})).catch((function(e){salla.logger.warn(e)}))};e.prototype.componentDidLoad=function(){var e=this.host.querySelector(".s-slider-block__title-nav");e===null||e===void 0?void 0:e.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()};e.prototype.findCategories=function(e,t){var r;var s=[];for(var n=0,i=e;n<i.length;n++){var a=i[n];if(t.includes(a.id_||a.id)){s.push(a)}if(((r=a.sub_categories)===null||r===void 0?void 0:r.length)>0){s=s.concat(this.findCategories(a.sub_categories,t))}}return s};e.prototype.getStorageKey=function(){try{var e=salla.config.get("page.slug").replace(".","_");var t=salla.lang.getLocale();var r=salla.config.currency().code;if(!e||!t||!r){throw new Error("Unable to get the storage key.")}return"s-offers-".concat(e,"-").concat(salla.config.get("page.id"),"-").concat(t,"-").concat(r)}catch(e){return""}};e.prototype.getOffersFromStorage=function(){var e=salla.storage.get(this.getStorageKey());if(!e||e.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(e.offers)};e.prototype.render=function(){var e=this;if(!this.offersList.length||!this.canRender||!this.showOffer)return null;var t=this.offersList[0];var s=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:t.title;var n=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:t.description;var i={"block-title":s,"block-subTitle":n,"show-controls":this.isMultipleBank};return r("div",{class:"s-offer-wrapper",onClick:function(){return e.emitPromotionClicked()}},r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},i),r("div",{slot:"items"},this.renderSectionForOfferType(t.type))))};e.prototype.renderSectionForOfferType=function(e){if(this.isBankOffer){return this.renderBankSection()}if(e==i.SpecialPrice){return this.renderSpecialPriceSection()}if(e==i.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()};e.prototype.getCategoriesSection=function(e){return r("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,e.url).replace(/\{icon\}/g,e.icon||"sicon-store").replace(/\{name\}/g,e.name)})};e.prototype.renderBuyXGetYSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[(t=n.get.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))})),(s=n.get.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)}))]};e.prototype.renderBankSection=function(){var e=this;return this.offersList.map((function(t){return r("div",{class:{"s-offer-slide-one-sixth":e.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!e.isMultipleBank}},r("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!e.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":e.isMultipleBank}},r("div",{class:"s-offer-bank-logo"},r("img",{src:t.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":t.details.logo,alt:t.title+" offer"})),r("ul",{class:"s-offer-bank-payment-wrapper"},t.details.payments.map((function(e){return r("li",{class:"s-offer-bank-payment-single"},r("img",{src:salla.url.cdn("images/payment/"+e+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+e+".png"),alt:"payment"}))}))),e.isMultipleBank?r("p",{class:"s-offer-bank-payment-discount-percent"},"".concat(e.product_discount_text," ").concat(t.details.discount_value).concat(t.details.discount_type==="percentage"&&"%")):""),!e.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,e.offersList[0].title),r("p",{innerHTML:e.generateBankDescription(e.offersList[0].description,t.details.discount_value)})):"")}))};e.prototype.generateBankDescription=function(e,t){return e.replace(new RegExp("".concat(t," %")),'<span class="s-offer-bank-message-amount">'.concat(t," %</span>"))};e.prototype.renderDiscountTableSection=function(){var e=this;var t;var s=this.offersList[0];var n=s.details.show_price_after_discount;return(t=this.offersList[0].details.discounts)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},r("div",{class:"s-offer-slide-offer-entry"},r("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},r("p",{class:"s-offer-slide-offer-entry-quantity"},e.buy_quantity_text(t.quantity)),n?r("div",{class:"s-offer-slide-offer-entry-price"},r("span",null,e.offer_with_price_text),r("span",{class:"s-offer-slide-offer-entry-price-amount"},t.discounted_amount)," ",r("span",null,e.userCurrency)):""),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},e.with_discount_text,"(",r("span",null,t.percentage,!!t.percentage&&"%"),")")))}))};e.prototype.renderSpecialPriceSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[n.apply_to==="product"&&((t=n.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))}))),n.apply_to==="category"&&((s=n.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)})))]};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ce2XJNsy.system.js"],(function(e){"use strict";var t,r,s;return{setters:[function(e){t=e.r;r=e.h;s=e.g}],execute:function(){var n;(function(e){e["ProductDetail"]="product.single";e["Cart"]="cart"})(n||(n={}));var i;(function(e){e["Conditional"]="conditional";e["PercentageOrFixed"]="fixed";e["DiscountsTable"]="discounts_table";e["Bank"]="bank";e["BuyXGetY"]="buy_x_get_y";e["SpecialPrice"]="special_price"})(i||(i={}));var a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';var o=e("salla_offer",function(){function e(e){var r=this;t(this,e);var s;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=function(e){return salla.lang.get("pages.offer.buy_quantity",{quantity:e})};salla.lang.onLoaded((function(){r.offer_with_price_text=salla.lang.get("pages.offer.with_price");r.with_discount_text=salla.lang.get("pages.products.with_a_discount");r.product_discount_text=salla.lang.get("pages.products.discount");r.special_offer_text=salla.lang.get("pages.products.special_offer");r.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");r.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug");r.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((s=this.host.querySelector('[slot="category"]'))===null||s===void 0?void 0:s.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}e.prototype.getEndpointByPageName=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!(this.currentPage==n.Cart))return[3,2];return[4,Salla.cart.getCurrentCartId()];case 1:e=t.sent();return[2,"offers/cart/".concat(e)];case 2:if(this.currentPage==n.ProductDetail){return[2,"offers/product/".concat(salla.config.get("page.id"))]}return[2,"offers"]}}))}))};e.prototype.emitPromotionViewed=function(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[e])};e.prototype.emitPromotionClicked=function(e){if(e===void 0){e=1}if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var t={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:e};salla.event.emit("promotion::clicked",[t])};e.prototype.componentWillLoad=function(){var e=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((function(e){return salla.onReady(e)})).then((function(){e.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(e.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:t=(e=salla.api).request;return[4,this.getEndpointByPageName()];case 1:return[2,t.apply(e,[r.sent()])]}}))}))})).then((function(t){if(!(e.offersList=t.data).length){throw new Error("salla-offers:: There is no offers!")}var r=e.offersList.find((function(e){return[i.SpecialPrice,i.Bank,i.BuyXGetY,i.DiscountsTable].includes(e.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===i.DiscountsTable){return e.offersList=[r]}if(e.isBankOffer=r.type===i.Bank){e.offersList=e.offersList.filter((function(e){return e.type===i.Bank}));e.isMultipleBank=e.offersList.length>1;return e.offersList}if(r.type===i.SpecialPrice){var s=r.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((function(t){r.details.products=t.data;return e.offersList=[r]})):salla.product.api.categories().then((function(t){var n=e.findCategories(t.data,s.targets);r.details.categories=n;return e.offersList=[r]}))}var n=r.details.get;return n.source==="products"?salla.product.api.fetch({source:"selected",source_value:n.source_value}).then((function(t){n.products=t.data;r.details.get=n;return e.offersList=[r]})):salla.product.api.categories().then((function(t){n.categories=e.findCategories(t.data,n.source_value);r.details.get=n;return e.offersList=[r]}))})).then((function(t){salla.storage.set(e.getStorageKey(),{offers:t,stored_at:(new Date).getTime()});e.canRender=true})).catch((function(e){salla.logger.warn(e)}))};e.prototype.componentDidLoad=function(){var e=this.host.querySelector(".s-slider-block__title-nav");e===null||e===void 0?void 0:e.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()};e.prototype.findCategories=function(e,t){var r;var s=[];for(var n=0,i=e;n<i.length;n++){var a=i[n];if(t.includes(a.id_||a.id)){s.push(a)}if(((r=a.sub_categories)===null||r===void 0?void 0:r.length)>0){s=s.concat(this.findCategories(a.sub_categories,t))}}return s};e.prototype.getStorageKey=function(){try{var e=salla.config.get("page.slug").replace(".","_");var t=salla.lang.getLocale();var r=salla.config.currency().code;if(!e||!t||!r){throw new Error("Unable to get the storage key.")}return"s-offers-".concat(e,"-").concat(salla.config.get("page.id"),"-").concat(t,"-").concat(r)}catch(e){return""}};e.prototype.getOffersFromStorage=function(){var e=salla.storage.get(this.getStorageKey());if(!e||e.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(e.offers)};e.prototype.render=function(){var e=this;if(!this.offersList.length||!this.canRender||!this.showOffer)return null;var t=this.offersList[0];var s=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:t.title;var n=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:t.description;var i={"block-title":s,"block-subTitle":n,"show-controls":this.isMultipleBank};return r("div",{class:"s-offer-wrapper",onClick:function(){return e.emitPromotionClicked()}},r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},i),r("div",{slot:"items"},this.renderSectionForOfferType(t.type))))};e.prototype.renderSectionForOfferType=function(e){if(this.isBankOffer){return this.renderBankSection()}if(e==i.SpecialPrice){return this.renderSpecialPriceSection()}if(e==i.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()};e.prototype.getCategoriesSection=function(e){return r("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,e.url).replace(/\{icon\}/g,e.icon||"sicon-store").replace(/\{name\}/g,e.name)})};e.prototype.renderBuyXGetYSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[(t=n.get.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))})),(s=n.get.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)}))]};e.prototype.renderBankSection=function(){var e=this;return this.offersList.map((function(t){return r("div",{class:{"s-offer-slide-one-sixth":e.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!e.isMultipleBank}},r("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!e.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":e.isMultipleBank}},r("div",{class:"s-offer-bank-logo"},r("img",{src:t.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":t.details.logo,alt:t.title+" offer"})),r("ul",{class:"s-offer-bank-payment-wrapper"},t.details.payments.map((function(e){return r("li",{class:"s-offer-bank-payment-single"},r("img",{src:salla.url.cdn("images/payment/"+e+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+e+".png"),alt:"payment"}))}))),e.isMultipleBank?r("p",{class:"s-offer-bank-payment-discount-percent"},"".concat(e.product_discount_text," ").concat(t.details.discount_value).concat(t.details.discount_type==="percentage"&&"%")):""),!e.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,e.offersList[0].title),r("p",{innerHTML:e.generateBankDescription(e.offersList[0].description,t.details.discount_value)})):"")}))};e.prototype.generateBankDescription=function(e,t){return e.replace(new RegExp("".concat(t," %")),'<span class="s-offer-bank-message-amount">'.concat(t," %</span>"))};e.prototype.renderDiscountTableSection=function(){var e=this;var t;var s=this.offersList[0];var n=s.details.show_price_after_discount;return(t=this.offersList[0].details.discounts)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},r("div",{class:"s-offer-slide-offer-entry"},r("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},r("p",{class:"s-offer-slide-offer-entry-quantity"},e.buy_quantity_text(t.quantity)),n?r("div",{class:"s-offer-slide-offer-entry-price"},r("span",null,e.offer_with_price_text),r("span",{class:"s-offer-slide-offer-entry-price-amount"},t.discounted_amount)," ",r("span",null,e.userCurrency)):""),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},e.with_discount_text,"(",r("span",null,t.percentage,!!t.percentage&&"%"),")")))}))};e.prototype.renderSpecialPriceSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[n.apply_to==="product"&&((t=n.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))}))),n.apply_to==="category"&&((s=n.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)})))]};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-68285203.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as c,h as l,H as t,g as s}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as c,h as l,H as t,g as s}from"./p-LSZwJPPB.js";import{f as i,t as e}from"./p-Dz7o69vX.js";var o=`\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>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n`;var a=`\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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n`;var n=`\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n`;var v=`\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>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n`;const h=":host{display:block}";const r=class{constructor(l){c(this,l);var t;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:n,tiktok:v};this.socialSlot=((t=this.host.querySelector('[slot="social-item"]'))===null||t===void 0?void 0:t.innerHTML)||`<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>`;salla.lang.onLoaded((()=>{this.links=salla.config.get("store.social")}))}getLinksArray(){return this.links?Object.entries(this.links).filter((([c,l])=>!!l&&c!=="whatsapp")).map((([c,l])=>({type:c,value:l}))):[]}componentWillLoad(){return new Promise((c=>salla.onReady(c)))}render(){const c=this.getLinksArray();return l(t,{key:"499e2f4c68034191143f53bb4d4581e85e4066b0"},l("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",class:"s-social-list"},c.map((c=>l("li",{class:"s-social-link"},l("div",{id:"social-slot",innerHTML:this.socialSlot.replace(/\{icon\}/g,this.iconsList[c.type]).replace(/\{type\}/g,c.type).replace(/\{link\}/g,c.value.toString())}))))))}componentDidRender(){var c;this.host.querySelectorAll("#social-slot").forEach((c=>c.replaceWith(c.firstChild)));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()}get host(){return s(this)}};r.style=h;export{r as salla_social};
|
|
5
|
+
//# sourceMappingURL=p-68327c54.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,a,e,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,a,e,n){function r(t){return t instanceof e?t:new e((function(a){a(t)}))}return new(e||(e=Promise))((function(e,i){function s(t){try{o(n.next(t))}catch(t){i(t)}}function u(t){try{o(n["throw"](t))}catch(t){i(t)}}function o(t){t.done?e(t.value):r(t.value).then(s,u)}o((n=n.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(a){return o([t,a])}}function o(u){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(n=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=a.call(t,e)}catch(t){u=[6,t];r=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ce2XJNsy.system.js"],(function(t){"use strict";var a,e,n,r;return{setters:[function(t){a=t.r;e=t.h;n=t.H;r=t.g}],execute:function(){var i="";var s=t("salla_metadata",function(){function t(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(t){salla.log("Bad json passed via entityId prop")}}}t.prototype.getValue=function(t){if(t.type==="file"){return'<a href="'.concat(t.value,'" class="text-primary" target="_blank"><span class="sicon-download"></span> ').concat(this.download,"</a>")}if(t.type==="url"){return'<a href="'.concat(t.value,'" class="text-blue-700 underline" target="_blank">').concat(t.value,"</a>")}if(t.type==="date"){var a=new Date(t.value);var e=String(a.getDate()).padStart(2,"0");var n=String(a.getMonth()+1).padStart(2,"0");var r=a.getFullYear();var i="".concat(e,"/").concat(n,"/").concat(r);return i}return t.value};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,e;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.onReady()];case 1:n.sent();if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("custom-fields"))){return[2,salla.logger.error("feature custom-fields is not activated")]}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return[2,salla.logger.error("can't render salla-metadata without enity-id prop!")]}return[4,salla.lang.onLoaded()];case 2:n.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=n.sent();this.specs=(a=e.data[0])===null||a===void 0?void 0:a.sections;return[2]}}))}))};t.prototype.render=function(){var t=this;if(!this.specs.length){return}return e(n,{class:"s-metadata-wrapper"},this.specs.map((function(a){return e("div",{class:"s-metadata-box"},e("div",{class:"s-metadata-box-header"},e("i",{class:"sicon-list"}),a.name),a.fields.map((function(a){return e("div",{class:"s-metadata-row"},e("p",{class:"s-metadata-row-name"},a.name),e("p",{class:"s-metadata-row-value",innerHTML:t.getValue(a)}))})))})))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
|
|
5
|
+
//# sourceMappingURL=p-6a8ba65f.system.entry.js.map
|