@salla.sa/twilight-components 2.14.251 → 2.14.252
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-0qyY-ElC.js → app-globals-ChKTQEJ9.js} +3 -3
- package/dist/cjs/{app-globals-0qyY-ElC.js.map → app-globals-ChKTQEJ9.js.map} +1 -1
- package/dist/cjs/{index-CxIOfeMA.js → index-DtXwvL5X.js} +4 -4
- package/dist/cjs/index-DtXwvL5X.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion.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-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-BBUHVW9U.js → app-globals-3b0DwjjK.js} +3 -3
- package/dist/esm/{app-globals-BBUHVW9U.js.map → app-globals-3b0DwjjK.js.map} +1 -1
- package/dist/esm/{index-aC-cHVMV.js → index-D4D34Ujk.js} +4 -4
- package/dist/esm/index-D4D34Ujk.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body.entry.js +1 -1
- package/dist/esm/salla-accordion-head.entry.js +1 -1
- package/dist/esm/salla-accordion.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-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-BBUHVW9U.js → app-globals-3b0DwjjK.js} +2 -2
- package/dist/esm-es5/{app-globals-BBUHVW9U.js.map → app-globals-3b0DwjjK.js.map} +1 -1
- package/dist/esm-es5/{index-aC-cHVMV.js → index-D4D34Ujk.js} +3 -3
- package/dist/esm-es5/index-D4D34Ujk.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
- package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
- package/dist/esm-es5/salla-accordion.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 +2 -2
- 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 +1 -1
- package/dist/esm-es5/salla-notification-item.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +1 -1
- package/dist/esm-es5/salla-offer.entry.js +1 -1
- package/dist/esm-es5/salla-order-summary.entry.js +1 -1
- 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-939b203a.system.entry.js → p-06b95a05.system.entry.js} +2 -2
- package/dist/twilight/{p-75203eae.entry.js → p-1055f2fb.entry.js} +2 -2
- package/dist/twilight/{p-8c2a97cf.system.entry.js → p-13324cdd.system.entry.js} +2 -2
- package/dist/twilight/p-154fc672.entry.js +5 -0
- package/dist/twilight/{p-7e1c3fd9.entry.js → p-17c50686.entry.js} +2 -2
- package/dist/twilight/{p-98ca67d7.entry.js → p-17ee3d18.entry.js} +2 -2
- package/dist/twilight/{p-1b9e31b1.system.entry.js → p-1a9eebb6.system.entry.js} +2 -2
- package/dist/twilight/{p-29440936.system.entry.js → p-1b24ea99.system.entry.js} +2 -2
- package/dist/twilight/{p-a3c00836.entry.js → p-2ae75a1c.entry.js} +2 -2
- package/dist/twilight/{p-fabacea5.system.entry.js → p-2af0da5a.system.entry.js} +2 -2
- package/dist/twilight/{p-9f75e64f.entry.js → p-2ecf868e.entry.js} +2 -2
- package/dist/twilight/{p-7f9f9400.system.entry.js → p-3483eb09.system.entry.js} +2 -2
- package/dist/twilight/{p-0d0836f3.entry.js → p-396198a2.entry.js} +2 -2
- package/dist/twilight/{p-3fb416fa.entry.js → p-3eaddcf1.entry.js} +2 -2
- package/dist/twilight/{p-9297d5d0.system.entry.js → p-407d19d8.system.entry.js} +2 -2
- package/dist/twilight/p-40e20722.system.entry.js +5 -0
- package/dist/twilight/{p-4a4cad07.system.entry.js → p-423d91f5.system.entry.js} +2 -2
- package/dist/twilight/{p-0e931dd0.system.entry.js → p-442340d3.system.entry.js} +2 -2
- package/dist/twilight/{p-8a55a076.entry.js → p-45b61475.entry.js} +2 -2
- package/dist/twilight/{p-94b99a34.entry.js → p-4af5ffea.entry.js} +2 -2
- package/dist/twilight/{p-e1a599fb.system.entry.js → p-4d6baea7.system.entry.js} +2 -2
- package/dist/twilight/{p-3b207dc4.system.entry.js → p-553bc6b4.system.entry.js} +2 -2
- package/dist/twilight/{p-92fb3adc.entry.js → p-5542a867.entry.js} +2 -2
- package/dist/twilight/{p-3438bc0c.entry.js → p-58085711.entry.js} +2 -2
- package/dist/twilight/{p-1d08e23e.system.entry.js → p-5b882c52.system.entry.js} +2 -2
- package/dist/twilight/{p-f9735e19.system.entry.js → p-60bf8746.system.entry.js} +3 -3
- package/dist/twilight/{p-0443edb2.entry.js → p-63a5bdc6.entry.js} +2 -2
- package/dist/twilight/{p-d01c0575.entry.js → p-63cba8e3.entry.js} +2 -2
- package/dist/twilight/{p-21c35fec.entry.js → p-648fb6ca.entry.js} +2 -2
- package/dist/twilight/{p-65d9d657.entry.js → p-669db4df.entry.js} +2 -2
- package/dist/twilight/{p-70688702.entry.js → p-6a0b5799.entry.js} +2 -2
- package/dist/twilight/{p-08b3ea63.system.entry.js → p-6b716e82.system.entry.js} +2 -2
- package/dist/twilight/{p-e29eb090.system.entry.js → p-6e24a5f0.system.entry.js} +2 -2
- package/dist/twilight/{p-4d318ffc.system.entry.js → p-7234c5f2.system.entry.js} +2 -2
- package/dist/twilight/{p-b1f25cb5.system.entry.js → p-7eff7dc5.system.entry.js} +3 -3
- package/dist/twilight/{p-342eda73.entry.js → p-81aeef6a.entry.js} +2 -2
- package/dist/twilight/p-8213a9ef.system.entry.js +5 -0
- package/dist/twilight/{p-56074b1e.entry.js → p-8359eb2a.entry.js} +2 -2
- package/dist/twilight/{p-09117f81.system.entry.js → p-8c0822f7.system.entry.js} +2 -2
- package/dist/twilight/{p-5dda0431.entry.js → p-95adf84e.entry.js} +2 -2
- package/dist/twilight/{p-9cvlynxW.system.js → p-B0xoNOFR.system.js} +3 -3
- package/dist/twilight/p-B0xoNOFR.system.js.map +1 -0
- package/dist/twilight/{p-sLrIToFR.system.js.map → p-BHI6mAw4.system.js.map} +1 -1
- package/dist/twilight/{p-DOHYAySQ.system.js.map → p-BJUBMQeL.system.js.map} +1 -1
- package/dist/twilight/{p-QCD41AKz.system.js.map → p-BN8tVPbo.system.js.map} +1 -1
- package/dist/twilight/{p-24T5fnEM.system.js.map → p-BRsVFuI-.system.js.map} +1 -1
- package/dist/twilight/{p-Craz4PUF.system.js.map → p-BXoB3JpD.system.js.map} +1 -1
- package/dist/twilight/{p-81UxRwTN.system.js.map → p-B_aBck2N.system.js.map} +1 -1
- package/dist/twilight/{p-Uzujt2uQ.system.js.map → p-BbDuw4AO.system.js.map} +1 -1
- package/dist/twilight/{p-3etOZ9ok.system.js.map → p-Bqv1miCk.system.js.map} +1 -1
- package/dist/twilight/{p-fkQosYiP.system.js.map → p-BrxIkK1y.system.js.map} +1 -1
- package/dist/twilight/{p-gyc8toCS.system.js.map → p-BxORDCZ3.system.js.map} +1 -1
- package/dist/twilight/{p-C3l3EpVC.system.js.map → p-ByNC3ygM.system.js.map} +1 -1
- package/dist/twilight/{p-DbkDylL6.system.js.map → p-C-vbYsMC.system.js.map} +1 -1
- package/dist/twilight/{p-BSHk_PNC.system.js.map → p-C9DFiJHW.system.js.map} +1 -1
- package/dist/twilight/{p-7HslI1sO.system.js.map → p-CB3G0Z8y.system.js.map} +1 -1
- package/dist/twilight/{p-Chh9LXws.system.js.map → p-CDmxJQ_1.system.js.map} +1 -1
- package/dist/twilight/{p-CbFmk86R.system.js.map → p-CNqFfslE.system.js.map} +1 -1
- package/dist/twilight/{p-63hxYOEG.system.js.map → p-CVW8a0jw.system.js.map} +1 -1
- package/dist/twilight/{p-DoomSogT.system.js.map → p-CZGaqTus.system.js.map} +1 -1
- package/dist/twilight/{p-Dohhf_R_.system.js.map → p-CaCB348j.system.js.map} +1 -1
- package/dist/twilight/{p-B6pAHU4P.system.js.map → p-Cc6e2YrQ.system.js.map} +1 -1
- package/dist/twilight/{p-CHKd1ZbK.system.js.map → p-Ccj70VFr.system.js.map} +1 -1
- package/dist/twilight/{p-YRdrauTw.system.js.map → p-CgDN9ZEV.system.js.map} +1 -1
- package/dist/twilight/{p-BaUsKGrq.system.js.map → p-CiGTTlgd.system.js.map} +1 -1
- package/dist/twilight/{p-B-6fJi1f.system.js.map → p-Cs3Irr4v.system.js.map} +1 -1
- package/dist/twilight/{p-aC-cHVMV.js → p-D4D34Ujk.js} +3 -3
- package/dist/twilight/p-D4D34Ujk.js.map +1 -0
- package/dist/twilight/{p-CBqvheHa.system.js → p-DMKkUrkS.system.js} +2 -2
- package/dist/twilight/{p-CBqvheHa.system.js.map → p-DMKkUrkS.system.js.map} +1 -1
- package/dist/twilight/{p-cW_hSk8i.js → p-DNiQ_YXx.js} +2 -2
- package/dist/twilight/{p-cW_hSk8i.js.map → p-DNiQ_YXx.js.map} +1 -1
- package/dist/twilight/{p-DOCHKq2e.system.js.map → p-DVnmchft.system.js.map} +1 -1
- package/dist/twilight/{p-D74Dhmc1.system.js.map → p-Daef3WlT.system.js.map} +1 -1
- package/dist/twilight/{p-DobF7Qkv.system.js.map → p-DlRNuq8n.system.js.map} +1 -1
- package/dist/twilight/{p-Cie2T8Bo.system.js.map → p-DvrwOwqK.system.js.map} +1 -1
- package/dist/twilight/{p-Bl7BRAvB.system.js → p-DxRZfb-O.system.js} +2 -2
- package/dist/twilight/{p-Bl7BRAvB.system.js.map → p-DxRZfb-O.system.js.map} +1 -1
- package/dist/twilight/{p-o3nk7iqR.system.js.map → p-O_6m6zp3.system.js.map} +1 -1
- package/dist/twilight/{p-BZAlfa8A.system.js.map → p-OzJ9XEsV.system.js.map} +1 -1
- package/dist/twilight/{p-a3gxDXSb.system.js.map → p-TrPvZWq-.system.js.map} +1 -1
- package/dist/twilight/{p-b75d729a.system.entry.js → p-a18f81a8.system.entry.js} +2 -2
- package/dist/twilight/{p-92a2ce11.system.entry.js → p-a1d102d3.system.entry.js} +2 -2
- package/dist/twilight/{p-f777295c.system.entry.js → p-aad20f10.system.entry.js} +2 -2
- package/dist/twilight/{p-2f85174e.system.entry.js → p-ab7cc63a.system.entry.js} +2 -2
- package/dist/twilight/{p-b9a992c8.system.entry.js → p-ad0fedcd.system.entry.js} +2 -2
- package/dist/twilight/{p-3e82f611.entry.js → p-c0363ba7.entry.js} +2 -2
- package/dist/twilight/{p-779536eb.entry.js → p-c84819d5.entry.js} +2 -2
- package/dist/twilight/{p-49051076.system.entry.js → p-c87d6aa6.system.entry.js} +2 -2
- package/dist/twilight/{p-6a16b86d.system.entry.js → p-c9678188.system.entry.js} +2 -2
- package/dist/twilight/{p-9c2bf5c2.entry.js → p-d0004953.entry.js} +2 -2
- package/dist/twilight/{p-b7bb5a85.system.entry.js → p-d097a67d.system.entry.js} +2 -2
- package/dist/twilight/{p-47fc4553.entry.js → p-d15630dd.entry.js} +2 -2
- package/dist/twilight/{p-04b3d375.entry.js → p-d513da6f.entry.js} +2 -2
- package/dist/twilight/{p-a94e5163.entry.js → p-d5750810.entry.js} +2 -2
- package/dist/twilight/{p-3407c5ef.entry.js → p-d84eb47c.entry.js} +2 -2
- package/dist/twilight/{p-18bd19bd.entry.js → p-dd83a408.entry.js} +2 -2
- package/dist/twilight/{p-D1othg3r.system.js.map → p-e-FAhVeu.system.js.map} +1 -1
- package/dist/twilight/{p-6943af29.system.entry.js → p-e2ab2b64.system.entry.js} +2 -2
- package/dist/twilight/{p-5054fc18.entry.js → p-e784d087.entry.js} +2 -2
- package/dist/twilight/{p-56628b3c.system.entry.js → p-e823d4e8.system.entry.js} +2 -2
- package/dist/twilight/{p-2d2fce30.system.entry.js → p-e9bc1fa4.system.entry.js} +2 -2
- package/dist/twilight/{p-e5cd34c3.system.entry.js → p-ebd4ac51.system.entry.js} +2 -2
- package/dist/twilight/{p-a5b4c38f.system.entry.js → p-ef38f4ac.system.entry.js} +2 -2
- package/dist/twilight/{p-efcf803a.entry.js → p-f57bcc51.entry.js} +2 -2
- package/dist/twilight/{p-b0584206.entry.js → p-f745fcad.entry.js} +2 -2
- package/dist/twilight/{p-af7ace10.entry.js → p-fbe10567.entry.js} +2 -2
- package/dist/twilight/p-fcc64f6d.entry.js +5 -0
- package/dist/twilight/{p-DFTLMdWL.system.js.map → p-ofxyuLsh.system.js.map} +1 -1
- package/dist/twilight/{p-De28Pl5h.system.js.map → p-u0que_SA.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-CxIOfeMA.js.map +0 -1
- package/dist/esm/index-aC-cHVMV.js.map +0 -1
- package/dist/esm-es5/index-aC-cHVMV.js.map +0 -1
- package/dist/twilight/p-03f5a937.entry.js +0 -5
- package/dist/twilight/p-61471a8d.system.entry.js +0 -5
- package/dist/twilight/p-8d02af0b.system.entry.js +0 -5
- package/dist/twilight/p-9b7b035c.entry.js +0 -5
- package/dist/twilight/p-9cvlynxW.system.js.map +0 -1
- package/dist/twilight/p-aC-cHVMV.js.map +0 -1
- /package/dist/twilight/{p-939b203a.system.entry.js.map → p-06b95a05.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-75203eae.entry.js.map → p-1055f2fb.entry.js.map} +0 -0
- /package/dist/twilight/{p-8c2a97cf.system.entry.js.map → p-13324cdd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9b7b035c.entry.js.map → p-154fc672.entry.js.map} +0 -0
- /package/dist/twilight/{p-7e1c3fd9.entry.js.map → p-17c50686.entry.js.map} +0 -0
- /package/dist/twilight/{p-98ca67d7.entry.js.map → p-17ee3d18.entry.js.map} +0 -0
- /package/dist/twilight/{p-1b9e31b1.system.entry.js.map → p-1a9eebb6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-29440936.system.entry.js.map → p-1b24ea99.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a3c00836.entry.js.map → p-2ae75a1c.entry.js.map} +0 -0
- /package/dist/twilight/{p-fabacea5.system.entry.js.map → p-2af0da5a.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9f75e64f.entry.js.map → p-2ecf868e.entry.js.map} +0 -0
- /package/dist/twilight/{p-7f9f9400.system.entry.js.map → p-3483eb09.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0d0836f3.entry.js.map → p-396198a2.entry.js.map} +0 -0
- /package/dist/twilight/{p-3fb416fa.entry.js.map → p-3eaddcf1.entry.js.map} +0 -0
- /package/dist/twilight/{p-9297d5d0.system.entry.js.map → p-407d19d8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-61471a8d.system.entry.js.map → p-40e20722.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4a4cad07.system.entry.js.map → p-423d91f5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0e931dd0.system.entry.js.map → p-442340d3.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8a55a076.entry.js.map → p-45b61475.entry.js.map} +0 -0
- /package/dist/twilight/{p-94b99a34.entry.js.map → p-4af5ffea.entry.js.map} +0 -0
- /package/dist/twilight/{p-e1a599fb.system.entry.js.map → p-4d6baea7.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3b207dc4.system.entry.js.map → p-553bc6b4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-92fb3adc.entry.js.map → p-5542a867.entry.js.map} +0 -0
- /package/dist/twilight/{p-3438bc0c.entry.js.map → p-58085711.entry.js.map} +0 -0
- /package/dist/twilight/{p-1d08e23e.system.entry.js.map → p-5b882c52.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f9735e19.system.entry.js.map → p-60bf8746.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0443edb2.entry.js.map → p-63a5bdc6.entry.js.map} +0 -0
- /package/dist/twilight/{p-d01c0575.entry.js.map → p-63cba8e3.entry.js.map} +0 -0
- /package/dist/twilight/{p-21c35fec.entry.js.map → p-648fb6ca.entry.js.map} +0 -0
- /package/dist/twilight/{p-65d9d657.entry.js.map → p-669db4df.entry.js.map} +0 -0
- /package/dist/twilight/{p-70688702.entry.js.map → p-6a0b5799.entry.js.map} +0 -0
- /package/dist/twilight/{p-08b3ea63.system.entry.js.map → p-6b716e82.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e29eb090.system.entry.js.map → p-6e24a5f0.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4d318ffc.system.entry.js.map → p-7234c5f2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b1f25cb5.system.entry.js.map → p-7eff7dc5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-342eda73.entry.js.map → p-81aeef6a.entry.js.map} +0 -0
- /package/dist/twilight/{p-8d02af0b.system.entry.js.map → p-8213a9ef.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-56074b1e.entry.js.map → p-8359eb2a.entry.js.map} +0 -0
- /package/dist/twilight/{p-09117f81.system.entry.js.map → p-8c0822f7.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5dda0431.entry.js.map → p-95adf84e.entry.js.map} +0 -0
- /package/dist/twilight/{p-b75d729a.system.entry.js.map → p-a18f81a8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-92a2ce11.system.entry.js.map → p-a1d102d3.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f777295c.system.entry.js.map → p-aad20f10.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2f85174e.system.entry.js.map → p-ab7cc63a.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b9a992c8.system.entry.js.map → p-ad0fedcd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3e82f611.entry.js.map → p-c0363ba7.entry.js.map} +0 -0
- /package/dist/twilight/{p-779536eb.entry.js.map → p-c84819d5.entry.js.map} +0 -0
- /package/dist/twilight/{p-49051076.system.entry.js.map → p-c87d6aa6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6a16b86d.system.entry.js.map → p-c9678188.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9c2bf5c2.entry.js.map → p-d0004953.entry.js.map} +0 -0
- /package/dist/twilight/{p-b7bb5a85.system.entry.js.map → p-d097a67d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-47fc4553.entry.js.map → p-d15630dd.entry.js.map} +0 -0
- /package/dist/twilight/{p-04b3d375.entry.js.map → p-d513da6f.entry.js.map} +0 -0
- /package/dist/twilight/{p-a94e5163.entry.js.map → p-d5750810.entry.js.map} +0 -0
- /package/dist/twilight/{p-3407c5ef.entry.js.map → p-d84eb47c.entry.js.map} +0 -0
- /package/dist/twilight/{p-18bd19bd.entry.js.map → p-dd83a408.entry.js.map} +0 -0
- /package/dist/twilight/{p-6943af29.system.entry.js.map → p-e2ab2b64.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5054fc18.entry.js.map → p-e784d087.entry.js.map} +0 -0
- /package/dist/twilight/{p-56628b3c.system.entry.js.map → p-e823d4e8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2d2fce30.system.entry.js.map → p-e9bc1fa4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e5cd34c3.system.entry.js.map → p-ebd4ac51.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a5b4c38f.system.entry.js.map → p-ef38f4ac.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-efcf803a.entry.js.map → p-f57bcc51.entry.js.map} +0 -0
- /package/dist/twilight/{p-b0584206.entry.js.map → p-f745fcad.entry.js.map} +0 -0
- /package/dist/twilight/{p-af7ace10.entry.js.map → p-fbe10567.entry.js.map} +0 -0
- /package/dist/twilight/{p-03f5a937.entry.js.map → p-fcc64f6d.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(r,t,e,i){function n(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,a){function s(r){try{o(i.next(r))}catch(r){a(r)}}function u(r){try{o(i["throw"](r))}catch(r){a(r)}}function o(r){r.done?e(r.value):n(r.value).then(s,u)}o((i=i.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(r){return function(t){return o([r,t])}}function o(u){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(i=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;n=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1];a=u;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(u);break}if(a[2])e.ops.pop();e.trys.pop();continue}u=t.call(r,e)}catch(r){u=[6,r];n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,a;i<n;i++){if(a||!(i in t)){if(!a)a=Array.prototype.slice.call(t,0,i);a[i]=t[i]}}return r.concat(a||Array.prototype.slice.call(t))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-9cvlynxW.system.js","./p-B8FGqfEh.system.js","./p-CzwwMHuN.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var w;var g;function y(){if(g)return w;g=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}w=e;return w}var m;var b;function _(){if(b)return m;b=1;var r=y(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}m=l;return m}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,w=false,g=false,y=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){w=!!o.leading;g="maxWait"in o;c=g?a(i(o.maxWait)||0,u):c;y="trailing"in o?!!o.trailing:y}function m(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return w?m(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return g?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||g&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(y&&f){return m(r)}f=l=undefined;return v}function x(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function E(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(g){clearTimeout(h);h=setTimeout(T,u);return m(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=x;M.flush=E;return M}k=u;return k}var x;var E;function M(){if(E)return x;E=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}x=n;return x}var S=M();var j=n(S);var C=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=j((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=z(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function z(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var L=":host{display:block}";var q=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new C(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},s("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},s("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},s("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());q.style=L}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-B0xoNOFR.system.js","./p-B8FGqfEh.system.js","./p-CzwwMHuN.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var w;var g;function m(){if(g)return w;g=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}w=e;return w}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,w=false,g=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){w=!!o.leading;g="maxWait"in o;c=g?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return w?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return g?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||g&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function x(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function E(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(g){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=x;M.flush=E;return M}k=u;return k}var x;var E;function M(){if(E)return x;E=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}x=n;return x}var S=M();var j=n(S);var C=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=j((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=z(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function z(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var F=":host{display:block}";var L=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new C(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},s("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},s("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},s("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());L.style=F}}}));
|
|
5
|
+
//# sourceMappingURL=p-a18f81a8.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(r,t,e,i){function n(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,s){function o(r){try{l(i.next(r))}catch(r){s(r)}}function a(r){try{l(i["throw"](r))}catch(r){s(r)}}function l(r){r.done?e(r.value):n(r.value).then(o,a)}l((i=i.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(r){return function(t){return l([r,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(e=0)),e)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;n=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){e.label=a[1];break}if(a[0]===6&&e.label<s[1]){e.label=s[1];s=a;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(a);break}if(s[2])e.ops.pop();e.trys.pop();continue}a=t.call(r,e)}catch(r){a=[6,r];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,s;i<n;i++){if(s||!(i in t)){if(!s)s=Array.prototype.slice.call(t,0,i);s[i]=t[i]}}return r.concat(s||Array.prototype.slice.call(t))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-9cvlynxW.system.js"],(function(r){"use strict";var t,e,i;return{setters:[function(r){t=r.r;e=r.h;i=r.H}],execute:function(){var n;(function(r){r["PERCENTAGE"]="percentage";r["FIXED"]="fixed"})(n||(n={}));var s='<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 a='<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>';var f={staticIcons:[s,o,a,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};var u=function(){function r(){}r.findTierByIndex=function(r,t){return r.find((function(r){return r.index===t}))||null};r.findTierByName=function(r,t){return r.find((function(r){return r.tier_name===t}))||null};r.getTierNameByIndex=function(r,t){var e;return(e=this.findTierByIndex(r,t))===null||e===void 0?void 0:e.tier_name};r.findCurrentTierIndex=function(r,t){if(!t)return 0;for(var e=t.length-1;e>=0;e--){if(r>=t[e].threshold){return t[e].index}}return 0};return r}();var c=".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)}";var d=r("salla_tiered_offer",function(){function r(r){var e=this;t(this,r);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=function(r){e.activeTabTier=r};salla.lang.onLoaded((function(){e.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");e.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");e.discountText=salla.lang.get("blocks.tiered_offer.discount");e.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t;return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,3,4,5]);return[4,salla.onReady()];case 1:e.sent();if(!this.checkFeatureEnabled()){return[2]}if(!this.checkCartExists()){return[2]}this.isLoading=true;return[4,this.fetchTieredOfferData()];case 2:r=e.sent();if(!r){return[2]}this.initializeComponent(r);return[3,5];case 3:t=e.sent();this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",t);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};r.prototype.checkFeatureEnabled=function(){var r;return(r=salla.config.get("store.features"))===null||r===void 0?void 0:r.includes("tiered-offer")};r.prototype.checkCartExists=function(){var r,t;return!!((t=(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.summary)===null||t===void 0?void 0:t.count)};r.prototype.validateCouponCompatibility=function(r,t){var e;return!(t&&!((e=r.details)===null||e===void 0?void 0:e.applied_with_coupon))};r.prototype.fetchTieredOfferData=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,salla.api.cart.offers()];case 1:t=n.sent().data;e=t.find((function(r){return r.type==="tiered_offer"}));if(!e){return[2,null]}if(!this.validateCouponCompatibility(e,(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.coupon)){this.canRender=false;return[2,null]}return[2,e];case 2:i=n.sent();throw i;case 3:return[2]}}))}))};r.prototype.initializeComponent=function(r){var t;this.apiOfferData=r;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;var e=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;var i=this.findCurrentTierIndex(e);if(i===0){this.canRender=false;return}this.currentTierIndex=i;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,i);this.activeTabTier=this.currentTier;this.canRender=true};r.prototype.componentDidLoad=function(){var r=this;salla.event.on("cart::updated",(function(t){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.fetchTieredOfferData()];case 1:r=e.sent();if(r){this.updateOfferValues(t,r)}return[2]}}))}))}))};r.prototype.mapApiDataToTiers=function(r){var t=__spreadArray([],r.details.discounts,true).sort((function(r,t){return r.min_spend-t.min_spend}));var e=t.map((function(r,t){return{name:r.name,tier_name:r.name,discount:r.type===n.PERCENTAGE?"".concat(salla.helpers.number(r.value),"%"):salla.money(r.value),icon:f.staticIcons[t]||f.staticIcons[0],threshold:r.min_spend,text_color:f.staticColors[t],index:t+1}}));return{current_tier:u.getTierNameByIndex(e,this.findCurrentTierIndex(r.details.current_value,e)),tiers:e}};r.prototype.findCurrentTierIndex=function(r,t){var e;if(t===void 0){t=(e=this.tieredOfferData)===null||e===void 0?void 0:e.tiers}return u.findCurrentTierIndex(r,t||[])};r.prototype.updateOfferValues=function(r,t){var e,i;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,r.coupon)){this.canRender=false;return}this.canRender=true;if(((e=t.details)===null||e===void 0?void 0:e.with_current_cart)===false){return}var n=((i=t.details)===null||i===void 0?void 0:i.current_value)||0;this.apiOfferData=t;var s=this.findCurrentTierIndex(n);if(s===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=s;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,s);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}};r.prototype.getLoadingSkeletonView=function(){return e(i,null,e("div",{class:"s-tiered-offer-container"},e("div",{class:"s-tiered-offer-skeleton-wrapper"},e("div",{class:"s-tiered-offer-skeleton-title"},e("salla-skeleton",{height:"16px",width:"40%"})),e("div",{class:"s-tiered-offer-skeleton-subtitle"},e("salla-skeleton",{height:"20px",width:"60%"})),e("div",{class:"s-tiered-offer-skeleton-progress"},e("salla-skeleton",{height:"16px",width:"100%"})),e("div",{class:"s-tiered-offer-skeleton-tabs"},e("salla-skeleton",{height:"50px",width:"100%"})))))};r.prototype.getCurrentTierData=function(){return u.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]};r.prototype.getProgressWidth=function(){var r;var t=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;var e=this.tieredOfferData.tiers.length;var i=this.findCurrentTierIndex(t);var n=i;return n/e*100};r.prototype.calculateMilestonePosition=function(r,t){if(t===1){return"calc(100% - 18px)"}var e=(r+1)/t*100;var i=8/t;return"".concat(Math.max(2,Math.min(95,e-i)),"%")};r.prototype.getMilestoneStyles=function(r,t,e){var i;var n=document.documentElement.dir==="rtl";var s=this.calculateMilestonePosition(t,e);var o=r.name.length>6?"flex-end":"center";return i={},i[n?"right":"left"]=s,i.alignItems=o,i.position="absolute",i.transform=n?"translateX(50%)":"translateX(-50%)",i};r.prototype.getMilestoneIconStyles=function(r,t,e){if(t){return{color:r.text_color}}if(e){return{color:"var(--color-primary)"}}return{}};r.prototype.renderProgressBarBackground=function(r){return[e("div",{class:"s-tiered-offer-progress-bg"}),e("div",{class:"s-tiered-offer-progress-fill",style:{width:"".concat(r,"%")}})]};r.prototype.renderMilestoneIcon=function(r,t,i){var n=["s-tiered-offer-milestone-icon",t?"s-tiered-offer-milestone-active":"",i?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return e("div",{class:n,style:this.getMilestoneIconStyles(r,t,i)},e("span",{innerHTML:r.icon}))};r.prototype.renderMilestoneName=function(r,t){return e("div",{class:"s-tiered-offer-milestone-name"},t&&e("span",{style:{color:r.text_color}},r.name))};r.prototype.renderMilestones=function(r,t){var i=this;var n=t===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return e("div",{class:"s-tiered-offer-milestones-wrapper"},e("div",{class:n},this.tieredOfferData.tiers.map((function(n,s){var o=r>=n.threshold;var a=n.tier_name===i.currentTier;return e("div",{class:"s-tiered-offer-milestone",style:i.getMilestoneStyles(n,s,t)},i.renderMilestoneIcon(n,a,o),i.renderMilestoneName(n,a))}))))};r.prototype.renderProgressBar=function(){var r;var t=this.getProgressWidth();var i=this.tieredOfferData.tiers.length;var n=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;return e("div",{class:"s-tiered-offer-progress-container"},e("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(t),this.renderMilestones(n,i)))};r.prototype.renderTabs=function(){var r=this;return e("div",{class:"s-tiered-offer-tabs-container"},e("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((function(t){var i=t.tier_name===r.activeTabTier;return e("button",{class:"s-tiered-offer-tab-header ".concat(i?"s-tiered-offer-tab-active":""),onClick:function(){return r.handleTabClick(t.tier_name)}},e("span",null,t.name))}))),e("div",{class:"s-tiered-offer-tab-content-wrapper"},function(){var t=u.findTierByName(r.tieredOfferData.tiers,r.activeTabTier);if(!t)return null;return e("div",{class:"s-tiered-offer-tab-content"},e("div",{class:"s-tiered-offer-tab-content-inner"},e("div",{class:"s-tiered-offer-discount-section"},e("p",{class:"s-tiered-offer-discount-title"},r.discountText," ",e("span",{innerHTML:t.discount})),e("p",{class:"s-tiered-offer-benefit-description"},r.benefitText," ",t.name))))}()))};r.prototype.render=function(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}var r=this.getCurrentTierData();return e(i,null,e("div",{class:"s-tiered-offer-container"},e("div",{class:"s-tiered-offer-header"},e("div",{class:"s-tiered-offer-header-content"},e("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),e("div",{class:"s-tiered-offer-current-tier-name-wrapper"},e("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",e("span",{class:"s-tiered-offer-tier-name"},r.name)),e("span",{innerHTML:r.icon})))),this.renderProgressBar(),this.renderTabs()))};return r}());d.style=c}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-B0xoNOFR.system.js"],(function(r){"use strict";var t,e,i;return{setters:[function(r){t=r.r;e=r.h;i=r.H}],execute:function(){var n;(function(r){r["PERCENTAGE"]="percentage";r["FIXED"]="fixed"})(n||(n={}));var s='<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 a='<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>';var f={staticIcons:[s,o,a,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};var u=function(){function r(){}r.findTierByIndex=function(r,t){return r.find((function(r){return r.index===t}))||null};r.findTierByName=function(r,t){return r.find((function(r){return r.tier_name===t}))||null};r.getTierNameByIndex=function(r,t){var e;return(e=this.findTierByIndex(r,t))===null||e===void 0?void 0:e.tier_name};r.findCurrentTierIndex=function(r,t){if(!t)return 0;for(var e=t.length-1;e>=0;e--){if(r>=t[e].threshold){return t[e].index}}return 0};return r}();var c=".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)}";var d=r("salla_tiered_offer",function(){function r(r){var e=this;t(this,r);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=function(r){e.activeTabTier=r};salla.lang.onLoaded((function(){e.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");e.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");e.discountText=salla.lang.get("blocks.tiered_offer.discount");e.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t;return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,3,4,5]);return[4,salla.onReady()];case 1:e.sent();if(!this.checkFeatureEnabled()){return[2]}if(!this.checkCartExists()){return[2]}this.isLoading=true;return[4,this.fetchTieredOfferData()];case 2:r=e.sent();if(!r){return[2]}this.initializeComponent(r);return[3,5];case 3:t=e.sent();this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",t);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};r.prototype.checkFeatureEnabled=function(){var r;return(r=salla.config.get("store.features"))===null||r===void 0?void 0:r.includes("tiered-offer")};r.prototype.checkCartExists=function(){var r,t;return!!((t=(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.summary)===null||t===void 0?void 0:t.count)};r.prototype.validateCouponCompatibility=function(r,t){var e;return!(t&&!((e=r.details)===null||e===void 0?void 0:e.applied_with_coupon))};r.prototype.fetchTieredOfferData=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,salla.api.cart.offers()];case 1:t=n.sent().data;e=t.find((function(r){return r.type==="tiered_offer"}));if(!e){return[2,null]}if(!this.validateCouponCompatibility(e,(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.coupon)){this.canRender=false;return[2,null]}return[2,e];case 2:i=n.sent();throw i;case 3:return[2]}}))}))};r.prototype.initializeComponent=function(r){var t;this.apiOfferData=r;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;var e=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;var i=this.findCurrentTierIndex(e);if(i===0){this.canRender=false;return}this.currentTierIndex=i;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,i);this.activeTabTier=this.currentTier;this.canRender=true};r.prototype.componentDidLoad=function(){var r=this;salla.event.on("cart::updated",(function(t){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.fetchTieredOfferData()];case 1:r=e.sent();if(r){this.updateOfferValues(t,r)}return[2]}}))}))}))};r.prototype.mapApiDataToTiers=function(r){var t=__spreadArray([],r.details.discounts,true).sort((function(r,t){return r.min_spend-t.min_spend}));var e=t.map((function(r,t){return{name:r.name,tier_name:r.name,discount:r.type===n.PERCENTAGE?"".concat(salla.helpers.number(r.value),"%"):salla.money(r.value),icon:f.staticIcons[t]||f.staticIcons[0],threshold:r.min_spend,text_color:f.staticColors[t],index:t+1}}));return{current_tier:u.getTierNameByIndex(e,this.findCurrentTierIndex(r.details.current_value,e)),tiers:e}};r.prototype.findCurrentTierIndex=function(r,t){var e;if(t===void 0){t=(e=this.tieredOfferData)===null||e===void 0?void 0:e.tiers}return u.findCurrentTierIndex(r,t||[])};r.prototype.updateOfferValues=function(r,t){var e,i;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,r.coupon)){this.canRender=false;return}this.canRender=true;if(((e=t.details)===null||e===void 0?void 0:e.with_current_cart)===false){return}var n=((i=t.details)===null||i===void 0?void 0:i.current_value)||0;this.apiOfferData=t;var s=this.findCurrentTierIndex(n);if(s===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=s;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,s);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}};r.prototype.getLoadingSkeletonView=function(){return e(i,null,e("div",{class:"s-tiered-offer-container"},e("div",{class:"s-tiered-offer-skeleton-wrapper"},e("div",{class:"s-tiered-offer-skeleton-title"},e("salla-skeleton",{height:"16px",width:"40%"})),e("div",{class:"s-tiered-offer-skeleton-subtitle"},e("salla-skeleton",{height:"20px",width:"60%"})),e("div",{class:"s-tiered-offer-skeleton-progress"},e("salla-skeleton",{height:"16px",width:"100%"})),e("div",{class:"s-tiered-offer-skeleton-tabs"},e("salla-skeleton",{height:"50px",width:"100%"})))))};r.prototype.getCurrentTierData=function(){return u.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]};r.prototype.getProgressWidth=function(){var r;var t=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;var e=this.tieredOfferData.tiers.length;var i=this.findCurrentTierIndex(t);var n=i;return n/e*100};r.prototype.calculateMilestonePosition=function(r,t){if(t===1){return"calc(100% - 18px)"}var e=(r+1)/t*100;var i=8/t;return"".concat(Math.max(2,Math.min(95,e-i)),"%")};r.prototype.getMilestoneStyles=function(r,t,e){var i;var n=document.documentElement.dir==="rtl";var s=this.calculateMilestonePosition(t,e);var o=r.name.length>6?"flex-end":"center";return i={},i[n?"right":"left"]=s,i.alignItems=o,i.position="absolute",i.transform=n?"translateX(50%)":"translateX(-50%)",i};r.prototype.getMilestoneIconStyles=function(r,t,e){if(t){return{color:r.text_color}}if(e){return{color:"var(--color-primary)"}}return{}};r.prototype.renderProgressBarBackground=function(r){return[e("div",{class:"s-tiered-offer-progress-bg"}),e("div",{class:"s-tiered-offer-progress-fill",style:{width:"".concat(r,"%")}})]};r.prototype.renderMilestoneIcon=function(r,t,i){var n=["s-tiered-offer-milestone-icon",t?"s-tiered-offer-milestone-active":"",i?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return e("div",{class:n,style:this.getMilestoneIconStyles(r,t,i)},e("span",{innerHTML:r.icon}))};r.prototype.renderMilestoneName=function(r,t){return e("div",{class:"s-tiered-offer-milestone-name"},t&&e("span",{style:{color:r.text_color}},r.name))};r.prototype.renderMilestones=function(r,t){var i=this;var n=t===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return e("div",{class:"s-tiered-offer-milestones-wrapper"},e("div",{class:n},this.tieredOfferData.tiers.map((function(n,s){var o=r>=n.threshold;var a=n.tier_name===i.currentTier;return e("div",{class:"s-tiered-offer-milestone",style:i.getMilestoneStyles(n,s,t)},i.renderMilestoneIcon(n,a,o),i.renderMilestoneName(n,a))}))))};r.prototype.renderProgressBar=function(){var r;var t=this.getProgressWidth();var i=this.tieredOfferData.tiers.length;var n=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;return e("div",{class:"s-tiered-offer-progress-container"},e("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(t),this.renderMilestones(n,i)))};r.prototype.renderTabs=function(){var r=this;return e("div",{class:"s-tiered-offer-tabs-container"},e("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((function(t){var i=t.tier_name===r.activeTabTier;return e("button",{class:"s-tiered-offer-tab-header ".concat(i?"s-tiered-offer-tab-active":""),onClick:function(){return r.handleTabClick(t.tier_name)}},e("span",null,t.name))}))),e("div",{class:"s-tiered-offer-tab-content-wrapper"},function(){var t=u.findTierByName(r.tieredOfferData.tiers,r.activeTabTier);if(!t)return null;return e("div",{class:"s-tiered-offer-tab-content"},e("div",{class:"s-tiered-offer-tab-content-inner"},e("div",{class:"s-tiered-offer-discount-section"},e("p",{class:"s-tiered-offer-discount-title"},r.discountText," ",e("span",{innerHTML:t.discount})),e("p",{class:"s-tiered-offer-benefit-description"},r.benefitText," ",t.name))))}()))};r.prototype.render=function(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}var r=this.getCurrentTierData();return e(i,null,e("div",{class:"s-tiered-offer-container"},e("div",{class:"s-tiered-offer-header"},e("div",{class:"s-tiered-offer-header-content"},e("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),e("div",{class:"s-tiered-offer-current-tier-name-wrapper"},e("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",e("span",{class:"s-tiered-offer-tier-name"},r.name)),e("span",{innerHTML:r.icon})))),this.renderProgressBar(),this.renderTabs()))};return r}());d.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-a1d102d3.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-B0xoNOFR.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:"e257e65621d724438fd4fdd74cdec45596a81cd0"},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:"097faf8d72b3c441bc22041a5643f91f61bbdd40",class:"flex justify-center items-center"},n("div",{key:"6adaa2b16c015de4ab5e254d4a9be05bb65b7848",class:"relative max-w-xl w-full"},n("div",{key:"3667d98c1e0886fc31600d23dd5a41a18d5ff8d0",class:"s-price-range-inputs"},n("div",{key:"98fdc0fdc9632318daa4664d4798154a17fe700a",class:"s-price-range-relative"},n("div",{key:"addd7b56c1e2496dba50db7ec320f8f5ea129d42",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"d36e129fd777ccfe30cf8d974dd96cf82e64c805",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:"b1fcc176d31d724c646291262e42c6a74e75f299",class:"s-price-range-gray-text"}," -"),n("div",{key:"93db8728b9f118be78549c6839a4d85d4664a3dc",class:"s-price-range-relative"},n("div",{key:"7b63ca0ffd946d34549768bf87876868842478a4",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"ba005f3834bc2179e1346cae746b7c734abaf0dd",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:"74283ca210bf2f85a4e5d7dde69372e55453a5a5",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},n("span",{key:"04600f026e465f96f98d54841e8c7bd7d1c849bd",innerHTML:this.isRTL?s:a}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}());l.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-aad20f10.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-B0xoNOFR.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-ab7cc63a.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,a,i,e){function n(t){return t instanceof i?t:new i((function(a){a(t)}))}return new(i||(i=Promise))((function(i,r){function s(t){try{l(e.next(t))}catch(t){r(t)}}function o(t){try{l(e["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):n(t.value).then(s,o)}l((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(a){return l([t,a])}}function l(o){if(e)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(i=0)),i)try{if(e=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=a.call(t,i)}catch(t){o=[6,t];n=0}finally{e=r=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-9cvlynxW.system.js"],(function(t){"use strict";var a,i,e,n;return{setters:[function(t){a=t.r;i=t.h;e=t.H;n=t.g}],execute:function(){var r="salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:-ms-flexbox;display:flex;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";var s=t("salla_installment",function(){function t(t){a(this,t);this.tabbyBorderRemoved=false;this.tabbyRemoveBorderTries=0;this.language=salla.config.get("user.language_code");this.currency=salla.config.get("user.currency_code");this.country=salla.config.get("user.country_code");this.installment_sheria_text=function(t,a){return salla.lang.get(t,a)}}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a;var i=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();return[4,salla.lang.onLoaded()];case 2:e.sent();this.currency=salla.config.get("user.currency_code")||"SAR";this.language=salla.config.get("user.language_code")||"ar";this.country=salla.config.get("user.country_code")||"SA";t=[{key:"pages.products.installments",installments:3},{key:"pages.products.installments_emkan",installments:5}];t.forEach((function(t){i.installment_sheria_text(t.key,{payment:salla.money(parseFloat(i.price)),amount:salla.money((parseFloat(i.price)/t.installments).toFixed(2)).replace(/\.00$/,""),installments:t.installments})}));a=salla.config.get("store.settings.installments");if(a){this.tamaraIsActive=a.tamara;this.tabbyIsActive=a.tabby;this.spotiiIsActive=a.spotii;this.mispayActive=a.mispay;this.emkanIsActive=a.emkan;this.madfuActive=a.madfu;this.rajehiIsActive=a.mokafaa_alrajhi}salla.event.on("product::price.updated",(function(t){var a=t.data;if(!a.price||a.price==i.price){return}i.price=a.price;i.renderInstallments(true)}));return[2]}}))}))};t.prototype.componentDidLoad=function(){this.renderInstallments()};t.prototype.render=function(){var t;var a=this.currency==="SAR";if(!this.isValidPrice(this.price)){return""}return i(e,null,this.tamaraIsActive&&(((t=this.tamaraIsActive)===null||t===void 0?void 0:t.publicKey)?i("div",{class:"mb-5"},i("tamara-widget",{type:"tamara-summary","inline-type":"2",amount:this.price})):i("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"})),this.tabbyIsActive?i("div",{id:"tabbyPromoWrapper"},i("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?i("div",{class:"spotii-wrapper"},i("div",{class:"spotii-promo"})):"",this.shouldShowMispay()&&(this.mispayActive.publicKey?i("div",{class:"mb-5"},i("mispay-widget",{amount:this.price,lang:this.language})):i("div",{class:"s-installment-mispay-wrapper"},i("div",{class:"s-installment-mispay-content"},i("img",{src:salla.url.cdn("images/payment/png/mispay.png"),alt:"mispay"}),i("span",{class:"s-installment-mispay-content-text",innerHTML:this.installment_sheria_text("pages.products.installments",{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/4).toFixed(2)),installments:4})})))),this.emkanIsActive&&this.currency==="SAR"?i("div",{class:"s-installment-emkan-wrapper"},i("div",{class:"s-installment-emkan-content"},i("img",{src:salla.url.cdn("images/payment/png/emkan.png"),alt:"emkan"}),i("span",{class:"s-installment-emkan-content-text",innerHTML:this.installment_sheria_text("pages.products.installments_emkan",{payment:salla.money(parseFloat(this.price)),installments:5})}))):"",this.madfuActive&&this.currency==="SAR"?i("div",{class:"s-installment-madfu-wrapper"},i("div",{class:"s-installment-madfu-content"},i("img",{src:salla.url.cdn("images/payment/png/madfu.png"),alt:"madfu"}),i("span",{class:"s-installment-madfu-content-text"},salla.lang.get("pages.products.installments_madfu")))):"",a&&this.rajehiIsActive?i("div",{class:"s-installment-rajehi-wrapper"},i("div",{class:"s-installment-rajehi-content"},i("img",{src:salla.url.cdn("images/payment/png/mokafaa_alrajhi_loyalty.png"),alt:"mokafaa_alrajhi_loyalty"}),i("span",{class:"s-installment-rajehi-content-text"},salla.lang.get("pages.products.rajahi_earn_points",{points:Math.floor(+this.price*this.rajehiIsActive.pointsPerRiyal)})))):"")};t.prototype.renderInstallments=function(t){var a=this;if(t===void 0){t=false}if(!this.isValidPrice(this.price)){return}if(this.tamaraIsActive){this.loadTamara({isUpdating:t})}if(this.tabbyIsActive){if(t){var i=this.host.querySelector("#tabbyPromoWrapper");if(i){i.remove()}var e=document.createElement("div");e.setAttribute("id","tabbyPromoWrapper");var n=document.createElement("div");n.setAttribute("id","tabbyPromo");e.appendChild(n);this.host.appendChild(e);var r=document.querySelector('script[src="https://checkout.tabby.ai/tabby-promo.js"]');if(r){r.remove()}}var s=document.createElement("script");s.setAttribute("src","https://checkout.tabby.ai/tabby-promo.js");document.head.appendChild(s);s.onload=function(){var t=window.TabbyPromo;new t({selector:"#tabbyPromo",currency:a.currency,price:a.price,lang:a.language,publicKey:salla.config.get("store.settings.installments.tabby.publicKey"),merchantCode:salla.config.get("store.settings.installments.tabby.merchantCode")});document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))};this.removeTabbyBorder()}if(this.spotiiIsActive){if(t){var o=this.host.querySelector(".spotii-wrapper");if(o){o.remove()}var l=document.createElement("div");l.classList.add("spotii-wrapper");var p=document.createElement("div");p.classList.add("spotii-promo");l.appendChild(p);this.host.appendChild(l);var m=document.querySelector('script[src="'+salla.url.cdn("js/price-widget-ar-salla.js")+'"]');if(m){m.remove()}}var c=salla.money((Number(this.price)/3).toFixed(2),false);var d=salla.config.get("theme.is_rtl",true);window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],numberOfPayment:3,currency:this.currency,templateLine:"${textOne} ${number} ${textTwo} "+c+"${logo} ${info}",textOne:d?"جزء الدفع على":"Split it into",textTwo:d?"أقساط متساوية بدون تكاليف اضافية بقيمة":"payments of",textThree:"مع",price:this.price};var b=document.createElement("script");b.setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js"));document.head.appendChild(b)}if(this.shouldShowMispay()&&this.mispayActive.publicKey){this.loadExternalScript({position:"head",src:"https://widget.mispay.co/v1/sdk.js?authorize=".concat(this.mispayActive.publicKey)})}};t.prototype.isValidPrice=function(t){var a=/^\d+(\.\d{1,2})?$/;var i=a.test(t);var e=parseFloat(t)>0;return i&&e};t.prototype.loadExternalScript=function(t){var a=t.src,i=t.onLoad,e=t.position;var n=document.createElement("script");n.src=a;n.onload=i;document[e].appendChild(n)};t.prototype.loadTamara=function(t){var a=this;var i=t.isUpdating;var e,n;var r=!!((e=this.tamaraIsActive)===null||e===void 0?void 0:e.publicKey);if(i){setTimeout((function(){var t,a;if(r){return(t=window.TamaraWidgetV2)===null||t===void 0?void 0:t.refresh()}(a=window.TamaraProductWidget)===null||a===void 0?void 0:a.render()}),300)}else{if(r){var s=salla.config.get("user.language_code");var o=["ar","en"].includes(s)?s:"ar";var l=(n=this.currency)===null||n===void 0?void 0:n.slice(0,-1);var p=["SA","AE","KW","BH","OM","QA"].includes(l)?l:null;if(!p){console.error("Tamara: Country code is not supported",l)}else{window.tamaraWidgetConfig={lang:o,country:p,publicKey:this.tamaraIsActive.publicKey,style:{fontSize:"14px"}};this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget-v2/tamara-widget.js"})}}else{this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget/product-widget.min.js",onLoad:function(){window.TamaraProductWidget.init({lang:a.language});setTimeout((function(){window.TamaraProductWidget.render()}),300)}})}}};t.prototype.shouldShowMispay=function(){return this.currency==="SAR"&&this.mispayActive};t.prototype.removeTabbyBorder=function(){var t=this;if(this.tabbyBorderRemoved||this.tabbyRemoveBorderTries>5){return}this.tabbyRemoveBorderTries++;setTimeout((function(){var a=document.querySelector("#tabbyPromo>div>div");a=a&&a.shadowRoot?a.shadowRoot.querySelector('div[class^="styles__tabby-promo-snippet--"]'):null;if(a){a.style="border: none; margin: 15px 0!important;";t.tabbyBorderRemoved=true}else{t.removeTabbyBorder()}}),this.tabbyRemoveBorderTries*500)};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());s.style=r}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-B0xoNOFR.system.js"],(function(t){"use strict";var a,i,e,n;return{setters:[function(t){a=t.r;i=t.h;e=t.H;n=t.g}],execute:function(){var r="salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:-ms-flexbox;display:flex;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";var s=t("salla_installment",function(){function t(t){a(this,t);this.tabbyBorderRemoved=false;this.tabbyRemoveBorderTries=0;this.language=salla.config.get("user.language_code");this.currency=salla.config.get("user.currency_code");this.country=salla.config.get("user.country_code");this.installment_sheria_text=function(t,a){return salla.lang.get(t,a)}}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a;var i=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();return[4,salla.lang.onLoaded()];case 2:e.sent();this.currency=salla.config.get("user.currency_code")||"SAR";this.language=salla.config.get("user.language_code")||"ar";this.country=salla.config.get("user.country_code")||"SA";t=[{key:"pages.products.installments",installments:3},{key:"pages.products.installments_emkan",installments:5}];t.forEach((function(t){i.installment_sheria_text(t.key,{payment:salla.money(parseFloat(i.price)),amount:salla.money((parseFloat(i.price)/t.installments).toFixed(2)).replace(/\.00$/,""),installments:t.installments})}));a=salla.config.get("store.settings.installments");if(a){this.tamaraIsActive=a.tamara;this.tabbyIsActive=a.tabby;this.spotiiIsActive=a.spotii;this.mispayActive=a.mispay;this.emkanIsActive=a.emkan;this.madfuActive=a.madfu;this.rajehiIsActive=a.mokafaa_alrajhi}salla.event.on("product::price.updated",(function(t){var a=t.data;if(!a.price||a.price==i.price){return}i.price=a.price;i.renderInstallments(true)}));return[2]}}))}))};t.prototype.componentDidLoad=function(){this.renderInstallments()};t.prototype.render=function(){var t;var a=this.currency==="SAR";if(!this.isValidPrice(this.price)){return""}return i(e,null,this.tamaraIsActive&&(((t=this.tamaraIsActive)===null||t===void 0?void 0:t.publicKey)?i("div",{class:"mb-5"},i("tamara-widget",{type:"tamara-summary","inline-type":"2",amount:this.price})):i("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"})),this.tabbyIsActive?i("div",{id:"tabbyPromoWrapper"},i("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?i("div",{class:"spotii-wrapper"},i("div",{class:"spotii-promo"})):"",this.shouldShowMispay()&&(this.mispayActive.publicKey?i("div",{class:"mb-5"},i("mispay-widget",{amount:this.price,lang:this.language})):i("div",{class:"s-installment-mispay-wrapper"},i("div",{class:"s-installment-mispay-content"},i("img",{src:salla.url.cdn("images/payment/png/mispay.png"),alt:"mispay"}),i("span",{class:"s-installment-mispay-content-text",innerHTML:this.installment_sheria_text("pages.products.installments",{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/4).toFixed(2)),installments:4})})))),this.emkanIsActive&&this.currency==="SAR"?i("div",{class:"s-installment-emkan-wrapper"},i("div",{class:"s-installment-emkan-content"},i("img",{src:salla.url.cdn("images/payment/png/emkan.png"),alt:"emkan"}),i("span",{class:"s-installment-emkan-content-text",innerHTML:this.installment_sheria_text("pages.products.installments_emkan",{payment:salla.money(parseFloat(this.price)),installments:5})}))):"",this.madfuActive&&this.currency==="SAR"?i("div",{class:"s-installment-madfu-wrapper"},i("div",{class:"s-installment-madfu-content"},i("img",{src:salla.url.cdn("images/payment/png/madfu.png"),alt:"madfu"}),i("span",{class:"s-installment-madfu-content-text"},salla.lang.get("pages.products.installments_madfu")))):"",a&&this.rajehiIsActive?i("div",{class:"s-installment-rajehi-wrapper"},i("div",{class:"s-installment-rajehi-content"},i("img",{src:salla.url.cdn("images/payment/png/mokafaa_alrajhi_loyalty.png"),alt:"mokafaa_alrajhi_loyalty"}),i("span",{class:"s-installment-rajehi-content-text"},salla.lang.get("pages.products.rajahi_earn_points",{points:Math.floor(+this.price*this.rajehiIsActive.pointsPerRiyal)})))):"")};t.prototype.renderInstallments=function(t){var a=this;if(t===void 0){t=false}if(!this.isValidPrice(this.price)){return}if(this.tamaraIsActive){this.loadTamara({isUpdating:t})}if(this.tabbyIsActive){if(t){var i=this.host.querySelector("#tabbyPromoWrapper");if(i){i.remove()}var e=document.createElement("div");e.setAttribute("id","tabbyPromoWrapper");var n=document.createElement("div");n.setAttribute("id","tabbyPromo");e.appendChild(n);this.host.appendChild(e);var r=document.querySelector('script[src="https://checkout.tabby.ai/tabby-promo.js"]');if(r){r.remove()}}var s=document.createElement("script");s.setAttribute("src","https://checkout.tabby.ai/tabby-promo.js");document.head.appendChild(s);s.onload=function(){var t=window.TabbyPromo;new t({selector:"#tabbyPromo",currency:a.currency,price:a.price,lang:a.language,publicKey:salla.config.get("store.settings.installments.tabby.publicKey"),merchantCode:salla.config.get("store.settings.installments.tabby.merchantCode")});document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))};this.removeTabbyBorder()}if(this.spotiiIsActive){if(t){var o=this.host.querySelector(".spotii-wrapper");if(o){o.remove()}var l=document.createElement("div");l.classList.add("spotii-wrapper");var p=document.createElement("div");p.classList.add("spotii-promo");l.appendChild(p);this.host.appendChild(l);var m=document.querySelector('script[src="'+salla.url.cdn("js/price-widget-ar-salla.js")+'"]');if(m){m.remove()}}var c=salla.money((Number(this.price)/3).toFixed(2),false);var d=salla.config.get("theme.is_rtl",true);window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],numberOfPayment:3,currency:this.currency,templateLine:"${textOne} ${number} ${textTwo} "+c+"${logo} ${info}",textOne:d?"جزء الدفع على":"Split it into",textTwo:d?"أقساط متساوية بدون تكاليف اضافية بقيمة":"payments of",textThree:"مع",price:this.price};var b=document.createElement("script");b.setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js"));document.head.appendChild(b)}if(this.shouldShowMispay()&&this.mispayActive.publicKey){this.loadExternalScript({position:"head",src:"https://widget.mispay.co/v1/sdk.js?authorize=".concat(this.mispayActive.publicKey)})}};t.prototype.isValidPrice=function(t){var a=/^\d+(\.\d{1,2})?$/;var i=a.test(t);var e=parseFloat(t)>0;return i&&e};t.prototype.loadExternalScript=function(t){var a=t.src,i=t.onLoad,e=t.position;var n=document.createElement("script");n.src=a;n.onload=i;document[e].appendChild(n)};t.prototype.loadTamara=function(t){var a=this;var i=t.isUpdating;var e,n;var r=!!((e=this.tamaraIsActive)===null||e===void 0?void 0:e.publicKey);if(i){setTimeout((function(){var t,a;if(r){return(t=window.TamaraWidgetV2)===null||t===void 0?void 0:t.refresh()}(a=window.TamaraProductWidget)===null||a===void 0?void 0:a.render()}),300)}else{if(r){var s=salla.config.get("user.language_code");var o=["ar","en"].includes(s)?s:"ar";var l=(n=this.currency)===null||n===void 0?void 0:n.slice(0,-1);var p=["SA","AE","KW","BH","OM","QA"].includes(l)?l:null;if(!p){console.error("Tamara: Country code is not supported",l)}else{window.tamaraWidgetConfig={lang:o,country:p,publicKey:this.tamaraIsActive.publicKey,style:{fontSize:"14px"}};this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget-v2/tamara-widget.js"})}}else{this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget/product-widget.min.js",onLoad:function(){window.TamaraProductWidget.init({lang:a.language});setTimeout((function(){window.TamaraProductWidget.render()}),300)}})}}};t.prototype.shouldShowMispay=function(){return this.currency==="SAR"&&this.mispayActive};t.prototype.removeTabbyBorder=function(){var t=this;if(this.tabbyBorderRemoved||this.tabbyRemoveBorderTries>5){return}this.tabbyRemoveBorderTries++;setTimeout((function(){var a=document.querySelector("#tabbyPromo>div>div");a=a&&a.shadowRoot?a.shadowRoot.querySelector('div[class^="styles__tabby-promo-snippet--"]'):null;if(a){a.style="border: none; margin: 15px 0!important;";t.tabbyBorderRemoved=true}else{t.removeTabbyBorder()}}),this.tabbyRemoveBorderTries*500)};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());s.style=r}}}));
|
|
5
|
+
//# sourceMappingURL=p-ad0fedcd.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t,H as a,g as e}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as s,h as t,H as a,g as e}from"./p-D4D34Ujk.js";const o="";const i=class{constructor(t){s(this,t);this.collapsible=true;this.collapsed=true;this.dir=document.dir||"rtl"}directionChangedHandler(s){this.dir=s.detail.dir}handleCollapse(s){this.collapsed=s.detail.payload.collapsed}setcollapsibleProp(){const s=this.host.querySelector("salla-accordion-head");if(this.collapsible&&s){s.setAttribute("collapsible","true");s.setAttribute("collapsed",this.collapsed.toString())}}componentDidRender(){this.setcollapsibleProp();const s=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());s===null||s===void 0?void 0:s.setAttribute("data-collapsed",this.collapsed.toString())}}render(){return t(a,{key:"30e906d87cba59e197e71460bb24e578455f2d28",class:`s-accordion-wrapper ${this.dir}`,"data-collapsed":this.collapsed.toString()},t("slot",{key:"8c26efc12856022567e5abe587c7537a5776285b"}))}get host(){return e(this)}};i.style=o;export{i as salla_accordion};
|
|
5
|
+
//# sourceMappingURL=p-c0363ba7.entry.js.map
|